public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug translator/14432] New: tempdir isn't always removed
@ 2012-08-04  3:15 jistone at redhat dot com
  2012-08-04  3:19 ` [Bug translator/14432] " jistone at redhat dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: jistone at redhat dot com @ 2012-08-04  3:15 UTC (permalink / raw)
  To: systemtap

http://sourceware.org/bugzilla/show_bug.cgi?id=14432

             Bug #: 14432
           Summary: tempdir isn't always removed
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: translator
        AssignedTo: systemtap@sourceware.org
        ReportedBy: jistone@redhat.com
    Classification: Unclassified


There are a number of places in the translator that call exit(), which means
that session tempdirs are not removed.  The most obvious case is "stap -V".

Some of these exit() calls may have been an issue for a while, but I think some
are also a regression due to PR13516 commit b96901b7, which creates the tempdir
much earlier than before.  So for example, now exits during option-parsing need
to be more careful and clean up.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

* [Bug translator/14432] tempdir isn't always removed
  2012-08-04  3:15 [Bug translator/14432] New: tempdir isn't always removed jistone at redhat dot com
@ 2012-08-04  3:19 ` jistone at redhat dot com
  2012-08-04 21:16 ` jistone at redhat dot com
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jistone at redhat dot com @ 2012-08-04  3:19 UTC (permalink / raw)
  To: systemtap

http://sourceware.org/bugzilla/show_bug.cgi?id=14432

--- Comment #1 from Josh Stone <jistone at redhat dot com> 2012-08-04 03:19:16 UTC ---
Note, there is a call to _exit() in handle_interrupt(), which is sort of an
emergency case that doesn't need to clean up.

For all plain exit() calls, we can probably get clever with setting up atexit()
or on_exit().  Or perhaps those exit() calls should convert to the new
interrupt_exception instead.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

* [Bug translator/14432] tempdir isn't always removed
  2012-08-04  3:15 [Bug translator/14432] New: tempdir isn't always removed jistone at redhat dot com
  2012-08-04  3:19 ` [Bug translator/14432] " jistone at redhat dot com
@ 2012-08-04 21:16 ` jistone at redhat dot com
  2012-08-24 19:02 ` wcohen at redhat dot com
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jistone at redhat dot com @ 2012-08-04 21:16 UTC (permalink / raw)
  To: systemtap

http://sourceware.org/bugzilla/show_bug.cgi?id=14432

Josh Stone <jistone at redhat dot com> changed:

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

--- Comment #2 from Josh Stone <jistone at redhat dot com> 2012-08-04 21:15:58 UTC ---
commit e2d0f787a648eefe4e5a152058f92c3f3274242e

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

* [Bug translator/14432] tempdir isn't always removed
  2012-08-04  3:15 [Bug translator/14432] New: tempdir isn't always removed jistone at redhat dot com
  2012-08-04  3:19 ` [Bug translator/14432] " jistone at redhat dot com
  2012-08-04 21:16 ` jistone at redhat dot com
@ 2012-08-24 19:02 ` wcohen at redhat dot com
  2012-08-24 19:36 ` wcohen at redhat dot com
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: wcohen at redhat dot com @ 2012-08-24 19:02 UTC (permalink / raw)
  To: systemtap

http://sourceware.org/bugzilla/show_bug.cgi?id=14432

William Cohen <wcohen at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |wcohen at redhat dot com
         Resolution|FIXED                       |

--- Comment #3 from William Cohen <wcohen at redhat dot com> 2012-08-24 19:02:06 UTC ---
On RHEL5 systems commit e2d0f787a648eefe4e5a152058f92c3f3274242e causes the
tests to hang on systemtap.base/cmd_parse.exp.  It reports "PASS: cmd_parse14"
but doesn't seem to progress past that message.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

* [Bug translator/14432] tempdir isn't always removed
  2012-08-04  3:15 [Bug translator/14432] New: tempdir isn't always removed jistone at redhat dot com
                   ` (2 preceding siblings ...)
  2012-08-24 19:02 ` wcohen at redhat dot com
@ 2012-08-24 19:36 ` wcohen at redhat dot com
  2012-08-24 19:55 ` wcohen at redhat dot com
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: wcohen at redhat dot com @ 2012-08-24 19:36 UTC (permalink / raw)
  To: systemtap

http://sourceware.org/bugzilla/show_bug.cgi?id=14432

--- Comment #4 from William Cohen <wcohen at redhat dot com> 2012-08-24 19:36:08 UTC ---
When comparing the output of "stap -v -v --vp 01020 -h" of the working and
hanging versions of stap the hanging one has the following lines at the end of
the output:

+Running rm -rf /tmp/stappdKUJd
+Spawn waitpid result (0x0): 0
+Removed temporary directory "/tmp/stappdKUJd"

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

* [Bug translator/14432] tempdir isn't always removed
  2012-08-04  3:15 [Bug translator/14432] New: tempdir isn't always removed jistone at redhat dot com
                   ` (3 preceding siblings ...)
  2012-08-24 19:36 ` wcohen at redhat dot com
