Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delays at startup: btree trans held srcu lock (delaying memory reclaim) for 19 seconds #811

Open
neilg opened this issue Jan 8, 2025 · 0 comments

Comments

@neilg
Copy link

neilg commented Jan 8, 2025

I consistently get slow startups on one of my machines because of repeated occurrences of this problem:

[   94.017691] ------------[ cut here ]------------
[   94.017695] btree trans held srcu lock (delaying memory reclaim) for 19 seconds
[   94.017709] WARNING: CPU: 4 PID: 820 at fs/bcachefs/btree_iter.c:3028 bch2_trans_put+0x244/0x250 [bcachefs]
[   94.017756] Modules linked in: poly1305_generic libpoly1305 poly1305_x86_64 chacha_generic chacha_x86_64 libchacha bcachefs libcrc32c crc32c_generic lz4_compress lz4hc_compress xor raid6_pq sr_mod cdrom usb_storage scsi_mod scsi_common hid_generic usbhid hid xhci_pci nvme thunderbolt xhci_hcd nvme_core crc32c_intel sha256_ssse3 nvme_auth amdgpu video wmi amdxcp i2c_algo_bit drm_ttm_helper ttm drm_exec gpu_sched drm_suballoc_helper drm_buddy drm_display_helper cec crc16 dm_mod dax
[   94.017794] CPU: 4 UID: 0 PID: 820 Comm: perl Tainted: G        W          6.12.8 #1-NixOS
[   94.017797] Tainted: [W]=WARN
[   94.017798] Hardware name: Framework Laptop 16 (AMD Ryzen 7040 Series)/FRANMZCP09, BIOS 03.05 11/13/2024
[   94.017800] RIP: 0010:bch2_trans_put+0x244/0x250 [bcachefs]
[   94.017816] Code: d5 c6 48 c7 c7 18 e3 a2 c1 48 b8 cf f7 53 e3 a5 9b c4 20 48 29 ca 48 c1 ea 03 48 f7 e2 48 89 d6 48 c1 ee 04 e8 dd 02 01 c5 90 <0f> 0b 90 90 eb 9c 90 0f 0b 90 eb a8 90 90 90 90 90 90 90 90 90 90
[   94.017818] RSP: 0018:ffffab8547063a00 EFLAGS: 00010246
[   94.017820] RAX: 0000000000000000 RBX: ffff98048fddad60 RCX: 0000000000000000
[   94.017821] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
[   94.017822] RBP: ffff98030ae94000 R08: 0000000000000000 R09: 0000000000000000
[   94.017823] R10: 0000000000000000 R11: 0000000000000000 R12: ffff98030ae94000
[   94.017824] R13: ffff9803112c0000 R14: ffff9803112c0000 R15: ffff98048fddad60
[   94.017825] FS:  00007f6df4fe6b80(0000) GS:ffff9811dfc00000(0000) knlGS:0000000000000000
[   94.017827] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   94.017828] CR2: 0000000011788078 CR3: 00000001b6f9e000 CR4: 0000000000f50ef0
[   94.017829] PKRU: 55555554
[   94.017830] Call Trace:
[   94.017834]  <TASK>
[   94.017836]  ? bch2_trans_put+0x244/0x250 [bcachefs]
[   94.017850]  ? __warn.cold+0x93/0xf6
[   94.017854]  ? bch2_trans_put+0x244/0x250 [bcachefs]
[   94.017869]  ? report_bug+0x10d/0x150
[   94.017872]  ? srso_alias_return_thunk+0x5/0xfbef5
[   94.017876]  ? handle_bug+0x61/0xb0
[   94.017879]  ? exc_invalid_op+0x17/0x80
[   94.017880]  ? asm_exc_invalid_op+0x1a/0x20
[   94.017885]  ? bch2_trans_put+0x244/0x250 [bcachefs]
[   94.017899]  __bch2_create+0x5c0/0x610 [bcachefs]
[   94.017930]  ? bch2_create+0x2a/0x70 [bcachefs]
[   94.017944]  bch2_create+0x2a/0x70 [bcachefs]
[   94.017958]  path_openat+0x1029/0x12f0
[   94.017964]  do_filp_open+0xc4/0x170
[   94.017969]  do_sys_openat2+0xb4/0xe0
[   94.017972]  __x64_sys_openat+0x55/0xb0
[   94.017974]  do_syscall_64+0xb7/0x210
[   94.017977]  entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   94.017980] RIP: 0033:0x7f6df490ba00
[   94.017983] Code: 83 e2 40 75 65 89 f0 f7 d0 a9 00 00 41 00 74 5a 80 3d 73 26 0f 00 00 74 7e 89 da 48 89 ee bf 9c ff ff ff b8 01 01 00 00 0f 05 <48> 3d 00 f0 ff ff 0f 87 a4 00 00 00 48 8b 54 24 28 64 48 2b 14 25
[   94.017984] RSP: 002b:00007ffd2b6e86c0 EFLAGS: 00000202 ORIG_RAX: 0000000000000101
[   94.017986] RAX: ffffffffffffffda RBX: 0000000000080041 RCX: 00007f6df490ba00
[   94.017987] RDX: 0000000000080041 RSI: 0000000011c8b150 RDI: 00000000ffffff9c
[   94.017988] RBP: 0000000011c8b150 R08: 00007ffd2b6e8940 R09: 00000000ffffffff
[   94.017989] R10: 00000000000001a4 R11: 0000000000000202 R12: 0000000000000000
[   94.017990] R13: 0000000011c8b150 R14: 00000000114b7cc0 R15: 0000000000000000
[   94.017993]  </TASK>
[   94.017994] ---[ end trace 0000000000000000 ]---
@neilg neilg changed the title Errors and delays at startup: btree trans held srcu lock (delaying memory reclaim) for 19 seconds Delays at startup: btree trans held srcu lock (delaying memory reclaim) for 19 seconds Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant