* [uml-devel] 2.6.14-rc4; panic: do_syscall_stub : failed to wait for SIGUSR1/SIGTRAP
@ 2005-10-13 3:39 William Stearns
2005-10-13 16:19 ` Jeff Dike
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: William Stearns @ 2005-10-13 3:39 UTC (permalink / raw)
To: ML-uml-devel; +Cc: William Stearns
Good evening, all,
This is from 2.6.14-rc4 + Jeff's 2 patches:
[PATCH 1/2] UML - Fix Al's build tidying
(was there ever a 2/2? I didn't see one in the list)
UML - Resend - Revert use of host AIO
i386 FC3 host has no skas patch, so skas0 is in effect.
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.
VFS: Mounted root (ext2 filesystem) readonly.
Kernel panic - not syncing: do_syscall_stub : failed to wait for
SIGUSR1/SIGTRAP, pid = 3357, n = 3357, errno = 0, status = 0xb7f
EIP: 0000:[<0000007b>] CPU: 0 Not tainted EFLAGS: 00000000
Not tainted
EAX: 00000000 EBX: 00000c8c ECX: 00000013 EDX: 00000c8c
ESI: 00000c89 EDI: 0000007b EBP: 00000000 DS: 0025 ES: 4611
14603510: [<080751ec>] show_regs+0xb0/0xd0
14603530: [<08062cf7>] panic_exit+0x27/0x48
14603550: [<08086922>] notifier_call_chain+0x1e/0x3c
14603580: [<08078e66>] panic+0x56/0xfc
146035a0: [<08063e57>] wait_stub_done+0x73/0xd0
146035e0: [<080635c2>] do_syscall_stub+0x62/0x1c8
14603670: [<080637ce>] run_syscall_stub+0xa6/0xd4
14603690: [<08063a45>] unmap+0xad/0xd0
14603710: [<0806529f>] do_ops+0xaf/0xf8
14603750: [<08061c86>] fix_range_common+0x1d2/0x284
146037d0: [<0806531f>] fix_range+0x37/0x3c
14603800: [<080653d8>] force_flush_all_skas+0x34/0x38
14603820: [<08061f87>] force_flush_all+0xb/0x10
14603830: [<080634cb>] flush_thread_skas+0xb/0x2c
14603840: [<0805c76f>] flush_thread+0xb/0x10
14603850: [<080b8adf>] flush_old_exec+0x2bf/0xae4
146039a0: [<080d6699>] load_elf_binary+0x33d/0xea0
14603af0: [<080b9554>] search_binary_handler+0x54/0xf0
14603b30: [<080b9785>] do_execve+0x195/0x234
14603b70: [<0805c7b4>] execve1+0x28/0x7c
14603ba0: [<0805c81d>] um_execve+0x15/0x50
14603bc0: [<0805c164>] run_init_process+0x40/0x6c
14603bf0: [<0805c256>] init+0xc6/0x168
14603c10: [<080714d5>] run_kernel_thread+0x31/0x38
14603cd0: [<08064d0c>] new_thread_handler+0xb0/0x10c
14603d20: [<b7fec420>] 0xb7fec420
This first kernel didn't have tt support built in, so I recompiled
with tt support as well and ran it with a mode=tt and it got further:
Enabling local filesystem quotas: [ OK ]
swapon: /dev/ubd/1: No such device or address
Enabling swap space: [ OK
]
Kernel panic - not syncing: Kernel mode fault at addr 0x66ab, ip
0xa002f711
Cheers,
- Bill
---------------------------------------------------------------------------
"A computer without a Microsoft operating system is like a dog
without bricks tied to its head."
-- Steve on slashdot
--------------------------------------------------------------------------
William Stearns (wstearns@pobox.com). Mason, Buildkernel, freedups, p0f,
rsync-backup, ssh-keyinstall, dns-check, more at: http://www.stearns.org
--------------------------------------------------------------------------
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.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] 7+ messages in thread* Re: [uml-devel] 2.6.14-rc4; panic: do_syscall_stub : failed to wait for SIGUSR1/SIGTRAP 2005-10-13 3:39 [uml-devel] 2.6.14-rc4; panic: do_syscall_stub : failed to wait for SIGUSR1/SIGTRAP William Stearns @ 2005-10-13 16:19 ` Jeff Dike 2005-10-19 4:09 ` William Stearns 2005-10-15 11:37 ` Blaisorblade 2005-10-20 17:19 ` Blaisorblade 2 siblings, 1 reply; 7+ messages in thread From: Jeff Dike @ 2005-10-13 16:19 UTC (permalink / raw) To: William Stearns; +Cc: ML-uml-devel On Wed, Oct 12, 2005 at 11:39:02PM -0400, William Stearns wrote: > Kernel panic - not syncing: do_syscall_stub : failed to wait for > SIGUSR1/SIGTRAP, pid = 3357, n = 3357, errno = 0, status = 0xb7f Can you apply the patch below, and see what it says? Jeff Index: linux-2.6.14-rc2-mm1/arch/um/kernel/skas/process.c =================================================================== --- linux-2.6.14-rc2-mm1.orig/arch/um/kernel/skas/process.c 2005-10-05 18:37:51.000000000 -0400 +++ linux-2.6.14-rc2-mm1/arch/um/kernel/skas/process.c 2005-10-05 18:50:23.000000000 -0400 @@ -69,6 +69,17 @@ if((n < 0) || !WIFSTOPPED(status) || (WSTOPSIG(status) != SIGUSR1 && WSTOPSIG(status) != SIGTRAP)){ + unsigned long regs[FRAME_SIZE]; + if(ptrace(PTRACE_GETREGS, pid, 0, regs) < 0) + printk("Failed to get registers from stub, " + "errno = %d\n", errno); + else { + int i; + + printk("Stub registers -\n"); + for(i = 0; i < FRAME_SIZE; i++) + printk("\t%d - %lx\n", i, regs[i]); + } panic("%s : failed to wait for SIGUSR1/SIGTRAP, " "pid = %d, n = %d, errno = %d, status = 0x%x\n", fname, pid, n, errno, status); ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.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] 7+ messages in thread
* Re: [uml-devel] 2.6.14-rc4; panic: do_syscall_stub : failed to wait for SIGUSR1/SIGTRAP 2005-10-13 16:19 ` Jeff Dike @ 2005-10-19 4:09 ` William Stearns 2005-10-19 4:35 ` William Stearns 0 siblings, 1 reply; 7+ messages in thread From: William Stearns @ 2005-10-19 4:09 UTC (permalink / raw) To: Jeff Dike; +Cc: ML-uml-devel, William Stearns Good evening, Jeff, On Thu, 13 Oct 2005, Jeff Dike wrote: > On Wed, Oct 12, 2005 at 11:39:02PM -0400, William Stearns wrote: >> Kernel panic - not syncing: do_syscall_stub : failed to wait for >> SIGUSR1/SIGTRAP, pid = 3357, n = 3357, errno = 0, status = 0xb7f > > Can you apply the patch below, and see what it says? > > Jeff > > Index: linux-2.6.14-rc2-mm1/arch/um/kernel/skas/process.c > =================================================================== > --- linux-2.6.14-rc2-mm1.orig/arch/um/kernel/skas/process.c 2005-10-05 18:37:51.000000000 -0400 > +++ linux-2.6.14-rc2-mm1/arch/um/kernel/skas/process.c 2005-10-05 18:50:23.000000000 -0400 > @@ -69,6 +69,17 @@ > > if((n < 0) || !WIFSTOPPED(status) || > (WSTOPSIG(status) != SIGUSR1 && WSTOPSIG(status) != SIGTRAP)){ > + unsigned long regs[FRAME_SIZE]; > + if(ptrace(PTRACE_GETREGS, pid, 0, regs) < 0) > + printk("Failed to get registers from stub, " > + "errno = %d\n", errno); > + else { > + int i; > + > + printk("Stub registers -\n"); > + for(i = 0; i < FRAME_SIZE; i++) > + printk("\t%d - %lx\n", i, regs[i]); > + } > panic("%s : failed to wait for SIGUSR1/SIGTRAP, " > "pid = %d, n = %d, errno = %d, status = 0x%x\n", > fname, pid, n, errno, status); OK, switched over to an fc3 rootfs and ran with your patch: ... kjournald starting. Commit interval 5 seconds EXT3-fs: mounted filesystem with ordered data mode. VFS: Mounted root (ext3 filesystem) readonly. Warning: unable to open an initial console. Stub registers - 0 - 357e 1 - 13 2 - 357e 3 - 357b 4 - 0 5 - 0 6 - 4 7 - 0 8 - 0 9 - 0 10 - 0 11 - ffffffff 12 - bfffe0dd 13 - 73 14 - 10202 15 - bffff008 16 - 7b Kernel panic - not syncing: do_syscall_stub : failed to wait for SIGUSR1/SIGTRAP, pid = 13697, n = 13697, errn o = 0, status = 0xb7f EIP: 0000:[<0000007b>] CPU: 0 Not tainted EFLAGS: 00000000 Not tainted EAX: 00000000 EBX: 0000357e ECX: 00000013 EDX: 0000357e ESI: 0000357b EDI: 0000007b EBP: 00000000 DS: 0025 ES: 46c1 a64a3300: [<a0032e13>] show_regs+0x1db/0x1ec a64a3330: [<a001c933>] panic_exit+0x27/0x48 a64a3350: [<a00478f2>] notifier_call_chain+0x1e/0x3c a64a3380: [<a0036dc6>] panic+0x56/0xfc a64a33a0: [<a0020119>] wait_stub_done+0xc1/0x170 a64a3440: [<a001f836>] do_syscall_stub+0x62/0x1c8 a64a34d0: [<a001fa42>] run_syscall_stub+0xa6/0xd4 a64a34f0: [<a001fbee>] map+0xf2/0x110 a64a3580: [<a0021634>] do_ops+0xec/0xf8 a64a35d0: [<a001b6d2>] fix_range_common+0x1d2/0x284 a64a3650: [<a0021677>] fix_range+0x37/0x3c a64a3680: [<a00216c2>] flush_tlb_range_skas+0x2e/0x34 a64a36a0: [<a001ba33>] flush_tlb_range+0x33/0x38 a64a36c0: [<a001b93b>] flush_tlb_page+0x1f/0x24 a64a36e0: [<a001bc15>] handle_page_fault+0x189/0x250 a64a3730: [<a0021906>] maybe_map+0x66/0x98 a64a3770: [<a0021949>] do_op+0x11/0x48 a64a3790: [<a00219eb>] do_buffer_op+0x6b/0x138 a64a37e0: [<a001d081>] setjmp_wrapper+0x45/0x50 a64a38b0: [<a0021adf>] buffer_op+0x27/0x5c a64a38f0: [<a0021e43>] clear_user_skas+0x53/0x7c a64a3930: [<a0099a47>] padzero+0x2f/0x50 a64a3950: [<a009a337>] load_elf_interp+0x1e3/0x2a0 a64a39a0: [<a009ae97>] load_elf_binary+0x8bf/0xf84 a64a3af0: [<a007c00c>] search_binary_handler+0x54/0xf0 a64a3b30: [<a007c22a>] do_execve+0x182/0x240 a64a3b70: [<a00157e4>] execve1+0x28/0x7c a64a3ba0: [<a001584d>] um_execve+0x15/0x50 a64a3bc0: [<a0015164>] run_init_process+0x40/0x6c a64a3bf0: [<a0015256>] init+0xc6/0x168 a64a3c10: [<a002daa9>] run_kernel_thread+0x31/0x38 a64a3cd0: [<a0021014>] new_thread_handler+0xb0/0x10c a64a3d20: [<b7f5d420>] 0xb7f5d420 [wstearns@sparrow test-fc3]$ These filesystems seem to have an almost empty /dev/, so I'll repopulate with device nodes and retry. I'll report back if I can get any more luck with this, but wanted to get an initial answer back finally. Sorry to take so long. Cheers, - Bill --------------------------------------------------------------------------- "Hackers do not feel that leisure time is automatically any more meaningful than work time. The desirability of both depends on how they are realized. From the point of a view of a meaningful life, the entire work/leisure duality must be abandoned. As long as we are living our work or our leisure, we are not even truly living. Meaning cannot be found in work or leisure but has to arise out of the nature of the activity itself. Out of passion. Social value. Creativity." -- Andrew Leonard <aleonard@salon.com> http://salon.com/tech/col/leon/2001/02/05/hacker_ethic/index2.html -------------------------------------------------------------------------- William Stearns (wstearns@pobox.com). Mason, Buildkernel, freedups, p0f, rsync-backup, ssh-keyinstall, dns-check, more at: http://www.stearns.org -------------------------------------------------------------------------- ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.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] 7+ messages in thread
* Re: [uml-devel] 2.6.14-rc4; panic: do_syscall_stub : failed to wait for SIGUSR1/SIGTRAP 2005-10-19 4:09 ` William Stearns @ 2005-10-19 4:35 ` William Stearns 2005-10-20 16:40 ` Jeff Dike 0 siblings, 1 reply; 7+ messages in thread From: William Stearns @ 2005-10-19 4:35 UTC (permalink / raw) To: Jeff Dike; +Cc: ML-uml-devel, William Stearns Good evening, Jeff, On Wed, 19 Oct 2005, William Stearns wrote: > On Thu, 13 Oct 2005, Jeff Dike wrote: > >> On Wed, Oct 12, 2005 at 11:39:02PM -0400, William Stearns wrote: >>> Kernel panic - not syncing: do_syscall_stub : failed to wait for >>> SIGUSR1/SIGTRAP, pid = 3357, n = 3357, errno = 0, status = 0xb7f >> >> Can you apply the patch below, and see what it says? >> >> Jeff >> >> Index: linux-2.6.14-rc2-mm1/arch/um/kernel/skas/process.c >> =================================================================== >> --- linux-2.6.14-rc2-mm1.orig/arch/um/kernel/skas/process.c 2005-10-05 >> 18:37:51.000000000 -0400 >> +++ linux-2.6.14-rc2-mm1/arch/um/kernel/skas/process.c 2005-10-05 >> 18:50:23.000000000 -0400 >> @@ -69,6 +69,17 @@ >> >> if((n < 0) || !WIFSTOPPED(status) || >> (WSTOPSIG(status) != SIGUSR1 && WSTOPSIG(status) != SIGTRAP)){ >> + unsigned long regs[FRAME_SIZE]; >> + if(ptrace(PTRACE_GETREGS, pid, 0, regs) < 0) >> + printk("Failed to get registers from stub, " >> + "errno = %d\n", errno); >> + else { >> + int i; >> + >> + printk("Stub registers -\n"); >> + for(i = 0; i < FRAME_SIZE; i++) >> + printk("\t%d - %lx\n", i, regs[i]); >> + } >> panic("%s : failed to wait for SIGUSR1/SIGTRAP, " >> "pid = %d, n = %d, errno = %d, status = 0x%x\n", >> fname, pid, n, errno, status); > > OK, switched over to an fc3 rootfs and ran with your patch: > > ... > kjournald starting. Commit interval 5 seconds > EXT3-fs: mounted filesystem with ordered data mode. > VFS: Mounted root (ext3 filesystem) readonly. > Warning: unable to open an initial console. > Stub registers - > 0 - 357e > 1 - 13 > 2 - 357e > 3 - 357b > 4 - 0 > 5 - 0 > 6 - 4 > 7 - 0 > 8 - 0 > 9 - 0 > 10 - 0 > 11 - ffffffff > 12 - bfffe0dd > 13 - 73 > 14 - 10202 > 15 - bffff008 > 16 - 7b > Kernel panic - not syncing: do_syscall_stub : failed to wait for > SIGUSR1/SIGTRAP, pid = 13697, n = 13697, errn > o = 0, status = 0xb7f > > > EIP: 0000:[<0000007b>] CPU: 0 Not tainted EFLAGS: 00000000 > Not tainted > EAX: 00000000 EBX: 0000357e ECX: 00000013 EDX: 0000357e > ESI: 0000357b EDI: 0000007b EBP: 00000000 DS: 0025 ES: 46c1 > a64a3300: [<a0032e13>] show_regs+0x1db/0x1ec > a64a3330: [<a001c933>] panic_exit+0x27/0x48 > a64a3350: [<a00478f2>] notifier_call_chain+0x1e/0x3c > a64a3380: [<a0036dc6>] panic+0x56/0xfc > a64a33a0: [<a0020119>] wait_stub_done+0xc1/0x170 > a64a3440: [<a001f836>] do_syscall_stub+0x62/0x1c8 > a64a34d0: [<a001fa42>] run_syscall_stub+0xa6/0xd4 > a64a34f0: [<a001fbee>] map+0xf2/0x110 > a64a3580: [<a0021634>] do_ops+0xec/0xf8 > a64a35d0: [<a001b6d2>] fix_range_common+0x1d2/0x284 > a64a3650: [<a0021677>] fix_range+0x37/0x3c > a64a3680: [<a00216c2>] flush_tlb_range_skas+0x2e/0x34 > a64a36a0: [<a001ba33>] flush_tlb_range+0x33/0x38 > a64a36c0: [<a001b93b>] flush_tlb_page+0x1f/0x24 > a64a36e0: [<a001bc15>] handle_page_fault+0x189/0x250 > a64a3730: [<a0021906>] maybe_map+0x66/0x98 > a64a3770: [<a0021949>] do_op+0x11/0x48 > a64a3790: [<a00219eb>] do_buffer_op+0x6b/0x138 > a64a37e0: [<a001d081>] setjmp_wrapper+0x45/0x50 > a64a38b0: [<a0021adf>] buffer_op+0x27/0x5c > a64a38f0: [<a0021e43>] clear_user_skas+0x53/0x7c > a64a3930: [<a0099a47>] padzero+0x2f/0x50 > a64a3950: [<a009a337>] load_elf_interp+0x1e3/0x2a0 > a64a39a0: [<a009ae97>] load_elf_binary+0x8bf/0xf84 > a64a3af0: [<a007c00c>] search_binary_handler+0x54/0xf0 > a64a3b30: [<a007c22a>] do_execve+0x182/0x240 > a64a3b70: [<a00157e4>] execve1+0x28/0x7c > a64a3ba0: [<a001584d>] um_execve+0x15/0x50 > a64a3bc0: [<a0015164>] run_init_process+0x40/0x6c > a64a3bf0: [<a0015256>] init+0xc6/0x168 > a64a3c10: [<a002daa9>] run_kernel_thread+0x31/0x38 > a64a3cd0: [<a0021014>] new_thread_handler+0xb0/0x10c > a64a3d20: [<b7f5d420>] 0xb7f5d420 > > > [wstearns@sparrow test-fc3]$ > > These filesystems seem to have an almost empty /dev/, so I'll > repopulate with device nodes and retry. I'll report back if I can get any > more luck with this, but wanted to get an initial answer back finally. OK, I repopulated /dev with static device nodes from an fc2 dev package and rebooted it. Command line: ./linux26 mem=96M ubd0=cow,root_fs.2005060501 ubd1=swap ubd2=workspace con=pty con0=fd:0,fd:1 Checking PROT_EXEC mmap in /tmp...OK Checking for /proc/mm...not found Checking for the skas3 patch in the host...not found UML running in SKAS0 mode Adding 32411648 bytes to physical memory to account for exec-shield gap Checking that ptrace can change system call numbers...OK Checking syscall emulation patch for ptrace...missing Linux version 2.6.14-rc4 (wstearns@sparrow.stearns.org) (gcc version 3.4.4 20050721 (Red Hat 3.4.4-2)) #3 Fri Oct 14 00:34:04 EDT 2005 Built 1 zonelists Kernel command line: mem=96M ubd0=cow,root_fs.2005060501 ubd1=swap ubd2=workspace con=pty con0=fd:0,fd:1 root=98:0 PID hash table entries: 512 (order: 9, 8192 bytes) Dentry cache hash table entries: 16384 (order: 4, 65536 bytes) Inode-cache hash table entries: 8192 (order: 3, 32768 bytes) Memory: 91264k available Mount-cache hash table entries: 512 Checking for host processor cmov support...Yes Checking for host processor xmm support...No Checking that host ptys support output SIGIO...Yes Checking that host ptys support SIGIO on close...No, enabling workaround Checking for /dev/anon on the host...Not available (open failed with errno 2) softlockup thread 0 started up. Using 2.6 host AIO ... md: Autodetecting RAID arrays. md: autorun ... md: ... autorun DONE. kjournald starting. Commit interval 5 seconds EXT3-fs: mounted filesystem with ordered data mode. VFS: Mounted root (ext3 filesystem) readonly. Stub registers - 0 - 51ae 1 - 13 2 - 51ae 3 - 51ab 4 - 0 5 - 0 6 - 4 7 - 0 8 - 0 9 - 0 10 - 0 11 - ffffffff 12 - bfffe0dd 13 - 73 14 - 10202 15 - bffff008 16 - 7b Kernel panic - not syncing: do_syscall_stub : failed to wait for SIGUSR1/SIGTRAP, pid = 20915, n = 20915, errno = 0, status = 0xb7f EIP: 0000:[<0000007b>] CPU: 0 Not tainted EFLAGS: 00000000 Not tainted EAX: 00000000 EBX: 000051ae ECX: 00000013 EDX: 000051ae ESI: 000051ab EDI: 0000007b EBP: 00000000 DS: 0025 ES: 46c1 a2a334a0: [<a0032e13>] show_regs+0x1db/0x1ec a2a334d0: [<a001c933>] panic_exit+0x27/0x48 a2a334f0: [<a00478f2>] notifier_call_chain+0x1e/0x3c a2a33520: [<a0036dc6>] panic+0x56/0xfc a2a33540: [<a0020119>] wait_stub_done+0xc1/0x170 a2a335e0: [<a001f836>] do_syscall_stub+0x62/0x1c8 a2a33670: [<a001fa42>] run_syscall_stub+0xa6/0xd4 a2a33690: [<a001fcb9>] unmap+0xad/0xd0 a2a33710: [<a00215f7>] do_ops+0xaf/0xf8 a2a33750: [<a001b6d2>] fix_range_common+0x1d2/0x284 a2a337d0: [<a0021677>] fix_range+0x37/0x3c a2a33800: [<a0021730>] force_flush_all_skas+0x34/0x38 a2a33820: [<a001ba89>] force_flush_all+0x1d/0x20 a2a33830: [<a001f70f>] flush_thread_skas+0xb/0x2c a2a33840: [<a0015781>] flush_thread+0x1d/0x20 a2a33850: [<a007b597>] flush_old_exec+0x2bf/0xae4 a2a339a0: [<a009a915>] load_elf_binary+0x33d/0xf84 a2a33af0: [<a007c00c>] search_binary_handler+0x54/0xf0 a2a33b30: [<a007c22a>] do_execve+0x182/0x240 a2a33b70: [<a00157e4>] execve1+0x28/0x7c a2a33ba0: [<a001584d>] um_execve+0x15/0x50 a2a33bc0: [<a0015164>] run_init_process+0x40/0x6c a2a33bf0: [<a0015256>] init+0xc6/0x168 a2a33c10: [<a002daa9>] run_kernel_thread+0x31/0x38 a2a33cd0: [<a0021014>] new_thread_handler+0xb0/0x10c a2a33d20: [<b7f7a420>] 0xb7f7a420 If I've done something as moronic as I've done in the past, I apologize in advance. :-) Cheers, - Bill --------------------------------------------------------------------------- I called up the Bureau of Alcohol, Tobacco, and Firearms regional office and asked, "What wine goes best with an M-16?" The guy who answered did his best to be helpful: "That depends. What are you smoking?" (Courtesy of Andrej Todosic <atodosic@ubisoft.qc.ca>) -------------------------------------------------------------------------- William Stearns (wstearns@pobox.com). Mason, Buildkernel, freedups, p0f, rsync-backup, ssh-keyinstall, dns-check, more at: http://www.stearns.org -------------------------------------------------------------------------- ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.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] 7+ messages in thread
* Re: [uml-devel] 2.6.14-rc4; panic: do_syscall_stub : failed to wait for SIGUSR1/SIGTRAP 2005-10-19 4:35 ` William Stearns @ 2005-10-20 16:40 ` Jeff Dike 0 siblings, 0 replies; 7+ messages in thread From: Jeff Dike @ 2005-10-20 16:40 UTC (permalink / raw) To: William Stearns; +Cc: ML-uml-devel On Wed, Oct 19, 2005 at 12:35:50AM -0400, William Stearns wrote: > Stub registers - > 0 - 51ae > 1 - 13 > 2 - 51ae > 3 - 51ab > 4 - 0 > 5 - 0 > 6 - 4 > 7 - 0 > 8 - 0 > 9 - 0 > 10 - 0 > 11 - ffffffff > 12 - bfffe0dd > 13 - 73 > 14 - 10202 > 15 - bffff008 > 16 - 7b I should have asked for this earlier, but can you also do this in gdb: disas batch_syscall_stub batch_syscall_stub+0x30 gdb doesn't have to be attached to a paniced UML, or any UML at all. Jeff ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.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] 7+ messages in thread
* Re: [uml-devel] 2.6.14-rc4; panic: do_syscall_stub : failed to wait for SIGUSR1/SIGTRAP 2005-10-13 3:39 [uml-devel] 2.6.14-rc4; panic: do_syscall_stub : failed to wait for SIGUSR1/SIGTRAP William Stearns 2005-10-13 16:19 ` Jeff Dike @ 2005-10-15 11:37 ` Blaisorblade 2005-10-20 17:19 ` Blaisorblade 2 siblings, 0 replies; 7+ messages in thread From: Blaisorblade @ 2005-10-15 11:37 UTC (permalink / raw) To: user-mode-linux-devel, William Stearns On Thursday 13 October 2005 05:39, William Stearns wrote: > Good evening, all, > This is from 2.6.14-rc4 + Jeff's 2 patches: > [PATCH 1/2] UML - Fix Al's build tidying > (was there ever a 2/2? I didn't see one in the list) Yes, there was, but was about sysrq-t (and had as title only "[PATCH 2/2] UML). > UML - Resend - Revert use of host AIO > i386 FC3 host has no skas patch, so skas0 is in effect. > md: Autodetecting RAID arrays. > md: autorun ... > md: ... autorun DONE. > VFS: Mounted root (ext2 filesystem) readonly. > Kernel panic - not syncing: do_syscall_stub : failed to wait for > SIGUSR1/SIGTRAP, pid = 3357, n = 3357, errno = 0, status = 0xb7f With which compilers? It has been reported that SKAS0 is (rightfully) miscompiled by some GCC, and I have some fixes. I'm porting them to 2.6.14 too. Btw, the thing should be the same as 2.6.13; 2.6.13-bs4 has the fixes for this instead - but read the NEWS page on my site for a note about COW files compatibility. > This first kernel didn't have tt support built in, so I recompiled > with tt support as well and ran it with a mode=tt and it got further: > Enabling local filesystem quotas: [ OK ] > swapon: /dev/ubd/1: No such device or address This is some kind of setup error - which was your previous kernel? 2.6.13 onwards have no DevFS. > Enabling swap space: [ OK > ] > Kernel panic - not syncing: Kernel mode fault at addr 0x66ab, ip > 0xa002f711 This is really strange... -- Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!". Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894) http://www.user-mode-linux.org/~blaisorblade ___________________________________ Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB http://mail.yahoo.it ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.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] 7+ messages in thread
* Re: [uml-devel] 2.6.14-rc4; panic: do_syscall_stub : failed to wait for SIGUSR1/SIGTRAP 2005-10-13 3:39 [uml-devel] 2.6.14-rc4; panic: do_syscall_stub : failed to wait for SIGUSR1/SIGTRAP William Stearns 2005-10-13 16:19 ` Jeff Dike 2005-10-15 11:37 ` Blaisorblade @ 2005-10-20 17:19 ` Blaisorblade 2 siblings, 0 replies; 7+ messages in thread From: Blaisorblade @ 2005-10-20 17:19 UTC (permalink / raw) To: user-mode-linux-devel, William Stearns [-- Attachment #1: Type: text/plain, Size: 1354 bytes --] On Thursday 13 October 2005 05:39, William Stearns wrote: > Good evening, all, > This is from 2.6.14-rc4 + Jeff's 2 patches: > [PATCH 1/2] UML - Fix Al's build tidying > (was there ever a 2/2? I didn't see one in the list) > UML - Resend - Revert use of host AIO > > i386 FC3 host has no skas patch, so skas0 is in effect. > This first kernel didn't have tt support built in, so I recompiled > with tt support as well and ran it with a mode=tt and it got further: > > Enabling local filesystem quotas: [ OK ] > swapon: /dev/ubd/1: No such device or address > Enabling swap space: [ OK > ] > Kernel panic - not syncing: Kernel mode fault at addr 0x66ab, ip > 0xa002f711 On this case: what happens if you try to fix the first problem (about /dev/ubd/1)? It's strange that "Enabling swap space" says ok, and it's not clear where it's failing. Finally, I'm attaching my SKAS0 stub fixes. Not everybody experience the bug they fix (it happens probably with GCC-3.2), so I don't know if they'll help you at all. However, try them. On top of -rc5 possibly - which should have everything else. -- Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!". Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894) http://www.user-mode-linux.org/~blaisorblade [-- Attachment #2: uml-fix-misassembling-skas0-stub --] [-- Type: text/x-diff, Size: 6522 bytes --] uml: fix SKAS0 assembly stubs - use proper constraints From: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Jeff Dike noted that the assembly code for syscall stubs is misassembled with GCC 3.2.3: the values copied in registers weren't preserved between one asm() and the following one. So I fixed the thing by rewriting the __asm__ constraints more like unistd.h ones. Note: in syscall6 case I had to add one more instruction (i.e. moving arg6 in eax and shuffling things around) - it's needed for the function to be valid in general (we can't load the value from the stack, relative to ebp, because we change it), but could be avoided since we actually use a constant as param 6. The only fix would be to turn stub_syscall6 to a macro and use a "i" constraint for arg6 (i.e., specify it's a constant value). Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> --- arch/um/include/sysdep-i386/stub.h | 64 +++++++++++++++++++++++----------- arch/um/include/sysdep-x86_64/stub.h | 61 ++++++++++++++++++++++++++------ 2 files changed, 92 insertions(+), 33 deletions(-) diff --git a/arch/um/include/sysdep-i386/stub.h b/arch/um/include/sysdep-i386/stub.h --- a/arch/um/include/sysdep-i386/stub.h +++ b/arch/um/include/sysdep-i386/stub.h @@ -16,45 +16,69 @@ extern void stub_clone_handler(void); #define STUB_MMAP_NR __NR_mmap2 #define MMAP_OFFSET(o) ((o) >> PAGE_SHIFT) +static inline long stub_syscall1(long syscall, long arg1) +{ + long ret; + + __asm__ volatile ("int $0x80" : "=a" (ret) : "0" (syscall), "b" (arg1)); + + return ret; +} + static inline long stub_syscall2(long syscall, long arg1, long arg2) { long ret; - __asm__("movl %0, %%ecx; " : : "g" (arg2) : "%ecx"); - __asm__("movl %0, %%ebx; " : : "g" (arg1) : "%ebx"); - __asm__("movl %0, %%eax; " : : "g" (syscall) : "%eax"); - __asm__("int $0x80;" : : : "%eax"); - __asm__ __volatile__("movl %%eax, %0; " : "=g" (ret) :); - return(ret); + __asm__ volatile ("int $0x80" : "=a" (ret) : "0" (syscall), "b" (arg1), + "c" (arg2)); + + return ret; } static inline long stub_syscall3(long syscall, long arg1, long arg2, long arg3) { - __asm__("movl %0, %%edx; " : : "g" (arg3) : "%edx"); - return(stub_syscall2(syscall, arg1, arg2)); + long ret; + + __asm__ volatile ("int $0x80" : "=a" (ret) : "0" (syscall), "b" (arg1), + "c" (arg2), "d" (arg3)); + + return ret; } static inline long stub_syscall4(long syscall, long arg1, long arg2, long arg3, long arg4) { - __asm__("movl %0, %%esi; " : : "g" (arg4) : "%esi"); - return(stub_syscall3(syscall, arg1, arg2, arg3)); + long ret; + + __asm__ volatile ("int $0x80" : "=a" (ret) : "0" (syscall), "b" (arg1), + "c" (arg2), "d" (arg3), "S" (arg4)); + + return ret; +} + +static inline long stub_syscall5(long syscall, long arg1, long arg2, long arg3, + long arg4, long arg5) +{ + long ret; + + __asm__ volatile ("int $0x80" : "=a" (ret) : "0" (syscall), "b" (arg1), + "c" (arg2), "d" (arg3), "S" (arg4), "D" (arg5)); + + return ret; } static inline long stub_syscall6(long syscall, long arg1, long arg2, long arg3, long arg4, long arg5, long arg6) { long ret; - __asm__("movl %0, %%eax; " : : "g" (syscall) : "%eax"); - __asm__("movl %0, %%ebx; " : : "g" (arg1) : "%ebx"); - __asm__("movl %0, %%ecx; " : : "g" (arg2) : "%ecx"); - __asm__("movl %0, %%edx; " : : "g" (arg3) : "%edx"); - __asm__("movl %0, %%esi; " : : "g" (arg4) : "%esi"); - __asm__("movl %0, %%edi; " : : "g" (arg5) : "%edi"); - __asm__ __volatile__("pushl %%ebp ; movl %1, %%ebp; " - "int $0x80; popl %%ebp ; " - "movl %%eax, %0; " : "=g" (ret) : "g" (arg6) : "%eax"); - return(ret); + + __asm__ volatile ("push %%ebp ; movl %%eax,%%ebp ; movl %1,%%eax ; " + "int $0x80 ; pop %%ebp" + : "=a" (ret) + : "g" (syscall), "b" (arg1), "c" (arg2), "d" (arg3), + "S" (arg4), "D" (arg5), "0" (arg6)); + + return ret; } static inline void trap_myself(void) diff --git a/arch/um/include/sysdep-x86_64/stub.h b/arch/um/include/sysdep-x86_64/stub.h --- a/arch/um/include/sysdep-x86_64/stub.h +++ b/arch/um/include/sysdep-x86_64/stub.h @@ -17,37 +17,72 @@ extern void stub_clone_handler(void); #define STUB_MMAP_NR __NR_mmap #define MMAP_OFFSET(o) (o) +#define __syscall_clobber "r11","rcx","memory" +#define __syscall "syscall" + static inline long stub_syscall2(long syscall, long arg1, long arg2) { long ret; - __asm__("movq %0, %%rsi; " : : "g" (arg2) : "%rsi"); - __asm__("movq %0, %%rdi; " : : "g" (arg1) : "%rdi"); - __asm__("movq %0, %%rax; " : : "g" (syscall) : "%rax"); - __asm__("syscall;" : : : "%rax", "%r11", "%rcx"); - __asm__ __volatile__("movq %%rax, %0; " : "=g" (ret) :); - return(ret); + __asm__ volatile (__syscall + : "=a" (ret) + : "0" (syscall), "D" (arg1), "S" (arg2) : __syscall_clobber ); + + return ret; } static inline long stub_syscall3(long syscall, long arg1, long arg2, long arg3) { - __asm__("movq %0, %%rdx; " : : "g" (arg3) : "%rdx"); - return(stub_syscall2(syscall, arg1, arg2)); + long ret; + + __asm__ volatile (__syscall + : "=a" (ret) + : "0" (syscall), "D" (arg1), "S" (arg2), "d" (arg3) + : __syscall_clobber ); + + return ret; } static inline long stub_syscall4(long syscall, long arg1, long arg2, long arg3, long arg4) { - __asm__("movq %0, %%r10; " : : "g" (arg4) : "%r10"); - return(stub_syscall3(syscall, arg1, arg2, arg3)); + long ret; + + __asm__ volatile ("movq %5,%%r10 ; " __syscall + : "=a" (ret) + : "0" (syscall), "D" (arg1), "S" (arg2), "d" (arg3), + "g" (arg4) + : __syscall_clobber, "r10" ); + + return ret; +} + +static inline long stub_syscall5(long syscall, long arg1, long arg2, long arg3, + long arg4, long arg5) +{ + long ret; + + __asm__ volatile ("movq %5,%%r10 ; movq %6,%%r8 ; " __syscall + : "=a" (ret) + : "0" (syscall), "D" (arg1), "S" (arg2), "d" (arg3), + "g" (arg4), "g" (arg5) + : __syscall_clobber, "r10", "r8" ); + + return ret; } static inline long stub_syscall6(long syscall, long arg1, long arg2, long arg3, long arg4, long arg5, long arg6) { - __asm__("movq %0, %%r9; " : : "g" (arg6) : "%r9"); - __asm__("movq %0, %%r8; " : : "g" (arg5) : "%r8"); - return(stub_syscall4(syscall, arg1, arg2, arg3, arg4)); + long ret; + + __asm__ volatile ("movq %5,%%r10 ; movq %6,%%r8 ; " + "movq %7, %%r9; " __syscall : "=a" (ret) + : "0" (syscall), "D" (arg1), "S" (arg2), "d" (arg3), + "g" (arg4), "g" (arg5), "g" (arg6) + : __syscall_clobber, "r10", "r8", "r9" ); + + return ret; } static inline void trap_myself(void) [-- Attachment #3: uml-fix-misassembling-skas0-stub-segv --] [-- Type: text/x-diff, Size: 3172 bytes --] uml: fix assembly stub for segv From: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Even here, we reuse values from one asm statement to the next without telling this to GCC - so fix this. While at it, a bit of improvements to the generated asm code, with better use of constraints. Still TODO: convert all this to the syscall_stub macros we already have. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> --- arch/um/sys-i386/stub_segv.c | 10 ++++++---- arch/um/sys-x86_64/stub_segv.c | 18 ++++++++++-------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/arch/um/sys-i386/stub_segv.c b/arch/um/sys-i386/stub_segv.c --- a/arch/um/sys-i386/stub_segv.c +++ b/arch/um/sys-i386/stub_segv.c @@ -13,17 +13,19 @@ void __attribute__ ((__section__ (".__sy stub_segv_handler(int sig) { struct sigcontext *sc = (struct sigcontext *) (&sig + 1); + long pid; GET_FAULTINFO_FROM_SC(*((struct faultinfo *) UML_CONFIG_STUB_DATA), sc); - __asm__("movl %0, %%eax ; int $0x80": : "g" (__NR_getpid)); - __asm__("movl %%eax, %%ebx ; movl %0, %%eax ; movl %1, %%ecx ;" - "int $0x80": : "g" (__NR_kill), "g" (SIGUSR1)); + __asm__("movl %1, %%eax ; int $0x80": "=&a" (pid): "i" (__NR_getpid)); + __asm__("movl %0, %%eax ; movl %1, %%ecx ;" + "int $0x80": : "i" (__NR_kill), "i" (SIGUSR1), "b" (pid) + : "eax", "ecx"); /* Load pointer to sigcontext into esp, since we need to leave * the stack in its original form when we do the sigreturn here, by * hand. */ __asm__("mov %0,%%esp ; movl %1, %%eax ; " - "int $0x80" : : "a" (sc), "g" (__NR_sigreturn)); + "int $0x80" : : "r" (sc), "i" (__NR_sigreturn)); } diff --git a/arch/um/sys-x86_64/stub_segv.c b/arch/um/sys-x86_64/stub_segv.c --- a/arch/um/sys-x86_64/stub_segv.c +++ b/arch/um/sys-x86_64/stub_segv.c @@ -31,21 +31,23 @@ void __attribute__ ((__section__ (".__sy stub_segv_handler(int sig) { struct ucontext *uc; + long pid; - __asm__("movq %%rdx, %0" : "=g" (uc) :); + __asm__("movq %%rdx, %0" : "=g" (uc) : ); GET_FAULTINFO_FROM_SC(*((struct faultinfo *) UML_CONFIG_STUB_DATA), &uc->uc_mcontext); - __asm__("movq %0, %%rax ; syscall": : "g" (__NR_getpid)); - __asm__("movq %%rax, %%rdi ; movq %0, %%rax ; movq %1, %%rsi ;" - "syscall": : "g" (__NR_kill), "g" (SIGUSR1) : - "%rdi", "%rax", "%rsi"); + __asm__("movq %0, %%rax ; syscall": "=&a" (pid) : "g" (__NR_getpid) + : "rax", __syscall_clobber); + __asm__("movq %0, %%rax ; movq %1, %%rsi ;" + "syscall": : "i" (__NR_kill), "i" (SIGUSR1), "D" (pid) : + "rdi", "rax", "rsi", __syscall_clobber); /* sys_sigreturn expects that the stack pointer will be 8 bytes into * the signal frame. So, we use the ucontext pointer, which we know * already, to get the signal frame pointer, and add 8 to that. */ - __asm__("movq %0, %%rsp": : - "g" ((unsigned long) container_of(uc, struct rt_sigframe, + __asm__("movq %0, %%rsp": : + "g" ((unsigned long) container_of(uc, struct rt_sigframe, uc) + 8)); - __asm__("movq %0, %%rax ; syscall" : : "g" (__NR_rt_sigreturn)); + __asm__("movq %0, %%rax ; syscall" : : "g" (__NR_rt_sigreturn) : "rax"); } ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2005-10-20 17:17 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2005-10-13 3:39 [uml-devel] 2.6.14-rc4; panic: do_syscall_stub : failed to wait for SIGUSR1/SIGTRAP William Stearns 2005-10-13 16:19 ` Jeff Dike 2005-10-19 4:09 ` William Stearns 2005-10-19 4:35 ` William Stearns 2005-10-20 16:40 ` Jeff Dike 2005-10-15 11:37 ` Blaisorblade 2005-10-20 17:19 ` Blaisorblade
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.