Dear list,
This kernel is vanilla 2.6.18.1 ; compiled ARCH=um with almost all kernel debug
enabled and SUBARCH=i386 ; all I can get from it is:
ur linux-2.6.18.1-32 # strace -f ./vmlinux
execve("./vmlinux", ["./vmlinux"], [/* 37 vars */]) = 0
[ Process PID=21412 runs in 32 bit mode. ]
uname({sys="Linux", node="ur", ...}) = 0
brk(0) = 0x833c000
brk(0x833cca0) = 0x833cca0
set_thread_area(0xff82071c) = 0
brk(0x835dca0) = 0x835dca0
brk(0x835e000) = 0x835e000
getrlimit(RLIMIT_STACK, {rlim_cur=-4286578688, rlim_max=-35457836959791316}) = 0
rt_sigaction(SIGINT, {0xc000000008065094, [], 0}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [INT], NULL, 8) = 0
rt_sigaction(SIGTERM, {0xc000000008065094, [], 0}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [TERM], NULL, 8) = 0
rt_sigaction(SIGHUP, {0xc000000008065094, [], 0}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [HUP], NULL, 8) = 0
fstat64(0x1, 0xff820020) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0x1000)
= 0xfffffffff7fc5000
mmap2(NULL, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0x1000) = 0xfffffffff7fc4000
clone(Process 21413 attached
child_stack=0xf7fc4fd4, flags=|SIGCHLD) = 21413
[pid 21412] waitpid(21413, Process 21412 suspended
<unfinished ...>
[pid 21413] getpid() = 21413
[pid 21413] getpid() = 21413
[pid 21413] getppid() = 21412
[pid 21413] rt_sigprocmask(SIG_BLOCK, [WINCH], [], 8) = 0
[pid 21413] ptrace(PTRACE_TRACEME, 0, 0, 0) = -1 EPERM (Operation not permitted)
[pid 21413] dup(2) = 3
[pid 21413] fcntl64(3, F_GETFL) = 0x8002 (flags O_RDWR|O_LARGEFILE)
[pid 21413] fstat64(0x3, 0xf7fc4e2c) = 0
[pid 21413] mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0x1000) = 0xfffffffff7fc3000
[pid 21413] _llseek(3, 0, 0xf7fc4e9c, SEEK_CUR) = -1 ESPIPE (Illegal seek)
[pid 21413] write(3, "ptrace: Operation not permitted\n", 32ptrace: Operation
not permitted
) = 32
[pid 21413] close(3) = 0
[pid 21413] munmap(0xf7fc3000, 4096) = 0
[pid 21413] kill(21413, SIGKILL) = 0
[pid 21413] +++ killed by SIGKILL +++
Process 21412 resumed
Process 21413 detached
<... waitpid resumed> [{WIFSIGNALED(s) && WTERMSIG(s) == SIGKILL}], WSTOPPED) =
21413
--- SIGCHLD (Child exited) @ 0 (0) ---
[... forever until ^C ...]
the ptrace called by my strace command gets is refused with EPERM, probably
because the process is already being ptraced, being an UML and all..
gdb *will* work on it though:
ur linux-2.6.18.1-32 # gdb ./vmlinux
GNU gdb 6.4
Copyright 2005 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 "x86_64-pc-linux-gnu"...Using host libthread_db
library "/lib/libthread_db.so.1".
(gdb) n
The program is not being run.
(gdb) run
Starting program: /usr/src/linux-2.6.18.1-32/vmlinux
(wait for a few seconds, then hit CTRL-C)
Program received signal SIGINT, Interrupt.
__const_udelay (usecs=4295000) at processor.h:57
57 __asm__ __volatile__("rep;nop": : :"memory");
(gdb) n
36 for(i=0;i<n;i++)
(gdb) n
57 __asm__ __volatile__("rep;nop": : :"memory");
(gdb)
36 for(i=0;i<n;i++)
(gdb) l
52 #include "asm/arch/user.h"
53
54 /* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */
55 static inline void rep_nop(void)
56 {
57 __asm__ __volatile__("rep;nop": : :"memory");
58 }
59
60 #define cpu_relax() rep_nop()
61
(gdb) n
36 for(i=0;i<n;i++)
(gdb) l
31 void __const_udelay(unsigned long usecs)
32 {
33 int i, n;
34
35 n = (loops_per_jiffy * HZ * usecs) / MILLION;
36 for(i=0;i<n;i++)
37 cpu_relax();
38 }
39
40 EXPORT_SYMBOL(__const_udelay);
It's looping in or around __const_udelay in arch/um/sys-i386/delay.c
(gdb) b 38
Breakpoint 1 at 0x806935f: file delay.c, line 38.
(gdb) c
Continuing.
Breakpoint 1, __const_udelay (usecs=4295000) at delay.c:38
38 }
(gdb) n
panic (fmt=0x82320a5 "check_ptrace: PTRACE_OLDSETOPTIONS failed, errno = %d")
at panic.c:139
139 }
(gdb) n
135 touch_softlockup_watchdog();
(gdb)
136 i += panic_blink(i);
(gdb)
137 mdelay(1);
(gdb)
136 i += panic_blink(i);
(gdb)
138 i++;
(gdb)
137 mdelay(1);
(gdb) print ithose
$1 = <value optimized out>
(gdb)
..and entering panic() because of detecting a lockup.. sigh.. I disable
debugging options and make again and gdb again..
ur linux-2.6.18.1-32 # gdb ./vmlinux
GNU gdb 6.4
Copyright 2005 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 "x86_64-pc-linux-gnu"...Using host libthread_db
library "/lib/libthread_db.so.1".
(gdb) run
Starting program: /usr/src/linux-2.6.18.1-32/vmlinux
Program received signal SIGINT, Interrupt.
0x0806bbf2 in __const_udelay ()
(gdb) l
1
/var/tmp/portage/glibc-2.4-r3/work/build-x86-x86_64-pc-linux-gnu-nptl/csu/crti.S:
No such file or directory.
in
/var/tmp/portage/glibc-2.4-r3/work/build-x86-x86_64-pc-linux-gnu-nptl/csu/crti.S
(gdb) n
Single stepping until exit from function __const_udelay,
which has no line number information.
0x0807592a in panic ()
(gdb) n
Single stepping until exit from function panic,
which has no line number information.
n
Program received signal SIGINT, Interrupt.
0x0806bbd7 in __const_udelay ()
(gdb) l
1 in
/var/tmp/portage/glibc-2.4-r3/work/build-x86-x86_64-pc-linux-gnu-nptl/csu/crti.S
(gdb) n
Single stepping until exit from function __const_udelay,
which has no line number information.
0x0807592a in panic ()
..all that gets me is no way to debug.. but still panicking..
** Tried commenting out NOP, reducing number of loops by forcing n=10 ;
commenting out body of function so no delay would occur.. same result..
loops and panics..
variable "n" is not in context.. strange.. what is the end condition, then?
I've seen i jumping to 100000, also.. doesn't make sense to me, this debugging
session..
IMHO this is using register variables and those are screwed up somehow. But I
don't have any experience on i386 let alone Opteron machine code.:-(
=======================================================================================
The host is vanilla 2.6.18 patched with skas3-v9-pre9 running on dual-CPU
Opteron..
The corresponding 64-bit kernel starts just fine, although it insists on not
finding PTRACE_FAULTINFO and hence starting in skas0 :-(
ur linux-2.6.18.1-32 # /vm_base/kernels/linux64
Checking that ptrace can change system call numbers...OK
Checking syscall emulation patch for ptrace...missing
Checking for tmpfs mount on /dev/shm...OK
Checking PROT_EXEC mmap in /dev/shm/...OK
Checking for the skas3 patch in the host:
- /proc/mm...found
- PTRACE_FAULTINFO...not found
- PTRACE_LDT...found
UML running in SKAS0 mode
...
Any ideas, debugging techniques, requests for shell access to play with the
thing yourself, curses for using amd instead of Intel, etc. ?
Please? Let me help you help me help you :-)
-F
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
User-mode-linux-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user