WimLib random crash when compressing @ LZMS:100, solid, 128M chunk with varying thread count

Comments, questions, bug reports, etc.
Post Reply
Vulpix
Posts: 4
Joined: Fri Jan 25, 2019 7:01 am

WimLib random crash when compressing @ LZMS:100, solid, 128M chunk with varying thread count

Post by Vulpix » Fri Jan 25, 2019 8:12 am

Hello! I love wimlib cause I have a bunch of full snapshots of a certain directory and thanks to wimlib's (or well, wim in general) single store mechanism, the archives are very small.

However recently when working on an archive, I stumbled upon an always-reproducible bug - the software keeps crashing. And in some cases when it doesn't crash, it produces a corrupted WIM file (wimverify complains, even 7zip shows some mismatches so the file is definitely corrupted).

How can I help with analysing this?

I have a high end Threadripper system with a lot of ram so I generally compress like this:

wimexport source.wim all target.wim --include-integrity --recompress --solid --solid-compress=LZMS:100 --solid-chunk-size=128M --threads=16

But it crashed on me recently and then again so I went to investigate and I ran a bunch of them at the same time (with different target names of course)

This one worked:
wimexport source.wim all target.wim --include-integrity --recompress --solid --solid-compress=LZMS:100 --solid-chunk-size=128M --threads=16

This one worked too:
wimexport source.wim all target.wim --include-integrity --recompress --solid --solid-compress=LZMS:100 --solid-chunk-size=128M --threads=4

This one crashed
wimexport source.wim all target.wim --include-integrity --recompress --solid --solid-compress=LZMS:100 --solid-chunk-size=128M --threads=8

This one crashed too...
wimexport source.wim all target.wim --include-integrity --recompress --solid --solid-compress=LZMS:100 --solid-chunk-size=128M --threads=1

.... I didn't have any stability issues on my system; I did a memory test and a stress test for a day and didn't notice any issues.

Is there perhaps some flag I can pass to wimlib to generate a dump or something like that to better understand what's happening?

Thanks!

synchronicity
Site Admin
Posts: 287
Joined: Sun Aug 02, 2015 10:31 pm

Re: WimLib random crash when compressing @ LZMS:100, solid, 128M chunk with varying thread count

Post by synchronicity » Sat Feb 09, 2019 10:25 pm

A few questions:

- How much memory does the system have?
- In the --threads=1 case, does it crash all the time or just some of the time? And when it crashes, does it always happen at the same time (same amount of data written so far) or does it happen at different times?
- Does it still reproduce if you change --solid-compress=LZMS:100 to --solid-compress=LZMS:50?
- Does it still reproduce if you change --solid-chunk-size=128M to --solid-chunk-size=64M?

Vulpix
Posts: 4
Joined: Fri Jan 25, 2019 7:01 am

Re: WimLib random crash when compressing @ LZMS:100, solid, 128M chunk with varying thread count

Post by Vulpix » Sat Feb 16, 2019 5:09 pm

Hi!

The system has 128GB of RAM. I'll perform the tests you requested and report back once I have the results.

Vulpix
Posts: 4
Joined: Fri Jan 25, 2019 7:01 am

Re: WimLib random crash when compressing @ LZMS:100, solid, 128M chunk with varying thread count

Post by Vulpix » Sun Feb 17, 2019 2:40 pm

OK, here are the test results:

with: --include-integrity --recompress --solid --solid-compress=LZMS:100 --solid-chunk-size=128M --threads=16
Attempt 1: crash at 6442457292B ~6GB more or less exactly
Attempt 2: crash at 4294973644B ~4GB more or less exactly
Attempt 3: crash at 2147489996B ~2GB more or less exactly
Attempt 4: crash at 6442457292B ~6GB more or less exactly, and exact same number as attempt 1
Attempt 5: crash at 15032391884B ~14GB more or less exactly

with: --include-integrity --recompress --solid --solid-compress=LZMS:50 --solid-chunk-size=128M --threads=16
Attempt 6: crash at 20803754188B , not a multiple of 2GB anymore so something did change

with: --include-integrity --recompress --solid --solid-compress=LZMS:100 --solid-chunk-size=64M --threads=16
Attempt 7: Finished successfully, 205315593909B

synchronicity
Site Admin
Posts: 287
Joined: Sun Aug 02, 2015 10:31 pm

Re: WimLib random crash when compressing @ LZMS:100, solid, 128M chunk with varying thread count

Post by synchronicity » Mon Feb 18, 2019 8:30 pm

FYI I had asked for --threads=1 too. That would reveal whether the problem always occurs at the same place in the data.

Anyway, if it works reliably with --solid-compress=LZMS:100 --solid-chunk-size=64M as indicated by your Attempt 7, that's useful to know too; it suggests the problem is exclusive to --solid-chunk-size=128M. Some code is different for chunk sizes > 64M and not many people use it, so the bug could be in there...

Also just to clarify, is this with the Windows build of wimlib and if so which version? Or is this on Linux?

[Edit: please make sure to also run wimverify after all successful tests to check the resulting file.]

Vulpix
Posts: 4
Joined: Fri Jan 25, 2019 7:01 am

Re: WimLib random crash when compressing @ LZMS:100, solid, 128M chunk with varying thread count

Post by Vulpix » Thu Feb 21, 2019 6:54 am

Hi!

My apologies, I somehow missed that.

I ran tests with --threads=1 as well now, and no; one crashed at 8.5GB, second at 30.5, I didn't run a third.

Also, this is the latest stable build of wimlib for windows x86_64 (v1.13.0), running on latest-build (as of today) windows 10 1703 Pro.

EDIT: I also ran wimverify on the lzms:100 64M file and it came back without issues.

Post Reply