]> sourceware.org Git - systemtap.git/commitdiff
PR31597: Allow time for data in buffers to be read out before shutdown
authorWilliam Cohen <wcohen@redhat.com>
Fri, 26 Apr 2024 15:20:27 +0000 (11:20 -0400)
committerWilliam Cohen <wcohen@redhat.com>
Fri, 26 Apr 2024 15:54:21 +0000 (11:54 -0400)
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.

staprun/relay.c

index cfd26331628547dcea0db0acd29ff3ba59e8dd15..f88fdfc3dcbf3f64d6ddc879ba9983cff4f960bf 100644 (file)
@@ -816,6 +816,7 @@ int init_relayfs(void)
 void close_relayfs(void)
 {
        int i;
+       usleep(reader_timeout_ms*2*1000); /* PR31597, delay to drain buffers */
        stop_threads = 1;
        dbug(2, "closing\n");
 
This page took 0.027543 seconds and 5 git commands to generate.