* [uml-devel] 2.4.27 + 2.4.26-3um - Kernel panic: handle_trap - failed to wait at end of syscall, errno = 4, status = 4479
@ 2004-10-06 1:31 Christopher S. Aker
0 siblings, 0 replies; 3+ messages in thread
From: Christopher S. Aker @ 2004-10-06 1:31 UTC (permalink / raw)
To: uml-devel
Linux version 2.4.27-linode33-3um (root@host4.linode.com) (gcc version 3.2.2
20030222 (Red Hat Linux 3.2.2-5)) #1 Tue Oct 5 19:3
3:13 EDT 2004
On node 0 totalpages: 24576
zone(0): 24576 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: mem=96M fake_ide fakehd con=null con0=fd:0,fd:1 devfs=nomount
root=/dev/ubda ubda=/linodes/jax/3946.fs ubdb
=/linodes/jax/3947.fs eth0=tuntap,jax_0,fe:fd:45:38:ad:1e token_max=400000
token_refill=512
fakehd : Changing ubd_gendisk.major_name to "hd".
Calibrating delay loop... 2470.70 BogoMIPS
Memory: 91496k available
Dentry cache hash table entries: 16384 (order: 5, 131072 bytes)
Inode cache hash table entries: 8192 (order: 4, 65536 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer cache hash table entries: 4096 (order: 2, 16384 bytes)
Page-cache hash table entries: 32768 (order: 5, 131072 bytes)
Checking for host processor cmov support...Yes
Checking for host processor xmm support...No
Checking that ptrace can change system call numbers...OK
Checking syscall emulation patch for ptrace...missing
Checking that host ptys support output SIGIO...Yes
Checking that host ptys support SIGIO on close...No, enabling workaround
POSIX conformance testing by UNIFIX
[snip]
kjournald starting. Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem) readonly.
INIT: version 2.84 booting
Kernel panic: handle_trap - failed to wait at end of syscall, errno = 4, status =
4479
<6>SysRq : Show Regs
EIP: 0073:[<080594ec>] CPU: 0 Not tainted ESP: 007b:bffff820 EFLAGS: 00000246
Not tainted
EAX: 00000011 EBX: bffffa20 ECX: bffff960 EDX: bffff8e0
ESI: bffff960 EDI: bffff8e0 EBP: bffff828 DS: 007b ES: 007b
Call Trace: [<80315778>] [<80317cb6>] [<800115f3>] [<801adc52>] [<80199325>]
[<8001e3fa>] [<80013cb4>] [<80013d46>] [<8019ccf2>] [<80340e00>] [<8019cfe0>]
[<8000f184>] [<8019d63c>] [<8019d095>] [<802b0118>] [<802b0381>]
Filesystem is Slackware 9 (no /lib/tls), will try to test some under gdb...
-Chris
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
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] 3+ messages in thread
* RE: [uml-devel] Re: 2.4.27 + 2.4.26-3um - Kernel panic: handle_trap - failed to wait at end of syscall, errno = 4, status = 4479
@ 2004-10-06 8:05 Stroesser, Bodo
2004-10-06 15:39 ` [uml-devel] " Christopher S. Aker
0 siblings, 1 reply; 3+ messages in thread
From: Stroesser, Bodo @ 2004-10-06 8:05 UTC (permalink / raw)
To: Christopher S. Aker, uml-devel
[-- Attachment #1: Type: text/plain, Size: 976 bytes --]
Christopher S. Aker said:
>Another tidbit of information...
>
>A user of mind has two UMLs on two different hosts. Both the UMLs are
running Debian unstable.
>This kernel on the 2.6.4 host doesn't work, while the other on a
2.6.7+sysemu box does.
>
>-Chris
Yes. That's exactly what happened with my uml 2.6.8.1 with the
sysemu-patch. And I can see the same problem in the 2.4.26 sysemu-patch,
that is used in your UML kernel (As the console prinout tells).
If sysemu isn't used, but the patch is applied, the correct sequence of
first nullifying a systemcall on the host and than calling
handle_syscall() in handle_trap() is inverted, what causes the problem.
In 2.6.9 sysemu is implemented correctly.
The attached patch (sorry, can't inline it, due to my silly mailer ...)
will correct the sequence and should let your kernel work with or
without sysemu support.
Please note, this is a patch against 2.6.8.1, you might need to adapt it
a bit.
Bodo
[-- Attachment #2: patch-sysemu-panic --]
[-- Type: application/octet-stream, Size: 1555 bytes --]
--- uml.orig/arch/um/kernel/skas/process.c 2004-09-17 19:20:15.000000000 +0200
+++ uml/arch/um/kernel/skas/process.c 2004-09-21 14:32:22.129327631 +0200
@@ -68,25 +68,25 @@
return;
}
- handle_syscall(regs);
- if(use_sysemu)
- return;
+ if(!use_sysemu) {
+ err = ptrace(PTRACE_POKEUSER, pid, PT_SYSCALL_NR_OFFSET, __NR_getpid);
+ if(err < 0)
+ panic("handle_trap - nullifying syscall failed, errno = %d\n",
+ errno);
- err = ptrace(PTRACE_POKEUSER, pid, PT_SYSCALL_NR_OFFSET, __NR_getpid);
- if(err < 0)
- panic("handle_trap - nullifying syscall failed, errno = %d\n",
- errno);
+ err = ptrace(PTRACE_SYSCALL, pid, 0, 0);
+ if(err < 0)
+ panic("handle_trap - continuing to end of syscall failed, "
+ "errno = %d\n", errno);
- err = ptrace(PTRACE_SYSCALL, pid, 0, 0);
- if(err < 0)
- panic("handle_trap - continuing to end of syscall failed, "
- "errno = %d\n", errno);
-
- CATCH_EINTR(err = waitpid(pid, &status, WUNTRACED));
- if((err < 0) || !WIFSTOPPED(status) ||
- (WSTOPSIG(status) != SIGTRAP))
- panic("handle_trap - failed to wait at end of syscall, "
- "errno = %d, status = %d\n", errno, status);
+ CATCH_EINTR(err = waitpid(pid, &status, WUNTRACED));
+ if((err < 0) || !WIFSTOPPED(status) ||
+ (WSTOPSIG(status) != SIGTRAP))
+ panic("handle_trap - failed to wait at end of syscall, "
+ "err = %d, errno = %d, status = %x\n", err, errno, status);
+ }
+
+ handle_syscall(regs);
}
static int userspace_tramp(void *arg)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [uml-devel] 2.4.27 + 2.4.26-3um - Kernel panic: handle_trap - failed to wait at end of syscall, errno = 4, status = 4479
2004-10-06 8:05 [uml-devel] Re: 2.4.27 + 2.4.26-3um - Kernel panic: handle_trap - failed to wait at end of syscall, errno = 4, status = 4479 Stroesser, Bodo
@ 2004-10-06 15:39 ` Christopher S. Aker
0 siblings, 0 replies; 3+ messages in thread
From: Christopher S. Aker @ 2004-10-06 15:39 UTC (permalink / raw)
To: Stroesser, Bodo; +Cc: uml-devel
> Yes. That's exactly what happened with my uml 2.6.8.1 with the
> sysemu-patch. And I can see the same problem in the 2.4.26 sysemu-patch,
> that is used in your UML kernel (As the console prinout tells).
> If sysemu isn't used, but the patch is applied, the correct sequence of
> first nullifying a systemcall on the host and than calling
> handle_syscall() in handle_trap() is inverted, what causes the problem.
> In 2.6.9 sysemu is implemented correctly.
> The attached patch (sorry, can't inline it, due to my silly mailer ...)
> will correct the sequence and should let your kernel work with or
> without sysemu support.
> Please note, this is a patch against 2.6.8.1, you might need to adapt it
> a bit.
In my quick testing, this patch appears to have fixed the problem.
Thanks for patch and the fast reply!
-Chris
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
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] 3+ messages in thread
end of thread, other threads:[~2004-10-06 15:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-06 8:05 [uml-devel] Re: 2.4.27 + 2.4.26-3um - Kernel panic: handle_trap - failed to wait at end of syscall, errno = 4, status = 4479 Stroesser, Bodo
2004-10-06 15:39 ` [uml-devel] " Christopher S. Aker
-- strict thread matches above, loose matches on Subject: below --
2004-10-06 1:31 Christopher S. Aker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox