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

Kernel Crashes on Raspberry Pi Zero 2 W #6438

Open
pmessan opened this issue Oct 24, 2024 · 34 comments
Open

Kernel Crashes on Raspberry Pi Zero 2 W #6438

pmessan opened this issue Oct 24, 2024 · 34 comments

Comments

@pmessan
Copy link

pmessan commented Oct 24, 2024

Describe the bug

We have been experiencing kernel crashes on our Zero 2 W devices at seemingly random instances. We are not quite sure what triggers these crashes, but we see them more often (but not always) when we perform system tests stressing the BLE subsystem and the USB gadget subsystem at the same time (HID / CDC output). We have recorded at least 3 crashes on kernel version 6.6.50 and at least one crash on kernel version 6.6.56.

We are using an external wireless chip connected to the Zero 2 W via GPIO, and have confirmed with the chip provider that the crash does not originate from their kernel driver.

Steps to reproduce the behaviour

  1. Connect multiple BLE peripherals to the pi (we had 10)
  2. Initiate BLE transmissions at regular intervals from each peripheral (we had each device sending data at a 1 second interval)
  3. Send data to USB HID stack around same interval
  4. This should run for at least an hour (on the device running the 6.6.56 kernel we saw the crash after ~1h)

Device (s)

Raspberry Pi Zero 2 W

System

$ uname -a
Linux 6.6.56-v7 #1 SMP Fri Oct 11 11:14:35 UTC 2024 armv7l GNU/Linux

$ vcgencmd version
Sep 13 2024 16:00:14 
Copyright (c) 2012 Broadcom
version ddfba3e3c234500025b545512b4b214f28e453e9 (clean) (release) (start_cd)

$ cat /etc/rpi-issue
Raspberry Pi reference 2024-03-15
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 11096428148f0f2be3985ef3126ee71f99c7f1c2, stage2

Logs

From the device running the 6.6.56 kernel:

Oct 15 12:04:14 [alert] kernel: [ 2922.738218] 8<--- cut here ---
Oct 15 12:04:14 [alert] kernel: [ 2922.738255] `Unable to handle kernel NULL pointer dereference at virtual address 00000014 when read
Oct 15 12:04:14 [alert] kernel: [ 2922.738290] [00000014] *pgd=06336835, *pte=00000000, *ppte=00000000
Oct 15 12:04:14 [emerg] kernel: [ 2922.738334] Internal error: Oops: 17 [#1] SMP ARM
Oct 15 12:04:14 [warning] kernel: [ 2922.738357] Modules linked in: xt_recent usb_f_ecm u_ether usb_f_mass_storage usb_f_hid dwc2 roles cmac algif_hash aes_arm_bs crypto_simd cryptd algif_skcipher af_alg btnxpuart bluetooth ecdh_generic ecc crc8 moal(O) mlan(O) cfg80211 xt_hl ip6t_rt rfkill ipt_REJECT nf_reject_ipv4 xt_LOG nf_log_syslog nft_limit xt_limit xt_addrtype xt_tcpudp xt_conntrack nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 nft_compat nf_tables nfnetlink binfmt_misc sc16is7xx regmap_i2c i2c_bcm2835 raspberrypi_hwmon raspberrypi_gpiomem fixed uio_pdrv_genirq uio w5100_spi w5100 libcomposite i2c_dev deflate zstd ubifs ubi ofpart spi_nor mtd spi_bcm2835 drm fuse drm_panel_orientation_quirks backlight ip_tables x_tables ipv6 overlay
Oct 15 12:04:14 [warning] kernel: [ 2922.738787] CPU: 0 PID: 487 Comm: python3 Tainted: G           O       6.6.56-v7 #1
Oct 15 12:04:14 [warning] kernel: [ 2922.738824] Hardware name: BCM2835
Oct 15 12:04:14 [warning] kernel: [ 2922.738841] PC is at memcg_charge_kernel_stack+0xc/0x9c
Oct 15 12:04:14 [warning] kernel: [ 2922.738878] LR is at copy_process+0xcc4/0x1d8c
Oct 15 12:04:14 [warning] kernel: [ 2922.738906] pc : [<80119d90>]    lr : [<8011c444>]    psr: 60000013
Oct 15 12:04:14 [warning] kernel: [ 2922.738921] sp : 9fd5de00  ip : 00000000  fp : 00010000
Oct 15 12:04:14 [warning] kernel: [ 2922.738934] r10: 9a87fe04  r9 : ffffffff  r8 : 9fd5debc
Oct 15 12:04:14 [warning] kernel: [ 2922.738952] r7 : 821ba380  r6 : 00000800  r5 : 003d0f00  r4 : 9a87fe04
Oct 15 12:04:14 [warning] kernel: [ 2922.738970] r3 : 00005526  r2 : 00005525  r1 : 00000000  r0 : 00000000
Oct 15 12:04:14 [warning] kernel: [ 2922.738987] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
Oct 15 12:04:14 [warning] kernel: [ 2922.739007] Control: 10c5383d  Table: 04ee406a  DAC: 00000055
Oct 15 12:04:14 [alert] kernel: [ 2922.739022] Register r0 information: NULL pointer
Oct 15 12:04:14 [alert] kernel: [ 2922.739042] Register r1 information: NULL pointer
Oct 15 12:04:14 [alert] kernel: [ 2922.739058] Register r2 information: non-paged memory
Oct 15 12:04:14 [alert] kernel: [ 2922.739075] Register r3 information: non-paged memory
Oct 15 12:04:14 [alert] kernel: [ 2922.739092] Register r4 information: non-slab/vmalloc memory
Oct 15 12:04:14 [alert] kernel: [ 2922.739110] Register r5 information: non-paged memory
Oct 15 12:04:14 [alert] kernel: [ 2922.739127] Register r6 information: non-paged memory
Oct 15 12:04:14 [alert] kernel: [ 2922.739144] Register r7 information: slab task_struct start 821ba380 pointer offset 0 size 4544
Oct 15 12:04:14 [alert] kernel: [ 2922.739182] Register r8 information: 2-page vmalloc region starting at 0x9fd5c000 allocated at kernel_clone+0xac/0x3a8
Oct 15 12:04:14 [alert] kernel: [ 2922.739217] Register r9 information: non-paged memory
Oct 15 12:04:14 [alert] kernel: [ 2922.739234] Register r10 information: non-slab/vmalloc memory
Oct 15 12:04:14 [alert] kernel: [ 2922.739253] Register r11 information: non-paged memory
Oct 15 12:04:14 [alert] kernel: [ 2922.739269] Register r12 information: NULL pointer
Oct 15 12:04:14 [emerg] kernel: [ 2922.739286] Process python3 (pid: 487, stack limit = 0xee79fc33)
Oct 15 12:04:14 [emerg] kernel: [ 2922.739305] Stack: (0x9fd5de00 to 0x9fd5e000)
Oct 15 12:04:14 [emerg] kernel: [ 2922.739325] de00: 9a87fe04 003d0f00 00000800 8011c444 00000dc2 0000065f 00000000 ffffffff
Oct 15 12:04:14 [emerg] kernel: [ 2922.739349] de20: 8011d654 00000024 9a9c8dc4 003d0f00 840e0000 9fd5df38 00000000 00000000
Oct 15 12:04:14 [emerg] kernel: [ 2922.739373] de40: 00000000 8116b41c 00000000 00000000 00000000 00000000 00000001 8032b324
Oct 15 12:04:14 [emerg] kernel: [ 2922.739397] de60: 9fd5dee4 8601bca8 9a8d9a80 8032b980 00000000 00000000 82231340 00000000
Oct 15 12:04:14 [emerg] kernel: [ 2922.739421] de80: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000255
Oct 15 12:04:14 [emerg] kernel: [ 2922.739445] dea0: 821ba380 6b1e7000 8601bca8 9fd5dfb0 82231340 00000040 8601bca8 00000000
Oct 15 12:04:14 [emerg] kernel: [ 2922.739469] dec0: 00000000 00000000 00000000 08159964 00000000 003d0f00 6b1e8468 9fd5df38
Oct 15 12:04:14 [emerg] kernel: [ 2922.739493] dee0: 6b1e7ef8 00000000 821ba380 00000078 00100000 8011d654 00000a55 00000000
Oct 15 12:04:14 [emerg] kernel: [ 2922.739517] df00: 00000000 00000000 00000000 08159964 8b1e079c 003d0f00 6b1e8468 6b1e8900
Oct 15 12:04:14 [emerg] kernel: [ 2922.739541] df20: 6b1e7ef8 80100298 821ba380 00000078 7eacb938 8011dcf8 003d0f00 00000000
Oct 15 12:04:14 [emerg] kernel: [ 2922.739565] df40: 6b1e8468 6b1e8468 6b1e8468 00000000 00000000 00000000 6b1e7ef8 00000000
Oct 15 12:04:14 [emerg] kernel: [ 2922.739588] df60: 6b1e8900 00000000 00000000 00000000 00000000 00000000 00000000 00000000
Oct 15 12:04:14 [emerg] kernel: [ 2922.739612] df80: 00000000 00000000 00000000 08159964 ffffffff 6b1e8468 7eacb9fc 7eacb936
Oct 15 12:04:14 [emerg] kernel: [ 2922.739636] dfa0: 00000078 80100040 6b1e8468 7eacb9fc 003d0f00 6b1e7ef8 6b1e8468 6b1e8900
Oct 15 12:04:14 [emerg] kernel: [ 2922.739661] dfc0: 6b1e8468 7eacb9fc 7eacb936 00000078 6a9e8000 7eacb937 6a9e8000 7eacb938
Oct 15 12:04:14 [emerg] kernel: [ 2922.739685] dfe0: 003d0f00 7eacb860 76e12da4 76e10a8c 20000010 003d0f00 00000000 00000000
Oct 15 12:04:14 [emerg] kernel: [ 2922.739711]  memcg_charge_kernel_stack from copy_process+0xcc4/0x1d8c
Oct 15 12:04:14 [emerg] kernel: [ 2922.739742]  copy_process from kernel_clone+0xac/0x3a8
Oct 15 12:04:14 [emerg] kernel: [ 2922.739765]  kernel_clone from sys_clone+0x78/0x9c
Oct 15 12:04:14 [emerg] kernel: [ 2922.739788]  sys_clone from ret_fast_syscall+0x0/0x4c
Oct 15 12:04:14 [emerg] kernel: [ 2922.739811] Exception stack(0x9fd5dfa8 to 0x9fd5dff0)
Oct 15 12:04:14 [emerg] kernel: [ 2922.739830] dfa0:                   6b1e8468 7eacb9fc 003d0f00 6b1e7ef8 6b1e8468 6b1e8900
Oct 15 12:04:14 [emerg] kernel: [ 2922.739854] dfc0: 6b1e8468 7eacb9fc 7eacb936 00000078 6a9e8000 7eacb937 6a9e8000 7eacb938
Oct 15 12:04:14 [emerg] kernel: [ 2922.739877] dfe0: 003d0f00 7eacb860 76e12da4 76e10a8c
Oct 15 12:04:14 [emerg] kernel: [ 2922.739896] Code: ea0168e4 e92d4070 e52de004 e28dd004 (e5903014)
Oct 15 12:04:14 [warning] kernel: [ 2922.739943] ---[ end trace 0000000000000000 ]---

From a device running with a 6.6.50 kernel

Oct 11 07:54:04 [alert] kernel: [62993.490295] 8<--- cut here ---
Oct 11 07:54:04 [alert] kernel: [62993.490329] Unable to handle kernel paging request at virtual address 7974744d when read
Oct 11 07:54:04 [alert] kernel: [62993.490349] [7974744d] *pgd=00000000
Oct 11 07:54:04 [emerg] kernel: [62993.490368] Internal error: Oops: 5 [#1] SMP ARM
Oct 11 07:54:04 [warning] kernel: [62993.490385] Modules linked in: xt_recent usb_f_hid dwc2 roles cmac algif_hash aes_arm_bs crypto_simd cryptd algif_skcipher af_alg btnxpuart bluetooth ecdh_generic ecc crc8 moal(O) mlan(O) cfg80211 xt_hl ip6t_rt rfkill ipt_REJECT nf_reject_ipv4 xt_LOG nf_log_syslog nft_limit xt_limit xt_addrtype xt_tcpudp xt_conntrack nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 nft_compat nf_tables nfnetlink binfmt_misc sc16is7xx regmap_i2c raspberrypi_hwmon i2c_bcm2835 raspberrypi_gpiomem uio_pdrv_genirq fixed uio w5100_spi w5100 libcomposite i2c_dev deflate zstd ubifs ubi ofpart spi_nor mtd spi_bcm2835 drm fuse drm_panel_orientation_quirks backlight ip_tables x_tables ipv6 overlay
Oct 11 07:54:04 [warning] kernel: [62993.490690] CPU: 0 PID: 145 Comm: systemd-udevd Tainted: G           O       6.6.50-v7 #1
Oct 11 07:54:04 [warning] kernel: [62993.490711] Hardware name: BCM2835
Oct 11 07:54:04 [warning] kernel: [62993.490721] PC is at __kmem_cache_alloc_node+0xc4/0x4c8
Oct 11 07:54:04 [warning] kernel: [62993.490748] LR is at __kmem_cache_alloc_node+0x44/0x4c8
Oct 11 07:54:04 [warning] kernel: [62993.490765] pc : [<803630c4>]    lr : [<80363044>]    psr: a0000013
Oct 11 07:54:04 [warning] kernel: [62993.490783] sp : 9f93dd10  ip : 0c022d19  fp : 9f93dd10
Oct 11 07:54:04 [warning] kernel: [62993.490799] r10: 00012db9  r9 : 00000036  r8 : 810057bc
Oct 11 07:54:04 [warning] kernel: [62993.490814] r7 : 00000dc0  r6 : 00000000  r5 : 7974742d  r4 : 81401100
Oct 11 07:54:04 [warning] kernel: [62993.490831] r3 : 00000020  r2 : 9ef7c378  r1 : 1dfe4000  r0 : 00012db8
Oct 11 07:54:04 [warning] kernel: [62993.490849] Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
Oct 11 07:54:04 [warning] kernel: [62993.490870] Control: 10c5383d  Table: 0374c06a  DAC: 00000055
Oct 11 07:54:04 [alert] kernel: [62993.490885] Register r0 information: non-paged memory
Oct 11 07:54:04 [alert] kernel: [62993.490905] Register r1 information: non-paged memory
Oct 11 07:54:04 [alert] kernel: [62993.490922] Register r2 information: non-slab/vmalloc memory
Oct 11 07:54:04 [alert] kernel: [62993.490943] Register r3 information: non-paged memory
Oct 11 07:54:04 [alert] kernel: [62993.490960] Register r4 information: slab kmem_cache start 81401100 pointer offset 0 size 124
Oct 11 07:54:04 [alert] kernel: [62993.490999] Register r5 information: non-paged memory
Oct 11 07:54:04 [alert] kernel: [62993.491016] Register r6 information: NULL pointer
Oct 11 07:54:04 [alert] kernel: [62993.491032] Register r7 information: non-paged memory
Oct 11 07:54:04 [alert] kernel: [62993.491049] Register r8 information: non-slab/vmalloc memory
Oct 11 07:54:04 [alert] kernel: [62993.491068] Register r9 information: non-paged memory
Oct 11 07:54:04 [alert] kernel: [62993.491085] Register r10 information: non-paged memory
Oct 11 07:54:04 [alert] kernel: [62993.491102] Register r11 information: 2-page vmalloc region starting at 0x9f93c000 allocated at kernel_clone+0xac/0x3a8
Oct 11 07:54:04 [alert] kernel: [62993.491138] Register r12 information: non-paged memory
Oct 11 07:54:04 [emerg] kernel: [62993.491156] Process systemd-udevd (pid: 145, stack limit = 0x6381dcca)
Oct 11 07:54:04 [emerg] kernel: [62993.491177] Stack: (0x9f93dd10 to 0x9f93e000)
Oct 11 07:54:04 [emerg] kernel: [62993.491194] dd00:                                     00001000 f8ea3954 82e8d0cd 00000000
Oct 11 07:54:04 [emerg] kernel: [62993.491219] dd20: 0eba24e4 ffffffff 83ef0114 00000036 80435d3c 81401100 f8ea3954 00000dc0
Oct 11 07:54:04 [emerg] kernel: [62993.491243] dd40: 9f93dddc 00000000 80b18ff0 8031a1d4 80435d3c f8ea3954 f2db9254 35302d75
Oct 11 07:54:04 [emerg] kernel: [62993.491267] dd60: 6465762d 7569cc34 81a2f030 8270eb40 f8ea3954 82e8d0b0 9f93dddc 00000000
Oct 11 07:54:04 [emerg] kernel: [62993.491292] dd80: 80b18ff0 80435d3c 82e8d0b0 81a2f030 819d6e80 9f93de40 82e8dff8 00000000
Oct 11 07:54:04 [emerg] kernel: [62993.491316] dda0: 00000000 80472880 9f93dddc 819d6e80 82e8d000 00001000 000000b0 00000000
Oct 11 07:54:04 [emerg] kernel: [62993.491340] ddc0: 00000007 9f93ddd4 860f9f00 00000000 00001000 00000000 00000000 82e8d0b8
Oct 11 07:54:04 [emerg] kernel: [62993.491364] dde0: 00000015 00000000 66e99076 87ef8dd2 22edd69e 81a2f030 00000000 860f9f00
Oct 11 07:54:04 [emerg] kernel: [62993.491387] de00: 00000000 00000000 81d1c700 8270eb60 00000000 80473c98 00000000 00000000
Oct 11 07:54:04 [emerg] kernel: [62993.491411] de20: 00000dc0 8036333c 00000000 00000000 00000000 00000000 00000000 00000000
Oct 11 07:54:04 [emerg] kernel: [62993.491435] de40: 7569cc34 f8ea3954 00000004 81f24894 00000000 00000000 00000000 00000000
Oct 11 07:54:04 [emerg] kernel: [62993.491459] de60: 00000000 00000000 00000000 00000000 00000000 87ef8dd2 00000000 9f93df68
Oct 11 07:54:04 [emerg] kernel: [62993.491483] de80: 8270eb40 81a2f030 81a2f030 00000000 860f9f00 81da5c00 81d1c700 80435938
Oct 11 07:54:04 [emerg] kernel: [62993.491507] dea0: 00000000 00000000 0000000f 87ef8dd2 000007ff 40020000 7e9ac658 00000000
Oct 11 07:54:04 [emerg] kernel: [62993.491530] dec0: 00000000 860f9f70 00000001 00000000 00000000 00000000 00000000 00000000
Oct 11 07:54:04 [emerg] kernel: [62993.491554] dee0: 00000000 00000000 00000000 00000000 00000000 87ef8dd2 00000000 40020000
Oct 11 07:54:04 [emerg] kernel: [62993.491578] df00: 860f9f00 9f93df68 81a2f030 80100298 81d1c700 87ef8dd2 81d1c700 00000000
Oct 11 07:54:04 [emerg] kernel: [62993.491602] df20: 860f9f00 9f93df68 81a2f030 81a2f0c0 81d1c700 000000d9 00000000 80393d5c
Oct 11 07:54:04 [emerg] kernel: [62993.491627] df40: 81d1c700 80ae6604 860f9f14 0127b4a8 860f9f02 0127b4a8 00008000 860f9f00
Oct 11 07:54:04 [emerg] kernel: [62993.491651] df60: 80100298 803942b4 80393fc8 00000000 00000000 00000000 0127b4c8 00000000
Oct 11 07:54:04 [emerg] kernel: [62993.491675] df80: 00008000 00000000 81d1c700 87ef8dd2 00000000 0127b4a8 0127b4a8 0127b4c8
Oct 11 07:54:04 [emerg] kernel: [62993.491699] dfa0: 000000d9 80100288 0127b4a8 0127b4a8 0000000f 0127b4c8 00008000 7fffffff
Oct 11 07:54:04 [emerg] kernel: [62993.491723] dfc0: 0127b4a8 0127b4a8 0127b4c8 000000d9 00000000 7e9ac874 0127b4a8 00000000
Oct 11 07:54:04 [emerg] kernel: [62993.491747] dfe0: 0059fbf8 7e9ac688 76d7c048 76d7bf84 80000010 0000000f 00000000 00000000
Oct 11 07:54:04 [emerg] kernel: [62993.491774]  __kmem_cache_alloc_node from __kmalloc+0x4c/0x180
Oct 11 07:54:04 [emerg] kernel: [62993.491806]  __kmalloc from ext4_htree_store_dirent+0x30/0x100
Oct 11 07:54:04 [emerg] kernel: [62993.491839]  ext4_htree_store_dirent from htree_dirblock_to_tree+0x188/0x39c
Oct 11 07:54:04 [emerg] kernel: [62993.491872]  htree_dirblock_to_tree from ext4_htree_fill_tree+0xe0/0x368
Oct 11 07:54:04 [emerg] kernel: [62993.491899]  ext4_htree_fill_tree from ext4_readdir+0x71c/0xad0
Oct 11 07:54:04 [emerg] kernel: [62993.491928]  ext4_readdir from iterate_dir+0x88/0x16c
Oct 11 07:54:04 [emerg] kernel: [62993.491958]  iterate_dir from sys_getdents64+0x6c/0x10c
Oct 11 07:54:04 [emerg] kernel: [62993.491985]  sys_getdents64 from __sys_trace_return+0x0/0x10
Oct 11 07:54:04 [emerg] kernel: [62993.492012] Exception stack(0x9f93dfa8 to 0x9f93dff0)
Oct 11 07:54:04 [emerg] kernel: [62993.492032] dfa0:                   0127b4a8 0127b4a8 0000000f 0127b4c8 00008000 7fffffff
Oct 11 07:54:04 [emerg] kernel: [62993.492056] dfc0: 0127b4a8 0127b4a8 0127b4c8 000000d9 00000000 7e9ac874 0127b4a8 00000000
Oct 11 07:54:04 [emerg] kernel: [62993.492078] dfe0: 0059fbf8 7e9ac688 76d7c048 76d7bf84
Oct 11 07:54:04 [emerg] kernel: [62993.492098] Code: e1a0b00d e58d600c e594301c e280a001 (e7953003) 
Oct 11 07:54:04 [warning] kernel: [62993.492118] ---[ end trace 0000000000000000 ]---

Additional context

No response

@pelwell
Copy link
Contributor

pelwell commented Oct 24, 2024

It's almost certainly experiencing under-voltage. What is the power source, and how are the attached peripherals powered?

@pmessan
Copy link
Author

pmessan commented Oct 24, 2024

In most of the cases, the pi is powered via a micro USB cable connected to the USB port on the pi and a USB 2.0/3.0 port on a laptop.

We had one case where the pi was connected to an AmazonBasics USB cable connected to a USB power adapter with a rating of 5.0 V | 1.2 A | 6W

By attached peripherals I assume you mean the external wireless chip. It is wired to the 1.8V pin of the pi for power.

I have some follow-up questions:

  • How can you tell that this is caused by under-voltage? How can we verify this on our side?
  • How can we prevent under-voltage in the future?

@pelwell
Copy link
Contributor

pelwell commented Oct 24, 2024

a USB power adapter with a rating of 5.0 V | 1.2 A | 6W

1.2A is criminally low.

It is wired to the 1.8V pin of the pi for power.

Which 1.8V pin is that?

How can you tell that this is caused by under-voltage?

Because the failures are in common, non-Pi-specific code, are different every time, and they happen under load. And because I've seen it before.

How can we verify this on our side?

You could try monitoring the supply rails, but you may find that the dips are too short and too localised to detect.

How can we prevent under-voltage in the future?

The limitation is in how much power can be routed through the Z2W's power infrastructure. You may need an external source of 1.8V that is derived directly from the (better) power supply, not via the Z2W.

@pelwell
Copy link
Contributor

pelwell commented Oct 24, 2024

You could try with over_voltage=2 in config.txt as a workaround, but you may find that it makes no difference.

@pmessan
Copy link
Author

pmessan commented Oct 24, 2024

1.2A is criminally low

😅

Which 1.8V pin is that?

Apologies, I got my facts wrong, it seems we are drawing from 5V_USB instead

Because the failures are in common, non-Pi-specific code, are different every time, and they happen under load. And because I've seen it before.

Thanks for the tip, will keep this in mind for future use 😄

You could try with over_voltage=2 in config.txt as a workaround, but you may find that it makes no difference.

Thanks, will try this not expecting too much. Changing our PSUs would be a more impactful start IMO based on this info

@pelwell
Copy link
Contributor

pelwell commented Oct 24, 2024

Good luck.

@pmessan
Copy link
Author

pmessan commented Oct 28, 2024

Hello again,
I have a follow-up question:

  • This is our config.txt. It turns out we have been using over_voltage=2 already. Do you think with all the options we have disabled we could still run into under-voltage due to increased power consumption?

@pelwell
Copy link
Contributor

pelwell commented Oct 28, 2024

With over_voltage=2 you are probably at the limit of what the on-board PMIC can deliver. You can try going to over_voltage=4, etc., but in practice it will be clamped. What does vcgencmd get_config over_voltage_avs report?
If the Pi has a decent power supply (our Micro-USB supply is 2.5A) and most/all peripherals are independently powered (e.g. on a powered hub) then you should be fine.

@pmessan
Copy link
Author

pmessan commented Oct 28, 2024

What does vcgencmd get_config over_voltage_avs report?

$ vcgencmd get_config over_voltage_avs
over_voltage_avs=6250

If the Pi has a decent power supply (our Micro-USB supply is 2.5A) and most/all peripherals are independently powered (e.g. on a powered hub) then you should be fine.

And what if the peripherals are drawing power from the Z2W's on-board circuitry (USB)?

@pelwell
Copy link
Contributor

pelwell commented Oct 28, 2024

And what if the peripherals are drawing power from the Z2W's on-board circuitry (USB)?

I can't quantify how much power is available for external peripherals, a) because I've not done the measurements, and b) because it varies from chip to chip according to the natural variability you get across the silicon wafers, but the short answer is you may not be fine.

@pmessan
Copy link
Author

pmessan commented Oct 30, 2024

Hello,

We've experienced another instance of a crash on kernel 6.6.57.
We have a Z2W (with BLE peripheral as described previously) connected to 5V 3A power supply via 3m micro USB cable from Amazon Basics.

There were 2 BLE devices connected via this peripheral, no active data transmission. There was also a connection to a TCP server established but no data coming in. We're not 100% sure what fraction of the 4 cores were consumed, but the core temperature measure a few minutes before was ~38 deg C.

Logs

Oct 30 09:08:13 [alert] kernel: [ 1220.541326] 8<--- cut here ---
Oct 30 09:08:13 [alert] kernel: [ 1220.541358] Unable to handle kernel NULL pointer dereference at virtual address 00000004 when read
Oct 30 09:08:13 [alert] kernel: [ 1220.541378] [00000004] *pgd=00000000
Oct 30 09:08:13 [emerg] kernel: [ 1220.541398] Internal error: Oops: 5 [#1] SMP ARM
Oct 30 09:08:13 [warning] kernel: [ 1220.541413] Modules linked in: xt_recent dwc2 roles cmac algif_hash aes_arm_bs crypto_simd cryptd algif_skcipher af_alg btnxpuart bluetooth ecdh_generic ecc crc8 moal(O) mlan(O) cfg80211 xt_hl rfkill ip6t_rt ipt_REJECT nf_reject_ipv4 xt_LOG nf_log_syslog nft_limit xt_limit xt_addrtype xt_tcpudp xt_conntrack nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 nft_compat nf_tables nfnetlink binfmt_misc sc16is7xx regmap_i2c raspberrypi_hwmon i2c_bcm2835 raspberrypi_gpiomem fixed uio_pdrv_genirq uio w5100_spi w5100 libcomposite i2c_dev deflate zstd ubifs ubi ofpart spi_nor drm mtd spi_bcm2835 fuse drm_panel_orientation_quirks backlight ip_tables x_tables ipv6 overlay
Oct 30 09:08:13 [warning] kernel: [ 1220.541716] CPU: 0 PID: 150 Comm: systemd-udevd Tainted: G           O       6.6.57-v7 #1
Oct 30 09:08:13 [warning] kernel: [ 1220.541736] Hardware name: BCM2835
Oct 30 09:08:13 [warning] kernel: [ 1220.541747] PC is at rb_insert_color+0x1c/0x170
Oct 30 09:08:13 [warning] kernel: [ 1220.541783] LR is at ext4_htree_store_dirent+0xd4/0x100
Oct 30 09:08:13 [warning] kernel: [ 1220.541810] pc : [<80ace89c>]    lr : [<80438fe8>]    psr: 60000013
Oct 30 09:08:13 [warning] kernel: [ 1220.541827] sp : 9f981d84  ip : 00000000  fp : 80b19170
Oct 30 09:08:13 [warning] kernel: [ 1220.541843] r10: 00000000  r9 : 9f981ddc  r8 : 8308d080
Oct 30 09:08:13 [warning] kernel: [ 1220.541858] r7 : 5925aa36  r6 : 84e3fe00  r5 : 84e3f700  r4 : 3c8f6260
Oct 30 09:08:13 [warning] kernel: [ 1220.541876] r3 : 84e3fd08  r2 : 00000000  r1 : 84e3fe00  r0 : 84e3f708
Oct 30 09:08:13 [warning] kernel: [ 1220.541894] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
Oct 30 09:08:13 [warning] kernel: [ 1220.541914] Control: 10c5383d  Table: 037fc06a  DAC: 00000055
Oct 30 09:08:13 [alert] kernel: [ 1220.541929] Register r0 information: slab kmalloc-64 start 84e3f700 pointer offset 8 size 64
Oct 30 09:08:13 [alert] kernel: [ 1220.541972] Register r1 information: slab kmalloc-64 start 84e3fe00 pointer offset 0 size 64
Oct 30 09:08:13 [alert] kernel: [ 1220.542008] Register r2 information: NULL pointer
Oct 30 09:08:13 [alert] kernel: [ 1220.542027] Register r3 information: slab kmalloc-64 start 84e3fd00 pointer offset 8 size 64
Oct 30 09:08:13 [alert] kernel: [ 1220.542063] Register r4 information: non-paged memory
Oct 30 09:08:13 [alert] kernel: [ 1220.542080] Register r5 information: slab kmalloc-64 start 84e3f700 pointer offset 0 size 64
Oct 30 09:08:13 [alert] kernel: [ 1220.542115] Register r6 information: slab kmalloc-64 start 84e3fe00 pointer offset 0 size 64
Oct 30 09:08:13 [alert] kernel: [ 1220.542150] Register r7 information: non-paged memory
Oct 30 09:08:13 [alert] kernel: [ 1220.542167] Register r8 information: non-slab/vmalloc memory
Oct 30 09:08:13 [alert] kernel: [ 1220.542187] Register r9 information: 2-page vmalloc region starting at 0x9f980000 allocated at kernel_clone+0xac/0x3a8
Oct 30 09:08:13 [alert] kernel: [ 1220.542225] Register r10 information: NULL pointer
Oct 30 09:08:13 [alert] kernel: [ 1220.542242] Register r11 information: non-slab/vmalloc memory
Oct 30 09:08:13 [alert] kernel: [ 1220.542261] Register r12 information: NULL pointer
Oct 30 09:08:13 [emerg] kernel: [ 1220.542277] Process systemd-udevd (pid: 150, stack limit = 0xec1a5737)
Oct 30 09:08:13 [emerg] kernel: [ 1220.542298] Stack: (0x9f981d84 to 0x9f982000)
Oct 30 09:08:13 [emerg] kernel: [ 1220.542317] 1d80:          80438fe8 8308d080 81be10a0 81aef640 9f981e40 8308dff8 00000000
Oct 30 09:08:13 [emerg] kernel: [ 1220.542342] 1da0: 00000000 80475b0c 9f981ddc 81aef640 8308d000 00001000 00000080 00000000
Oct 30 09:08:13 [emerg] kernel: [ 1220.542366] 1dc0: 00000006 9f981dd4 82723a80 00000000 00001000 00000000 00000000 8308d088
Oct 30 09:08:13 [emerg] kernel: [ 1220.542390] 1de0: 0000000d 00000000 6718e9cb f05487c7 32c85657 81be10a0 00000000 82723a80
Oct 30 09:08:13 [emerg] kernel: [ 1220.542414] 1e00: 00000000 00000000 824811c0 84e3fe20 00000000 80476f54 00000000 00000000
Oct 30 09:08:13 [emerg] kernel: [ 1220.542438] 1e20: 00000dc0 80363a5c 00000000 00000000 00000000 000081d6 00000000 00000000
Oct 30 09:08:13 [emerg] kernel: [ 1220.542462] 1e40: 3c8f6260 5925aa36 00000004 81ff4894 00000000 00000000 00000000 00000000
Oct 30 09:08:13 [emerg] kernel: [ 1220.542485] 1e60: 00000000 00000000 00000000 00000000 00000000 f05487c7 00000000 9f981f68
Oct 30 09:08:13 [emerg] kernel: [ 1220.542509] 1e80: 81be10a0 84e3fe00 81be10a0 00000000 82723a80 81d65c00 824811c0 80438b9c
Oct 30 09:08:13 [emerg] kernel: [ 1220.542533] 1ea0: 00000000 00000000 0000000f f05487c7 000007ff 40020000 7ecde658 00000000
Oct 30 09:08:13 [emerg] kernel: [ 1220.542556] 1ec0: 00000000 82723af0 00000001 00000000 00000000 00000000 00000000 00000000
Oct 30 09:08:13 [emerg] kernel: [ 1220.542580] 1ee0: 00000000 00000000 00000000 00000000 00000000 f05487c7 00000000 40020000
Oct 30 09:08:13 [emerg] kernel: [ 1220.542604] 1f00: 82723a80 9f981f68 81be10a0 80100298 824811c0 f05487c7 824811c0 00000000
Oct 30 09:08:13 [emerg] kernel: [ 1220.542628] 1f20: 82723a80 9f981f68 81be10a0 81be1130 824811c0 000000d9 00000000 80396da0
Oct 30 09:08:13 [emerg] kernel: [ 1220.542652] 1f40: 824811c0 80aea768 82723a94 00f23e50 82723a82 00f23e50 00008000 82723a80
Oct 30 09:08:13 [emerg] kernel: [ 1220.542676] 1f60: 80100298 803972f8 8039700c 00000000 00000000 00000000 00f23e70 00000000
Oct 30 09:08:13 [emerg] kernel: [ 1220.542700] 1f80: 00008000 00000000 824811c0 f05487c7 00000000 00f23e50 00f23e50 00f23e70
Oct 30 09:08:13 [emerg] kernel: [ 1220.542724] 1fa0: 000000d9 80100288 00f23e50 00f23e50 0000000f 00f23e70 00008000 7fffffff
Oct 30 09:08:13 [emerg] kernel: [ 1220.542748] 1fc0: 00f23e50 00f23e50 00f23e70 000000d9 00000000 7ecde874 00f23e50 00000000
Oct 30 09:08:13 [emerg] kernel: [ 1220.542772] 1fe0: 00545bf8 7ecde688 76d9c048 76d9bf84 80000010 0000000f 00000000 00000000
Oct 30 09:08:13 [emerg] kernel: [ 1220.542796]  rb_insert_color from ext4_htree_store_dirent+0xd4/0x100
Oct 30 09:08:13 [emerg] kernel: [ 1220.542835]  ext4_htree_store_dirent from htree_dirblock_to_tree+0x188/0x39c
Oct 30 09:08:13 [emerg] kernel: [ 1220.542870]  htree_dirblock_to_tree from ext4_htree_fill_tree+0xe0/0x368
Oct 30 09:08:13 [emerg] kernel: [ 1220.542899]  ext4_htree_fill_tree from ext4_readdir+0x788/0xae0
Oct 30 09:08:13 [emerg] kernel: [ 1220.542930]  ext4_readdir from iterate_dir+0x88/0x16c
Oct 30 09:08:13 [emerg] kernel: [ 1220.542962]  iterate_dir from sys_getdents64+0x6c/0x10c
Oct 30 09:08:13 [emerg] kernel: [ 1220.542991]  sys_getdents64 from __sys_trace_return+0x0/0x10
Oct 30 09:08:13 [emerg] kernel: [ 1220.543018] Exception stack(0x9f981fa8 to 0x9f981ff0)
Oct 30 09:08:13 [emerg] kernel: [ 1220.543037] 1fa0:                   00f23e50 00f23e50 0000000f 00f23e70 00008000 7fffffff
Oct 30 09:08:13 [emerg] kernel: [ 1220.543061] 1fc0: 00f23e50 00f23e50 00f23e70 000000d9 00000000 7ecde874 00f23e50 00000000
Oct 30 09:08:13 [emerg] kernel: [ 1220.543083] 1fe0: 00545bf8 7ecde688 76d9c048 76d9bf84
Oct 30 09:08:13 [emerg] kernel: [ 1220.543103] Code: e5932000 e3120001 112fff1e e52de004 (e592c004) 
Oct 30 09:08:13 [warning] kernel: [ 1220.543147] ---[ end trace 0000000000000000 ]---

Could this still be caused by undervoltage?

@pelwell
Copy link
Contributor

pelwell commented Oct 30, 2024

Yes - this crash is in ext4 filesystem code which is very well tested and unrelated to the test you are doing. I bet if you repeat the same test and get another crash that it will be somewhere else (although there may be "hot spots" because of the way the code is structured).

@pmessan
Copy link
Author

pmessan commented Oct 30, 2024

We have a Z2W (with BLE peripheral as described previously) connected to 5V 3A power supply via 3m micro USB cable from Amazon Basics.

Point of correction, I just got confirmation that the test was done with a 1m USB cable.

If this is the case, how can under-voltage be occurring in this scenario?

@pelwell
Copy link
Contributor

pelwell commented Oct 30, 2024

I'm not a hardware engineer, so there may be some small inaccuracies in what I say, but the basic idea is correct.

The job of the PMIC is to keep the voltage rails at constant levels by pumping charge/adjusting the current when it sees the voltage start to drift. When there is a sudden change in current demand it takes a while for the PMIC to notice and increase the current. If the sudden change is large the PMIC may not be able to keep up with demand, and the voltage drops.

However, it can be worse than that if 1) there isn't enough current available from the supply, or 2) the amount of current that the PMIC can control is limited. It sounds as if 1) may not be the case now, but you do need to take account of voltage drop in the cable - particularly if the cable is not permanently attached. Our power supplies are pre-compensated - they run at 5.1V (say) so that after the loss in the cable 5V is delivered to the Pi. But even if 1) isn't happening, 2) can still be a limiting factor, particularly if you have unpowered peripherals drawing more current.

@adam-mujaj
Copy link

Hi Phil,
Since hardware issues are being considered I want to jump in on the conversation. I'm Adam, and the electrical engineering manager.
One other aspect that I see is the 3.3V power rail. We are using this to power some other components in the system. However, I cannot see a specification for what current is available on ths for external components. Note that in our application the onboard Wi-Fi chipset is disabled. Is there a specficiation for the available current on this for external components?

@pelwell
Copy link
Contributor

pelwell commented Oct 31, 2024

I've not seen that kind of information - have you tried our Industrial Applications support (https://www.raspberrypi.com/contact/#get-in-touch)? - but if I were in your position and had heard the kind of things I had told you I would lash up an external 3.3V supply to power the other devices to see if it solves the instability.

@adam-mujaj
Copy link

I will reach out to them to ask. And yes I was already thinking we should try applying a separate 3.3V source. The challenge is that this is not happening consistently. In fact, as far as I am aware only this one customer is seeing the crashes. The other customers have the devices working fine, including with the 1.2A supply.

@pelwell
Copy link
Contributor

pelwell commented Oct 31, 2024

How many units does this one customer have? There is variation, with "fast" parts requiring more current.

@JamesH65
Copy link
Contributor

JamesH65 commented Nov 1, 2024

If it's just one customer and all other things being equal, is there a chance this could be an EMC problem? Does the problematic customer have any heavy machinery starting up in the vicinity that might be spiking things?

@adam-mujaj
Copy link

That's also something we have considered, but it seems unlikley to me. The facility is a large open warehouse. The only machinery is the roller doors for truck loading/unloading. It does not appear to use forklifts or anything like that even.

This customer has four devices, all exhibiting the behaviour.

@pmessan
Copy link
Author

pmessan commented Nov 4, 2024

Just got confirmation from the customer: "no large electricity consumers or other machines are used in the building, so I would rule that out." (Translated from German).

@toni-proglove
Copy link

Hello,
During investigation, there is a suspicion that something might be wrong at the mmc layer.

image

As you can see, there are a lot of cmd53 write,read errors. As mentioned in the first post our external WiFi chip is connected to the GPIO lines (SDIO bus). Do you think it might be related to our crashing issue ?

I have also tried to enable CONFIG_MMC_DEBUG in the kernel and set loglevel=7 but seems like I have missed something. Any advice in debugging would be helpful.

@pelwell
Copy link
Contributor

pelwell commented Nov 25, 2024

110 is ETIMEDOUT, which means that the wireless chip did not respond in a timely fashion - but at an SDIO level, it's not just that the firmware didn't come up with an answer in time. This is more circumstantial evidence for a hardware problem, and that includes power problems.

@toni-proglove
Copy link

Thanks for the quick response. Any advice on debugging the SDIO or MMC layer ? I am asking, because I would like to take some parts out of the equation.
As power_problems were mentioned, what is your opinion on setting over_voltage to 3 or 4? Would that help ?

@pelwell
Copy link
Contributor

pelwell commented Nov 25, 2024

If the error is no response, I doubt that any kernel logging is going to tell you any more. How is the WiFi chip powered?

what is your opinion on setting over_voltage to 3 or 4? Would that help ?

That depends on the exact silicon composition of the Zero 2 W(s) in question. If vcgencmd measure_volts is already 1.4V then there's no headroom, but the chances are there is still room to go up. Maxing out the voltage is not going to damage the Pi, but running for extend periods at an unnessarily high voltage could potentially shorten it's life.

@toni-proglove
Copy link

The output of vcgencmd measure_volts is volt=1.3563V
As for the WiFi chip, it is connected to RPi 3V3 rail.

@pelwell
Copy link
Contributor

pelwell commented Nov 25, 2024

Have you disabled the onboard WiFi chip? If not,

dtoverlay=disable-wifi
dtoverlay=disable-bt

should save some power.

@toni-proglove
Copy link

Yes, both are disabled.

@pelwell
Copy link
Contributor

pelwell commented Nov 25, 2024

In that case you may have to look at providing a separate 3.3V rail, if adding a view voltage steps doesn't help.

@toni-proglove
Copy link

I did an experiment, by adding an artificial load parallel to the 3V3 rail.
Before connecting the HAT to pi zero 2w: 3.277V
After adding the HAT to pi zero 2w: 3.276V
After adding the additional load in form of a 2R resistor: 3.258V

The rPI continued with it's normal operation.

As you can see the HAT is not loading the 3V3 rail that much.
If I increase the load switch from 2R to 1R, the voltage drop is big. The 3V3 rail falls to around 2.7 or 2.5V and then the rPI reboots, which is expected as most likely the brown out reset kicks in.

@pelwell
Copy link
Contributor

pelwell commented Nov 27, 2024

That won't show you the response to sudden changes in load, which can be worse.

@toni-proglove
Copy link

Could you provide with some hint on debugging the sdhci or mmc ? Simple enabling the CONFIG_MMC_DEBUG and setting loglevel to 7 does not work.

@pelwell
Copy link
Contributor

pelwell commented Nov 29, 2024

# To enable mmc tracing
$ echo 1 | sudo tee /sys/kernel/debug/tracing/events/mmc/enable
# Do something, then view the output with:
$ sudo cat /sys/kernel/debug/tracing/trace
# To clear the current trace
$ echo -n | sudo tee /sys/kernel/debug/tracing/trace
# To disable tracing
$ echo 0 | sudo tee /sys/kernel/debug/tracing/events/mmc/enable

@pmessan
Copy link
Author

pmessan commented Dec 13, 2024

Hi,

Since our last update we have tried a setup where we power the wireless module with an external regulator connected to 3.3 V on the module and powered by the the 5V rail on the Z2W. The external regulator has a maximum output of 1A. The wireless module has a core which receives an input of 1.8V and is sourced from the 5V rail of the Z2W. The Z2W itself was powered by a micro USB cable connected to a USB hub with a max output of 2A. The Z2W was under load, receiving BLE data and transmitting data over wifi 5GHz.

Crash logs:

Dec 12 18:22:27 [alert] kernel: [17784.062964] Unable to handle kernel NULL pointer dereference at virtual address 00000014 when read
Dec 12 18:22:27 [alert] kernel: [17784.062984] [00000014] *pgd=06194835, *pte=00000000, *ppte=00000000
Dec 12 18:22:27 [emerg] kernel: [17784.063014] Internal error: Oops: 17 [#1] SMP ARM
Dec 12 18:22:27 [warning] kernel: [17784.063030] Modules linked in: xt_recent usb_f_ecm u_ether usb_f_mass_storage usb_f_acm u_serial dwc2 roles cmac algif_hash aes_arm_bs crypto_simd cryptd algif_skcipher af_alg btnxpuart bluetooth ecdh_generic ecc crc8 moal(O) mlan(O) xt_hl cfg80211 ip6t_rt rfkill ipt_REJECT nf_reject_ipv4 xt_LOG nf_log_syslog nft_limit xt_limit xt_addrtype xt_tcpudp xt_conntrack nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 nft_compat nf_tables nfnetlink binfmt_misc sc16is7xx regmap_i2c raspberrypi_hwmon i2c_bcm2835 raspberrypi_gpiomem fixed uio_pdrv_genirq uio w5100_spi w5100 libcomposite i2c_dev deflate zstd ubifs ubi ofpart spi_nor drm mtd spi_bcm2835 fuse drm_panel_orientation_quirks backlight ip_tables x_tables ipv6 overlay
Dec 12 18:22:27 [warning] kernel: [17784.063359] CPU: 3 PID: 516 Comm: python3 Tainted: G           O       6.6.57-v7 #1
Dec 12 18:22:27 [warning] kernel: [17784.063379] Hardware name: BCM2835
Dec 12 18:22:27 [warning] kernel: [17784.063390] PC is at memcg_charge_kernel_stack+0xc/0x9c
Dec 12 18:22:27 [warning] kernel: [17784.063421] LR is at copy_process+0xcc4/0x1d8c
Dec 12 18:22:27 [warning] kernel: [17784.063437] pc : [<80119e10>]    lr : [<8011c4c4>]    psr: 60000013
Dec 12 18:22:27 [warning] kernel: [17784.063455] sp : 9fd1de00  ip : 00000000  fp : 00000000
Dec 12 18:22:27 [warning] kernel: [17784.063470] r10: 9a9342f0  r9 : ffffffff  r8 : 9fd1debc
Dec 12 18:22:27 [warning] kernel: [17784.063485] r7 : 8246ea80  r6 : 00000000  r5 : 00000000  r4 : 9a9342f0
Dec 12 18:22:27 [warning] kernel: [17784.063502] r3 : 00007d52  r2 : 00007d51  r1 : 00000000  r0 : 00000000
Dec 12 18:22:27 [warning] kernel: [17784.063520] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
Dec 12 18:22:27 [warning] kernel: [17784.063539] Control: 10c5383d  Table: 0607c06a  DAC: 00000055
Dec 12 18:22:27 [alert] kernel: [17784.063554] Register r0 information: NULL pointer
Dec 12 18:22:27 [alert] kernel: [17784.063574] Register r1 information: NULL pointer
Dec 12 18:22:27 [alert] kernel: [17784.063591] Register r2 information: non-paged memory
Dec 12 18:22:27 [alert] kernel: [17784.063608] Register r3 information: non-paged memory
Dec 12 18:22:27 [alert] kernel: [17784.063625] Register r4 information: non-slab/vmalloc memory
Dec 12 18:22:27 [alert] kernel: [17784.063644] Register r5 information: NULL pointer
Dec 12 18:22:27 [alert] kernel: [17784.063661] Register r6 information: NULL pointer
Dec 12 18:22:27 [alert] kernel: [17784.063677] Register r7 information: slab task_struct start 8246ea80 pointer offset 0 size 4544
Dec 12 18:22:27 [alert] kernel: [17784.063716] Register r8 information: 2-page vmalloc region starting at 0x9fd1c000 allocated at kernel_clone+0xac/0x3a8
Dec 12 18:22:27 [alert] kernel: [17784.063751] Register r9 information: non-paged memory
Dec 12 18:22:27 [alert] kernel: [17784.063768] Register r10 information: non-slab/vmalloc memory
Dec 12 18:22:27 [alert] kernel: [17784.063786] Register r11 information: NULL pointer
Dec 12 18:22:27 [alert] kernel: [17784.063803] Register r12 information: NULL pointer
Dec 12 18:22:27 [emerg] kernel: [17784.063819] Process python3 (pid: 516, stack limit = 0xb9f2524a)
Dec 12 18:22:27 [emerg] kernel: [17784.063839] Stack: (0x9fd1de00 to 0x9fd1e000)
Dec 12 18:22:27 [emerg] kernel: [17784.063858] de00: 9a9342f0 00000000 00000000 8011c4c4 00000dc2 0000065f 00000000 ffffffff
Dec 12 18:22:27 [emerg] kernel: [17784.063883] de20: 8011d6d4 00000000 810057bc 01200000 844a4700 9fd1df38 00000000 00000000
Dec 12 18:22:27 [emerg] kernel: [17784.063907] de40: 00000000 8116b41c 00000000 00000000 00000000 00000000 00000001 00000000
Dec 12 18:22:27 [emerg] kernel: [17784.063930] de60: 9fd1dee4 861185e8 9a8cec20 8032bad8 00000000 810057bc 00000001 9fd1df40
Dec 12 18:22:27 [emerg] kernel: [17784.063955] de80: 810057bc 80361880 9efb2548 000000c0 00000088 8036093c 00400dc0 00000255
Dec 12 18:22:27 [emerg] kernel: [17784.063979] dea0: 8246ea80 767bd000 861185e8 9fd1dfb0 8218f440 00000040 861185e8 00000000
Dec 12 18:22:27 [emerg] kernel: [17784.064002] dec0: 00000000 00000000 84628c38 49a33e3d 00000000 01200000 00000000 9fd1df38
Dec 12 18:22:27 [emerg] kernel: [17784.064026] dee0: 00000000 00000000 8246ea80 00000078 00000000 8011d6d4 00000a55 00000000
Dec 12 18:22:27 [emerg] kernel: [17784.064050] df00: 00000000 00000000 00000000 49a33e3d 838cb6f4 01200000 00000000 00000000
Dec 12 18:22:27 [emerg] kernel: [17784.064074] df20: 00000000 80100298 8246ea80 00000078 00000000 8011dd78 01200000 00000000
Dec 12 18:22:27 [emerg] kernel: [17784.064097] df40: 00000000 76f193a8 00000000 00000000 00000011 00000000 00000000 00000000
Dec 12 18:22:27 [emerg] kernel: [17784.064121] df60: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
Dec 12 18:22:27 [emerg] kernel: [17784.064144] df80: 00000000 00000000 00000037 49a33e3d 00000015 76f193a8 00000000 00000000
Dec 12 18:22:27 [emerg] kernel: [17784.064168] dfa0: 00000078 80100040 76f193a8 00000000 01200011 00000000 00000000 00000000
Dec 12 18:22:27 [emerg] kernel: [17784.064192] dfc0: 76f193a8 00000000 00000000 00000078 00000000 7ea121b0 00000000 00000000
Dec 12 18:22:27 [emerg] kernel: [17784.064216] dfe0: 76f19840 7ea12194 76f19340 76d882fc 60000010 01200011 00000000 00000000
Dec 12 18:22:27 [emerg] kernel: [17784.064240]  memcg_charge_kernel_stack from copy_process+0xcc4/0x1d8c
Dec 12 18:22:27 [emerg] kernel: [17784.064272]  copy_process from kernel_clone+0xac/0x3a8
Dec 12 18:22:27 [emerg] kernel: [17784.064295]  kernel_clone from sys_clone+0x78/0x9c
Dec 12 18:22:27 [emerg] kernel: [17784.064317]  sys_clone from ret_fast_syscall+0x0/0x4c
Dec 12 18:22:27 [emerg] kernel: [17784.064339] Exception stack(0x9fd1dfa8 to 0x9fd1dff0)
Dec 12 18:22:27 [emerg] kernel: [17784.064358] dfa0:                   76f193a8 00000000 01200011 00000000 00000000 00000000
Dec 12 18:22:27 [emerg] kernel: [17784.064381] dfc0: 76f193a8 00000000 00000000 00000078 00000000 7ea121b0 00000000 00000000
Dec 12 18:22:27 [emerg] kernel: [17784.064403] dfe0: 76f19840 7ea12194 76f19340 76d882fc
Dec 12 18:22:27 [emerg] kernel: [17784.064423] Code: ea0168e6 e92d4070 e52de004 e28dd004 (e5903014) 
Dec 12 18:22:27 [warning] kernel: [17784.064441] ---[ end trace 0000000000000000 ]---
Dec 13 00:23:25 [alert] kernel: [39441.988019] 8<--- cut here ---
Dec 13 00:23:25 [alert] kernel: [39441.988056] Unable to handle kernel paging request at virtual address 607395dd when write
Dec 13 00:23:25 [alert] kernel: [39441.988080] [607395dd] *pgd=00000000
Dec 13 00:23:25 [emerg] kernel: [39441.988102] Internal error: Oops: 805 [#2] SMP ARM
Dec 13 00:23:25 [warning] kernel: [39441.988119] Modules linked in: xt_recent usb_f_ecm u_ether usb_f_mass_storage usb_f_acm u_serial dwc2 roles cmac algif_hash aes_arm_bs crypto_simd cryptd algif_skcipher af_alg btnxpuart bluetooth ecdh_generic ecc crc8 moal(O) mlan(O) xt_hl cfg80211 ip6t_rt rfkill ipt_REJECT nf_reject_ipv4 xt_LOG nf_log_syslog nft_limit xt_limit xt_addrtype xt_tcpudp xt_conntrack nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 nft_compat nf_tables nfnetlink binfmt_misc sc16is7xx regmap_i2c raspberrypi_hwmon i2c_bcm2835 raspberrypi_gpiomem fixed uio_pdrv_genirq uio w5100_spi w5100 libcomposite i2c_dev deflate zstd ubifs ubi ofpart spi_nor drm mtd spi_bcm2835 fuse drm_panel_orientation_quirks backlight ip_tables x_tables ipv6 overlay
Dec 13 00:23:25 [warning] kernel: [39441.988462] CPU: 2 PID: 32760 Comm: kworker/u13:0 Tainted: G      D    O       6.6.57-v7 #1
Dec 13 00:23:25 [warning] kernel: [39441.988487] Hardware name: BCM2835
Dec 13 00:23:25 [warning] kernel: [39441.988500] Workqueue: hci0 hci_cmd_sync_work [bluetooth]
Dec 13 00:23:25 [warning] kernel: [39441.988703] PC is at hci_cmd_sync_work+0x3c/0xbc [bluetooth]
Dec 13 00:23:25 [warning] kernel: [39441.988884] LR is at __cond_resched+0x24/0x54
Dec 13 00:23:25 [warning] kernel: [39441.988907] pc : [<7f6198ac>]    lr : [<80aea768>]    psr: a0000013
Dec 13 00:23:25 [warning] kernel: [39441.988924] sp : 9f8b5f08  ip : 00000000  fp : 00000100
Dec 13 00:23:25 [warning] kernel: [39441.988939] r10: 00000122  r9 : 82164000  r8 : 8216440c
Dec 13 00:23:25 [warning] kernel: [39441.988954] r7 : 821645d0  r6 : 821643fc  r5 : 82164414  r4 : 827cc580
Dec 13 00:23:25 [warning] kernel: [39441.988972] r3 : 607395dd  r2 : 827cc540  r1 : 00000000  r0 : 82164414
Dec 13 00:23:25 [warning] kernel: [39441.988989] Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
Dec 13 00:23:25 [warning] kernel: [39441.989009] Control: 10c5383d  Table: 061c006a  DAC: 00000055
Dec 13 00:23:25 [alert] kernel: [39441.989024] Register r0 information: slab kmalloc-4k start 82164000 pointer offset 1044 size 4096
Dec 13 00:23:25 [alert] kernel: [39441.989065] Register r1 information: NULL pointer
Dec 13 00:23:25 [alert] kernel: [39441.989084] Register r2 information: slab kmalloc-64 start 827cc540 pointer offset 0 size 64
Dec 13 00:23:25 [alert] kernel: [39441.989120] Register r3 information: non-paged memory
Dec 13 00:23:25 [alert] kernel: [39441.989137] Register r4 information: slab kmalloc-64 start 827cc580 pointer offset 0 size 64
Dec 13 00:23:25 [alert] kernel: [39441.989172] Register r5 information: slab kmalloc-4k start 82164000 pointer offset 1044 size 4096
Dec 13 00:23:25 [alert] kernel: [39441.989208] Register r6 information: slab kmalloc-4k start 82164000 pointer offset 1020 size 4096
Dec 13 00:23:25 [alert] kernel: [39441.989244] Register r7 information: slab kmalloc-4k start 82164000 pointer offset 1488 size 4096
Dec 13 00:23:25 [alert] kernel: [39441.989280] Register r8 information: slab kmalloc-4k start 82164000 pointer offset 1036 size 4096
Dec 13 00:23:25 [alert] kernel: [39441.989316] Register r9 information: slab kmalloc-4k start 82164000 pointer offset 0 size 4096
Dec 13 00:23:25 [alert] kernel: [39441.989351] Register r10 information: non-paged memory
Dec 13 00:23:25 [alert] kernel: [39441.989368] Register r11 information: non-paged memory
Dec 13 00:23:25 [alert] kernel: [39441.989385] Register r12 information: NULL pointer
Dec 13 00:23:25 [emerg] kernel: [39441.989402] Process kworker/u13:0 (pid: 32760, stack limit = 0x10e35acd)
Dec 13 00:23:25 [emerg] kernel: [39441.989423] Stack: (0x9f8b5f08 to 0x9f8b6000)
Dec 13 00:23:25 [emerg] kernel: [39441.989441] 5f00:                   7f619870 83bc2e80 821643fc 86058500 81e0d800 861f8000
Dec 13 00:23:25 [emerg] kernel: [39441.989466] 5f20: 000001a0 86058515 00000000 8013b090 81e0d800 80139f8c 86058500 83bc2e80
Dec 13 00:23:25 [emerg] kernel: [39441.989490] 5f40: 81e0d800 81003d40 81e0d820 61c88647 83bc2eac 861f8000 81e0d800 8013ba0c
Dec 13 00:23:25 [emerg] kernel: [39441.989514] 5f60: 81e0d85c 81003d40 a5c6dec8 861c75c0 861f8000 8013b774 83bc2e80 84f16580
Dec 13 00:23:25 [emerg] kernel: [39441.989538] 5f80: a5c6dec8 00000000 00000000 801446ac 861c75c0 801445c4 00000000 00000000
Dec 13 00:23:25 [emerg] kernel: [39441.989562] 5fa0: 00000000 00000000 00000000 8010011c 00000000 00000000 00000000 00000000
Dec 13 00:23:25 [emerg] kernel: [39441.989585] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
Dec 13 00:23:25 [emerg] kernel: [39441.989609] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
Dec 13 00:23:25 [emerg] kernel: [39441.989631]  hci_cmd_sync_work [bluetooth] from process_one_work+0x160/0x378
Dec 13 00:23:25 [emerg] kernel: [39441.989821]  process_one_work from worker_thread+0x298/0x4f0
Dec 13 00:23:25 [emerg] kernel: [39441.989849]  worker_thread from kthread+0xe8/0x104
Dec 13 00:23:25 [emerg] kernel: [39441.989876]  kthread from ret_from_fork+0x14/0x38
Dec 13 00:23:25 [emerg] kernel: [39441.989899] Exception stack(0x9f8b5fb0 to 0x9f8b5ff8)
Dec 13 00:23:25 [emerg] kernel: [39441.989916] 5fa0:                                     00000000 00000000 00000000 00000000
Dec 13 00:23:25 [emerg] kernel: [39441.989940] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
Dec 13 00:23:25 [emerg] kernel: [39441.989962] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000
Dec 13 00:23:25 [emerg] kernel: [39441.989983] Code: e3540000 0a00001f e1c420d0 e5823004 (e5832000) 
Dec 13 00:23:25 [warning] kernel: [39441.990001] ---[ end trace 0000000000000000 ]---

One more crash from a few minutes ago:

Dec 13 10:39:44 [alert] kernel: [ 4276.959985] 8<--- cut here ---
Dec 13 10:39:44 [alert] kernel: [ 4276.960021] Unable to handle kernel NULL pointer dereference at virtual address 00000004 when read
Dec 13 10:39:44 [alert] kernel: [ 4276.960041] [00000004] *pgd=08c01835, *pte=00000000, *ppte=00000000
Dec 13 10:39:44 [emerg] kernel: [ 4276.960072] Internal error: Oops: 17 [#1] SMP ARM
Dec 13 10:39:44 [warning] kernel: [ 4276.960087] Modules linked in: xt_recent usb_f_ecm u_ether usb_f_mass_storage usb_f_acm u_serial dwc2 roles cmac algif_hash aes_arm_bs crypto_simd cryptd algif_skcipher af_alg btnxpuart bluetooth ecdh_generic ecc crc8 moal(O) mlan(O) cfg80211 xt_hl rfkill ip6t_rt ipt_REJECT nf_reject_ipv4 xt_LOG nf_log_syslog nft_limit xt_limit xt_addrtype xt_tcpudp xt_conntrack nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 nft_compat nf_tables nfnetlink binfmt_misc sc16is7xx regmap_i2c raspberrypi_hwmon i2c_bcm2835 raspberrypi_gpiomem fixed uio_pdrv_genirq uio w5100_spi w5100 libcomposite i2c_dev deflate zstd ubifs ubi drm ofpart spi_nor mtd fuse spi_bcm2835 drm_panel_orientation_quirks backlight ip_tables x_tables ipv6 overlay
Dec 13 10:39:44 [warning] kernel: [ 4276.960413] CPU: 1 PID: 478 Comm: python3 Tainted: G           O       6.6.57-v7 #1
Dec 13 10:39:44 [warning] kernel: [ 4276.960433] Hardware name: BCM2835
Dec 13 10:39:44 [warning] kernel: [ 4276.960443] PC is at __mod_lruvec_page_state+0xc/0xbc
Dec 13 10:39:44 [warning] kernel: [ 4276.960472] LR is at account_kernel_stack+0x34/0x7c
Dec 13 10:39:44 [warning] kernel: [ 4276.960496] pc : [<8036fc3c>]    lr : [<80119ed4>]    psr: 60000093
Dec 13 10:39:44 [warning] kernel: [ 4276.960510] sp : 9f9c1df0  ip : a270a000  fp : 00000000
Dec 13 10:39:44 [warning] kernel: [ 4276.960523] r10: 90901000  r9 : ffffffff  r8 : 9f9c1ebc
Dec 13 10:39:44 [warning] kernel: [ 4276.960536] r7 : 822291c0  r6 : 88f98b40  r5 : 60000013  r4 : 00000004
Dec 13 10:39:44 [warning] kernel: [ 4276.960551] r3 : 88f98e40  r2 : 00000004  r1 : 00000025  r0 : 00000000
Dec 13 10:39:44 [warning] kernel: [ 4276.960567] Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment user
Dec 13 10:39:44 [warning] kernel: [ 4276.960589] Control: 10c5383d  Table: 069a806a  DAC: 00000055
Dec 13 10:39:44 [alert] kernel: [ 4276.960604] Register r0 information: NULL pointer
Dec 13 10:39:44 [alert] kernel: [ 4276.960624] Register r1 information: non-paged memory
Dec 13 10:39:44 [alert] kernel: [ 4276.960641] Register r2 information: non-paged memory
Dec 13 10:39:44 [alert] kernel: [ 4276.960658] Register r3 information: slab kmalloc-64 start 88f98e40 pointer offset 0 size 64
Dec 13 10:39:44 [alert] kernel: [ 4276.960697] Register r4 information: non-paged memory
Dec 13 10:39:44 [alert] kernel: [ 4276.960714] Register r5 information: non-paged memory
Dec 13 10:39:44 [alert] kernel: [ 4276.960731] Register r6 information: slab kmalloc-64 start 88f98b40 pointer offset 0 size 64
Dec 13 10:39:44 [alert] kernel: [ 4276.960766] Register r7 information: slab task_struct start 822291c0 pointer offset 0 size 4544
Dec 13 10:39:44 [alert] kernel: [ 4276.960802] Register r8 information: 2-page vmalloc region starting at 0x9f9c0000 allocated at kernel_clone+0xac/0x3a8
Dec 13 10:39:44 [alert] kernel: [ 4276.960837] Register r9 information: non-paged memory
Dec 13 10:39:44 [alert] kernel: [ 4276.960854] Register r10 information: slab task_struct start 90900000 pointer offset 4096 size 4544
Dec 13 10:39:44 [alert] kernel: [ 4276.960891] Register r11 information: NULL pointer
Dec 13 10:39:44 [alert] kernel: [ 4276.960908] Register r12 information: 2-page vmalloc region starting at 0xa2708000 allocated at kernel_clone+0xac/0x3a8
Dec 13 10:39:44 [emerg] kernel: [ 4276.960941] Process python3 (pid: 478, stack limit = 0x2693a8aa)
Dec 13 10:39:44 [emerg] kernel: [ 4276.960961] Stack: (0x9f9c1df0 to 0x9f9c2000)
Dec 13 10:39:44 [emerg] kernel: [ 4276.960978] 1de0:                                     00000004 60000013 88f98b40 80119ed4
Dec 13 10:39:44 [emerg] kernel: [ 4276.961002] 1e00: 00000001 90900000 00000000 8011ba88 103d60f4 00000000 675c0ef0 00000000
Dec 13 10:39:44 [emerg] kernel: [ 4276.961026] 1e20: 103d60f4 00000000 00000000 01200000 90900000 9f9c1f38 00000000 00000000
Dec 13 10:39:44 [emerg] kernel: [ 4276.961050] 1e40: 00000000 8116b41c 00000000 00000000 00000000 88f98b40 00000001 00000000
Dec 13 10:39:44 [emerg] kernel: [ 4276.961074] 1e60: 9f9c1ee4 86989cf0 9a9e904c 8032bad8 00000000 80aea768 81401f80 00000dc0
Dec 13 10:39:44 [emerg] kernel: [ 4276.961098] 1e80: 810057bc 80361880 81402c80 00000cc0 90a6f780 0000c1fa a0000013 00000255
Dec 13 10:39:44 [emerg] kernel: [ 4276.961122] 1ea0: 822291c0 71f01000 86989cf0 9f9c1fb0 82189b80 00000040 86989cf0 00000000
Dec 13 10:39:44 [emerg] kernel: [ 4276.961146] 1ec0: 00000000 00000000 826fbc38 9815a917 00000000 01200000 00000000 9f9c1f38
Dec 13 10:39:44 [emerg] kernel: [ 4276.961169] 1ee0: 00000000 00000000 822291c0 00000078 00000000 8011d6d4 00000a55 00000000
Dec 13 10:39:44 [emerg] kernel: [ 4276.961193] 1f00: 00000000 00000000 00000000 9815a917 84e93404 01200000 00000000 00000000
Dec 13 10:39:44 [emerg] kernel: [ 4276.961217] 1f20: 00000000 80100298 822291c0 00000078 00000000 8011dd78 01200000 00000000
Dec 13 10:39:44 [emerg] kernel: [ 4276.961240] 1f40: 00000000 76ef63a8 00000000 00000000 00000011 00000000 00000000 00000000
Dec 13 10:39:44 [emerg] kernel: [ 4276.961263] 1f60: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
Dec 13 10:39:44 [emerg] kernel: [ 4276.961287] 1f80: 00000000 00000000 00000035 9815a917 00000012 76ef63a8 00000000 00000000
Dec 13 10:39:44 [emerg] kernel: [ 4276.961310] 1fa0: 00000078 80100040 76ef63a8 00000000 01200011 00000000 00000000 00000000
Dec 13 10:39:44 [emerg] kernel: [ 4276.961334] 1fc0: 76ef63a8 00000000 00000000 00000078 00000000 7ead81b0 00000000 00000000
Dec 13 10:39:44 [emerg] kernel: [ 4276.961358] 1fe0: 76ef6840 7ead8194 76ef6340 76d682fc 60000010 01200011 00000000 00000000
Dec 13 10:39:44 [emerg] kernel: [ 4276.961380]  __mod_lruvec_page_state from account_kernel_stack+0x34/0x7c
Dec 13 10:39:44 [emerg] kernel: [ 4276.961420]  account_kernel_stack from copy_process+0x288/0x1d8c
Dec 13 10:39:44 [emerg] kernel: [ 4276.961449]  copy_process from kernel_clone+0xac/0x3a8
Dec 13 10:39:44 [emerg] kernel: [ 4276.961472]  kernel_clone from sys_clone+0x78/0x9c
Dec 13 10:39:44 [emerg] kernel: [ 4276.961494]  sys_clone from ret_fast_syscall+0x0/0x4c
Dec 13 10:39:44 [emerg] kernel: [ 4276.961517] Exception stack(0x9f9c1fa8 to 0x9f9c1ff0)
Dec 13 10:39:44 [emerg] kernel: [ 4276.961536] 1fa0:                   76ef63a8 00000000 01200011 00000000 00000000 00000000
Dec 13 10:39:44 [emerg] kernel: [ 4276.961560] 1fc0: 76ef63a8 00000000 00000000 00000078 00000000 7ead81b0 00000000 00000000
Dec 13 10:39:44 [emerg] kernel: [ 4276.961582] 1fe0: 76ef6840 7ead8194 76ef6340 76d682fc
Dec 13 10:39:44 [emerg] kernel: [ 4276.961601] Code: eaffffbd e92d4070 e52de004 e28dd004 (e5903004) 
Dec 13 10:39:44 [warning] kernel: [ 4276.961619] ---[ end trace 0000000000000000 ]---

Does anyone have any pointers on a different configuration we should try?

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

5 participants