Repository navigation
Open
Description
Describe the bug
PXE/nfs booting Buster on a Pi 3+ does not quite work
Does boot the kernel and starts to execute the first systemd units, but then the system hangs some seconds after on random moments (text cursor stops blinking, no activity, numlock does not respond)
Happens both with the kernel version you ship by default in your June 2019 Buster image, and 4.19.57 you get after running "apt-get upgrade"
In most cases kernels hangs without outputing any message, but seen the following kernel panic as well.
Starting Helper to synchronize boot up for ifupdown...
[ OK ] Mounted /tmp.
[ OK ] Mounted /media.
[ OK ] Mounted /var/lib/sudo.
[ OK ] Mounted /var/lib/dhcp.
[ OK ] Mounted /var/tmp.
[ OK ] Mounted /home.
[ OK ] Mounted /var/log.
[ OK ] Mounted /var/cache.
[ OK ] Mounted /var/spool.
[ OK ] Started udev Kernel Device Manager.
[ OK ] Mounted /var/lib/systemd/rfkill.
[ OK ] Mounted /var/lib/lightdm.
[ OK ] Mounted /var/lib/systemd/coredump.
[ OK ] Started Helper to synchronize boot up for ifupdown.
Starting Flush Journal to Persistent Storage...
[ OK ] Reached target Local File Systems.
Starting Preprocess NFS configuration...
Starting Set console font and keymap...
Starting Raise network interfaces...
[ OK ] Started Preprocess NFS configuration.
[ OK ] Reached target NFS client services.
[ OK ] Reached target Remote File Systems (Pre).
[ OK ] Reached target Remote File Systems.
[ 14.481793] Unable to handle kernel paging request at virtual address f74193c8
[ 14.500886] pgd = 30af461a
[ 14.515245] [f74193c8] *pgd=00000000
[ 14.530421] Internal error: Oops: 80000005 [#1] SMP ARM
[ 14.547260] Modules linked in: bcm2835_v4l2(C+) v4l2_mem2mem snd_timer v4l2_common bcm2835_mmal_vchiq(C) snd videobuf2_vmalloc videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 videobuf2_common videodev media vc_sm_cma(C) uio_pdrv_genirq uio fixed i2c_dev ip_tables x_tables ipv6
[ 14.597249] CPU: 0 PID: 9 Comm: ksoftirqd/0 Tainted: G C 4.19.57-v7+ #1244
[ 14.617972] Hardware name: BCM2835
[ 14.633734] PC is at 0xf74193c8
[ 14.649171] LR is at rcu_process_callbacks+0x2cc/0x674
[ 14.666604] pc : [<f74193c8>] lr : [<8018e0b8>] psr: a0000013
[ 14.685285] sp : b9d3de58 ip : b9d3de58 fp : b9d3decc
[ 14.702969] r10: b9d3c018 r9 : 0000000a r8 : 80d10c80
[ 14.720594] r7 : b9d3de8c r6 : ba352660 r5 : 80d10780 r4 : ba352640
[ 14.739565] r3 : f74193c8 r2 : f74193c8 r1 : b9d3de08 r0 : b7419654
[ 14.758469] Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
[ 14.778024] Control: 10c5383d Table: 376fc06a DAC: 00000055
[ 14.796173] Process ksoftirqd/0 (pid: 9, stack limit = 0x1631a8d3)
[ 14.814825] Stack: (0xb9d3de58 to 0xb9d3e000)
[ 14.831548] de40: 00000000 80d04d48
[ 14.852230] de60: ba351e40 00000001 80d10780 80d97784 80d04d48 80d04d70 80d8ed74 80c903f0
[ 14.872765] de80: 00000001 80d04e10 80102374 f74193c8 b8350000 fffffffa ffffffff a271c001
[ 14.893156] dea0: b9d3decc 80d030a4 00000009 b9d3c010 00000100 80d0be48 00000024 00000200
[ 14.913429] dec0: b9d3df34 b9d3ded0 80102410 8018ddf8 802018e8 80202aec 00000000 04208040
[ 14.933588] dee0: 80d03d00 ffff907a 00000009 80c94a00 80d8f278 80d04d70 80c8c308 80d03080
[ 14.953722] df00: b9d3ded0 0000000a b9d3df34 b9d3c000 b9ccb380 00000000 00000001 80d0be48
[ 14.973701] df20: 80d04d48 00000000 b9d3df44 b9d3df38 8012664c 8010228c b9d3df7c b9d3df48
[ 14.993483] df40: 80146b1c 80126614 b9d40000 a271c001 b9d3df7c b9ccb580 b9ccb540 00000000
[ 15.013156] df60: b9ccb380 801469e4 b9ccb59c b9d0ddd4 b9d3dfac b9d3df80 8014251c 801469f0
[ 15.032816] df80: ffffffff b9ccb540 801423e4 00000000 00000000 00000000 00000000 00000000
[ 15.052490] dfa0: 00000000 b9d3dfb0 801010ac 801423f0 00000000 00000000 00000000 00000000
[ 15.072096] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 15.091679] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[ 15.111014] [<8018e0b8>] (rcu_process_callbacks) from [<80102410>] (__do_softirq+0x190/0x3f0)
[ 15.130616] [<80102410>] (__do_softirq) from [<8012664c>] (run_ksoftirqd+0x44/0x54)
[ 15.149185] [<8012664c>] (run_ksoftirqd) from [<80146b1c>] (smpboot_thread_fn+0x138/0x1d0)
[ 15.168335] [<80146b1c>] (smpboot_thread_fn) from [<8014251c>] (kthread+0x138/0x168)
[ 15.186934] [<8014251c>] (kthread) from [<801010ac>] (ret_from_fork+0x14/0x28)
[ 15.204883] Exception stack(0xb9d3dfb0 to 0xb9d3dff8)
[ 15.220500] dfa0: 00000000 00000000 00000000 00000000
[ 15.239418] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 15.258293] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000
[ 15.275462] Code: bad PC value
[ 15.288934] ---[ end trace 3e6a1f362873c12f ]---
[ 15.304036] Kernel panic - not syncing: Fatal exception in interrupt
[ 15.321004] CPU1: stopping
[ 15.334358] CPU: 1 PID: 144 Comm: systemd-udevd Tainted: G D C 4.19.57-v7+ #1244
[ 15.353750] Hardware name: BCM2835
[ 15.367836] [<80111f38>] (unwind_backtrace) from [<8010d4b0>] (show_stack+0x20/0x24)
[ 15.386527] [<8010d4b0>] (show_stack) from [<80814ea0>] (dump_stack+0xd4/0x118)
[ 15.404422] [<80814ea0>] (dump_stack) from [<80110350>] (handle_IPI+0x388/0x3a8)
[ 15.422021] [<80110350>] (handle_IPI) from [<801021f4>] (bcm2836_arm_irqchip_handle_irq+0xa0/0xa4)
[ 15.441271] [<801021f4>] (bcm2836_arm_irqchip_handle_irq) from [<80101d0c>] (__irq_usr+0x4c/0x60)
[ 15.460543] Exception stack(0xb8269fb0 to 0xb8269ff8)
[ 15.475907] 9fa0: 00000001 004f4910 2d4eb800 2d4eb800
[ 15.494608] 9fc0: 0000002f 00000000 7ed3897c 76ffd968 004f4910 004e8680 0000002f 7ed38924
[ 15.513331] 9fe0: 00515cbc 7ed38758 004c1998 76ee1134 60000010 ffffffff
[ 15.530213] CPU3: stopping
[ 15.542679] CPU: 3 PID: 0 Comm: swapper/3 Tainted: G D C 4.19.57-v7+ #1244
[ 15.560547] Hardware name: BCM2835
[ 15.573622] [<80111f38>] (unwind_backtrace) from [<8010d4b0>] (show_stack+0x20/0x24)
[ 15.591260] [<8010d4b0>] (show_stack) from [<80814ea0>] (dump_stack+0xd4/0x118)
[ 15.608438] [<80814ea0>] (dump_stack) from [<80110350>] (handle_IPI+0x388/0x3a8)
[ 15.625665] [<80110350>] (handle_IPI) from [<801021f4>] (bcm2836_arm_irqchip_handle_irq+0xa0/0xa4)
[ 15.644624] [<801021f4>] (bcm2836_arm_irqchip_handle_irq) from [<801019bc>] (__irq_svc+0x5c/0x7c)
[ 15.663548] Exception stack(0xb9d51f38 to 0xb9d51f80)
[ 15.678202] 1f20: 80109a84 00000000
[ 15.695751] 1f40: 40000193 40000193 80d04d70 b9d50000 80d04db8 00000008 80d8ed3e 410fd034
[ 15.713290] 1f60: 00000000 b9d51f94 80d0517c b9d51f88 00000000 80109a88 40000113 ffffffff
[ 15.730839] [<801019bc>] (__irq_svc) from [<80109a88>] (arch_cpu_idle+0x34/0x4c)
[ 15.747679] [<80109a88>] (arch_cpu_idle) from [<80831eb4>] (default_idle_call+0x34/0x48)
[ 15.765310] [<80831eb4>] (default_idle_call) from [<8015265c>] (do_idle+0xec/0x17c)
[ 15.782510] [<8015265c>] (do_idle) from [<801529ac>] (cpu_startup_entry+0x28/0x2c)
[ 15.799636] [<801529ac>] (cpu_startup_entry) from [<8010fd54>] (secondary_start_kernel+0x134/0x140)
[ 15.818384] [<8010fd54>] (secondary_start_kernel) from [<0010270c>] (0x10270c)
[ 15.835311] CPU2: stopping
[ 15.847637] CPU: 2 PID: 0 Comm: swapper/2 Tainted: G D C 4.19.57-v7+ #1244
[ 15.865445] Hardware name: BCM2835
[ 15.878460] [<80111f38>] (unwind_backtrace) from [<8010d4b0>] (show_stack+0x20/0x24)
[ 15.896045] [<8010d4b0>] (show_stack) from [<80814ea0>] (dump_stack+0xd4/0x118)
[ 15.913200] [<80814ea0>] (dump_stack) from [<80110350>] (handle_IPI+0x388/0x3a8)
[ 15.930420] [<80110350>] (handle_IPI) from [<801021f4>] (bcm2836_arm_irqchip_handle_irq+0xa0/0xa4)
[ 15.949258] [<801021f4>] (bcm2836_arm_irqchip_handle_irq) from [<801019bc>] (__irq_svc+0x5c/0x7c)
[ 15.967977] Exception stack(0xb9d4ff38 to 0xb9d4ff80)
[ 15.982797] ff20: 80109a84 00000000
[ 16.000859] ff40: 40000093 40000093 80d04d70 b9d4e000 80d04db8 00000004 80d8ed3e 410fd034
[ 16.018940] ff60: 00000000 b9d4ff94 80d0517c b9d4ff88 00000000 80109a88 40000013 ffffffff
[ 16.037026] [<801019bc>] (__irq_svc) from [<80109a88>] (arch_cpu_idle+0x34/0x4c)
[ 16.054360] [<80109a88>] (arch_cpu_idle) from [<80831eb4>] (default_idle_call+0x34/0x48)
[ 16.072432] [<80831eb4>] (default_idle_call) from [<8015265c>] (do_idle+0xec/0x17c)
[ 16.090080] [<8015265c>] (do_idle) from [<801529ac>] (cpu_startup_entry+0x28/0x2c)
[ 16.107627] [<801529ac>] (cpu_startup_entry) from [<8010fd54>] (secondary_start_kernel+0x134/0x140)
[ 16.126830] [<8010fd54>] (secondary_start_kernel) from [<0010270c>] (0x10270c)
[ 16.144261] ---[ end Kernel panic - not syncing: Fatal exception in interrupt ]---
Metadata
Metadata
Assignees
Labels
No labels
Activity
justinh-rahb commentedon Jul 12, 2019
Confirmed. It's broken. How can I revert to previous version?
maxnet commentedon Jul 12, 2019
Some more panics, which seems to be different each time.
But all happen pretty soon after boot.
Issue seems to be present with the 4.19.x kernels.
4.14.x works fine with same root file system.
maxnet commentedon Jul 12, 2019
If using piserver and "apt-get upgrade" gave you a 4.19.x kernel that bricked your system, use the following to downgrade to 4.14.x:
pelwell commentedon Jul 12, 2019
This looks like memory corruption - something is probably writing off the end of a buffer, or continuing to write to it after our has been freed. @maxnet There are some kernel heap validation features of varying performance impact that can be enabled if you are prepared to build your own kernel.
Correction: "slub" debugging is a runtime option - try adding "slub_debug" to cmdline.txt.
maxnet commentedon Jul 12, 2019
@pelwell
slub_debug did not give anything useful.
But did notice that if for testing purposes I boot without modules (rename the /lib/modules folder), it does boot to X correctly.
So after that I have been playing a bit with blacklisting modules one by one. And the problem module seems to be bcm2835_v4l2
maxnet commentedon Jul 13, 2019
Two things I noticed.
If I raise SYNC_MSG_TIMEOUT to say 10, it does not timeout.
But in both cases the system hangs (or panics) some seconds afterwards.
Like there is something wrong with the firmware side implementation of that command.
Does firmware also have the potential to corrupt memory or otherwise get the system to hang some seconds later if there is a bug there?
kpfleming commentedon Jul 15, 2019
I noticed a number of errors with the bcm2835_v4l2 module as well when trying to boot the 4.19.57 kernel, and had to roll back to 4.19.42 to get a working system. I didn't have kernel crashes, but I'm also using nfsboot and the lan78xx driver failed to keep the link working after the bcm2835_v4l2 module failure messages (could be unrelated of course).
6by9 commentedon Jul 15, 2019
We did have a memory corruption issue with bcm2835_v4l2 and PORT_PARAMETER_GET previously. Life got a little tortuous as upstream applied a different patch to "fix" it, so it's possible it's still partially broken.
I'll have a look.
I'm bemused that we get a timeout at 3 seconds - the VPU should be doing very little at that point. It is probing for the connected sensor, but that should take less time than that.
maxnet commentedon Jul 15, 2019
That also only happens when the Pi is being booted using a PXE network boot BTW.
If I put same kernel on SD card, even when having root file system still on NFS, the command does complete fast, and system boots properly.
kpfleming commentedon Jul 15, 2019
Just a note: Pis do not support PXE, at all. They can boot off of a network (I have four that do), but they don't use PXE and it's really unfortunate that the community has adopted this terminology. PXE is a specific protocol and configuration, it's not just another name for 'network boot' :-)
maxnet commentedon Jul 15, 2019
If a device spits out DHCP packets that say "PXEClient" I call it a PXE boot.
Regardless of the level of protocol conformity.
kpfleming commentedon Jul 15, 2019
Indeed, a decent part of the blame falls on the RPi team which decided to use PXEClient as an identifier in the DHCP packets for a non-PXE device. In my network I don't test for it, and don't include it in responses back to the devices (and I don't even check for the magic vendor identifier either) and it all works fine.
kpfleming commentedon Sep 2, 2019
I have resolved my booting problems by blacklisting the
bcm2835_codecandbcm2835_v4l2modules in/etc/modprobe.d/blacklist.conf. I have no need for any VPU support in my applications and with these modules blacklisted my boards boot properly when using kernel DHCP/tftp-boot/nfsroot.lurch commentedon Sep 2, 2019
@kpfleming That's kinda what raspberrypi/piserver#75 (comment) also says.
gorky commentedon Sep 3, 2019
In my case, the PIs were hanging on boot w/o displaying anything in regards to a kernel panic, halt or anything else. Blacklisting these modules resolved the issue. PI2 & PI3, several different hardware versions. Raspian 4.19.66-v7+.
gorky commentedon Sep 3, 2019
I wonder if #2528 has anything to do with this?
Flole998 commentedon Sep 5, 2019
I'm also affected, thought it had something to do with the bootcode at first but apparently it doesn't.
FeepingCreature commentedon Sep 7, 2019
Huh. Blacklisting those modules fixed it for me, too. Let me throw in some Google keywords to help others: "raise network interfaces", "Network Time Synchronization" (it sometimes froze with that task displayed), Raspberry Pi 3 B nfsboot NFS boot freeze hang broken.
esticle commentedon Sep 9, 2019
Thanks google, this thread took me a while to find! Brand new Buster image on RPI3 modelB using "PXE" boot / nfsroot fails, uname -a claims '4.19.57-v7+ #1244'. Blacklisting those two modules works for me as well.
Mine got stuck in startup at "creating volatile files and directories" or when systemd starts "udev kernel device manager". I twice had a kernel panic, but this has not happened after I hooked up a serial console to try and capture the output.
Thanks @kpfleming for the temporary workaround.
rfeague commentedon Sep 10, 2019
+1 --- blacklisting bcm2835_codec and bcm2835_v4l2 fixed network boot for me. Huge kudos to @maxnet, @kpfleming, and anyone else who contributed here. This bug cost me a dozen hours or more, stopped dead in my tracks. The problem manifests itself in a variety of ways, most commonly hanging in Network Time Synchronization, but sometimes "raise network interfaces" as @esticle and @FeepingCreature note. I've attached the two files I created to blacklist these modules. Place them in /etc/modprobe.d/ and reboot.
blacklist.zip
gorky commentedon Sep 10, 2019
I am wondering what it would take to get a contributor or someone from the @raspberrypi group to have a look at this?
linuxkidd commentedon Sep 10, 2019
Another +1 on this issue, and the same workaround ( blacklisted bcm2835_v4l2 ).
Latest Raspbian Buster lite, fully updated
Kernel:
4.19.71-v7+ #1262XECDesign commentedon Oct 1, 2019
This is currently holding up piserver images. Should I apply the blacklist workaround or is a fix in the works?
6by9 commentedon Oct 1, 2019
I've done a quick test on the old PiServer image I had around but using the latest rpi-update kernel and firmware, and it's booting fine, with or without camera.
Firmware is 30th Sept, 6820edeeee4ef
Kernel is 30th Sept, 4.19.75-v7+
If you have a more recent image that I can test with, then I'm happy to do so.
6by9 commentedon Oct 1, 2019
Ah, I do have
start_x=1in config.txt. Without that I do see boot stalling.It'll probably be VLL loading again - I thought we'd solved that ages ago.
I'll try to get a debugger working on it and see what is going on.
6by9 commentedon Oct 1, 2019
Firmware patch created that seems to work for me.
It needs to ripple through the firmware release process before it makes its way into the wild.
peter-chineham commentedon Jan 5, 2020
The depressing thing is that I am getting exactly this problem with 2 x brand new RPi4 netbooting from another RPi4 (following two official guides closely), but another two work fine. On the two which work, I got a kernel panic as described after pressing enter to continue, these two now work no problem and reboot fine. The other two just hang exactly as in the original description... The workarounds in the git error report don't work, not surprisingly, so I am now going to try booting from an SD card with just /boot on it which directs to the original nfs folder and see if that works. I suspect I have configured something wrong which the panic corrected, but I can't see anything obvious.
lurch commentedon Jan 6, 2020
@peter-chineham Netbooting on RPi4 is still in beta, so it may be more appropriate to report your problem at https://github.com/raspberrypi/rpi-eeprom/issues ?
maxnet commentedon Jan 6, 2020
Could be a different problem then.
Have you captured the full kernel panics (not just the bottom part) through serial console, and do they look different each time (which can indicate memory corruption like in this issue), or are they always the same?
You may also want to try if it also happens when you PXE boot your Pi through piserver. As that uses the same "known good" rootfs for all Pi.
When you are using different writable rootfs for each individual Pi, there are also other things that could go wrong.
alkisg commentedon Jan 19, 2020
While adding Raspberry support to the new LTSP, I too bumped into this issue, and it took me many days to find the appropriate bug reports and workarounds.
I believe it's the same as #2335 which resurfaced, so I initially commented there; then I found this one.
Fortunately with the workaround everything is fine, LTSP can now netboot rpi2, rpi3b+ and rpi4 with no issues other than camera support due to the blacklisting.