public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug runtime/24193] New: rhel7 stapbpf SEGV
@ 2019-02-08  7:18 mcermak at redhat dot com
  2019-03-25 16:28 ` [Bug bpf/24193] " me at serhei dot io
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: mcermak at redhat dot com @ 2019-02-08  7:18 UTC (permalink / raw)
  To: systemtap

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

            Bug ID: 24193
           Summary: rhel7 stapbpf SEGV
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: runtime
          Assignee: systemtap at sourceware dot org
          Reporter: mcermak at redhat dot com
  Target Milestone: ---

I seem to be able to reliably reproduce a SEGV that happens with git stap
4e768695 and kernel-3.10.0-993.el7.x86_64.  (This doesn't happen with rhel
packaged systemtap-3.3-3.el7):

=======
 7.7 Server x86_64 # stap -v -p4 -k --runtime=bpf
/root/.mcermak/systemtap/testsuite/systemtap.bpf/bpf_tests/array.stp
Pass 1: parsed user script and 49 library scripts using
216880virt/14620res/3360shr/11024data kb, in 40usr/0sys/32real ms.
Pass 2: analyzed script: 3 probes, 2 functions, 0 embeds, 1 global using
257120virt/55720res/4288shr/51264data kb, in 700usr/130sys/1184real ms.
stap_14165.bo
Pass 4: compiled BPF into "stap_14165.bo" in 0usr/0sys/3real ms.
Keeping temporary directory "/tmp/stap8MN8vG"
 7.7 Server x86_64 # 
 7.7 Server x86_64 # gdb -q -args /usr/local/bin/stapbpf stap_14165.bo
Reading symbols from /usr/local/bin/stapbpf...done.
(gdb) r
Starting program: /usr/local/bin/stapbpf stap_14165.bo
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
___fprintf_chk (fp=0x0, flag=1, format=0x40bc58 "%s (%s): stapbpf: %s, name:
%s, d_size: %lu\n") at fprintf_chk.c:31
31        _IO_acquire_lock_clear_flags2 (fp);
(gdb) 
(gdb) 
(gdb) bt full
#0  ___fprintf_chk (fp=0x0, flag=1, format=0x40bc58 "%s (%s): stapbpf: %s,
name: %s, d_size: %lu\n") at fprintf_chk.c:31
        _IO_acquire_lock_file = 0x0
        ap = {{gp_offset = 0, fp_offset = 0, overflow_arg_area = 0x0,
reg_save_area = 0x0}}
        done = <optimized out>
#1  0x0000000000407104 in fprintf (__fmt=0x40bc58 "%s (%s): stapbpf: %s, name:
%s, d_size: %lu\n", __stream=<optimized out>) at /usr/include/bits/stdio2.h:98
No locals.
#2  prog_load (data=0x159f678, data=0x159f678, name=0x7f4a977c7806
"kprobe/0x242f90") at ../../systemtap/stapbpf/stapbpf.cxx:318
        prog_type = BPF_PROG_TYPE_KPROBE
        fd = <optimized out>
#3  load_bpf_file (module=<optimized out>) at
../../systemtap/stapbpf/stapbpf.cxx:1210
        shdr = <optimized out>
        sh_name = <optimized out>
        license_idx = 2541516806
        script_name_idx = 10
        begin_idx = 2
        end_idx = 4
        sh_data = <optimized out>
        maps_idx = 1
        version_idx = 8
        kprobes_idx = 0
        buf = <optimized out>
        module_basename_str = "stap_14165.bo"
        len = <optimized out>
        fd = <optimized out>
        elf = <optimized out>
        shnum = 13
        module_name_str = "stap_14165.bo"
        ehdr = <optimized out>
        shdrs = <optimized out>
#4  0x00000000004034bf in main (argc=2, argv=0x7ffd36a1d258) at
../../systemtap/stapbpf/stapbpf.cxx:1442
        long_opts = {{name = 0x40b5ea "help", has_arg = 0, flag = 0x0, val =
104}, {name = 0x40b5ef "verbose", has_arg = 0, flag = 0x0, val = 118}, {name =
0x40b407 "version", has_arg = 0, flag = 0x0, val = 86}}
        rc = <optimized out>
(gdb)
=======

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug bpf/24193] rhel7 stapbpf SEGV
  2019-02-08  7:18 [Bug runtime/24193] New: rhel7 stapbpf SEGV mcermak at redhat dot com
@ 2019-03-25 16:28 ` me at serhei dot io
  2019-03-25 16:32 ` me at serhei dot io
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: me at serhei dot io @ 2019-03-25 16:28 UTC (permalink / raw)
  To: systemtap

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

Serhei Makarov <me at serhei dot io> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |me at serhei dot io
          Component|runtime                     |bpf

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug bpf/24193] rhel7 stapbpf SEGV
  2019-02-08  7:18 [Bug runtime/24193] New: rhel7 stapbpf SEGV mcermak at redhat dot com
  2019-03-25 16:28 ` [Bug bpf/24193] " me at serhei dot io
@ 2019-03-25 16:32 ` me at serhei dot io
  2019-03-27 14:44 ` me at serhei dot io
  2019-04-03 12:58 ` mcermak at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: me at serhei dot io @ 2019-03-25 16:32 UTC (permalink / raw)
  To: systemtap

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

--- Comment #1 from Serhei Makarov <me at serhei dot io> ---
This happens when /dev/kmsg is not available, so the corresponding file is
NULL. I encountered this problem and fixed it in the following commits (merged
to master last week):

-
https://sourceware.org/git/gitweb.cgi?p=systemtap.git;a=commitdiff;h=82349a5eb0e1122d5532a03367d91d5ee838722d
-
https://sourceware.org/git/gitweb.cgi?p=systemtap.git;a=commitdiff;h=c1a7434f7cfb49d9845de03d1157cf31027a9cba

Let me know if there's still a problem, otherwise I will close as WORKSFORME.

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug bpf/24193] rhel7 stapbpf SEGV
  2019-02-08  7:18 [Bug runtime/24193] New: rhel7 stapbpf SEGV mcermak at redhat dot com
  2019-03-25 16:28 ` [Bug bpf/24193] " me at serhei dot io
  2019-03-25 16:32 ` me at serhei dot io
@ 2019-03-27 14:44 ` me at serhei dot io
  2019-04-03 12:58 ` mcermak at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: me at serhei dot io @ 2019-03-27 14:44 UTC (permalink / raw)
  To: systemtap

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

Serhei Makarov <me at serhei dot io> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |WORKSFORME

--- Comment #2 from Serhei Makarov <me at serhei dot io> ---
Closing WORKSFORME as the previously mentioned commits added safety checking
for the code indicated in that GDB session.

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug bpf/24193] rhel7 stapbpf SEGV
  2019-02-08  7:18 [Bug runtime/24193] New: rhel7 stapbpf SEGV mcermak at redhat dot com
                   ` (2 preceding siblings ...)
  2019-03-27 14:44 ` me at serhei dot io
@ 2019-04-03 12:58 ` mcermak at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: mcermak at redhat dot com @ 2019-04-03 12:58 UTC (permalink / raw)
  To: systemtap

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

--- Comment #3 from Martin Cermak <mcermak at redhat dot com> ---
Tests fine; Thanks for the fix!

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-04-03 12:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-08  7:18 [Bug runtime/24193] New: rhel7 stapbpf SEGV mcermak at redhat dot com
2019-03-25 16:28 ` [Bug bpf/24193] " me at serhei dot io
2019-03-25 16:32 ` me at serhei dot io
2019-03-27 14:44 ` me at serhei dot io
2019-04-03 12:58 ` mcermak at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).