@ 2012-08-24 19:55 ` wcohen at redhat dot com
  2012-08-24 21:36 ` jistone at redhat dot com
  2012-09-07 19:31 ` jistone at redhat dot com
  6 siblings, 0 replies; 8+ messages in thread
From: wcohen at redhat dot com @ 2012-08-24 19:55 UTC (permalink / raw)
  To: systemtap

http://sourceware.org/bugzilla/show_bug.cgi?id=14432

--- Comment #5 from William Cohen <wcohen at redhat dot com> 2012-08-24 19:55:38 UTC ---
For cmd_parse14 doesn't seems to be exiting stap. See something like the
following pstee when running the test:

$ pstree -p 15099
make(15099)───sh(15100)───execrc(15136)───expect(15137)─┬─sh(15424)───stap(15427)
                                                        └─{expect}(15158)

Started gdb to see where stap is stuck:

(gdb) where
#0  0x00000034a52c5630 in __write_nocancel () from /lib64/libc.so.6
#1  0x00000034a526a6b3 in _IO_new_file_write (f=0x34a5551860, data=0xfbd14a8, 
    n=29) at fileops.c:1260
#2  0x00000034a526baf3 in _IO_new_file_xsputn (f=0x34a5551860, 
    data=<value optimized out>, n=29) at fileops.c:514
#3  0x00000034a5260dfb in _IO_fwrite (buf=0xfbd14a8, size=1, count=29, 
    fp=0x34a5551860) at iofwrite.c:45
#4  0x00000034aba8e5dd in std::basic_ostream<char, std::char_traits<char> >&
std::operator<< <char, std::char_traits<char>, std::allocator<char>
>(std::basic_ostream<char, std::char_traits<char> >&, std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&) () from
/usr/lib64/libstdc++.so.6
#5  0x000000000053dcee in stap_waitpid (verbose=<value optimized out>, 
    pid=15428) at ../systemtap/util.cxx:618
#6  0x0000000000540adc in stap_system (verbose=2, description="rm", 
    args=std::vector of length 3, capacity 4 = {...}, null_out=false, 
    null_err=<value optimized out>) at ../systemtap/util.cxx:817
#7  0x000000000041818a in stap_system (this=0x7fffe37b6830)
    at ../systemtap/util.h:73
#8  systemtap_session::remove_tmp_dir (this=0x7fffe37b6830)
    at ../systemtap/session.cxx:1781
#9  0x0000000000418497 in systemtap_session::~systemtap_session (this=0x2, 
    __in_chrg=<value optimized out>) at ../systemtap/session.cxx:360
#10 0x000000000041332b in main (argc=6, argv=0x7fffe37b71f8)
---Type <return> to continue, or q <return> to quit---
    at ../systemtap/main.cxx:1135
(gdb)

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

* [Bug translator/14432] tempdir isn't always removed
  2012-08-04  3:15 [Bug translator/14432] New: tempdir isn't always removed jistone at redhat dot com
                   ` (4 preceding siblings ...)
  2012-08-24 19:55 ` wcohen at redhat dot com
@ 2012-08-24 21:36 ` jistone at redhat dot com
  2012-09-07 19:31 ` jistone at redhat dot com
  6 siblings, 0 replies; 8+ messages in thread
From: jistone at redhat dot com @ 2012-08-24 21:36 UTC (permalink / raw)
  To: systemtap

http://sourceware.org/bugzilla/show_bug.cgi?id=14432

--- Comment #6 from Josh Stone <jistone at redhat dot com> 2012-08-24 21:36:28 UTC ---
(In reply to comment #4)
> When comparing the output of "stap -v -v --vp 01020 -h" of the working and
> hanging versions of stap the hanging one has the following lines at the end of
> the output:
> 
> +Running rm -rf /tmp/stappdKUJd
> +Spawn waitpid result (0x0): 0
> +Removed temporary directory "/tmp/stappdKUJd"

This much is a good thing - exactly what the commit was intended to solve.

But it doesn't gel with:

(In reply to comment #5)
> #5  0x000000000053dcee in stap_waitpid (verbose=<value optimized out>, 
>     pid=15428) at ../systemtap/util.cxx:618

This line is the clog which prints the "Spawn waitpid..." above, plus

> #8  systemtap_session::remove_tmp_dir (this=0x7fffe37b6830)
>    at ../systemtap/session.cxx:1781

This is a couple lines before that which prints "Removed temporary directory".

So I don't see how that backtrace could possibly correspond with the new
output.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

* [Bug translator/14432] tempdir isn't always removed
  2012-08-04  3:15 [Bug translator/14432] New: tempdir isn't always removed jistone at redhat dot com
                   ` (5 preceding siblings ...)
  2012-08-24 21:36 ` jistone at redhat dot com
@ 2012-09-07 19:31 ` jistone at redhat dot com
  6 siblings, 0 replies; 8+ messages in thread
From: jistone at redhat dot com @ 2012-09-07 19:31 UTC (permalink / raw)
  To: systemtap

http://sourceware.org/bugzilla/show_bug.cgi?id=14432

Josh Stone <jistone at redhat dot com> changed:

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

--- Comment #7 from Josh Stone <jistone at redhat dot com> 2012-09-07 19:31:13 UTC ---
I believe cmd_parse's issues are more of a testcase bug -- cloned to PR14560.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

end of thread, other threads:[~2012-09-07 19:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-04  3:15 [Bug translator/14432] New: tempdir isn't always removed jistone at redhat dot com
2012-08-04  3:19 ` [Bug translator/14432] " jistone at redhat dot com
2012-08-04 21:16 ` jistone at redhat dot com
2012-08-24 19:02 ` wcohen at redhat dot com
2012-08-24 19:36 ` wcohen at redhat dot com
2012-08-24 19:55 ` wcohen at redhat dot com
2012-08-24 21:36 ` jistone at redhat dot com
2012-09-07 19:31 ` jistone 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).