RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1729070 - Unable to mmap trace file dump.blktrace.0, err Invalid argument
Summary: Unable to mmap trace file dump.blktrace.0, err Invalid argument
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: blktrace
Version: 8.0
Hardware: aarch64
OS: Unspecified
unspecified
low
Target Milestone: rc
: 8.0
Assignee: Eric Sandeen
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks: 1746605
TreeView+ depends on / blocked
 
Reported: 2019-07-11 10:50 UTC by Karel Srot
Modified: 2019-09-23 19:25 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-09-23 19:25:13 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Karel Srot 2019-07-11 10:50:35 UTC
Description of problem:

on aarch64 and s390x I am getting following error:

# blktrace -d /dev/mapper/rhel_apm--mustang--b0--10-root -o dump &
# dd if=/dev/zero of=foo bs=1K count=1
# kill -s SIGINT $!
# ls
dump.blktrace.0  dump.blktrace.2  dump.blktrace.4  dump.blktrace.6  
dump.blktrace.1  dump.blktrace.3  dump.blktrace.5  dump.blktrace.7
# iowatcher -t dump.blktrace.0 -o movie.ogg  --movie=rect Using movie style: rect
Unable to mmap trace file dump.blktrace.0, err Invalid argument

on x86_64 and ppc64le it works.

Version-Release number of selected component (if applicable):
blktrace-1.2.0-10.el8.aarch64

How reproducible:
always, see instractions above

Comment 2 Eric Sandeen 2019-07-11 17:12:12 UTC
A quick try here didn't reproduce it.

Can you do:

# ls -l dump.blktrace.*
and also strace the iowatcher process (probably with -e open -e mmap) ?

Thanks
-Eric

Comment 3 Eric Sandeen 2019-07-11 18:10:30 UTC
OK, I bet your dump.blktrace.0 is zero bytes.

# iowatcher -t dump.blktrace.1 -o movie.ogg  --movie=rect
Using movie style: rect
Unable to mmap trace file dump.blktrace.1, err Invalid argument
# ls -l dump.blktrace.1
-rw-r--r--. 1 root root 0 Jul 11 13:11 dump.blktrace.1

Agreed that a nicer error would be nicer, but this comes from trying to mmap a zero-length file.

This would be the normal way I'd invoke it:

# iowatcher -t dump -o movie.ogg  --movie=rect
Using movie style: rect
Start blkparse -O -d dump.dump -i dump.blktrace.0
Input file dump.blktrace.0 added
Input file dump.blktrace.3 added
Input file dump.blktrace.6 added
Input file dump.blktrace.7 added
Exit (0): blkparse
Converting svg files in io-movie-eE2lDR
...

setup_file() skips zero-length files:

        if (stat(pci->fname, &st) < 0)
                return 0;
        if (!st.st_size)
                return 1;

-Eric

Comment 4 Karel Srot 2019-07-12 07:35:35 UTC
You are right of course, I didn't give blktrace enough time to start before terminating it in the test. Fixing it now. Would you like to keep the bug open for tracking the error message improvement?

Comment 6 Eric Sandeen 2019-08-20 16:20:52 UTC
I sent a patch upstream to make the error more clear.

# iowatcher -t dump.blktrace.1 -o movie.ogg  --movie=rect
Using movie style: rect
skipping zero-length file dump.blktrace.1
#

Honestly it doesn't matter much to me whether we get that included for RHEL8,
or just fix it upstream and close this bug.

Comment 7 Eric Sandeen 2019-09-23 19:25:13 UTC
I don't think this issue is probably severe enough to warrant a respin and new package version in RHEL.


Note You need to log in before you can comment on or make changes to this bug.