LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 12-17-2011, 03:44 PM   #1
rrlangly
Member
 
Registered: Dec 2009
Posts: 47

Rep: Reputation: 0
Thread overran stack, or stack corrupted


I think the main error here is "Thread overran stack, or stack corrupted", but I'm not sure what that means in relation to what I might be doing wrong in my module. Can anyone explain this better or have any thoughts as to how to track down this oops?

Code:
[  599.455035] BUG: unable to handle kernel paging request at 0000000000010d40
[  599.456017] IP: [<ffffffff8105eb1a>] resched_task+0x1a/0x60
[  599.456017] PGD 1d821067 PUD 1da27067 PMD 0
[  599.456017] Thread overran stack, or stack corrupted
[  599.456017] Oops: 0000 [#1] SMP
[  599.456017] CPU 0
[  599.456017] Modules linked in: mod2 mod1
[  599.456017]
[  599.456017] Pid: 1744, comm: udptest Tainted: G        W   3.0.6-gentoo #7 Bochs Bochs
[  599.456017] RIP: 0010:[<ffffffff8105eb1a>]  [<ffffffff8105eb1a>] resched_task+0x1a/0x60
[  599.456017] RSP: 0018:ffff88001fa03df8  EFLAGS: 00010002
[  599.456017] RAX: 0000000000010d40 RBX: ffff88001fa10db0 RCX: 0000000000000080
[  599.456017] RDX: ffff88001d972000 RSI: 0000000000000c00 RDI: ffff88001e08b3a0
[  599.456017] RBP: ffff88001fa03df8 R08: 0000000000000000 R09: ffff88001fa10d60
[  599.456017] R10: ffff88001fa03dd8 R11: ffff88001e08b3e8 R12: ffff88001e08b3e8
[  599.456017] R13: 0000000000000000 R14: ffff88001fa03f48 R15: 7fffffffffffffff
[  599.456017] FS:  00007fc29ac96700(0000) GS:ffff88001fa00000(0000) knlGS:0000000000000000
[  599.456017] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  599.456017] CR2: 0000000000010d40 CR3: 000000001d80c000 CR4: 00000000000006f0
[  599.456017] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[  599.456017] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[  599.456017] Process udptest (pid: 1744, threadinfo ffff88001d972000, task ffff88001e08b3a0)
[  599.456017] Stack:
[  599.456017]  ffff88001fa03e28 ffffffff81068271 ffff88001fa10d40 ffff88001fa10d40
[  599.456017]  0000000000000000 ffff88001e08b3a0 ffff88001fa03e58 ffffffff81066221
[  599.456017]  ffff88001e08b3a0 ffff88001e08b3a0 0000000000000000 0000000000000000
[  599.456017] Call Trace:
[  599.456017]  <IRQ>
[  599.456017]  [<ffffffff81068271>] task_tick_fair+0x96/0x100
[  599.456017]  [<ffffffff81066221>] scheduler_tick+0xc1/0x259
[  599.456017]  [<ffffffff81079985>] update_process_times+0x62/0x73
[  599.456017]  [<ffffffff810956f1>] tick_sched_timer+0x6d/0x96
[  599.456017]  [<ffffffff8108b33c>] __run_hrtimer+0xb8/0x143
[  599.456017]  [<ffffffff81095684>] ? tick_nohz_handler+0xd6/0xd6
[  599.456017]  [<ffffffff8108b5f1>] hrtimer_interrupt+0xd5/0x19f
[  599.456017]  [<ffffffff81048c44>] smp_apic_timer_interrupt+0x81/0x94
[  599.456017]  [<ffffffff8159e293>] apic_timer_interrupt+0x13/0x20
[  599.456017]  <EOI>
[  599.456017] Code: 7e 28 00 75 e6 31 c0 48 83 7f 18 00 0f 94 c0 c9 c3 55 48 c7 c0 40 0d 01 00 48 8b 57 08 48 89 e5 8b 4a 18 48 03 04 cd 90 21 a8 81 <8b> 00 89 c1 c1 f9 08 38 c1 75 04 0f 0b eb fe 48 8b 42 10 a8 08
[  599.456017] RIP  [<ffffffff8105eb1a>] resched_task+0x1a/0x60
[  599.456017]  RSP <ffff88001fa03df8>
[  599.456017] CR2: 0000000000010d40
[  599.456017] ---[ end trace fadf069c92748739 ]---
[  599.456017] Kernel panic - not syncing: Fatal exception in interrupt
[  599.456017] Pid: 1744, comm: udptest Tainted: G      D W   3.0.6-gentoo #7
[  599.456017] Call Trace:
[  599.456017]  <IRQ>  [<ffffffff81595303>] panic+0x8c/0x195
[  599.456017]  [<ffffffff8159834f>] oops_end+0xb1/0xc1
[  599.456017]  [<ffffffff81056cf4>] no_context+0x1f7/0x206
[  599.456017]  [<ffffffff81056e8b>] __bad_area_nosemaphore+0x188/0x1ab
[  599.456017]  [<ffffffff81056ebc>] bad_area_nosemaphore+0xe/0x10
[  599.456017]  [<ffffffff8159a273>] do_page_fault+0x1c6/0x38c
[  599.456017]  [<ffffffff81068c3a>] ? enqueue_task_fair+0x3fc/0x40b
[  599.456017]  [<ffffffff8159546f>] ? printk+0x63/0x65
[  599.456017]  [<ffffffff8159526c>] ? dump_stack+0x77/0x82
[  599.456017]  [<ffffffff81599ca2>] do_async_page_fault+0x49/0x6b
[  599.456017]  [<ffffffff81597855>] async_page_fault+0x25/0x30
[  599.456017]  [<ffffffff8105eb1a>] ? resched_task+0x1a/0x60
[  599.456017]  [<ffffffff81068271>] task_tick_fair+0x96/0x100
[  599.456017]  [<ffffffff81066221>] scheduler_tick+0xc1/0x259
[  599.456017]  [<ffffffff81079985>] update_process_times+0x62/0x73
[  599.456017]  [<ffffffff810956f1>] tick_sched_timer+0x6d/0x96
[  599.456017]  [<ffffffff8108b33c>] __run_hrtimer+0xb8/0x143
[  599.456017]  [<ffffffff81095684>] ? tick_nohz_handler+0xd6/0xd6
[  599.456017]  [<ffffffff8108b5f1>] hrtimer_interrupt+0xd5/0x19f
[  599.456017]  [<ffffffff81048c44>] smp_apic_timer_interrupt+0x81/0x94
[  599.456017]  [<ffffffff8159e293>] apic_timer_interrupt+0x13/0x20
[  599.456017]  <EOI>
 
Old 12-21-2011, 12:04 AM   #2
gary185
Member
 
Registered: Jul 2011
Posts: 113

Rep: Reputation: Disabled
the kernel places the value STACK_END_MAGIC at the end of the stack
when there is a fault in kernel space the value of STACK_END_MAGIC is checked
if it's been overwritten you get the message Thread overran stack, or stack corrupted
so basically you just ran the pointer past the stack end

stackend = end_of_stack(tsk);
if (tsk != &init_task && *stackend != STACK_END_MAGIC)
printk(KERN_ALERT "Thread overran stack, or stack corrupted\n");
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Thread stack printing psmurthy Programming 5 08-18-2011 02:14 AM
single 8K process stack vs 4K process stack and a seperate 4K interrupt stack charvak Linux - Kernel 1 03-17-2010 07:58 PM
thread's stack lqu Linux - Kernel 5 01-13-2010 12:57 AM
Difference b/t Kernel stack and User stack hazzyb Linux - Software 2 09-29-2008 08:40 PM
Thread call stack StephenG Linux - General 3 08-24-2005 11:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 12:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration