Bug 62321
Summary: | issues with large memory allocation/population when using encrypted swap | ||
---|---|---|---|
Product: | Memory Management | Reporter: | Michael Gilbert (mgilbert) |
Component: | Other | Assignee: | Andrew Morton (akpm) |
Status: | NEW --- | ||
Severity: | normal | CC: | alan, ua_bugzilla_linux-kernel |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | <= 3.10.11 | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: | reproducer |
Description
Michael Gilbert
2013-09-29 07:31:57 UTC
I've seen the same behaviour here with several tools which scan and validate a very large bitmap etchmask for correctness. I have recently started seeing freezes on my system that were hard to track down. They always happened while compiling huge packages -- and thus the system became under memory pressure (8 GiB no longer are what they used to be ;P). It took me a while to track this down but every time the system hits the encrypted swap partition, the system either freezes for a _very_ long time or freezes hard (usually the latter). If X is running, there is no escaping -- not even with magic sysrq keys. Everything hangs, even the keyboard. If in a terminal, you can switch between terminals and issue magic sysrq keys but those only print out an echo of the command itself or a help but the command itself is never executed -- except for the boot command. I tested several things: 1. different ciphers and block modes (aes, serpent, twofish, ...) 2. moved the swap from a RAID5 to dedicated partitions 3. experimented with several vm knobs (including but not limited to vm.min_free_kbytes and vm.swappiness) 4. w/ and w/o zswap Nothing made a difference at all. The systems works totally fine if the swap is not encrypted. This is easily reproducible at least on 4.4.x and 4.5.x (x64_64). Right now I am running w/o swap. If there is anything I can do to help track this down, please don't hesitate to let me know. Forgot to add: I also tried w/ a swap file, which made no difference as well. Worth mentioning: I have been using an encrypted swap for ages, the freezes started only "recently" -- unfortunately I cannot put a finger on when exactly that was, which is why I can only say for sure that 4.4.x and 4.5.x are affected thus far. I did some further diagnosing as well as a git bisect and posted all my findings to the linux kernel mailing list, as I figured it would get more attention there: http://marc.info/?l=linux-kernel&m=146099448410071&w=2 Like I said earlier, if there is anything else I can do, please let me know. |