Re: reboot broken on RPi4 on main [breaks at git: e6cf1a0826c9 - main - physmem: add ram0 pseudo-driver]
Date: Sat, 25 Feb 2023 22:40:06 UTC
On Feb 25, 2023, at 01:58, Mark Millard <marklmi@yahoo.com> wrote:
> [I probably should have also shown related output from
> earlier in the boot log.]
>
> On Feb 25, 2023, at 01:23, Mark Millard <marklmi@yahoo.com> wrote:
>
>> On Feb 24, 2023, at 22:16, Mark Millard <marklmi@yahoo.com> wrote:
>>
>>> [The first main version to not reboot RPi4B's is:
>>> git: e6cf1a0826c9 - main - physmem: add ram0 pseudo-driver Mitchell Horne
>>> ]
>>>
>>> On Feb 24, 2023, at 17:45, Mark Millard <marklmi@yahoo.com> wrote:
>>>
>>>> On Feb 24, 2023, at 15:18, Mark Millard <marklmi@yahoo.com> wrote:
>>>>
>>>>> On Feb 23, 2023, at 14:01, Mike Karels <mike@karels.net> wrote:
>>>>>
>>>>>> Reboot (shutdown -r) is hanging on RPi4 on main as of today’s snapshot.
>>>>>> It hangs after printing the Uptime. The initial bootstrap and boot from
>>>>>> power-up work. I haven’t tested a snapshot since Jan 1, so I’m not sure
>>>>>> when it stopped working. Any ideas what might have broken it? I can bisect
>>>>>> the recent snapshots if nothing else.
>>>>>>
>>>>>> 13.2-BETA2 works, however.
>>>>>
>>>>> For reference . . .
>>>>>
>>>>> While it is a personal build instead of a snapshot,
>>>>> I see the "shutdown -r now" hang problem for my build
>>>>> based on:
>>>>>
>>>>> # ~/fbsd-based-on-what-commit.sh -C /usr/main-src/
>>>>> d04c86717c8c (HEAD -> main, freebsd/main, freebsd/HEAD) bsd.sys.mk: Add NO_WSTRICT_PROTOTYPES like in kernel
>>>>> branch: main
>>>>> merge-base: d04c86717c8ca3aa1bd9d8927a37a1f5443925b5
>>>>> merge-base: CommitDate: 2023-02-19 07:02:12 +0000
>>>>> n261026 (--first-parent --count for merge-base)
>>>>>
>>>>> The context has a "B0T" 8 GiByte RPi4B.
>>>>
>>>> For the artifact builds available for arm64, testing
>>>> the kernels:
>>>>
>>>> The last that has "shutdown -r now" working on the RPi4B I'm using:
>>>>
>>>> • git: 8b418c83d175 - main - cp: Adjust the sparse file tests. Dag-Erling Smørgrav
>>>> ( https://artifact.ci.freebsd.org/snapshot/main/8b418c83d175fde3b1f65210509ddcf2ac248d9f/arm64/aarch64/kernel.txz )
>>>>
>>>> No arm64 artifacts after that until . . .
>>>>
>>>> The first that has "shutdown -r now" failing on the same RPi4B:
>>>>
>>>> • git: ded5f2954e1a - main - nfsd: Fix handling of the error case for nfsvno_open Rick Macklem
>>>> ( https://artifact.ci.freebsd.org/snapshot/main/ded5f2954e1a1bb7748646888938af767ee6257a/arm64/aarch64/kernel.txz )
>>>>
>>>> So the range is limited to (including those end points):
>>>> (All are 2023-Feb-08 artifact builds.)
>>>>
>>>> • git: 8b418c83d175 - main - cp: Adjust the sparse file tests. Dag-Erling Smørgrav
>>>> • git: 87d405eab911 - main - iommu_gas: initialize start_gap as first node Doug Moore
>>>> • git: 8c784bb8cf36 - main - lua: Update to 5.4.4 Warner Losh
>>>> • git: 5fff09660e06 - main - geli: split the initalization of HMAC Gordon Tetlow
>>>> • git: 81ad626541db - main - Merge llvm-project main llvmorg-15-init-15358-g53dc0f10787 Dimitry Andric
>>>> • git: 753f127f3ace - main - Merge llvm-project main llvmorg-15-init-16436-g18a6ab5b8d1f Dimitry Andric
>>>> • git: fcaf7f8644a9 - main - Merge llvm-project main llvmorg-15-init-17485-ga3e38b4a206b Dimitry Andric
>>>> • git: 972a253a57b6 - main - Merge llvm-project main llvmorg-15-init-17826-g1f8ae9d7e7e4 Dimitry Andric
>>>> • git: 61cfbce3347e - main - Merge llvm-project release/15.x llvmorg-15.0.0-rc2-40-gfbd2950d8d0d Dimitry Andric
>>>> • git: a4a491e2238b - main - Merge llvm-project release/15.x llvmorg-15.0.0-9-g1c73596d3454 Dimitry Andric
>>>> • git: 6246ae0b85d8 - main - Merge llvm-project release/15.x llvmorg-15.0.2-10-gf3c5289e7846 Dimitry Andric
>>>> • git: f3fd488f1e19 - main - Merge llvm-project release/15.x llvmorg-15.0.6-0-g088f33605d8a Dimitry Andric
>>>> • git: 50d7464c3fe6 - main - Merge llvm-project release/15.x llvmorg-15.0.7-0-g8dfdcc7b7bf6 Dimitry Andric
>>>> • git: 3264f6b88fce - main - Bump __FreeBSD_version for llvm 15.0.7 merge Dimitry Andric
>>>> • git: 89a072d11cd2 - main - Makefile.amd64: remove construct that serves no purpose Warner Losh
>>>> • git: ae1dca798e0f - main - e1000: fix I219 hang on reset Kevin Bowling
>>>> • git: 647f2d2bc0cb - main - e1000: bump driver version Kevin Bowling
>>>> • git: 48bfd3597654 - main - Add nproc(1) Mateusz Guzik
>>>> • git: 1d03c3578d05 - main - arm: add an interrupt rman to nexus Mitchell Horne
>>>
>>> My build of the above version works for "shutdown -r now".
>>>
>>>> • git: f9bdaab95ec4 - main - ofwbus: remove handling of resources from ofwbus Mitchell Horne
>>>
>>> My build of the above version works for "shutdown -r now".
>>> It is the last version to do so.
>>>
>>>> • git: e6cf1a0826c9 - main - physmem: add ram0 pseudo-driver Mitchell Horne
>>>
>>> My build of the above version fails for "shutdown -r now":
>>> hang-up just after Uptime: . . . message.
>>>
>>>> • git: fa3f6655421f - main - netmap: drop redundant if_mtu assignment Vincenzo Maffione
>>>> • git: ded5f2954e1a - main - nfsd: Fix handling of the error case for nfsvno_open Rick Macklem
>>>>
>>>> . . .
>>>
>>>
>>
>> The following from boot -v looks somewhat odd:
>>
>> ram0: reserving memory region: 2000-7ef0000
>> ram0: reserving memory region: 7f10000-31c00000
>> ram0: reserving memory region: 331d7000-39c2a000
>> ram0: reserving memory region: 39c2b000-39c2e000
>> ram0: reserving memory region: 39c2f000-39c30000
>> ram0: reserving memory region: 39c32000-39c33000
>> ram0: reserving memory region: 39c37000-3b050000
>> ram0: reserving memory region: 3b060000-3b300000
>> ram0: reserving memory region: 40000000-fc000000
>> ram0: reserving excluded region: 0-1fff
>> ram0: reserving excluded region: 7ef0000-7f0ffff
>> ram0: reserving excluded region: 31c00000-331d6fff
>> ram0: reserving excluded region: 39c2a000-39c2afff
>> ram0: reserving excluded region: 39c2e000-39c2efff
>> ram0: reserving excluded region: 39c30000-39c31fff
>> ram0: reserving excluded region: 39c33000-39c36fff
>> ram0: reserving excluded region: 3b050000-3b05ffff
>> ram0: reserving excluded region: 3ee5c000-3ee5cfff
>> ram0: reserving excluded region: 3ee5c000-3ee5cfff
>> ram0: failed to reserve region
>> ram0: reserving excluded region: fe100000-fe100fff
>>
>> Possible oddities (4 GiByte RPi4B example):
>>
>> Nothing covers any part of [3b300000,3ee5c000) .
>> Exclusion [3ee5c000-3ee5cfff] is repeated. (Related to the above?)
>> The "failed to reserve region" notice. (Related to repetition?)
>> Nothing covers any part of [fc000000,fe100000) .
>> Nothing covers any part of [fe101000,ffffffff] .
>>
>> (The 2 different styles of specifying high bounds
>> reads oddly.)
>
> Related boot log material:
>
> Type Physical Virtual #Pages Attr
> Reserved 000000000000 000000000000 00000002 WB
> ConventionalMemory 000000002000 000000002000 00007eee WB
> ACPIReclaimMemory 000007ef0000 000007ef0000 00000020 WB
> ConventionalMemory 000007f10000 000007f10000 00029c43 WB
> LoaderData 000031b53000 000031b53000 00000001 WB
> LoaderCode 000031b54000 000031b54000 00004000 WB
> LoaderData 000035b54000 000035b54000 00004000 WB
> LoaderCode 000039b54000 000039b54000 000000ce WB
> BootServicesData 000039c22000 000039c22000 00000008 WB
> RuntimeServicesData 000039c2a000 000039c2a000 00000001 WB RUNTIME
> BootServicesData 000039c2b000 000039c2b000 00000003 WB
> RuntimeServicesData 000039c2e000 000039c2e000 00000001 WB RUNTIME
> BootServicesData 000039c2f000 000039c2f000 00000001 WB
> RuntimeServicesData 000039c30000 000039c30000 00000002 WB RUNTIME
> BootServicesData 000039c32000 000039c32000 00000001 WB
> RuntimeServicesData 000039c33000 000039c33000 00000004 WB RUNTIME
> BootServicesData 000039c37000 000039c37000 00000009 WB
> BootServicesCode 000039c40000 000039c40000 00001410 WB
> RuntimeServicesCode 00003b050000 00003b050000 00000010 WB RUNTIME
> BootServicesCode 00003b060000 00003b060000 000000a0 WB
> BootServicesData 00003b100000 00003b100000 00000200 WB
> Reserved 00003ee5c000 00003ee5c000 00000001 WB
> BootServicesData 000040000000 000040000000 000bc000 WB
> MemoryMappedIO 0000fe100000 0000fe100000 00000001 RUNTIME
> Physical memory chunk(s):
> 0x00002000 - 0x3b2fffff, 946 MB ( 242430 pages)
> 0x40000000 - 0xfbffffff, 3008 MB ( 770048 pages)
> Excluded memory regions:
> 0x00000000 - 0x00001fff, 0 MB ( 2 pages) NoAlloc
> 0x07ef0000 - 0x07f0ffff, 0 MB ( 32 pages) NoAlloc
> 0x31c00000 - 0x331d6fff, 21 MB ( 5591 pages) NoAlloc
> 0x39c2a000 - 0x39c2afff, 0 MB ( 1 pages) NoAlloc
> 0x39c2e000 - 0x39c2efff, 0 MB ( 1 pages) NoAlloc
> 0x39c30000 - 0x39c31fff, 0 MB ( 2 pages) NoAlloc
> 0x39c33000 - 0x39c36fff, 0 MB ( 4 pages) NoAlloc
> 0x3b050000 - 0x3b05ffff, 0 MB ( 16 pages) NoAlloc
> 0x3ee5c000 - 0x3ee5cfff, 0 MB ( 1 pages) NoAlloc NoDump
> 0x3ee5c000 - 0x3ee5cfff, 0 MB ( 1 pages) NoAlloc
> 0xfe100000 - 0xfe100fff, 0 MB ( 1 pages) NoAlloc
>
> and:
>
> Physical memory chunk(s):
> 0x00000000002000 - 0x00000007eeffff, 133095424 bytes (32494 pages)
> 0x00000007f10000 - 0x00000031bfffff, 701431808 bytes (171248 pages)
> 0x000000331d7000 - 0x00000039c29fff, 111489024 bytes (27219 pages)
> 0x00000039c2b000 - 0x00000039c2dfff, 12288 bytes (3 pages)
> 0x00000039c2f000 - 0x00000039c2ffff, 4096 bytes (1 pages)
> 0x00000039c32000 - 0x00000039c32fff, 4096 bytes (1 pages)
> 0x00000039c37000 - 0x0000003b04ffff, 21073920 bytes (5145 pages)
> 0x0000003b060000 - 0x0000003b2fffff, 2752512 bytes (672 pages)
> 0x00000040000000 - 0x000000f5e2ffff, 3051552768 bytes (745008 pages)
>
> So: Some of the oddities go back to some of this earlier
> material. For example, somehow:
>
> Reserved 00003ee5c000 00003ee5c000 00000001 WB
>
> turned into:
>
> 0x3ee5c000 - 0x3ee5cfff, 0 MB ( 1 pages) NoAlloc NoDump
> 0x3ee5c000 - 0x3ee5cfff, 0 MB ( 1 pages) NoAlloc
In case it matters: devinfo -u shows:
PCIe Memory:
0xc0000000-0xc00fffff (pcib1)
0xc0100000-0xffffffff (root0)
. . .
pcib1 memory window:
0x600000000-0x600000fff (bcm_xhci0)
0xc0001000-0xc00fffff (root0)
but the prior I/O memory addresses list it
showed has:
0x40000000-0xfbffffff (ram0)
(See later for 0xfc000000..0xff843fff .)
and:
0xff844000-0xffffffffffffffff (root0)
For reference:
I/O memory addresses:
0x0-0x1fff (ram0)
0x2000-0x7eeffff (ram0)
0x7ef0000-0x7f0ffff (ram0)
0x7f10000-0x31bfffff (ram0)
0x31c00000-0x331d5fff (ram0)
0x331d6000-0x39c2afff (ram0)
0x39c2b000-0x39c2bfff (ram0)
0x39c2c000-0x39c2efff (ram0)
0x39c2f000-0x39c2ffff (ram0)
0x39c30000-0x39c30fff (ram0)
0x39c31000-0x39c32fff (ram0)
0x39c33000-0x39c33fff (ram0)
0x39c34000-0x39c37fff (ram0)
0x39c38000-0x3b04ffff (ram0)
0x3b050000-0x3b05ffff (ram0)
0x3b060000-0x3b2fffff (ram0)
0x3b300000-0x3ee5bfff (root0)
0x3ee5c000-0x3ee5cfff (ram0)
0x3ee5d000-0x3fffffff (root0)
0x40000000-0xfbffffff (ram0)
0xfc000000-0xfd4fffff (root0)
0xfd500000-0xfd50930f (pcib0)
0xfd509310-0xfd57ffff (root0)
0xfd580000-0xfd58ffff (genet0)
0xfd590000-0xfd5d1fff (root0)
0xfd5d2000-0xfd5d2eff (simple_mfd0)
0xfd5d2f00-0xfe006fff (root0)
0xfe007000-0xfe007aff (bcm_dma0)
0xfe007b00-0xfe00b87f (root0)
0xfe00b880-0xfe00b8bf (mbox0)
0xfe00b8c0-0xfe0fffff (root0)
0xfe100000-0xfe100fff (ram0)
0xfe101000-0xfe102fff (bcm2835_clkman0)
0xfe103000-0xfe103fff (root0)
0xfe104000-0xfe104027 (bcmrng0)
0xfe104028-0xfe1fffff (root0)
0xfe200000-0xfe2000b3 (gpio0)
0xfe2000b4-0xfe200fff (root0)
0xfe201000-0xfe2011ff (uart0)
0xfe201200-0xfe203fff (root0)
0xfe204000-0xfe2041ff (spi0)
0xfe204200-0xfe2fffff (root0)
0xfe300000-0xfe3000ff (sdhci_bcm0)
0xfe300100-0xfe33ffff (root0)
0xfe340000-0xfe3400ff (sdhci_bcm1)
0xfe340100-0xfe803fff (root0)
0xfe804000-0xfe804fff (iichb0)
0xfe805000-0xff840fff (root0)
0xff841000-0xff841fff (gic0)
0xff842000-0xff843fff (gic0)
0xff844000-0xffffffffffffffff (root0)
===
Mark Millard
marklmi at yahoo.com