This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug kprobes/23260] SystemTap usage appears to adversely affect GDB breakpoint functionality


https://sourceware.org/bugzilla/show_bug.cgi?id=23260

--- Comment #4 from Andrew W <awillia2 at sourcefire dot com> ---
Just to follow-up on this, the issue also affects C binaries as well, but in a
different way.  For the program below:

int main()
{
    return 1;
}

$ gcc main.c

$ gdb ./a.out
GNU gdb (Ubuntu 8.0.1-0ubuntu1) 8.0.1
...
This GDB was configured as "x86_64-linux-gnu".
...
Reading symbols from ./a.out...(no debugging symbols found)...done.
(gdb) break _start
Breakpoint 1 at 0x4f0
(gdb) run
Starting program: /home/zelda/Desktop/a.out 

Breakpoint 1, 0x00005555555544f0 in _start ()
(gdb) 

[In a second terminal]

$ ps -eL -o pid,ppid,lwp,stat,nlwp,cmd | awk 'NR==1 ||
/\/home\/zelda\/Desktop\/a.out/'
   PID   PPID    LWP STAT NLWP CMD
 56346  56342  56346 t       1 /home/zelda/Desktop/a.out

$ sudo stap --suppress-handler-errors --skip-badvars strace.stp -x 56346 -v
Pass 1: parsed user script and 465 library scripts using
119616virt/48552res/6432shr/42428data kb, in 90usr/90sys/286real ms.
Pass 2: analyzed script: 1116 probes, 207 functions, 104 embeds, 108 globals
using 311348virt/239224res/5376shr/234160data kb, in 22240usr/1320sys/26099real
ms.
Pass 3: using cached
/home/zelda/.systemtap/cache/02/stap_027e862ab47a5cdf6a07ae0b1c596ae7_1079724.c
Pass 4: using cached
/home/zelda/.systemtap/cache/02/stap_027e862ab47a5cdf6a07ae0b1c596ae7_1079724.ko
Pass 5: starting run.
Thu Jul 19 15:47:35 2018.405124 exit_group(1) = 

[ In a third terminal, you can see the process is no longer running ]

$ ps -eL -o pid,ppid,lwp,stat,nlwp,cmd | awk 'NR==1 ||
/\/home\/zelda\/Desktop\/a.out/'
   PID   PPID    LWP STAT NLWP CMD
$

[ In the first terminal ]

(gdb) c
Continuing.
Warning:
Cannot insert breakpoint 1.
Cannot access memory at address 0x5555555544f0
Cannot insert breakpoint -2.
Temporarily disabling shared library breakpoints:
breakpoint #-2
breakpoint #-5
breakpoint #-7

-- 
You are receiving this mail because:
You are the assignee for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]