public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug runtime/31597] New: Systemtap not extracting all the data sent to the print data in the buffers before shutdown
@ 2024-04-02 19:13 wcohen at redhat dot com
  2024-04-17 14:42 ` [Bug runtime/31597] " wcohen at redhat dot com
  2024-04-26 15:56 ` wcohen at redhat dot com
  0 siblings, 2 replies; 3+ messages in thread
From: wcohen at redhat dot com @ 2024-04-02 19:13 UTC (permalink / raw)
  To: systemtap

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

            Bug ID: 31597
           Summary: Systemtap not extracting all the data sent to the
                    print data in the buffers before shutdown
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: runtime
          Assignee: systemtap at sourceware dot org
          Reporter: wcohen at redhat dot com
  Target Milestone: ---

When reviewing the tests results for the syscall.exp tests different runs of
the same tests would have different tests fail.  The syscall.exp tests should
be deterministics, but they are not. Note even those the second and third run
have same number of passes there are difference in which specific tests passed.
Four different runs of:

sudo make installcheck RUNTESTFLAGS=syscall.exp


                === systemtap Summary ===

# of expected passes            302
# of unexpected failures        38
# of untested testcases         1
# of unsupported tests          4

                === systemtap Summary ===

# of expected passes            299
# of unexpected failures        41
# of untested testcases         1
# of unsupported tests          4

                === systemtap Summary ===

# of expected passes            299
# of unexpected failures        41
# of untested testcases         1
# of unsupported tests          4

                === systemtap Summary ===

# of expected passes            295
# of unexpected failures        45
# of untested testcases         1
# of unsupported tests          4

One of the things that this test does is use the -c option to shut down the
systemtap instrumentation when the user-space command completes.  However, it
appears that the shutdown sometimes happens too quickly and some of the print
output saved in the buffer has not been read out of the buffers, causing the
output to be truncated and the test to fail.  To test this hypothesis I put
"sleep(1);" before the "stop_threads = 1;" in close_relayfs() and
kill_relayfs() functions in staprun/relay.c.  I compared the systemtap.sum
output for the delayed shutdown.  The only changes were the additional PASS in
the version with the failure. There were no FAIL: in the delayed version where
the previous 4 runs has PASS:.

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

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

* [Bug runtime/31597] Systemtap not extracting all the data sent to the print data in the buffers before shutdown
  2024-04-02 19:13 [Bug runtime/31597] New: Systemtap not extracting all the data sent to the print data in the buffers before shutdown wcohen at redhat dot com
@ 2024-04-17 14:42 ` wcohen at redhat dot com
  2024-04-26 15:56 ` wcohen at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: wcohen at redhat dot com @ 2024-04-17 14:42 UTC (permalink / raw)
  To: systemtap

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

--- Comment #1 from William Cohen <wcohen at redhat dot com> ---
The core of the problem appears to be that when stop_threads is set any pending
data in the buffer or heap is just left there as the threads immediately exit
or at best read one more entry when stap_threads is set.

The stop_thread should act more like a "5 minutes left on the test" in college
where the read_thread_serialmode() exits either when the "5 minutes left"
expires OR there is no additional data to drain from the buffer.  The
read_thread_serializer() should have similar conditions.

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

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

* [Bug runtime/31597] Systemtap not extracting all the data sent to the print data in the buffers before shutdown
  2024-04-02 19:13 [Bug runtime/31597] New: Systemtap not extracting all the data sent to the print data in the buffers before shutdown wcohen at redhat dot com
  2024-04-17 14:42 ` [Bug runtime/31597] " wcohen at redhat dot com
@ 2024-04-26 15:56 ` wcohen at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: wcohen at redhat dot com @ 2024-04-26 15:56 UTC (permalink / raw)
  To: systemtap

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

William Cohen <wcohen at redhat dot com> changed:

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

--- Comment #2 from William Cohen <wcohen at redhat dot com> ---
This has been addressed the following git commit:

commit eb1f039347f70838bfea922034c1aaa1b14a6379 (HEAD -> master, origin/master,
origin/HEAD)
Author: William Cohen <wcohen@redhat.com>
Date:   Fri Apr 26 11:20:27 2024 -0400

    PR31597: Allow time for data in buffers to be read out before shutdown

    On SystemTap scripts using the -c <command> option some data was
    dropped from the output.  This was observed with sporadic failures of
    the *syscall.exp tests.  The process of shutting down the transport
    layer moving data from the kernel- to user-space was not allowing time
    for data to be completely drained from the buffers. A delay has been
    added in the shutdown process to provided the needed time to drain the
    buffers.

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

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

end of thread, other threads:[~2024-04-26 15:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-02 19:13 [Bug runtime/31597] New: Systemtap not extracting all the data sent to the print data in the buffers before shutdown wcohen at redhat dot com
2024-04-17 14:42 ` [Bug runtime/31597] " wcohen at redhat dot com
2024-04-26 15:56 ` wcohen 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).