* [Bug dyninst/15486] New: stapdyn get hung when printing debug messages
@ 2013-05-17 17:33 dsmith at redhat dot com
2013-05-17 18:19 ` [Bug dyninst/15486] " dsmith at redhat dot com
0 siblings, 1 reply; 2+ messages in thread
From: dsmith at redhat dot com @ 2013-05-17 17:33 UTC (permalink / raw)
To: systemtap
http://sourceware.org/bugzilla/show_bug.cgi?id=15486
Bug #: 15486
Summary: stapdyn get hung when printing debug messages
Product: systemtap
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: dyninst
AssignedTo: systemtap@sourceware.org
ReportedBy: dsmith@redhat.com
Classification: Unclassified
In dyninst mode, stapdyn can get hung when printing multiple debug messages.
Here's the test script:
====
probe begin
{
%{ { _stp_dbug(__FUNCTION__, __LINE__, "debug line 1\n"); 0; } %}
%{ { _stp_dbug(__FUNCTION__, __LINE__, "debug line 2\n"); 0; } %}
%{ { _stp_dbug(__FUNCTION__, __LINE__, "debug line 3\n"); 0; } %}
%{ { _stp_dbug(__FUNCTION__, __LINE__, "debug line 4\n"); 0; } %}
%{ { _stp_dbug(__FUNCTION__, __LINE__, "debug line 5\n"); 0; } %}
%{ { _stp_dbug(__FUNCTION__, __LINE__, "debug line 6\n"); 0; } %}
%{ { _stp_dbug(__FUNCTION__, __LINE__, "debug line 7\n"); 0; } %}
%{ { _stp_dbug(__FUNCTION__, __LINE__, "debug line 8\n"); 0; } %}
%{ { _stp_dbug(__FUNCTION__, __LINE__, "debug line 9\n"); 0; } %}
%{ { _stp_dbug(__FUNCTION__, __LINE__, "debug line 10\n"); 0; } %}
%{ { _stp_dbug(__FUNCTION__, __LINE__, "debug line 11\n"); 0; } %}
%{ { _stp_dbug(__FUNCTION__, __LINE__, "debug line 12\n"); 0; } %}
%{ { _stp_dbug(__FUNCTION__, __LINE__, "debug line 13\n"); 0; } %}
%{ { _stp_dbug(__FUNCTION__, __LINE__, "debug line 14\n"); 0; } %}
%{ { _stp_dbug(__FUNCTION__, __LINE__, "debug line 15\n"); 0; } %}
%{ { _stp_dbug(__FUNCTION__, __LINE__, "debug line 16\n"); 0; } %}
%{ { _stp_dbug(__FUNCTION__, __LINE__, "debug line 17\n"); 0; } %}
warn("finished\n")
exit()
}
====
When run, stapdyn hangs after printing the 16th debug message until
interrupted.
=====
# stap --dyninst -g ../dbug_test.stp
probe_32:131: debug line 1
probe_32:133: debug line 2
probe_32:135: debug line 3
probe_32:137: debug line 4
probe_32:139: debug line 5
probe_32:141: debug line 6
probe_32:143: debug line 7
probe_32:145: debug line 8
probe_32:147: debug line 9
probe_32:149: debug line 10
probe_32:157: debug line 11
probe_32:159: debug line 12
probe_32:161: debug line 13
probe_32:163: debug line 14
probe_32:165: debug line 15
probe_32:167: debug line 16
^Cstapdyn: WARNING: Multiple interrupts received, exiting...
=====
_stp_dbug() ends up calling _stp_vlog() (in runtime/dyninst/io.c). _stp_vlog()
allocates a log buffer, but in the DBUG case just uses the allocated buffer for
temporary storage. The log buffer is never sent through the transport, which
means it can never get reused. (The default _STP_LOG_BUF_ENTRIES is 16, which
is why the above output never gets to the 17th debug message or the final
warning in the test script.)
--
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] 2+ messages in thread
* [Bug dyninst/15486] stapdyn get hung when printing debug messages
2013-05-17 17:33 [Bug dyninst/15486] New: stapdyn get hung when printing debug messages dsmith at redhat dot com
@ 2013-05-17 18:19 ` dsmith at redhat dot com
0 siblings, 0 replies; 2+ messages in thread
From: dsmith at redhat dot com @ 2013-05-17 18:19 UTC (permalink / raw)
To: systemtap
http://sourceware.org/bugzilla/show_bug.cgi?id=15486
David Smith <dsmith at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #1 from David Smith <dsmith at redhat dot com> 2013-05-17 18:18:57 UTC ---
Fixed in 90efadc, which also adds a new test for _stp_dbug().
--
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] 2+ messages in thread
end of thread, other threads:[~2013-05-17 18:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-17 17:33 [Bug dyninst/15486] New: stapdyn get hung when printing debug messages dsmith at redhat dot com
2013-05-17 18:19 ` [Bug dyninst/15486] " dsmith 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).