public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug translator/20281] New: probe process("")  kills stap with SIGABRT
@ 2016-06-21  9:58 mcermak at redhat dot com
  2016-06-21 12:52 ` [Bug translator/20281] " mcermak at redhat dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: mcermak at redhat dot com @ 2016-06-21  9:58 UTC (permalink / raw)
  To: systemtap

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

            Bug ID: 20281
           Summary: probe process("")  kills stap with SIGABRT
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: translator
          Assignee: systemtap at sourceware dot org
          Reporter: mcermak at redhat dot com
  Target Milestone: ---

Following script makes stap die with a not very user-friendly error message:

=======
work #  stap -p3 -e 'probe process("").syscall { println("hey")}' -c /bin/ls
stap: ../../home/mcermak/stap/src/translate.cxx:7424: void
emit_symbol_data(systemtap_session&): Assertion `modname.length() != 0' failed.
Aborted (core dumped)
work #
=======

This happens at translation time at 'assert (modname.length() != 0);' when
processing user modules (files).  Maybe this might get caught earlier, possibly
at elaboration time within match_node::find_and_build() (?) and a nicer error
message might get returned.

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

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

* [Bug translator/20281] probe process("")  kills stap with SIGABRT
  2016-06-21  9:58 [Bug translator/20281] New: probe process("") kills stap with SIGABRT mcermak at redhat dot com
@ 2016-06-21 12:52 ` mcermak at redhat dot com
  2016-06-24 13:11 ` mcermak at redhat dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: mcermak at redhat dot com @ 2016-06-21 12:52 UTC (permalink / raw)
  To: systemtap

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

--- Comment #1 from Martin Cermak <mcermak at redhat dot com> ---
Created attachment 9346
  --> https://sourceware.org/bugzilla/attachment.cgi?id=9346&action=edit
proposed patch

=======
work #  stap -p3 -e 'probe process("").syscall { println("hey")}' -c /bin/ls
parse error: Component must not be empty.
        saw: operator ')' at <input>:1:17
     source: probe process("").syscall { println("hey")}
                             ^

1 parse error.
Pass 1: parse failed.  [man error::pass1]
work #
=======

Attached patch seems to work for me.  But full regression testing hasn't been
run against it yet.

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

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

* [Bug translator/20281] probe process("")  kills stap with SIGABRT
  2016-06-21  9:58 [Bug translator/20281] New: probe process("") kills stap with SIGABRT mcermak at redhat dot com
  2016-06-21 12:52 ` [Bug translator/20281] " mcermak at redhat dot com
@ 2016-06-24 13:11 ` mcermak at redhat dot com
  2016-06-28  4:24 ` mcermak at redhat dot com
  2016-06-28 14:36 ` mcermak at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: mcermak at redhat dot com @ 2016-06-24 13:11 UTC (permalink / raw)
  To: systemtap

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

--- Comment #2 from Martin Cermak <mcermak at redhat dot com> ---
Created attachment 9357
  --> https://sourceware.org/bugzilla/attachment.cgi?id=9357&action=edit
proposed patch

Another, maybe a smarter way to solve this.  Attached patch would produce
following error message:

=======
work #  /opt/mystap/bin/stap -p4 --poison-cache -ve 'probe process("").syscall
{ println("hey") }' -c /bin/ls
Pass 1: parsed user script and 0 library scripts using
212104virt/16728res/8076shr/8432data kb, in 0usr/0sys/0real ms.
semantic error: resolution failed in 

semantic error: while resolving probe point: identifier 'process' at
<input>:1:7
        source: probe process("").syscall { println("hey") }
                      ^

semantic error: empty module

Pass 2: analyzed script: 0 probes, 0 functions, 0 embeds, 0 globals using
212104virt/16728res/8076shr/8432data kb, in 0usr/0sys/0real ms.
Pass 2: analysis failed.  [man error::pass2]
work #
=======

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

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

* [Bug translator/20281] probe process("")  kills stap with SIGABRT
  2016-06-21  9:58 [Bug translator/20281] New: probe process("") kills stap with SIGABRT mcermak at redhat dot com
  2016-06-21 12:52 ` [Bug translator/20281] " mcermak at redhat dot com
  2016-06-24 13:11 ` mcermak at redhat dot com
@ 2016-06-28  4:24 ` mcermak at redhat dot com
  2016-06-28 14:36 ` mcermak at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: mcermak at redhat dot com @ 2016-06-28  4:24 UTC (permalink / raw)
  To: systemtap

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

--- Comment #3 from Martin Cermak <mcermak at redhat dot com> ---
Full regression testing the above patch seems to pass.

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

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

* [Bug translator/20281] probe process("")  kills stap with SIGABRT
  2016-06-21  9:58 [Bug translator/20281] New: probe process("") kills stap with SIGABRT mcermak at redhat dot com
                   ` (2 preceding siblings ...)
  2016-06-28  4:24 ` mcermak at redhat dot com
@ 2016-06-28 14:36 ` mcermak at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: mcermak at redhat dot com @ 2016-06-28 14:36 UTC (permalink / raw)
  To: systemtap

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

Martin Cermak <mcermak at redhat dot com> changed:

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

--- Comment #4 from Martin Cermak <mcermak at redhat dot com> ---
Fixed in commit 403fa5e6ff171454d5b7f1fcf6f8dcd4fd7d995c

-- 
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:[~2016-06-28 14:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-21  9:58 [Bug translator/20281] New: probe process("") kills stap with SIGABRT mcermak at redhat dot com
2016-06-21 12:52 ` [Bug translator/20281] " mcermak at redhat dot com
2016-06-24 13:11 ` mcermak at redhat dot com
2016-06-28  4:24 ` mcermak at redhat dot com
2016-06-28 14:36 ` 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).