Skip to contentSkip to conversation

New Debian sparc64 test kernel for stack corruption issue

DISCUSSION John Paul Adrian Glaubitz 2 participants 5 messages Oct 19, 2025 – Oct 22, 2025

lore
Share & tools
lore
#0 lore raw

Hi,

NRoach44 on the #debian-ports IRC channel has determined that turning off the following two configuration options in the Linux kernel,

- CONFIG_SLAB_FREELIST_HARDENED
- CONFIG_SLAB_FREELIST_RANDOM

fixes the following crash:

[   25.528376] Kernel panic - not syncing: corrupted stack end detected inside scheduler
[   25.528384] CPU: 149 UID: 0 PID: 2305 Comm: (udev-worker) Tainted: G        W           6.17.3-1760771931-debmod #13 NONE 
[   25.528395] Tainted: [W]=WARN
[   25.528399] Call Trace:
[   25.528403] [<0000000000433cd4>] dump_stack+0x8/0x18
[   25.528419] [<00000000004297ac>] vpanic+0xdc/0x318
[   25.528429] [<0000000000429a0c>] panic+0x24/0x30
[   25.528436] [<0000000000be2280>] __schedule+0xa8/0x7bc
[   25.528445] [<0000000000be2b60>] schedule+0x24/0x4c
[   25.528452] [<0000000000be6970>] schedule_timeout+0xc8/0xe4
[   25.528459] [<0000000000be3318>] __wait_for_common+0x78/0xf0
[   25.528466] [<0000000000be3550>] wait_for_completion_timeout+0x1c/0x2c
[   25.528473] [<000000001005e2f4>] usb_start_wait_urb+0x68/0x128 [usbcore]
[   25.528502] [<000000001005e468>] usb_control_msg+0xb4/0xf8 [usbcore]
[   25.528518] [<0000000010051180>] set_port_feature+0x44/0x54 [usbcore]
[   25.528530] [<00000000100530f0>] hub_power_on+0xc8/0xe8 [usbcore]
[   25.528543] [<0000000010054fd8>] hub_activate+0x12c/0x644 [usbcore]
[   25.528557] [<0000000010059438>] hub_probe+0xdd4/0xeb0 [usbcore]
[   25.528570] [<0000000010062360>] usb_probe_interface+0x234/0x26c [usbcore]
[   25.528585] [<0000000000a10a40>] really_probe+0x1ac/0x3b0
[   26.606260] Press Stop-A (L1-A) from sun keyboard or send break
[   26.606260] twice on console to return to the boot prom
[   26.628265] ---[ end Kernel panic - not syncing: corrupted stack end detected inside scheduler ]---

I have created UMP and SMP test kernel Debian packages to verify this:

https://people.debian.org/~glaubitz/sparc64/

Could someone test this kernel? It works for me in a SPARC T4 LDOM.

FWIW, the kernel does *not* yet include the fixes for accurate exception reporting [1], so expect that the kernels may not be stable on older UltraSPARC systems. The fixes for that will be included in 6.17.3 or newer or 6.18 or newer.

A GitHub issue has been opened for this bug in [2].

Adrian

Quoted 2 lines

[1] https://github.com/sparclinux/issues/issues/1
[2] https://github.com/sparclinux/issues/issues/14

Signature · 4 lines
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
#1 lore raw

Hi Adrian!"

Quoted 9 lines · John Paul Adrian Glaubitz

I have created UMP and SMP test kernel Debian packages to verify this:

https://people.debian.org/~glaubitz/sparc64/

Could someone test this kernel? It works for me in a SPARC T4 LDOM.

FWIW, the kernel does*not* yet include the fixes for accurate exception reporting [1], so expect that the kernels may not be stable on older UltraSPARC systems. The fixes for that will be included in 6.17.3 or newer or 6.18 or newer.

I found two versions. I tested:

https://people.debian.org/~glaubitz/sparc64/linux-image-6.16.12+3-sparc64-smp_6.16.12-2+sparc64.1_sparc64.deb

On T2000 with Niagara

