* [uml-devel] Kernel panic - not syncing: do_syscall_stub : PTRACE_SETREGS failed, errno = 5
@ 2008-07-18 19:22 Peter Teoh
2008-07-18 20:55 ` Jeff Dike
0 siblings, 1 reply; 4+ messages in thread
From: Peter Teoh @ 2008-07-18 19:22 UTC (permalink / raw)
To: user-mode-linux-devel
First I tried the 2.6.24-rc7.bz2 image mentioned at:
http://user-mode-linux.sourceforge.net/
And it worked. Next, using the same rootfs, I checkout 2.6.26-rc7
and generated a UML guest for it. Looking at the
uml/include/config/kernel.release indicated the version of the UML
guest as:
2.6.26-rc4-00103-g1beee8d
It bootup no problem as well.
Next I checkout the 2.6.26 branch (current master), and generated a
UML guest for it. Now the guest have the same version as the host -
2.6.26. But bootup with errors:
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem) readonly.
Registers -
0 0x0
1 0x0
2 0x0
3 0x0
4 0x0
5 0x0
6 0x0
7 0x0
8 0x0
9 0x0
10 0x0
11 0x0
12 0x0
13 0x0
14 0x0
15 0x0
16 0x0
Kernel panic - not syncing: do_syscall_stub : PTRACE_SETREGS failed, errno = 5
EIP: 0073:[<b7f33424>] CPU: 0 Not tainted ESP: 007b:bfe314b0 EFLAGS: 00200246
Not tainted
EAX: 00000000 EBX: 00000fed ECX: 00000013 EDX: 00000fed
ESI: 00000fe9 EDI: 00000003 EBP: bfe314d8 DS: 007b ES: 007b
0fc5cca8: [<08069a9b>] show_regs+0xb4/0xb9
0fc5ccd4: [<0805968e>] panic_exit+0x25/0x3b
0fc5cce8: [<080832b6>] notifier_call_chain+0x27/0x4c
0fc5cd10: [<080832f2>] __atomic_notifier_call_chain+0x17/0x19
0fc5cd20: [<08083309>] atomic_notifier_call_chain+0x15/0x17
0fc5cd3c: [<0806f9ef>] panic+0x52/0xdd
0fc5cd5c: [<0806648b>] do_syscall_stub+0x6e/0x173
0fc5cd84: [<0806669a>] run_syscall_stub+0x9c/0xa1
0fc5cd98: [<08067ad2>] write_ldt_entry+0xe2/0x140
0fc5cde0: [<0806813f>] init_new_ldt+0x193/0x2a8
0fc5ce58: [<08059986>] init_new_context+0xb7/0xf5
0fc5ce78: [<080ad6cc>] bprm_mm_init+0x3f/0x164
0fc5cea8: [<080ae2d1>] do_execve+0x6d/0x198
0fc5cec8: [<080564f9>] execve1+0x25/0x40
0fc5ceec: [<08056565>] um_execve+0x14/0x34
0fc5cef8: [<08058225>] kernel_execve+0x2c/0x36
0fc5cf18: [<0805624c>] run_init_process+0x18/0x1d
0fc5cf2c: [<080562f7>] init_post+0xa6/0xcf
0fc5cf38: [<0804953f>] kernel_init+0x1e7/0x1f1
0fc5cfb4: [<08063c0f>] run_kernel_thread+0x37/0x3f
0fc5cfe0: [<08057541>] new_thread_handler+0x57/0x7e
0fc5cffc: [<00000000>] 0x0
Terminated
Seems similar to that of:
http://www.gossamer-threads.com/lists/linux/kernel/944646
Any fix yet?
--
Regards,
Peter Teoh
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [uml-devel] Kernel panic - not syncing: do_syscall_stub : PTRACE_SETREGS failed, errno = 5 2008-07-18 19:22 [uml-devel] Kernel panic - not syncing: do_syscall_stub : PTRACE_SETREGS failed, errno = 5 Peter Teoh @ 2008-07-18 20:55 ` Jeff Dike 2008-07-20 9:15 ` Peter Teoh 0 siblings, 1 reply; 4+ messages in thread From: Jeff Dike @ 2008-07-18 20:55 UTC (permalink / raw) To: Peter Teoh; +Cc: user-mode-linux-devel On Sat, Jul 19, 2008 at 03:22:58AM +0800, Peter Teoh wrote: > Next I checkout the 2.6.26 branch (current master), and generated a > UML guest for it. Now the guest have the same version as the host - > 2.6.26. But bootup with errors: > > EXT3-fs: mounted filesystem with ordered data mode. > VFS: Mounted root (ext3 filesystem) readonly. > Registers - > 0 0x0 > 1 0x0 > 2 0x0 > 3 0x0 > 4 0x0 > 5 0x0 > 6 0x0 > 7 0x0 > 8 0x0 > 9 0x0 > 10 0x0 > 11 0x0 > 12 0x0 > 13 0x0 > 14 0x0 > 15 0x0 > 16 0x0 > Kernel panic - not syncing: do_syscall_stub : PTRACE_SETREGS failed, errno = 5 I'm working on it - so far no big clues yet... Jeff -- Work email - jdike at linux dot intel dot com ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [uml-devel] Kernel panic - not syncing: do_syscall_stub : PTRACE_SETREGS failed, errno = 5 2008-07-18 20:55 ` Jeff Dike @ 2008-07-20 9:15 ` Peter Teoh 2008-07-20 14:07 ` Jeff Dike 0 siblings, 1 reply; 4+ messages in thread From: Peter Teoh @ 2008-07-20 9:15 UTC (permalink / raw) To: Jeff Dike; +Cc: user-mode-linux-devel The problem lies in the function: static inline long do_syscall_stub(struct mm_id * mm_idp, void **addr) { int n, i; long ret, offset; unsigned long * data; unsigned long * syscall; int err, pid = mm_idp->u.pid; if (proc_mm) /* FIXME: Need to look up userspace_pid by cpu */ pid = userspace_pid[0]; multi_count++; n = ptrace_setregs(pid, syscall_regs); if (n < 0) { printk(UM_KERN_ERR "Registers - \n"); for (i = 0; i < MAX_REG_NR; i++) printk(UM_KERN_ERR "\t%d\t0x%lx\n", i, syscall_regs[i]); panic("do_syscall_stub : PTRACE_SETREGS failed, errno = %d\n", -n); } Where the ptrace_setregs() above returned a value less than zero. Breakpoint 2, do_syscall_stub (mm_idp=0xfdaee9c, addr=0xfc5ce44) at /mnt/hd0/download/linux-2.6-latest/arch/um/os-Linux/skas/mem.c:76 76 printk(UM_KERN_ERR "\t%d\t0x%lx\n", i, syscall_regs[i]); (gdb) 16 0x0 75 for (i = 0; i < MAX_REG_NR; i++) (gdb) 77 panic("do_syscall_stub : PTRACE_SETREGS failed, errno = %d\n", (gdb) Kernel panic - not syncing: do_syscall_stub : PTRACE_SETREGS failed, errno = 5 And ptrace_setregs() calling ptrace() seemed to returned -errno almost immediately: (gdb) s ptrace_setregs (pid=19131, regs=0x820aae0) at /mnt/hd0/download/linux-2.6-latest/arch/um/sys-i386/ptrace_user.c:18 18 if (ptrace(PTRACE_SETREGS, pid, 0, regs) < 0) (gdb) s 19 return -errno; (gdb) s Why is it so? ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [uml-devel] Kernel panic - not syncing: do_syscall_stub : PTRACE_SETREGS failed, errno = 5 2008-07-20 9:15 ` Peter Teoh @ 2008-07-20 14:07 ` Jeff Dike 0 siblings, 0 replies; 4+ messages in thread From: Jeff Dike @ 2008-07-20 14:07 UTC (permalink / raw) To: Peter Teoh; +Cc: user-mode-linux-devel On Sun, Jul 20, 2008 at 05:15:16PM +0800, Peter Teoh wrote: > And ptrace_setregs() calling ptrace() seemed to returned -errno almost > immediately: > > (gdb) s > ptrace_setregs (pid=19131, regs=0x820aae0) at > /mnt/hd0/download/linux-2.6-latest/arch/um/sys-i386/ptrace_user.c:18 > 18 if (ptrace(PTRACE_SETREGS, pid, 0, regs) < 0) > (gdb) s > 19 return -errno; > (gdb) s > > Why is it so? Because the registers are all zero. Jeff -- Work email - jdike at linux dot intel dot com ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-07-20 14:08 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-07-18 19:22 [uml-devel] Kernel panic - not syncing: do_syscall_stub : PTRACE_SETREGS failed, errno = 5 Peter Teoh 2008-07-18 20:55 ` Jeff Dike 2008-07-20 9:15 ` Peter Teoh 2008-07-20 14:07 ` Jeff Dike
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.