From: Yann D. <yd...@al...> - 2000-10-16 22:08:44
|
Still using 2.4.0-test9 + um on a Debian "woody" host: Linux bylbo 2.2.17 #1 Sun Sep 10 19:21:52 CEST 2000 i586 unknown I compiled the um kernel with debugging support (.config attached) and cannot attach to it without getting a segfault. * debug from beggining: Console output stops where I usually get init's startup message, which is coherent with `um_execve ("/sbin/init")' in the traces. $ ~/usr/src/umlinux[704]$ ./kernel-source-2.4.0-test9-um/linux debug ubd0=/home/dwitch/usr/src/umlinux/rootfs/root_fs_debian2.2_small umn=10.0.0.132 tracing thread pid = 25507 Linux version 2.4.0-test9-1um (dwitch@bylbo) (gcc version 2.95.2 20000220 (Debian GNU/Linux)) #1 lun oct 16 22:20:01 CEST 2000 On node 0 totalpages: 4096 zone(0): 0 pages. zone(1): 4096 pages. zone(2): 0 pages. Kernel command line: debug ubd0=/home/dwitch/usr/src/umlinux/rootfs/root_fs_debian2.2_small umn=10.0.0.132 root=/dev/ubd0 [...] VFS: Mounted root (ext2 filesystem) readonly. Mounted devfs on /dev 5400010 att 1 b start_kernel c GNU gdb 5.0 [Copyright...] (gdb) att 1 Attaching to Pid 1 0x100b4d11 in ?? () (gdb) b start_kernel No symbol table is loaded. Use the "file" command. (gdb) c Continuing. Program received signal SIGSEGV, Segmentation fault. 0x10034a70 in ?? () (gdb) symbol-file kernel-source-2.4.0-test9-um/linux Reading symbols from kernel-source-2.4.0-test9-um/linux...done. (gdb) bt #0 0x10034a70 in padzero (elf_bss=1073818712) at /home/dwitch/usr/src/umlinux/kernel-source-2.4.0-test9-um/include/asm/arch/string.h:418 #1 0x10035349 in load_elf_interp (interp_elf_ex=0x50053d48, interpreter=0x500e8180, interp_load_addr=0x50053d18) at binfmt_elf.c:320 #2 0x10035c2e in load_elf_binary (bprm=0x50053e1c, regs=0x0) at binfmt_elf.c:666 #3 0x10026262 in search_binary_handler (bprm=0x50053e1c, regs=0x0) at exec.c:809 #4 0x10026484 in do_execve (filename=0x100fbd2d "/sbin/init", argv=0x1013a140, envp=0x1013a180, regs=0x0) at exec.c:902 #5 0x100aa48b in execve1 (file=0x100fbd2d "/sbin/init", argv=0x1013a140, env=0x1013a180) at exec_kern.c:77 #6 0x100aa4cb in um_execve (file=0x100fbd2d "/sbin/init", argv=0x1013a140, env=0x1013a180) at exec_kern.c:87 #7 0x100013b8 in init (unused=0x0) at init/main.c:768 #8 0x100afcf8 in new_thread_proc (t=0x50052000) at process_kern.c:128 (gdb) * attach to running kernel: It takes a couple of seconds before the segfault comes, but it is quite reproducible. In this case, the console is still responsive - I can halt the system with no apparent problem. It appears the thread which gets the segfault is not the kernel itself 6c00010 GNU gdb 5.0 [...] (gdb) att 1 Attaching to Pid 1 0x100bc111 in ?? () (gdb) c Continuing. Program received signal SIGSEGV, Segmentation fault. 0x804b871 in ?? () (gdb) bt #0 0x804b871 in ?? () #1 0x804cd86 in ?? () #2 0x804d0ba in ?? () #3 0x4002da42 in ?? () (gdb) symbol-file kernel-source-2.4.0-test9-um/linux Reading symbols from kernel-source-2.4.0-test9-um/linux...done. (gdb) bt #0 0x804b871 in ?? () #1 0x804cd86 in ?? () #2 0x804d0ba in ?? () #3 0x4002da42 in ?? () (gdb) If I just have the login prompt when I attach, just hit 'c' after the 1st segfault which I cannot tell what thread/process got, then when pressing RETURN at the login prompt (staying in getty IIRC) I get a second segfault, in the kernel this time: (gdb) bt #0 0x10012154 in file_read_actor (desc=0x5019de2c, page=0x500371e0, offset=0, size=25) at /home/dwitch/usr/src/umlinux/kernel-source-2.4.0-test9-um/include/asm/arch/string.h:202 #1 0x10011df9 in do_generic_file_read (filp=0x500e8720, ppos=0x500e8740, desc=0x5019de2c, actor=0x100120f0 <file_read_actor>) at filemap.c:1009 #2 0x100121d7 in generic_file_read (filp=0x500e8720, buf=0x40014000 <Address 0x40014000 out of bounds>, count=4096, ppos=0x500e8740) at filemap.c:1140 #3 0x1001d0d7 in sys_read (fd=3, buf=0x40014000 <Address 0x40014000 out of bounds>, count=4096) at read_write.c:133 #4 0x100acbc5 in execute_syscall (syscall=3, args=0x5019dee4) at syscall_kern.c:340 #5 0x100ad01b in syscall_handler (unused=0) at syscall_user.c:113 #6 0x100a9eb9 in fork_handler (sig=10) at process.c:96 #7 <signal handler called> #8 0x100b4d11 in kill () at umn_kern.c:202 If then I attempt a real login, `execve("/bin/login")' fails in much the same way as init did in the first example: Program received signal SIGSEGV, Segmentation fault. 0x10034a70 in padzero (elf_bss=1073818712) at /home/dwitch/usr/src/umlinux/kernel-source-2.4.0-test9-um/include/asm/arch/string.h:418 418 __asm__ __volatile__( (gdb) bt #0 0x10034a70 in padzero (elf_bss=1073818712) at /home/dwitch/usr/src/umlinux/kernel-source-2.4.0-test9-um/include/asm/arch/string.h:418 #1 0x10035349 in load_elf_interp (interp_elf_ex=0x5019dc04, interpreter=0x50d0be60, interp_load_addr=0x5019dbd4) at binfmt_elf.c:320 #2 0x10035c2e in load_elf_binary (bprm=0x5019dcd8, regs=0x0) at binfmt_elf.c:666 #3 0x10026262 in search_binary_handler (bprm=0x5019dcd8, regs=0x0) at exec.c:809 #4 0x10026484 in do_execve (filename=0x50ea9000 "/bin/login", argv=0xbf7fed54, envp=0xbf7ffe94, regs=0x0) at exec.c:902 #5 0x100aa48b in execve1 (file=0x50ea9000 "/bin/login", argv=0xbf7fed54, env=0xbf7ffe94) at exec_kern.c:77 #6 0x100aa519 in sys_execve ( file=0x804a911 <Address 0x804a911 out of bounds>, argv=0xbf7fed54, env=0xbf7ffe94) at exec_kern.c:101 #7 0x100acbc5 in execute_syscall (syscall=11, args=0x5019dee4) at syscall_kern.c:340 #8 0x100ad01b in syscall_handler (unused=0) at syscall_user.c:113 #9 0x100a9eb9 in fork_handler (sig=10) at process.c:96 #10 <signal handler called> #11 0x100b4d11 in kill () at umn_kern.c:202 (gdb) -- Yann Dirson <yd...@al...> | Why make M$-Bill richer & richer ? debian-email: <di...@de...> | Support Debian GNU/Linux: | Cheaper, more Powerful, more Stable ! http://ydirson.free.fr/ | Check <http://www.debian.org/> |