* [Bug runtime/19764] New: stap --tmpdir leaves useless tempdirs behind
@ 2016-03-04 13:56 mcermak at redhat dot com
2016-03-04 15:07 ` [Bug runtime/19764] " mcermak at redhat dot com
0 siblings, 1 reply; 2+ messages in thread
From: mcermak at redhat dot com @ 2016-03-04 13:56 UTC (permalink / raw)
To: systemtap
https://sourceware.org/bugzilla/show_bug.cgi?id=19764
Bug ID: 19764
Summary: stap --tmpdir leaves useless tempdirs behind
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: ---
Created attachment 9064
--> https://sourceware.org/bugzilla/attachment.cgi?id=9064&action=edit
proposed patch
I noticed that stap --use-server leaves empty directories in /tmp after its
operation:
=====
# pwd; ls
/tmp
# stap --use-server -e 'probe syscall.open { exit() }'
# ls
stapKEPhUo
#
=====
In this case stap calls stap-server and that calls stap ... --tmpdir ... again.
It turns out that systemtap_session::create_tmp_dir() gets called within the
systemtap_session ctor before the cmdline gets parsed, always creating the
tmpdir (regardless of the --tmpdir setting). Note that
systemtap_session::remove_tmp_dir() only removes the tmpdir if --tmpdir has not
been set on the cmdline. So in the above use-case, the tmpdir gets left on the
filesystem.
Attached patch removes create_tmp_dir() from the systemtap_session ctor and
calls it slightly later, after the cmdline parsing is finished. Then
create_tmp_dir() only creates the tmpdir if --tmpdir has not been set on the
cmdline.
--
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug runtime/19764] stap --tmpdir leaves useless tempdirs behind
2016-03-04 13:56 [Bug runtime/19764] New: stap --tmpdir leaves useless tempdirs behind mcermak at redhat dot com
@ 2016-03-04 15:07 ` mcermak at redhat dot com
0 siblings, 0 replies; 2+ messages in thread
From: mcermak at redhat dot com @ 2016-03-04 15:07 UTC (permalink / raw)
To: systemtap
https://sourceware.org/bugzilla/show_bug.cgi?id=19764
Martin Cermak <mcermak at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #1 from Martin Cermak <mcermak at redhat dot com> ---
Fixed in commit 9fb504510601eac140dfb59c955f292dc08ada09.
--
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-03-04 15:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-04 13:56 [Bug runtime/19764] New: stap --tmpdir leaves useless tempdirs behind mcermak at redhat dot com
2016-03-04 15:07 ` [Bug runtime/19764] " 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).