All of lore.kernel.org
 help / color / mirror / Atom feed
* [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  1:34 Christopher S. Aker
  2004-10-06  3:04 ` Christopher S. Aker
  0 siblings, 1 reply; 3+ messages in thread
From: Christopher S. Aker @ 2004-10-06  1:34 UTC (permalink / raw)
  To: uml-devel

> Filesystem is Slackware 9 (no /lib/tls), will try to test some under gdb...

Forgot to mention, this is 2.4.26-3um with all the incrementals.  Host is 2.6.4, without sysemu.

-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  1:34 [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 Christopher S. Aker
@ 2004-10-06  3:04 ` Christopher S. Aker
  0 siblings, 0 replies; 3+ messages in thread
From: Christopher S. Aker @ 2004-10-06  3:04 UTC (permalink / raw)
  To: uml-devel

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



-------------------------------------------------------
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
  0 siblings, 0 replies; 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

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

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-06  1:34 [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 Christopher S. Aker
2004-10-06  3:04 ` Christopher S. Aker
  -- strict thread matches above, loose matches on Subject: below --
2004-10-06  8:05 Stroesser, Bodo

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.