Bug 595356

Summary: run time went by but blktrace is still running
Product: Red Hat Enterprise Linux 6 Reporter: Milos Malik <mmalik>
Component: blktraceAssignee: Edward Shishkin <edward>
Status: CLOSED ERRATA QA Contact: Milos Malik <mmalik>
Severity: medium Docs Contact:
Priority: low    
Version: 6.0CC: edward, esandeen, rwheeler
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: blktrace-1.0.1-4.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-19 14:10:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Milos Malik 2010-05-24 12:55:27 UTC

Version-Release number of selected component (if applicable):

Steps to Reproduce: 
# blktrace -d /dev/sda -w 30
=== sda ===
  CPU  0:                   17 events,        1 KiB data
  CPU  1:                    1 events,        1 KiB data
  CPU  2:                   84 events,        4 KiB data
  CPU  3:                  255 events,       12 KiB data
  Total:                   357 events (dropped 0),       17 KiB data
# ls -l *.blktrace.*
-rw-r--r--. 1 root root   818 May 24 08:13 sda.blktrace.0
-rw-r--r--. 1 root root    68 May 24 08:13 sda.blktrace.1
-rw-r--r--. 1 root root  4073 May 24 08:13 sda.blktrace.2
-rw-r--r--. 1 root root 12272 May 24 08:13 sda.blktrace.3
# rm -f sda.blktrace.0
# mkdir sda.blktrace.0
# blktrace -d /dev/sda -w 30
Open output file ./sda.blktrace.0 failed: 21/Is a directory
FAILED to start thread on CPU 0: 1/Operation not permitted

Actual results: 
blktrace does not end after 30 seconds, it will be running until you kill it

Expected results:
blktrace terminates either immediately (because of the error message) or after 30 seconds (because of the run time option)

Comment 1 Milos Malik 2010-05-24 13:04:25 UTC
The command sequence is very similar to https://bugzilla.redhat.com/show_bug.cgi?id=498489 , which is related to RHEL-5, but the result is different this time.

Comment 2 Edward Shishkin 2010-07-08 13:32:36 UTC
The bug:
If open_ios() fails, then tracer_wait_unblock() in the
thread_main() waits for event, wich will never occur:
in the case of unsuccess tracers are not unblocked.

Make sure unblock_tracers() is also called in the case on
unsuccess (when nthreads_running != ncpus).

The patch has been sent to upstream:

Comment 3 Ric Wheeler 2010-07-16 13:41:24 UTC
Edward, looks like this fix is ready to pull. Can you bring this into an updated build?

Comment 4 Edward Shishkin 2010-07-16 22:54:44 UTC
Ok, I need permissions then?

Comment 5 Ric Wheeler 2010-07-17 02:52:14 UTC
Milos, can you justify this as a blocker (i.e., would you hold up the RHEL6.0 release for this specific fix?), or should be move this back to 6.1?


Comment 6 Milos Malik 2010-07-19 07:52:00 UTC
I have no problem with moving this fix to RHEL-6.1. Nobody else encountered this bug.

Comment 7 Eric Sandeen 2010-10-29 21:35:57 UTC
Sending blktrace bugs over to Edward, as he did the upstream work for them.

Comment 8 Eric Sandeen 2011-01-10 20:47:00 UTC
Changes were committed & built in blktrace-1.0.1-4.el6

Comment 11 errata-xmlrpc 2011-05-19 14:10:24 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.