Bug 912790

Summary: 32-bit strace cannot handle 64-bit inode numbers
Product: [Fedora] Fedora Reporter: Eric Sandeen <esandeen>
Component: straceAssignee: Dmitry V. Levin <ldv>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: dvlasenk, ldv, schwab
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: strace-4.8-1.fc19 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-06-13 06:51:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Eric Sandeen 2013-02-19 16:48:26 UTC
If strace attempts to stat a file which returns an inode number above 32 bits, it will fail.  Although ext4 doesn't have 64-bit inode nrs today, btrfs, xfs, and others will.

This can be tested on ext4 by using this systemtap script which bumps up any ext4 inode number above 2^32; the line numbers work for F18 or so:

probe kernel.statement("ext4_getattr@fs/ext4/inode.c+21")
{
	$stat->ino = $stat->ino + 4294967295;
}

probe begin { log("starting probe") }

We can see how it behaves when running:

# stat testfile | grep Inode
Device: fd01h/64769d	Inode: 281242      Links: 1

# stap -g change-ino.stp  &
starting probe

# stat testfile | grep Inode
Device: fd01h/64769d	Inode: 4295248537  Links: 1

If we attempt to use strace while ext4 is returning large inode numbers, it fails:

# strace /bin/ls
strace: Can't stat '/bin/ls': Value too large for defined data type

because the 32-bit stat call returns EOVERFLOW due to the large inode nr.

Unfortunately, strace would be useful for evaluating other binaries which fail in this way, so it'd be nice to fix.

Using -D_FILE_OFFSET_BITS=64 at compile time (or putting it in a header) will invoke the 64-bit variants of stat etc; then just be sure local code handles the larger values as needed.

Comment 1 Fedora End Of Life 2013-04-03 15:50:54 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19

Comment 2 Fedora Update System 2013-06-05 23:34:04 UTC
strace-4.8-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/strace-4.8-1.fc19

Comment 3 Eric Sandeen 2013-06-06 03:24:45 UTC
Thanks!

Comment 4 Fedora Update System 2013-06-06 17:29:54 UTC
Package strace-4.8-1.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing strace-4.8-1.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-10196/strace-4.8-1.fc19
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2013-06-13 06:51:35 UTC
strace-4.8-1.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.