[Bug 213837] "Kernel panic - not syncing: corrupted stack end detected inside scheduler" at building via distcc on a G5

From
<hidden>
Date
2021-09-08 12:56:12
Reply to
unknown sender, 2021-07-23
https://bugzilla.kernel.org/show_bug.cgi?id=213837
--- Comment #6 from mpe@ellerman.id.au ---
bugzilla-daemon@bugzilla.kernel.org writes:
quoted hunk ↗ jump to hunk
https://bugzilla.kernel.org/show_bug.cgi?id=213837

Erhard F. (erhard_f@mailbox.org) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|https://bugzilla.kernel.org |
                   |/show_bug.cgi?id=213079     |
--- Comment #4 from Erhard F. (erhard_f@mailbox.org) ---
Checked out whether this has really something to do with bug #213079 or not
by
copying this root partition to a regular HDD and use that one instead. As the
issue still happens it seems these are two seperate bugs.

[...]
Kernel panic - not syncing: corrupted stack end detected inside scheduler
Can you try this patch, it might help us work out what is corrupting the
stack.

cheers
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index c4462c454ab9..07bfa25c1b48 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -5490,8 +5490,14 @@ static noinline void __schedule_bug(struct task_struct
*prev)
 static inline void schedule_debug(struct task_struct *prev, bool preempt)
 {
 #ifdef CONFIG_SCHED_STACK_END_CHECK
-       if (task_stack_end_corrupted(prev))
+       if (task_stack_end_corrupted(prev)) {
+               char *start = (char *)end_of_stack(prev);
+               pr_err("stack corrupted? stack end = 0x%px\n",
end_of_stack(prev));
+               print_hex_dump(KERN_ERR, "stack: ", DUMP_PREFIX_ADDRESS, 16, 4,
+                              start - SZ_1K, THREAD_SIZE + SZ_1K, true);
+
                panic("corrupted stack end detected inside scheduler\n");
+       }

        if (task_scs_end_corrupted(prev))
                panic("corrupted shadow stack detected inside scheduler\n");

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching someone on the CC list of the bug.
Thread (26 messages) 26 messages, 3 authors, last reply 2022-07-07
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help