[   12.126130] mptsas 0000:07:00.0: Unable to change power state from D3cold to D0, device inaccessible
[   12.463473] NON-RESUMABLE ERROR: Reporting on cpu 31
[   12.463643] NON-RESUMABLE ERROR: TPC [0x0000000010184034] <MakeIocReady+0x10/ 0x298 [mptbase]>
[   12.463810] NON-RESUMABLE ERROR: RAW [1f10000000000007:0000000e3179235c:00000 00202000004:000000ea00300000
[   12.463894] NON-RESUMABLE ERROR: 00000000001f0000:0000000000000000:00000 00000000000:0000000000000000]
[   12.463975] NON-RESUMABLE ERROR: handle [0x1f10000000000007] stick [0x0000000 e3179235c]
[   12.464050] NON-RESUMABLE ERROR: type [precise nonresumable]
[   12.464113] NON-RESUMABLE ERROR: attrs [0x02000004] < PIO sp-faulted priv > [   12.464221] NON-RESUMABLE ERROR: raddr [0x000000ea00300000]
[   12.465352] Kernel panic - not syncing: Non-resumable error.
[   12.465422] CPU: 31 UID: 0 PID: 367 Comm: (udev-worker) Not tainted 6.16.12+3 -sparc64-smp #1 NONE  Debian 6.16.12-2+sparc64.1
[   12.465532] Call Trace:
[   12.465574] [<00000000004373c4>] dump_stack+0x8/0x18
[   12.465656] [<0000000000429540>] panic+0xf4/0x398
[   12.465727] [<000000000043afcc>] sun4v_nonresum_error+0x16c/0x240 [   12.465817] [<0000000000406eb8>] sun4v_nonres_mondo+0xc8/0xd8
[   12.465910] [<0000000010184034>] MakeIocReady+0x10/0x298 [mptbase] [   12.466007] [<00000000101844b4>] mpt_do_ioc_recovery+0x9c/0x1110 [mptbase] [   12.466103] [<00000000101836f8>] mpt_attach+0xb58/0xd20 [mptbase] [   12.466209] [<0000000010287f30>] mptsas_probe+0x10/0x440 [mptsas] [   12.466336] [<0000000000b3fab0>] local_pci_probe+0x30/0x80
[   12.466427] [<0000000000b405d4>] pci_device_probe+0xb4/0x240
[   12.466518] [<0000000000bfd348>] really_probe+0xc8/0x400
[   12.466612] [<0000000000bfd70c>] __driver_probe_device+0x8c/0x160 [   12.466709] [<0000000000bfd8c8>] driver_probe_device+0x28/0x100 [   12.466805] [<0000000000bfdb7c>] __driver_attach+0xbc/0x1e0
[   12.466900] [<0000000000bfacfc>] bus_for_each_dev+0x5c/0xc0
[   12.466992] [<0000000000bfcafc>] driver_attach+0x1c/0x40
[   13.088506] Press Stop-A (L1-A) from sun keyboard or send break [   13.088506] twice on console to return to the boot prom
[   13.088811] ---[ end Kernel panic - not syncing: Non-resumable error. ]---

still crash, but there is some "information"

Take in consideration that on this sytem my sweet spot for kernel is:
6.12.38+deb13-sparc64-smp

older stuff was crashy, IIRC all newer kernel (or most?) straigt from debian and most kernel you provided fail to boot.

Instead on single-CPU I tested:

https://people.debian.org/~glaubitz/sparc64/linux-image-6.16.12+3-sparc64_6.16.12-2+sparc64.1_sparc64.deb

On Netra T1 UltraSPARC IIe

- boots fine
- basic operations like apt-get work fine
- some compilation - survives fine

In dmesg I see no failures, errors... except this:

[    0.952369] pci_bus 0000:01: extended config space not accessible
[    0.957507] pci_bus 0000:02: extended config space not accessible
[   10.402607] This architecture does not have kernel memory protection.
[   21.640233] Warning! ehci_hcd should always be loaded before uhci_hcd and ohci_hcd, not after [   33.087538] PM: Image not found (code -22)
[   35.720238] Not activating Mandatory Access Control as /sbin/tomoyo-init does not exist.

Then I tried the said kernel on Ultra1 with UltraSPARC I (literally transferring the same Hard Disk) As "expected" there were no improvements over other kernels. same boot failure:
Invalid sbus slot number 31
Invalid sbus slot number 31
error: canonicalise devname failed.
Can't read disk label.
Can't open disk label package
error: unable to open /sbus@1f,0/SUNW,fdtwo@f,1400000.
Invalid SCSI target number fffe55d0
error: unable to open /sbus@1f,0/SUNW,fas@e,8800000/sd.

This is really the same I even got with 6.1 kernels. I was not able to boot this system into debian at all.

Riccardo

#2 lore raw

Hello Riccardo,

Quoted 50 lines · Riccardo Mottola

https://people.debian.org/~glaubitz/sparc64/linux-image-6.16.12+3-sparc64-smp_6.16.12-2+sparc64.1_sparc64.deb

On T2000 with Niagara

[   12.126130] mptsas 0000:07:00.0: Unable to change power state from D3cold to
D0, device inaccessible
[   12.463473] NON-RESUMABLE ERROR: Reporting on cpu 31
[   12.463643] NON-RESUMABLE ERROR: TPC [0x0000000010184034] <MakeIocReady+0x10/
0x298 [mptbase]>
[   12.463810] NON-RESUMABLE ERROR: RAW [1f10000000000007:0000000e3179235c:00000 00202000004:000000ea00300000
[   12.463894] NON-RESUMABLE ERROR: 00000000001f0000:0000000000000000:00000 00000000000:0000000000000000]
[   12.463975] NON-RESUMABLE ERROR: handle [0x1f10000000000007] stick [0x0000000
e3179235c]
[   12.464050] NON-RESUMABLE ERROR: type [precise nonresumable] [   12.464113] NON-RESUMABLE ERROR: attrs [0x02000004] < PIO sp-faulted priv >
[   12.464221] NON-RESUMABLE ERROR: raddr [0x000000ea00300000] [   12.465352] Kernel panic - not syncing: Non-resumable error. [   12.465422] CPU: 31 UID: 0 PID: 367 Comm: (udev-worker) Not tainted 6.16.12+3
-sparc64-smp #1 NONE  Debian 6.16.12-2+sparc64.1
[   12.465532] Call Trace:
[   12.465574] [<00000000004373c4>] dump_stack+0x8/0x18
[   12.465656] [<0000000000429540>] panic+0xf4/0x398
[   12.465727] [<000000000043afcc>] sun4v_nonresum_error+0x16c/0x240 [   12.465817] [<0000000000406eb8>] sun4v_nonres_mondo+0xc8/0xd8 [   12.465910] [<0000000010184034>] MakeIocReady+0x10/0x298 [mptbase] [   12.466007] [<00000000101844b4>] mpt_do_ioc_recovery+0x9c/0x1110 [mptbase]
[   12.466103] [<00000000101836f8>] mpt_attach+0xb58/0xd20 [mptbase] [   12.466209] [<0000000010287f30>] mptsas_probe+0x10/0x440 [mptsas] [   12.466336] [<0000000000b3fab0>] local_pci_probe+0x30/0x80
[   12.466427] [<0000000000b405d4>] pci_device_probe+0xb4/0x240 [   12.466518] [<0000000000bfd348>] really_probe+0xc8/0x400
[   12.466612] [<0000000000bfd70c>] __driver_probe_device+0x8c/0x160 [   12.466709] [<0000000000bfd8c8>] driver_probe_device+0x28/0x100 [   12.466805] [<0000000000bfdb7c>] __driver_attach+0xbc/0x1e0 [   12.466900] [<0000000000bfacfc>] bus_for_each_dev+0x5c/0xc0 [   12.466992] [<0000000000bfcafc>] driver_attach+0x1c/0x40
[   13.088506] Press Stop-A (L1-A) from sun keyboard or send break [   13.088506] twice on console to return to the boot prom
[   13.088811] ---[ end Kernel panic - not syncing: Non-resumable error. ]---

Quoted 1 line

still crash, but there is some "information"

