Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertion `backup_off == lseek_off' failed. #151

Open
cheongpeibin opened this issue Sep 13, 2020 · 2 comments
Open

Assertion `backup_off == lseek_off' failed. #151

cheongpeibin opened this issue Sep 13, 2020 · 2 comments

Comments

@cheongpeibin
Copy link

Hi guys, I am facing a crash when the binary is run as a binary in Ubuntu.

My workflow is the binary will be placed in a ubuntu:20.10 docker image, and then a supervisord process will run the compiled node-packer binary.

The issue is when there is a lot of usage, the binary will crash with the message:
../deps/libsquash/sample/enclose_io_unix.c:459: enclose_io_pread: Assertion `backup_off == lseek_off' failed.

I have researched the line causing the crash is:

assert(backup_off == lseek_off);

But I don't understand this part of the code and thus unable to perform debugging.

I am using Nodec: 1.5.0 binary (the one pre-built by pmq20)

@pmq20
Copy link
Owner

pmq20 commented Sep 20, 2020

@cheongpeibin Hi Pei Bin, thank you for reporting the issue. I briefly looked at the line. It appeared that the code there was trying to read the current offset value, record it in "backup_off", and then perform the pread. After the pread is performed, the code appears to be resuming the current offset from "backup_off". Apparently a lock / mutex is missing if this code was to run concurrently. This matches your description of "when there is a lot of usage". I'll open an issue in libsquash and find time to fix it. Meanwhile PR are greatly welcome!

@cheongpeibin
Copy link
Author

@pmq20 Hi Minqi, thank you for your response. Appreciate your time looking at this! I'll keep an eye on the update. =D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants