head -r356109 on 32-bit powerpc (old PowerMac): Memory modified after free during late-stage of boot, most recently used by bus-sc

From: Mark Millard <marklmi_at_yahoo.com>
Date: Sun, 29 Dec 2019 13:53:42 -0800
The kernel here is from expanding:

https://artifact.ci.freebsd.org/snapshot/head/r356109/powerpc/powerpc/kernel*.txz

(So: not my kernel build.) This is, of course, a debug kernel.
World is my build (via system-clang, not gcc 4.2.1)

Hand copied from an image of the crash information
(no input possible at the db> prompt) . . .

. . .
Root mount waiting for: CAM usbus0 usbus1
ugen1.2: <Mitsumi Electric Hub in Apple Extended USB Keyboard> at usbus1
uhub4 on uhub0
uhub4: <Mitsumi Electric Hub in Apple Extended USB Keyboard, class 9/0, rev 1.10/1.22, addr 2> on ubus1
Memory modified after free 0x1e4d180(28) val=1e5a9c0 0 0x1e4d190
panic: Most recently used by bus-sc

cpuid = 0
time = 2
KDB: stack backtrace:
0xd2630390: at kdb_backtrace+0x5c
0xd2630400: at vpanic+0x1f8
0xd2630470: at panic+0x68
0xd26304c0: at mtrash_ctor+0x9c
0xd26304e0: at item_ctor+0xb4
0xd2630510: at uma_zalloc_arg+0x1b4
0xd2630540: at malloc+0xfc
0xd2630580: at alloc_bounce_pages+0x7c
0xd26305c0: at bus_dmamap_create+0x1e8
0xd26305f0: at bus_dmamem_alloc+0x64
0xd2630620: at usb_pc_alloc_mem+0xbc
0xd2630660: at usbd_transfer_setup_sub_malloc+0x28c
0xd26306c0: at ohci_xfer_setup+0x1e4
0xd2630720: at usbd_trasnfer_setup+0x494
0xd26307a0: at usbd_ctrl_trasnfer_setup+0x184
0xd26307f0: at usbd_do_request_flags+0x300
0xd2630870: at usbd_req_set_address+0xdc
0xd26308b0: at usb_alloc_device+0x3cc
0xd2630940: at uhub_explore+0x678
0xd26309b0: at usb_bus_explore+0x128
0xd26309d0: at usb_process+0x128
0xd2630a10: at fork_exit+0xc0
0xd2630a40: at fork_trampoline+0xc
KDB: enter: panic
[ thread pid 15 tid 100040 ]
Stopped at kdb_enter +0x70: addi r0,r0,0x0
db> 

Unfortunately, I have no control at that point
so this is all the information available about
the PowerMac's state.

I can report the that following sequences do
boot (so far):

boot -s then exit at the shell prompt
boot -v

(I've also seen a Rock64 Cortex-A53 board with
boot crashes, where boot -v happened to boot,
but only a personal non-debug kernel build was
tried at the time.)

The PowerMac is a 2-processor G4 model, with
FW800. 2 GiBytes of RAM.



Note: Historically I've experimented with
system-clang and more modern gcc builds
for 32-bit powerpc and powerpc64. The above
is from me getting ready to jump over to
the official system-clang context (and ELFv2
for powerpc64).

I wanted to know some of the status of things
that I'd see just before those changes so I'd
have some clue what might be new vs. old when
I switch over.


===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)
Received on Sun Dec 29 2019 - 20:53:49 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:22 UTC