public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug translator/27274] New: stap: staptree.h:1349: virtual update_visitor::~update_visitor(): Assertion `values.empty()' failed.
@ 2021-01-29  9:20 craig.ringer at 2ndquadrant dot com
  2021-01-29  9:22 ` [Bug translator/27274] " craig.ringer at 2ndquadrant dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: craig.ringer at 2ndquadrant dot com @ 2021-01-29  9:20 UTC (permalink / raw)
  To: systemtap

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

            Bug ID: 27274
           Summary: stap: staptree.h:1349: virtual
                    update_visitor::~update_visitor(): Assertion
                    `values.empty()' failed.
           Product: systemtap
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: translator
          Assignee: systemtap at sourceware dot org
          Reporter: craig.ringer at 2ndquadrant dot com
  Target Milestone: ---

I've been seeing intermittent assertion failures
`update_visitor::~update_visitor(): Assertion `values.empty()' failed` in
script compilation and finally tracked down one of the ways it arises.

In a SDT marker based probe, if not enough arguments are passed to a function,
then in some cases this assertion seems to fire. I finally reduced this to a
minimal example, attached.

Run

    gcc -Wextra -Wall -Wno-unused-parameter -o test_sdt test_sdt.c

    stap -v sdt_assert.stp

Result:

    $ /usr/local/systemtap/bin/stap -v sdt_assert.stp 
    Pass 1: parsed user script and 497 library scripts using
357068virt/114944res/13316shr/101304data kb, in 210usr/20sys/232real ms.
    stap: staptree.h:1349: virtual update_visitor::~update_visitor(): Assertion
`values.empty()' failed.
    Aborted (core dumped)

Full backtrace attached, but here's the short one:

```
#0  __GI_raise (sig=<optimized out>) at ../sysdeps/unix/sysv/linux/raise.c:49
#1  __GI_abort () at abort.c:79
#2  __assert_fail_base (fmt="%s%s%s:%u: %s%sAssertion `%s' failed.\n%n",
assertion="values.empty()", file="staptree.h", line=1349, function=<optimized
out>) at assert.c:92
#3  __GI___assert_fail (assertion="values.empty()", file="staptree.h",
line=1349, function="virtual update_visitor::~update_visitor()") at
assert.c:101
#4  update_visitor::~update_visitor (this=<optimized out>, __in_chrg=<optimized
out>) at staptree.h:1349
#5  update_visitor::~update_visitor (this=<optimized out>, __in_chrg=<optimized
out>) at staptree.h:1349
#6  sdt_query::handle_probe_entry (this=) at
/usr/include/c++/10/ext/new_allocator.h:89
#7  sdt_query::setup_note_probe_entry (this=, scn_name=..., note_name=...,
type=<optimized out>, data="p\215\005M\377\177", len=<optimized out>) at
tapsets.cxx:7890
#8  dwflpp::iterate_over_notes<void> (this=this@entry=, object=object@entry=, 
   
callback=callback@entry=<sdt_query::setup_note_probe_entry_callback(sdt_query*,
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >
const&, std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&, int, char const*, unsigned long)>) at
dwflpp.cxx:1292
#9  dwflpp::iterate_over_notes<sdt_query> (
    callback=<sdt_query::setup_note_probe_entry_callback(sdt_query*,
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >
const&, std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&, int, char const*, unsigned long)>, object=,
this=<optimized out>) at dwflpp.h:310
#10 sdt_query::handle_query_module (this=) at tapsets.cxx:7748
#11 query_module (mod=, name="/home/craig/projects/2Q/systemtap/test_sdt",
addr=<optimized out>, q=<optimized out>) at tapsets.cxx:2664
#12 dwfl_getmodules () from /lib64/libdw.so.1
#13 dwflpp::iterate_over_modules<base_query> (data=,
callback=<query_module(Dwfl_Module*, void**, char const*, Dwarf_Addr,
base_query*)>, this=) at dwflpp.h:228
#14 dwarf_builder::build (this=, sess=..., base=, location=,
parameters=std::map with 2 elements = {...}, finished_results=std::vector of
length 0, capacity 0) at tapsets.cxx:8805
#15 match_node::find_and_build (this=, s=..., p=, loc=, pos=<optimized out>,
results=std::vector of length 0, capacity 0, builders=std::set with 0 elements)
at elaborate.cxx:479
#16 match_node::find_and_build (this=, s=..., p=, loc=, pos=1,
results=std::vector of length 0, capacity 0, builders=std::set with 0 elements)
at elaborate.cxx:653
#17 match_node::find_and_build (this=, s=..., p=, loc=, pos=0,
results=std::vector of length 0, capacity 0, builders=std::set with 0 elements)
at elaborate.cxx:653
#18 derive_probes (s=..., p=, dps=std::vector of length 0, capacity 0,
optional=<optimized out>, rethrow_errors=false) at elaborate.cxx:1020
#19 semantic_pass_symbols (s=...) at elaborate.cxx:1950
#20 semantic_pass (s=...) at elaborate.cxx:2540
#21 passes_0_4 (s=...) at main.cxx:1019
#22 main (argc=<optimized out>, argv=<optimized out>) at main.cxx:1504
```

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

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

* [Bug translator/27274] stap: staptree.h:1349: virtual update_visitor::~update_visitor(): Assertion `values.empty()' failed.
  2021-01-29  9:20 [Bug translator/27274] New: stap: staptree.h:1349: virtual update_visitor::~update_visitor(): Assertion `values.empty()' failed craig.ringer at 2ndquadrant dot com
@ 2021-01-29  9:22 ` craig.ringer at 2ndquadrant dot com
  2021-01-29  9:22 ` craig.ringer at 2ndquadrant dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: craig.ringer at 2ndquadrant dot com @ 2021-01-29  9:22 UTC (permalink / raw)
  To: systemtap

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

--- Comment #1 from Craig Ringer <craig.ringer at 2ndquadrant dot com> ---
Created attachment 13172
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13172&action=edit
Test program

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

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

* [Bug translator/27274] stap: staptree.h:1349: virtual update_visitor::~update_visitor(): Assertion `values.empty()' failed.
  2021-01-29  9:20 [Bug translator/27274] New: stap: staptree.h:1349: virtual update_visitor::~update_visitor(): Assertion `values.empty()' failed craig.ringer at 2ndquadrant dot com
  2021-01-29  9:22 ` [Bug translator/27274] " craig.ringer at 2ndquadrant dot com
@ 2021-01-29  9:22 ` craig.ringer at 2ndquadrant dot com
  2021-01-29  9:23 ` craig.ringer at 2ndquadrant dot com
  2021-05-03 22:14 ` fche at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: craig.ringer at 2ndquadrant dot com @ 2021-01-29  9:22 UTC (permalink / raw)
  To: systemtap

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

--- Comment #2 from Craig Ringer <craig.ringer at 2ndquadrant dot com> ---
Created attachment 13173
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13173&action=edit
tapscript to trigger the assertion

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

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

* [Bug translator/27274] stap: staptree.h:1349: virtual update_visitor::~update_visitor(): Assertion `values.empty()' failed.
  2021-01-29  9:20 [Bug translator/27274] New: stap: staptree.h:1349: virtual update_visitor::~update_visitor(): Assertion `values.empty()' failed craig.ringer at 2ndquadrant dot com
  2021-01-29  9:22 ` [Bug translator/27274] " craig.ringer at 2ndquadrant dot com
  2021-01-29  9:22 ` craig.ringer at 2ndquadrant dot com
@ 2021-01-29  9:23 ` craig.ringer at 2ndquadrant dot com
  2021-05-03 22:14 ` fche at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: craig.ringer at 2ndquadrant dot com @ 2021-01-29  9:23 UTC (permalink / raw)
  To: systemtap

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

--- Comment #3 from Craig Ringer <craig.ringer at 2ndquadrant dot com> ---
Created attachment 13174
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13174&action=edit
"bt full"

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

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

* [Bug translator/27274] stap: staptree.h:1349: virtual update_visitor::~update_visitor(): Assertion `values.empty()' failed.
  2021-01-29  9:20 [Bug translator/27274] New: stap: staptree.h:1349: virtual update_visitor::~update_visitor(): Assertion `values.empty()' failed craig.ringer at 2ndquadrant dot com
                   ` (2 preceding siblings ...)
  2021-01-29  9:23 ` craig.ringer at 2ndquadrant dot com
@ 2021-05-03 22:14 ` fche at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: fche at redhat dot com @ 2021-05-03 22:14 UTC (permalink / raw)
  To: systemtap

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

Frank Ch. Eigler <fche at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |fche at redhat dot com
         Resolution|---                         |FIXED

--- Comment #4 from Frank Ch. Eigler <fche at redhat dot com> ---
commit 8ae1d1dcec48 allows the underlying exceptions to propagate cleanly

-- 
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:[~2021-05-03 22:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-29  9:20 [Bug translator/27274] New: stap: staptree.h:1349: virtual update_visitor::~update_visitor(): Assertion `values.empty()' failed craig.ringer at 2ndquadrant dot com
2021-01-29  9:22 ` [Bug translator/27274] " craig.ringer at 2ndquadrant dot com
2021-01-29  9:22 ` craig.ringer at 2ndquadrant dot com
2021-01-29  9:23 ` craig.ringer at 2ndquadrant dot com
2021-05-03 22:14 ` fche 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).