armhf core20 image unusable on rpi2, rpi3

Bug #1878943 reported by Paul Larson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd
Fix Released
High
Unassigned

Bug Description

So far, I've tried this on an rpi2 and rpi3b. The current core20 images (as of 20200515 and previous) are unusable on rpi 2/3.
When booting into the installer, it does eventually complete, but usually with some tracebacks (will attach logs). However instead of taking just a few minutes like it normally does, I see it taking usually 30+ min to complete - seeming to stall many times before getting to console conf.

Once it does get to console-conf, it doesn't detect the ethernet adapter, so there's no way to continue.

I've noticed that if I remove the dtoverlay=vc4-fkms-v3d,cma-256 line from config.txt, it works. The install goes much faster, and it sees the ethernet adapter.
I know I mentioned this in https://bugs.launchpad.net/pi2-kernel-snap/+bug/1878432 since a similar workaround helped, but I opted to file this as a new bug since this one seems to be on armhf only, and because this workaround has never been needed except for on 3a+. It also behaves very differently, instead of just hanging at boot, it does boot *very* slowly

Tags: uc20
Revision history for this message
Paul Larson (pwlars) wrote :

Logs from rpi3

Revision history for this message
Paul Larson (pwlars) wrote :

Logs from rpi2

tags: added: core20
Paul Larson (pwlars)
tags: added: uc20
removed: core20
Michael Vogt (mvo)
Changed in snapd:
importance: Undecided → High
Revision history for this message
Maciej Borzecki (maciek-borzecki) wrote :
Download full text (4.6 KiB)

There's also WARN_ON backtrace from the kernel in the attached rpi3 log:

[ 656.853716] ------------[ cut here ]------------
[ 656.858465] WARNING: CPU: 1 PID: 1 at arch/arm/mm/dma-mapping.c:515 pool_allocator_alloc+0xb4/0xb8
[ 656.867585] coherent pool not initialised!
[ 656.871768] Modules linked in: vc4 drm_kms_helper snd_soc_core snd_compress ac97_bus snd_pcm_dmaengine snd_pcm snd_timer snd fb_sys_fops syscopyarea sysfillrect sysimgblt crypto_simd cryptd linear multipath raid0 raid1 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx raid10 btrfs libcrc32c xor xor_neon zstd_compress crc32_arm_ce spidev raid6_pq drm sch_fq_codel uio_pdrv_genirq uio rpivid_mem raspberrypi_hwmon bcm2835_v4l2(CE) videobuf2_vmalloc videobuf2_memops bcm2835_mmal_vchiq(CE) vc_sm_cma(CE) videobuf2_v4l2 videobuf2_common videodev mc brcmfmac cfg80211 brcmutil input_leds btsdio bluetooth ecdh_generic ecc scsi_dh_alua scsi_dh_emc scsi_dh_rdac dm_multipath phy_generic sha256_arm echainiv aes_arm dm_crypt algif_skcipher af_alg virtio_blk virtio_scsi nls_iso8859_1 usb_storage libahci hid_generic usbhid nvme nvme_core i2c_bcm2708 ip_tables x_tables autofs4
[ 656.950794] CPU: 1 PID: 1 Comm: shutdown Tainted: G WC E 5.4.0-1011-raspi #11-Ubuntu
[ 656.959705] Hardware name: BCM2835
[ 656.963152] Backtrace:
[ 656.965646] [<c0239048>] (dump_backtrace) from [<c02393a8>] (show_stack+0x20/0x24)
[ 656.973330] r7:ffffffff r6:00000000 r5:600b0013 r4:c148fe14
[ 656.979080] [<c0239388>] (show_stack) from [<c0c36100>] (dump_stack+0xd4/0x118)
[ 656.986503] [<c0c3602c>] (dump_stack) from [<c0253be8>] (__warn+0xe0/0x108)
[ 656.993571] r10:00000000 r9:dfe56740 r8:00000009 r7:00000203 r6:c0243464 r5:00000009
[ 657.001514] r4:c1058a24 r3:00000000
[ 657.005146] [<c0253b08>] (__warn) from [<c0254008>] (warn_slowpath_fmt+0xa8/0xcc)
[ 657.012740] r7:c0243464 r6:00000203 r5:c1058a24 r4:c1058a04
[ 657.018489] [<c0253f64>] (warn_slowpath_fmt) from [<c0243464>] (pool_allocator_alloc+0xb4/0xb8)
[ 657.027319] r8:00000707 r7:00000000 r6:c11360b4 r5:e611fc64 r4:00000000
[ 657.034127] [<c02433b0>] (pool_allocator_alloc) from [<c0244114>] (__dma_alloc+0x158/0x2f0)
[ 657.042601] r6:ffffffff r5:e6340810 r4:00000a20
[ 657.047294] [<c0243fbc>] (__dma_alloc) from [<c024434c>] (arm_dma_alloc+0x54/0x5c)
[ 657.054979] r10:dfe56780 r9:00000000 r8:00000000 r7:e611fd70 r6:00000000 r5:00000000
[ 657.062922] r4:00c00000
[ 657.065498] [<c02442f8>] (arm_dma_alloc) from [<c02e08e0>] (dma_direct_alloc+0x48/0x6c)
[ 657.073618] r5:00000a20 r4:e611fd70
[ 657.077251] [<c02e0898>] (dma_direct_alloc) from [<c02df114>] (dma_alloc_attrs+0x94/0x11c)
[ 657.085637] r6:00001000 r5:00000a20 r4:e6340810
[ 657.090332] [<c02df080>] (dma_alloc_attrs) from [<c0a31064>] (rpi_firmware_property_list+0x6c/0x180)
[ 657.099602] r8:00001000 r7:e63176c0 r6:00000018 r5:0000000c r4:dfe56780
[ 657.106409] [<c0a30ff8>] (rpi_firmware_property_list) from [<c0a311e8>] (rpi_firmware_property+0x70/0x118)
[ 657.116210] r10:dfe5678c r9:00030048 r8:e63176c0 r7:00000000 r6:00000000 r5:0000000c
[ 657.124152] r4:dfe56780
[ 657.126728] [<c0a31178>] (rpi_firmware_property) from [<c0a31310>] (r...

Read more...

Dave Jones (waveform)
Changed in snapd:
status: New → Confirmed
Revision history for this message
Dave Jones (waveform) wrote :

Seems to work happily (including wifi) if the "cma-256" parameter (the maximum) is changed to one of the lower values - I've tested the lowest ("cma-64") but haven't had time to try the larger values (96, 128, 192) yet. Still it does appear something's changed between Core 18 and Core 20 in this regard as Core 18 used "cma-256" happily. It might simply be that Core 20's kernel/initrd require significantly more memory for some reason?

Revision history for this message
Michael Vogt (mvo) wrote :

I can can boot/install a Pi3 in armhf mode with pi r64, snapd r7978 but I don't have the hardware to test on the cm3. My Pi3 has 1Gb of ram.

Revision history for this message
Michael Vogt (mvo) wrote :

The gadget got updated and changed to cma-128 AIUI - this should unblock most devices.

Changed in snapd:
status: Confirmed → In Progress
Revision history for this message
Paul Larson (pwlars) wrote :

Yes, we can now boot on pi2 and cm3 again with that change. Thanks!

Michael Vogt (mvo)
Changed in snapd:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.