I have not seen that crash on any of my machines, so I'm really wondering where it comes from.

Quoted 2 lines

Take in consideration that on this sytem my sweet spot for kernel is:
6.12.38+deb13-sparc64-smp

Would you be able to bisect this?

Quoted 15 lines

older stuff was crashy, IIRC all newer kernel (or most?) straigt from debian and most kernel you provided fail to boot.

Instead on single-CPU I tested:

https://people.debian.org/~glaubitz/sparc64/linux-image-6.16.12+3-sparc64_6.16.12-2+sparc64.1_sparc64.deb

On Netra T1 UltraSPARC IIe

- boots fine
- basic operations like apt-get work fine
- some compilation - survives fine

In dmesg I see no failures, errors... except this:

Quoted 8 lines

[    0.952369] pci_bus 0000:01: extended config space not accessible [    0.957507] pci_bus 0000:02: extended config space not accessible [   10.402607] This architecture does not have kernel memory protection. [   21.640233] Warning! ehci_hcd should always be loaded before uhci_hcd and ohci_hcd, not after
[   33.087538] PM: Image not found (code -22)
[   35.720238] Not activating Mandatory Access Control as /sbin/tomoyo-init does not exist.

Out of curiosity, can you try reinstalling the openssh-server package?

# apt install --reinstall openssh-server

This causes crashes for me with certain kernels on UltraSPARC III.

Quoted 13 lines

Then I tried the said kernel on Ultra1 with UltraSPARC I (literally transferring the same Hard Disk)
As "expected" there were no improvements over other kernels. same boot failure:
Invalid sbus slot number 31
Invalid sbus slot number 31
error: canonicalise devname failed.
Can't read disk label.
Can't open disk label package
error: unable to open /sbus@1f,0/SUNW,fdtwo@f,1400000. Invalid SCSI target number fffe55d0
error: unable to open /sbus@1f,0/SUNW,fas@e,8800000/sd.

Quoted 2 lines

This is really the same I even got with 6.1 kernels. I was not able to boot this system into debian at all.

We can look into this later, this is not a kernel but a bootloader problem.

Adrian

Signature · 4 lines
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
#3 lore raw

Hi Adrian!

sorry for the delay, but $DAYJOB and actual coding in GNUSstep  do take over on system hacking...

Quoted 1 line · John Paul Adrian Glaubitz

I have not seen that crash on any of my machines, so I'm really wondering where it comes from.

I remember we had some testing about the issue on Niagara T1... I should dig in bast conversations.

Quoted 3 lines
Quoted 2 lines

Take in consideration that on this sytem my sweet spot for kernel is:
6.12.38+deb13-sparc64-smp

Would you be able to bisect this?

Not immediatly. Do you mean by cloing out git of kernel.org? Or can I test various ready deb files already archived? Issue could be in code as well as some configuration changes.

I can test some of the available kernels.. I think some are yours some debians.
Can I distinguish them with the "deb" ? There is also the issue that my boot partition can hold a finite number of kernels, so I need to uninstall some. I had more, but I removed some to make place for your lates tones.

Of course, it is easy if there are just .deb files to be uninstalled/reinstalled.

For a ballpark of the issue, I have:

6.8.12-sparc64-smp - > works
6.12.38+deb13-sparc64-smp -> works
6.12+unreleased-sparc64-smp -> doesn't work (where does this kernel come from??) 6.16.12+deb14-sparc64-smp -> doesn't work

and of course, your kernel doesn't work either.

Quoted 5 lines

Out of curiosity, can you try reinstalling the openssh-server package?

# apt install --reinstall openssh-server

This causes crashes for me with certain kernels on UltraSPARC III.

On the Ultra IIe I just tried:

Preconfiguring packages ...
(Reading database ... 56583 files and directories currently installed.) Preparing to unpack .../openssh-server_1%3a10.2p1-2_sparc64.deb ... Unpacking openssh-server (1:10.2p1-2) over (1:10.2p1-2) ... Setting up openssh-server (1:10.2p1-2) ...
ssh.socket is a disabled or a static unit not running, not starting it. multix@debian-sparc64:~$

