All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nuno Silva <nuno.silva@vgertech.com>
To: user-mode-linux-devel@lists.sourceforge.net
Cc: 224431@bugs.debian.org
Subject: Re: Resolution (Re: [uml-devel] 2.4.22-[67] problems)
Date: Tue, 06 Jan 2004 09:20:06 +0000	[thread overview]
Message-ID: <3FFA7DC6.1040403@vgertech.com> (raw)
In-Reply-To: <3FFA66B3.501@vgertech.com>

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



Nuno Silva wrote:

[...]

> 
> I've been doing some tests and I'd say that the problem is something 
> regarding the NPTL+TLS+__thread features of recent libc6 (2.3.2 and 
> 2.3.3cvs)... But I'm clueless about the fix :-)
> 
> I'll setup a chroot where I can play around with glibc setups.
> 

OK, just finished the chroot: debian unstable with glibc-2.3.3cvs 
hand-compiled (../libc/configure --with-tls --with-__thread 
--enable-add-ons=nptl --prefix=/ --enable-kernel=2.6.0) and removed the 
debian's libc.

Everything runs OK with the new glibc, tested: bash, apt-get, perl, mc, 
strace, gcc, etc.

However linux (UML's executable) doesn't run:
puma:/uml# ls -la /proc/mm
--w--w--w-    1 root     root            0 Jan  6 08:33 /proc/mm
puma:/uml# uname -a
Linux puma 2.6.0 #2 Mon Jan 5 09:25:45 WET 2004 i686 unknown unknown 
GNU/Linux
puma:/uml# ./linux
Checking for the skas3 patch in the host...found
Checking for /proc/mm...found

[1]+  Stopped                 ./linux
puma:/uml# fg
./linux
Segmentation fault
puma:/uml#


Now with strace:
(see attached file)

Now with gdb:
puma:/uml# gdb ./linux
GNU gdb 6.0-debian
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain 
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-linux"...
(gdb) run
Starting program: /uml/linux
Detaching after fork from child process 26378.
Checking for the skas3 patch in the host...found
Checking for /proc/mm...found
Detaching after fork from child process 26379.

Program received signal SIGSTOP, Stopped (signal).
0x400f18dc in clone () from /lib/libc.so.6
(gdb) bt
#0  0x400f18dc in clone () from /lib/libc.so.6
#1  0x4014f000 in ?? ()
#2  0x00000007 in ?? ()
#3  0x00001000 in ?? ()
#4  0xa00a7b7f in start_userspace (cpu=26379) at process.c:113
#5  0xa00a88e2 in start_uml_skas () at process_kern.c:162
#6  0xa00a6bcb in linux_main (argc=0, argv=0xa0000000) at um_arch.c:387
#7  0xa000de0e in main (argc=1, argv=0xbffffa44, envp=0xbffffa4c) at 
arch/um/main.c:146
(gdb) cont
Continuing.

Program received signal SIGSTOP, Stopped (signal).
0x400f18dc in clone () from /lib/libc.so.6
(gdb) bt
#0  0x400f18dc in clone () from /lib/libc.so.6
#1  0x4014f000 in ?? ()
#2  0x00000007 in ?? ()
#3  0x00001000 in ?? ()
#4  0xa00a7b7f in start_userspace (cpu=26379) at process.c:113
#5  0xa00a88e2 in start_uml_skas () at process_kern.c:162
#6  0xa00a6bcb in linux_main (argc=0, argv=0xa0000000) at um_arch.c:387
#7  0xa000de0e in main (argc=1, argv=0xbffffa44, envp=0xbffffa4c) at 
arch/um/main.c:146
(gdb) cont
Continuing.

Program received signal SIGSEGV, Segmentation fault.
0xa001305a in panic (fmt=0xbfffc000 "") at panic.c:67
67      panic.c: No such file or directory.
         in panic.c
(gdb) bt
#0  0xa001305a in panic (fmt=0xbfffc000 "") at panic.c:67
#1  0xa00a7bdd in start_userspace (cpu=-1073758208) at process.c:127
#2  0xa00a88e2 in start_uml_skas () at process_kern.c:162
#3  0xa00a6bcb in linux_main (argc=0, argv=0xa0000000) at um_arch.c:387
#4  0xa000de0e in main (argc=1, argv=0xbffffa44, envp=0xbffffa4c) at 
arch/um/main.c:146
(gdb) cont
Continuing.

Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
(gdb) quit
puma:/uml#

In my tree, arch/um/kernel/skas/process.c:113 is the pid=clone(..., in

void start_userspace(int cpu)
{
         void *stack;
         unsigned long sp;
         int pid, status, n;

         stack = mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE | PROT_EXEC,
                      MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
         if(stack == MAP_FAILED)
                 panic("start_userspace : mmap failed, errno = %d", errno);
         sp = (unsigned long) stack + PAGE_SIZE - sizeof(void *);

         pid = clone(userspace_tramp, (void *) sp,
                     CLONE_FILES | CLONE_VM | SIGCHLD, NULL);


I hope this makes sense to someone because I'm off to sleep a few hours :-)

Regards,
Nuno Silva





[-- Attachment #2: straced-linux.txt --]
[-- Type: text/plain, Size: 7914 bytes --]

execve("./linux", ["./linux"], [/* 25 vars */]) = 0
uname({sys="Linux", node="puma", ...})  = 0
brk(0)                                  = 0xa01f6000
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or directory)
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40017000
open("/lib/tls/i686/mmx/libutil.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/tls/i686/mmx", 0xbffff16c) = -1 ENOENT (No such file or directory)
open("/lib/tls/i686/libutil.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/tls/i686", 0xbffff16c)     = -1 ENOENT (No such file or directory)
open("/lib/tls/mmx/libutil.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/tls/mmx", 0xbffff16c)      = -1 ENOENT (No such file or directory)
open("/lib/tls/libutil.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/tls", 0xbffff16c)          = -1 ENOENT (No such file or directory)
open("/lib/i686/mmx/libutil.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/i686/mmx", 0xbffff16c)     = -1 ENOENT (No such file or directory)
open("/lib/i686/libutil.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/i686", 0xbffff16c)         = -1 ENOENT (No such file or directory)
open("/lib/mmx/libutil.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/mmx", 0xbffff16c)          = -1 ENOENT (No such file or directory)
open("/lib/libutil.so.1", O_RDONLY)     = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0@\16\0\000"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=92994, ...}) = 0
mmap2(NULL, 10672, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40018000
mmap2(0x4001a000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x1) = 0x4001a000
close(3)                                = 0
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0PZ\1\000"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=19666162, ...}) = 0
mmap2(NULL, 1252652, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4001b000
mmap2(0x40142000, 36864, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x127) = 0x40142000
mmap2(0x4014b000, 7468, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4014b000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4014d000
set_thread_area({entry_number:-1 -> 6, base_addr:0x4014d070, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
rt_sigprocmask(SIG_SETMASK, [IO], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
brk(0)                                  = 0xa01f6000
brk(0xa0217000)                         = 0xa0217000
brk(0)                                  = 0xa0217000
rt_sigaction(SIGINT, {0xa000dc90, [], SA_NOMASK|SA_ONESHOT}, NULL, 8) = 0
rt_sigaction(SIGTERM, {0xa000dc90, [], SA_NOMASK|SA_ONESHOT}, NULL, 8) = 0
rt_sigaction(SIGHUP, {0xa000dc90, [], SA_NOMASK|SA_ONESHOT}, NULL, 8) = 0
fstat64(1, {st_mode=S_IFREG|0644, st_size=3126, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4014e000
mmap2(NULL, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4014f000
clone(child_stack=0x4014ffd8, flags=0|SIGCHLD) = 26355
--- SIGCHLD (Child exited) @ 0 (0) ---
rt_sigprocmask(SIG_UNBLOCK, [], [IO], 8) = 0
rt_sigprocmask(SIG_BLOCK, [ALRM VTALRM IO], NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [ALRM VTALRM], [ALRM VTALRM IO], 8) = 0
rt_sigprocmask(SIG_BLOCK, [IO], NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [], [IO], 8) = 0
rt_sigprocmask(SIG_BLOCK, [ALRM VTALRM IO], NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [ALRM VTALRM], [ALRM VTALRM IO], 8) = 0
rt_sigprocmask(SIG_BLOCK, [IO], NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [], [IO], 8) = 0
rt_sigprocmask(SIG_BLOCK, [ALRM VTALRM IO], NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [ALRM VTALRM], [ALRM VTALRM IO], 8) = 0
rt_sigprocmask(SIG_BLOCK, [IO], NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [], [IO], 8) = 0
rt_sigprocmask(SIG_BLOCK, [ALRM VTALRM IO], NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [ALRM VTALRM], [ALRM VTALRM IO], 8) = 0
rt_sigprocmask(SIG_BLOCK, [IO], NULL, 8) = 0
waitpid(26355, [WIFSTOPPED(s) && WSTOPSIG(s) == SIGSTOP], WUNTRACED) = 26355
ptrace(0x34 /* PTRACE_??? */, 26355, 0, 0xbffff8a0) = 0
ptrace(PTRACE_GETREGS, 26355, 0, 0xa01d8c60) = 0
ptrace(PTRACE_GETFPXREGS, 26355, 0, 0xa01d8d40) = 0
ptrace(PTRACE_CONT, 26355, 0, SIG_0)    = 0
waitpid(26355, [WIFEXITED(s) && WEXITSTATUS(s) == 1], 0) = 26355
--- SIGCHLD (Child exited) @ 0 (0) ---
munmap(0x4014f000, 4096)                = 0
access("/proc/mm", W_OK)                = 0
brk(0)                                  = 0xa0217000
uname({sys="Linux", node="puma", ...})  = 0
gettimeofday({1073378804, 532883}, NULL) = 0
getpid()                                = 26354
open("/tmp/vm_file-AukWKw", O_RDWR|O_CREAT|O_EXCL, 0600) = 3
unlink("/tmp/vm_file-AukWKw")           = 0
fchmod(3, 0777)                         = 0
_llseek(3, 33554432, [33554432], SEEK_SET) = 0
write(3, "\0", 1)                       = 1
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
mmap2(0xa0800000, 25165824, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_FIXED, 3, 0x800) = 0xa0800000
mkdir("/root/.uml/", 0777)              = -1 EEXIST (File exists)
open("/root/.uml/uPjYnh", O_RDWR|O_CREAT|O_EXCL, 0600) = 4
close(4)                                = 0
unlink("/root/.uml/uPjYnh")             = 0
mkdir("/root/.uml/uPjYnh", 0777)        = 0
open("/root/.uml/uPjYnh/pid", O_RDWR|O_CREAT|O_EXCL|O_LARGEFILE, 0644) = 4
write(4, "26354\n", 6)                  = 6
close(4)                                = 0
mprotect(0xa0196000, 8192, PROT_READ|PROT_WRITE|PROT_EXEC) = 0
write(1, "Checking for the skas3 patch in "..., 79Checking for the skas3 patch in the host...found
Checking for /proc/mm...found
) = 79
mmap2(NULL, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4014f000
clone(child_stack=0x4014ffd8, flags=CLONE_VM|CLONE_FILES|SIGCHLD) = 26356
--- SIGCHLD (Child exited) @ 0 (0) ---
--- SIGSTOP (Stopped (signal)) @ 0 (0) ---
--- SIGSTOP (Stopped (signal)) @ 0 (0) ---
rt_sigprocmask(SIG_UNBLOCK, [], [IO], 8) = 0
rt_sigprocmask(SIG_BLOCK, [ALRM VTALRM IO], NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [ALRM VTALRM], [ALRM VTALRM IO], 8) = 0
rt_sigprocmask(SIG_BLOCK, [IO], NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [], [IO], 8) = 0
rt_sigprocmask(SIG_BLOCK, [ALRM VTALRM IO], NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [ALRM VTALRM], [ALRM VTALRM IO], 8) = 0
rt_sigprocmask(SIG_BLOCK, [IO], NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [], [IO], 8) = 0
rt_sigprocmask(SIG_BLOCK, [ALRM VTALRM IO], NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [ALRM VTALRM], [ALRM VTALRM IO], 8) = 0
rt_sigprocmask(SIG_BLOCK, [IO], NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [], [IO], 8) = 0
rt_sigprocmask(SIG_BLOCK, [ALRM VTALRM IO], NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [ALRM VTALRM], [ALRM VTALRM IO], 8) = 0
rt_sigprocmask(SIG_BLOCK, [IO], NULL, 8) = 0
waitpid(26356, [WIFEXITED(s) && WEXITSTATUS(s) == 0], WUNTRACED) = 26356
rt_sigprocmask(SIG_UNBLOCK, [], [IO], 8) = 0
rt_sigprocmask(SIG_BLOCK, [ALRM VTALRM IO], NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [ALRM VTALRM], [ALRM VTALRM IO], 8) = 0
rt_sigprocmask(SIG_BLOCK, [IO], NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [], [IO], 8) = 0
rt_sigprocmask(SIG_BLOCK, [ALRM VTALRM IO], NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [ALRM VTALRM], [ALRM VTALRM IO], 8) = 0
rt_sigprocmask(SIG_BLOCK, [IO], NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [], [IO], 8) = 0
rt_sigprocmask(SIG_BLOCK, [ALRM VTALRM IO], NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [ALRM VTALRM], [ALRM VTALRM IO], 8) = 0
rt_sigprocmask(SIG_BLOCK, [IO], NULL, 8) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++

  parent reply	other threads:[~2004-01-06  9:18 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-20  1:13 [uml-devel] 2.4.22-[67] problems Matt Zimmerman
2003-12-20 17:14 ` Jeff Dike
2003-12-21  0:47   ` Matt Zimmerman
2003-12-21 15:58     ` BlaisorBlade
2003-12-21 22:40       ` Matt Zimmerman
2003-12-21 23:16         ` Matt Zimmerman
2003-12-22  0:25           ` Jeff Dike
2003-12-22  4:08             ` Matt Zimmerman
2003-12-22  5:49               ` Daniel Jacobowitz
2003-12-22  9:08                 ` Matt Zimmerman
2004-01-05 17:51                   ` Adam Heath
2004-01-05 18:10                     ` Matt Zimmerman
2003-12-24 12:48         ` BlaisorBlade
2003-12-21  0:52   ` Matt Zimmerman
2003-12-21  1:06     ` Matt Zimmerman
2003-12-28  9:33       ` Matt Zimmerman
2003-12-28  9:51         ` Matt Zimmerman
2003-12-28  9:52           ` Matt Zimmerman
2004-01-06  2:59             ` Jeff Dike
2003-12-28 10:12           ` Matt Zimmerman
2003-12-28 11:30             ` Matt Zimmerman
2003-12-30 18:43               ` Resolution (Re: [uml-devel] 2.4.22-[67] problems) Matt Zimmerman
2004-01-06  2:58                 ` Jeff Dike
2004-01-06  7:41                   ` Nuno Silva
2004-01-06  8:02                     ` Matt Zimmerman
2004-01-06  8:20                       ` Nuno Silva
2004-01-06  8:47                         ` Nuno Silva
2004-01-06  9:20                     ` Nuno Silva [this message]
2004-01-06 17:13                       ` Matt Zimmerman
2004-01-09  7:22                         ` Nuno Silva
2004-01-08  7:07                   ` Matt Zimmerman
2004-01-12 18:36                     ` [uml-devel] Panic with slirp transport and gcc 3.3 Matt Zimmerman
2004-01-13 15:25                       ` [uml-devel] " Bill Allombert
2004-01-13 17:30                         ` Jeff Dike
2004-01-13 17:44                           ` Bill Allombert
2004-01-13 18:51                           ` Matt Zimmerman
2004-01-16  2:38                             ` Jeff Dike
2004-01-16  2:38                               ` Matt Zimmerman
2004-01-16 20:04                                 ` Jeff Dike
2004-01-16 19:49                                   ` Matt Zimmerman
2004-01-17  0:42                                     ` Matt Zimmerman
2003-12-21  1:29   ` [uml-devel] 2.4.22-[67] problems Matt Zimmerman
2003-12-20 19:05 ` Nick Craig-Wood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3FFA7DC6.1040403@vgertech.com \
    --to=nuno.silva@vgertech.com \
    --cc=224431@bugs.debian.org \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.