Skip to contentSkip to conversation

x86 32bit kernel (HIGHMEM + PAE) BUGs

DISCUSSION Qu Wenruo 1 participant 1 message Apr 19, 2025

Subsystems (2)
lore
Share & tools
lore

Qu Wenruo

author
#0 lore raw

Hi,

When running btrfs tests with high memory pressure, the 32bit x86 kernel with HIGHMEM and PAE (VM with 6GiB memory) trigger a crash with the following crash:

[ 1578.590032] BTRFS info (device dm-4): checking UUID tree
[ 1593.756090] BUG: unable to handle page fault for address: f7c66430
[ 1593.756769] #PF: supervisor read access in kernel mode
[ 1593.757294] #PF: error_code(0x0000) - not-present page
[ 1593.757763] *pdpt = 0000000012496001 *pde = 000000000112c067 *pte = 0000000000000000
[ 1593.758462] Oops: Oops: 0000 [#1] SMP NOPTI
[ 1593.758845] CPU: 3 UID: 0 PID: 84 Comm: kswapd0 Not tainted 6.15.0-rc2-custom+ #8 PREEMPT(full) f507b09d7d211cc6dbc5158483bab51fd03422b1
[ 1593.760665] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Arch Linux 1.16.3-1-1 04/01/2014
[ 1593.762052] EIP: scomp_acomp_comp_decomp+0xb9/0x3b0
[ 1593.762653] Code: d7 8b 55 d8 c1 ee 0c 81 e7 ff 0f 00 00 8d 34 b6 8d 34 f1 89 d1 81 e2 ff 0f 00 00 8d 54 17 ff c1 e9 0c c1 ea 0c 01 ca 8d 14 92 <8b> 14 d6 c1 ea 1e 83 fa 02 0f 84 08 02 00 00 83 fa 03 0f 84 ef 01
[ 1593.764644] EAX: 00000400 EBX: c22c0240 ECX: 00000001 EDX: 00500000
[ 1593.765395] ESI: f5466430 EDI: 00000000 EBP: c18b3990 ESP: c18b395c
[ 1593.766024] DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068 EFLAGS: 00010216
[ 1593.766696] CR0: 80050033 CR2: f7c66430 CR3: 13705e60 CR4: 000006f0
[ 1593.767271] Call Trace:
[ 1593.767488]  scomp_acomp_compress+0x17/0x50
[ 1593.767860]  acomp_do_req_chain+0xd1/0xf0
[ 1593.768231]  crypto_acomp_compress+0x13/0x20
[ 1593.768639]  zswap_store+0x37b/0x9e0
[ 1593.768988]  swap_writepage+0xf7/0x280
[ 1593.769351]  shmem_writepage+0x35b/0x460
[ 1593.769738]  pageout+0x126/0x260
[ 1593.770050]  shrink_folio_list+0x6a4/0xd40
[ 1593.770439]  ? cgroup_rstat_updated+0xf5/0x1f0
[ 1593.770868]  ? __mod_memcg_lruvec_state+0xaa/0x1e0
[ 1593.771319]  ? __count_memcg_events+0x12d/0x180
[ 1593.771772]  evict_folios+0xd7b/0x1210
[ 1593.772135]  try_to_shrink_lruvec+0x1c0/0x290
[ 1593.772563]  shrink_one+0xec/0x1e0
[ 1593.772888]  shrink_node+0x96d/0xb10
[ 1593.773230]  ? psi_group_change+0x127/0x330
[ 1593.773637]  ? mem_cgroup_exit+0x40/0x60
[ 1593.774020]  balance_pgdat+0x3f0/0x8e0
[ 1593.774326]  ? __switch_to_asm+0x83/0xf0
[ 1593.774688]  ? calibrate_delay+0x410/0x41d
[ 1593.775068]  ? __switch_to_asm+0x41/0xf0
[ 1593.775408]  ? __switch_to_asm+0x3b/0xf0
[ 1593.775799]  ? finish_task_switch.isra.0+0x85/0x2c0
[ 1593.776291]  kswapd+0x199/0x310
[ 1593.776624]  ? prepare_to_wait_exclusive+0xb0/0xb0
[ 1593.777239]  kthread+0x100/0x200
[ 1593.777598]  ? kthreads_online_cpu+0xe0/0xe0
[ 1593.778046]  ? balance_pgdat+0x8e0/0x8e0
[ 1593.778467]  ? kthreads_online_cpu+0xe0/0xe0
[ 1593.778891]  ret_from_fork+0x38/0x60
[ 1593.779241]  ? kthreads_online_cpu+0xe0/0xe0
[ 1593.779652]  ret_from_fork_asm+0x12/0x18
[ 1593.780042]  entry_INT80_32+0xf0/0xf0
[ 1593.780398] Modules linked in: dm_log_writes dm_flakey crc32c_generic btrfs blake2b_generic xor raid6_pq snd_hda_codec_generic snd_hda_intel snd_intel_dspcfg snd_hda_codec snd_hwdep snd_hda_core snd_pcm vfat fat snd_timer snd psmouse pcspkr joydev i2c_piix4 soundcore e1000 mousedev i2c_smbus fuse loop nfnetlink qemu_fw_cfg ip_tables x_tables ext4 crc16 mbcache jbd2 dm_mod ata_generic serio_raw virtio_blk virtio_balloon pata_acpi atkbd libps2 virtio_console virtio_rng vivaldi_fmap sr_mod i8042 virtio_pci floppy ata_piix cdrom virtio_pci_legacy_dev virtio_pci_modern_dev serio intel_agp intel_gtt usbhid
[ 1593.785273] CR2: 00000000f7c66430
[ 1593.785641] ---[ end trace 0000000000000000 ]---
[ 1593.786139] EIP: scomp_acomp_comp_decomp+0xb9/0x3b0
[ 1593.786617] Code: d7 8b 55 d8 c1 ee 0c 81 e7 ff 0f 00 00 8d 34 b6 8d 34 f1 89 d1 81 e2 ff 0f 00 00 8d 54 17 ff c1 e9 0c c1 ea 0c 01 ca 8d 14 92 <8b> 14 d6 c1 ea 1e 83 fa 02 0f 84 08 02 00 00 83 fa 03 0f 84 ef 01
[ 1593.788426] EAX: 00000400 EBX: c22c0240 ECX: 00000001 EDX: 00500000
[ 1593.789056] ESI: f5466430 EDI: 00000000 EBP: c18b3990 ESP: c18b395c
[ 1593.789671] DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068 EFLAGS: 00010216
[ 1593.790319] CR0: 80050033 CR2: f7c66430 CR3: 13705e60 CR4: 000006f0
[ 1593.790922] note: kswapd0[84] exited with irqs disabled

So far I didn't see any btrfs involvement in the call trace, thus I guess it may be something related to MM layer.

Furthermore, to boot the VM with HIGHMEM + PAE, I have applied this patch:

https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=1e07b9fad022e0e02215150ca1e20912e78e8ec1

But that also means I'm not really able to test the HIGHMEM cases.

Thanks,
Qu