View previous topic :: View next topic |
Author |
Message |
toralf Developer
Joined: 01 Feb 2004 Posts: 3922 Location: Hamburg
|
Posted: Tue Oct 08, 2013 8:58 pm Post subject: [solved]gdb won't give me a back trace of a running process |
|
|
While trying to debug a user mode linux issue I got Code: | tfoerste@n22 ~ $ sudo gdb /home/tfoerste/devel/linux/linux 15576 -n -batch -ex bt
warning: process 15576 is already traced by process 971
ptrace: Operation not permitted.
/home/tfoerste/15576: No such file or directory.
No stack.
| WHat irritates me is "/home/tfoerste/15576" - shouldn't gdb look into /proc instead ?
Last edited by toralf on Wed Oct 09, 2013 5:16 pm; edited 1 time in total |
|
Back to top |
|
|
eyoung100 Veteran
Joined: 23 Jan 2004 Posts: 1428
|
|
Back to top |
|
|
toralf Developer
Joined: 01 Feb 2004 Posts: 3922 Location: Hamburg
|
Posted: Tue Oct 08, 2013 9:20 pm Post subject: |
|
|
that is the "root" of all linux - processes of the user mode linux guests: Code: | $ pgrep -a linux
971 /home/tfoerste/devel/linux/linux earlyprintk ubda=/home/tfoerste/virtual/uml/trinity ubdb=/mnt/ramdisk/trinity_swap eth0=tuntap,tap0,72:ef:3d:9f:c3:5a mem=1025M con0=fd:0,fd:1 con=pts umid=uml_trinity rootfstype=ext4
978 /home/tfoerste/devel/linux/linux earlyprintk ubda=/home/tfoerste/virtual/uml/trinity ubdb=/mnt/ramdisk/trinity_swap eth0=tuntap,tap0,72:ef:3d:9f:c3:5a mem=1025M con0=fd:0,fd:1 con=pts umid=uml_trinity rootfstype=ext4
979 /home/tfoerste/devel/linux/linux earlyprintk ubda=/home/tfoerste/virtual/uml/trinity ubdb=/mnt/ramdisk/trinity_swap eth0=tuntap,tap0,72:ef:3d:9f:c3:5a mem=1025M con0=fd:0,fd:1 con=pts umid=uml_trinity rootfstype=ext4
980 /home/tfoerste/devel/linux/linux earlyprintk ubda=/home/tfoerste/virtual/uml/trinity ubdb=/mnt/ramdisk/trinity_swap eth0=tuntap,tap0,72:ef:3d:9f:c3:5a mem=1025M con0=fd:0,fd:1 con=pts umid=uml_trinity rootfstype=ext4
981 linux
1072 linux
1774 linux
5940 linux
5943 linux
6076 linux
6156 linux
6456 linux
6713 linux
6881 linux
6945 linux
7143 linux
7185 linux
7187 linux
7209 linux
7226 linux
7227 linux
13127 linux
13252 linux
13255 linux
13262 linux
|
|
|
Back to top |
|
|
eyoung100 Veteran
Joined: 23 Jan 2004 Posts: 1428
|
Posted: Tue Oct 08, 2013 9:35 pm Post subject: |
|
|
Try:
Code: | sudo gdb /home/tfoerste/devel/linux/linux 971 -n -batch -ex bt |
I don't think you'll ever get 15576 because 15576 is forked _________________ The Birth and Growth of Science is the Death and Atrophy of Art -- Unknown
Registerd Linux User #363735
Adopt a Post | Strip Comments| Emerge Wrapper |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21635
|
Posted: Tue Oct 08, 2013 9:57 pm Post subject: Re: gdb won't give me a back trace of a running process |
|
|
toralf wrote: | While trying to debug a user mode linux issue I got Code: | tfoerste@n22 ~ $ sudo gdb /home/tfoerste/devel/linux/linux 15576 -n -batch -ex bt
warning: process 15576 is already traced by process 971
ptrace: Operation not permitted.
/home/tfoerste/15576: No such file or directory.
No stack.
| WHat irritates me is "/home/tfoerste/15576" - shouldn't gdb look into /proc instead ? | GDB tried to attach to the process and failed. It then tried to treat the identifier as a program in the current working directory. Arguably, it should skip that latter check if the former found a valid process but still failed to attach.
You cannot ptrace a process that is already under ptrace. According to the gdb output, process 971 is already tracing your target. Normally, I would suggest killing 971 and trying again, but since you say that is the UML process, killing it might bring down the whole UML environment. |
|
Back to top |
|
|
toralf Developer
Joined: 01 Feb 2004 Posts: 3922 Location: Hamburg
|
Posted: Wed Oct 09, 2013 5:16 pm Post subject: |
|
|
ah - thx.
So probably worth a minor bug report/enhancement request. |
|
Back to top |
|
|
|