no kernel crash. I previously, diligently, installed also a telnetd server so i can access the system beyond serial console in case of ssh issues! (It is safe, not NAT'd out of my LAN anyway)

Quoted 1 line

We can look into this later, this is not a kernel but a bootloader problem.

Do you think it is GRUB? IIRC it affects also the Ultra2. I did not test this kernel, because old Ultra (and SparcStation) cases are becoming brittle due to PC+ABS cristallization... and to my sadness also the Netra T1 Panel during this deep test process (I tested also OpenBSD and NetBSD which now I have fully functional instead of older Solaris, a quite nice comparison). I also exchanged most of NVRAM chips, I got a couple of NOS of more recent manufacture. Unfortunately one did not work or anyway somehow cooked.... need to check that. It made things quite more convenient.

Would be nice to look at it, but if it is so "separate thread" from the kernel stuff then. I am unsure how the mapping of SCSI targets is going on there.

Riccardo

#4 lore raw
In reply to John Paul Adrian Glaubitz

Hi,

regarding T2000 Niagara T1 I did some tests using kernels from debian snapshots. E.g.

https://snapshot.debian.org/archive/debian-ports/20250511T134440Z/pool-sparc64/main/l/linux/

I found that 6.13, 6.14, 6.15 were available and I tried most of them.
I was prearing a report file with various boots attempt.
Unfortunately doing lots of reboots, I ended up rebooting my running workstation and not the SPARC server loosing everything. Ah! I was not "connected" and xterms are look alike.

Quoted 4 lines · John Paul Adrian Glaubitz
Quoted 2 lines

Take in consideration that on this sytem my sweet spot for kernel is:
6.12.38+deb13-sparc64-smp

Would you be able to bisect this?

The boot breakage appears to be with 6.15. I am unsure of the various versions. 6.14 kernels do boot, although during usage I got VM issues (e.g. using aptitude while running it)

Luckily I have the downloaded files so I coiuld reconstruct.

-rw-r--r--  1 multix users 42142648 Aug 28 16:34 linux-image-6.12.3-sparc64-smp_6.12.3-1+sparc64_sparc64.deb -rw-r--r--  1 multix users 48755288 Sep  8 23:53 linux-image-6.12+unreleased-sparc64-smp_6.12.43-1+nothp1_sparc64.deb -rw-r--r--  1 multix users 49575964 Jan 26  2025 linux-image-6.13-rc7-sparc64-smp_6.13~rc7-1~exp1_sparc64.deb -rw-r--r--  1 multix users 51283484 Feb 22  2025 linux-image-6.13-sparc64-smp_6.13.4-1~exp1_sparc64.deb

-> up to here all boot fine!

-rw-r--r--  1 multix users 50302692 Apr 25 22:00 linux-image-6.14-sparc64-smp_6.14.3-1~exp1_sparc64.deb -rw-r--r--  1 multix users 50316636 May 10 09:50 linux-image-6.14-sparc64-smp_6.14.6-1~exp1_sparc64.deb

-> these do boot, but running aptitude issued vm issues, although the machine did not lock up and could reboot

-rw-r--r--  1 multix users 50688376 May 23 09:53 linux-image-6.15-rc7-sparc64-smp_6.15~rc7-1~exp1_sparc64.deb -rw-r--r--  1 multix users 50664668 May 30 09:54 linux-image-6.15-sparc64-smp_6.15-1~exp1_sparc64.deb -rw-r--r--  1 multix users 50935216 Jul 11 16:14 linux-image-6.15-sparc64-smp_6.15.6-1~exp1_sparc64.deb -rw-r--r--  1 multix users 50422504 Oct 19 21:58 linux-image-6.16.12+3-sparc64-smp_6.16.12-2+sparc64.1_sparc64.deb -rw-r--r--  1 multix users 50432892 Sep 28 03:52 linux-image-6.16.9+deb14-sparc64-smp_6.16.9-1_sparc64.deb

-> all of these fail to boot, even the rc7

I don't know if there are later 6.14 kernels I can try or earlier 6.15, but I would say that the issue is there. Could be kernel code, change in configuration...

Riccardo