OpenZFS on Linux 32-bit practically hangs on recv #13241
Labels
Bot: Not Stale
Override for the stale bot
Type: Architecture
Indicates an issue is specific to a single processor architecture
Type: Defect
Incorrect behavior (e.g. crash, hang)
System information
Describe the problem you're observing
When trying to benchmark some things on 32-bit OpenZFS, I discovered that attempting zfs recv of a 1M recordsize dataset on a 32-bit VM very rapidly nearly hung (it makes about 100 MB of progress in a second or two every minute or so), and the callstack looked like:
Which maps to line 1078 here:
zfs/module/os/linux/spl/spl-kmem-cache.c
Lines 1065 to 1082 in c70bb2f
Being a 32-bit VM with the default splith, we get 1 GB of kernel RAM, which ZFS calculates it can use up to 372922368 bytes of (half the 745844736 it calculates allmem to be).
Meanwhile, arcstat reports using 5.6 MB of RAM with a target of 50 and 599M available.
I'm wildly guessing from the lines above that we're requesting 1M of contiguous RAM, finding it hard to come by, and then waiting permanently in the "emergency" allocation path, with the progress being whenever the emergency path timeout deigns to allow progress.
Describe how to reproduce the problem
Include any warning/errors/backtraces from the system logs
As above.
I hacked it up to grossly shorten the timeout on i386 just to make progress, but then it hangs semi-indefinitely on attempting to receive with zstd enabled with a /proc/foo/stack on the recv of:
and complaints about receive_writer blocking forever in dmesg with:
So more work than just that hack job required, I suppose.
The text was updated successfully, but these errors were encountered: