linux-um archives
 help / color / mirror / Atom feed
* [uml-devel] 2.6.8.1: Kernel panic: handle_trap - failed to wait at end of syscall, errno = 4, status = 4479
@ 2004-10-05 19:22 Tsillas, Demetrios J
  2004-10-05 19:44 ` BlaisorBlade
  0 siblings, 1 reply; 3+ messages in thread
From: Tsillas, Demetrios J @ 2004-10-05 19:22 UTC (permalink / raw)
  To: user-mode-linux-devel

I'm trying with root_fs.fc-2-client.pristine.20040504. I've got
the incrementals in there:

Checking for the skas3 patch in the host...found
Checking for /proc/mm...found
Checking PROT_EXEC mmap in /tmp...OK
Linux version 2.6.8.1-1um (jtsillas@gabriel) (gcc version 3.2.2 20030222
(Red Hat Linux 3.2.2-5)) #1 Tue Oct 5 15:17:54 EDT 2004
Built 1 zonelists
Kernel command line:
ubd0=/local/tmp/root_fs.fc-2-client.pristine.20040504 root=98:0
PID hash table entries: 16 (order 4: 128 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 30040k available
Calibrating delay loop... 3722.44 BogoMIPS
Mount-cache hash table entries: 512 (order: 0, 4096 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
openpty failed, errno = 8
openpty failed, errno = 8
Checking for /dev/anon on the host...Not available (open failed with
errno 2)
NET: Registered protocol family 16
mconsole (version 2) initialized on /home/jtsillas/.uml/BlLygB/mconsole
ubd : Synchronous mode
devfs: 2004-01-31 Richard Gooch (rgooch@atnf.csiro.au)
devfs: boot_options: 0x1
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
loop: loaded (max 8 devices)
Universal TUN/TAP device driver 1.5 (C)1999-2002 Maxim Krasnyansky
NET: Registered protocol family 2
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 2048 bind 4096)
NET: Registered protocol family 1
NET: Registered protocol family 17
Initializing software serial port version 1
Using anticipatory io scheduler
 /dev/ubd/disc0: unknown partition table
Initializing stdio console driver
VFS: Mounted root (ext2 filesystem) readonly.
Mounted devfs on /dev
INIT: version 2.85 booting
Kernel panic: handle_trap - failed to wait at end of syscall, errno = 4,
status = 4479


-------------------------------------------------------
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] 2.6.8.1: Kernel panic: handle_trap - failed to wait at end of syscall, errno = 4, status = 4479
@ 2004-10-05 20:33 Stroesser, Bodo
  0 siblings, 0 replies; 3+ messages in thread
From: Stroesser, Bodo @ 2004-10-05 20:33 UTC (permalink / raw)
  To: BlaisorBlade, user-mode-linux-devel; +Cc: Tsillas, Demetrios J

[-- Attachment #1: Type: text/plain, Size: 4371 bytes --]

This looks like the problem I noticed on my system. It occurs with
2.6.8.1 on a host without sysemu support.

Please try applying this patch, it changes the the code to be equal to
2.6.9 (if the patch is broken, use the attachment please):

--- arch/um/kernel/skas/process.c	2004-09-17 19:20:15.000000000
+0200
+++ 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)  

-----Original Message-----
From: user-mode-linux-devel-admin@lists.sourceforge.net
[mailto:user-mode-linux-devel-admin@lists.sourceforge.net] On Behalf Of
BlaisorBlade
Sent: Tuesday, October 05, 2004 9:44 PM
To: user-mode-linux-devel@lists.sourceforge.net
Cc: Tsillas, Demetrios J
Subject: Re: [uml-devel] 2.6.8.1: Kernel panic: handle_trap - failed to
wait at end of syscall, errno = 4, status = 4479

On Tuesday 05 October 2004 21:22, Tsillas, Demetrios J wrote:
> I'm trying with root_fs.fc-2-client.pristine.20040504. I've got the 
> incrementals in there:
Tried without any of them? Does it make any difference? Also, against
which tree are you applying patches, 2.6.8.1-1 or 2.6.9-rc2-mm4? And
does using different filesystems change anything?

> VFS: Mounted root (ext2 filesystem) readonly.
> Mounted devfs on /dev
> INIT: version 2.85 booting
> Kernel panic: handle_trap - failed to wait at end of syscall, errno = 
> 4, status = 4479

This is quite strange. The child has been stopped by SIGCHLD, which is
completely unexpected (except if any syscall is executing on the host).
Have you made sure you have moved, inside the fs, /lib/tls to
/lib/notls?

About the 4479 value:
./testprogs/waitstatus 4479
WSTOPSIG(status) is 17

Signal 17 is SIGCHLD
waitstatus.c:

#include <sys/types.h>
#include <sys/wait.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char * argv[])
{
        int status = 2943;
        if (argc >= 2)
                status = atol(argv[1]);
        if (WIFSIGNALED(status))
                printf("error, process signaled\n");
        if (WIFEXITED(status))
                printf("error, process exited\n");
        if (!WIFSTOPPED(status))
                printf("error, process not stopped\n");
        if (WSTOPSIG(status) != SIGTRAP)
                printf("WSTOPSIG(status) is %d\n", WSTOPSIG(status));
        return 0;
}

--
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729


-------------------------------------------------------
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

[-- Attachment #2: patch-sysemu-panic --]
[-- Type: application/octet-stream, Size: 1497 bytes --]

--- arch/um/kernel/skas/process.c	2004-09-17 19:20:15.000000000 +0200
+++ 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

end of thread, other threads:[~2004-10-05 20:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-05 19:22 [uml-devel] 2.6.8.1: Kernel panic: handle_trap - failed to wait at end of syscall, errno = 4, status = 4479 Tsillas, Demetrios J
2004-10-05 19:44 ` BlaisorBlade
  -- strict thread matches above, loose matches on Subject: below --
2004-10-05 20:33 Stroesser, Bodo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox