@cheongpeibin Hi Pei Bin, thank you for reporting the issue. I briefly looked at the line. It appeared that the code there is trying to read the current offset, 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!
Originally posted by @pmq20 in pmq20/node-packer#151 (comment)