Bug 1251176

Summary: Doesn't print nanosecond fields in stat-like calls
Product: [Fedora] Fedora Reporter: Oliver Henshaw <oliver.henshaw>
Component: straceAssignee: Dmitry V. Levin <ldv>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 21CC: dvlasenk, ldv, schwab
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: strace-4.11-1.fc23 strace-4.11-1.fc22 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-01-24 22:51:12 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 Oliver Henshaw 2015-08-06 15:51:03 UTC
Description of problem:

strace prints st_Xtime fields in stat-like system calls, i.e. with a resolution of a second. This is even when the platform and the file system offer nanosecond resolutions timestamps.

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

strace-4.10-2.fc21.x86_64

How reproducible:

$ strace -v -e trace=stat,fstat stat .
fstat(3, {st_dev=makedev(253, 0), st_ino=162639, st_mode=S_IFREG|0644, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=192, st_size=95638, st_atime=2015/08/06-11:20:15, st_mtime=2015/08/06-11:20:15, st_ctime=2015/08/06-11:20:15}) = 0
fstat(3, {st_dev=makedev(253, 0), st_ino=138436, st_mode=S_IFREG|0755, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=288, st_size=146232, st_atime=2015/08/06-11:19:42, st_mtime=2014/10/14-09:41:26, st_ctime=2014/12/03-15:51:35}) = 0
fstat(3, {st_dev=makedev(253, 0), st_ino=137971, st_mode=S_IFREG|0755, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=4072, st_size=2082456, st_atime=2015/08/06-11:19:42, st_mtime=2014/09/27-12:48:03, st_ctime=2014/12/03-15:51:34}) = 0
fstat(3, {st_dev=makedev(253, 0), st_ino=138419, st_mode=S_IFREG|0755, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=880, st_size=447240, st_atime=2015/08/06-11:19:42, st_mtime=2014/11/07-07:34:30, st_ctime=2014/12/03-15:51:35}) = 0
fstat(3, {st_dev=makedev(253, 0), st_ino=138412, st_mode=S_IFREG|0755, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=304, st_size=152864, st_atime=2015/08/06-11:19:42, st_mtime=2014/08/19-01:41:11, st_ctime=2014/12/03-15:51:35}) = 0
fstat(3, {st_dev=makedev(253, 0), st_ino=137977, st_mode=S_IFREG|0755, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=40, st_size=19512, st_atime=2015/08/06-11:19:42, st_mtime=2014/09/27-12:48:01, st_ctime=2014/12/03-15:51:35}) = 0
fstat(3, {st_dev=makedev(253, 0), st_ino=137997, st_mode=S_IFREG|0755, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=280, st_size=141880, st_atime=2015/08/06-11:19:42, st_mtime=2014/09/27-12:48:02, st_ctime=2014/12/03-15:51:35}) = 0
fstat(3, {st_dev=makedev(253, 0), st_ino=138281, st_mode=S_IFREG|0644, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=207712, st_size=106374736, st_atime=2015/08/06-11:19:45, st_mtime=2014/12/03-15:30:53, st_ctime=2014/12/03-15:50:58}) = 0
fstat(3, {st_dev=makedev(253, 0), st_ino=137955, st_mode=S_IFREG|0644, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=8, st_size=2492, st_atime=2014/12/03-15:30:50, st_mtime=2014/09/27-12:43:58, st_ctime=2014/12/03-15:51:21}) = 0
fstat(1, {st_dev=makedev(253, 0), st_ino=37, st_mode=S_IFREG|0644, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=8, st_size=2224, st_atime=2015/08/06-11:44:29, st_mtime=2015/08/06-11:44:42, st_ctime=2015/08/06-11:44:42}) = 0
fstat(3, {st_dev=makedev(253, 0), st_ino=191178, st_mode=S_IFREG|0644, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=8, st_size=1763, st_atime=2015/08/06-11:19:43, st_mtime=2014/12/03-15:38:00, st_ctime=2015/08/06-11:19:55}) = 0
fstat(3, {st_dev=makedev(253, 0), st_ino=162639, st_mode=S_IFREG|0644, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=192, st_size=95638, st_atime=2015/08/06-11:20:15, st_mtime=2015/08/06-11:20:15, st_ctime=2015/08/06-11:20:15}) = 0
fstat(3, {st_dev=makedev(253, 0), st_ino=137989, st_mode=S_IFREG|0755, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=128, st_size=62072, st_atime=2015/08/06-11:19:43, st_mtime=2014/09/27-12:48:04, st_ctime=2014/12/03-15:51:35}) = 0
fstat(3, {st_dev=makedev(253, 0), st_ino=199230, st_mode=S_IFREG|0644, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=8, st_size=2140, st_atime=2015/08/06-11:20:19, st_mtime=2015/08/06-11:20:19, st_ctime=2015/08/06-11:20:19}) = 0
fstat(3, {st_dev=makedev(253, 0), st_ino=199229, st_mode=S_IFREG|0644, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=8, st_size=813, st_atime=2015/08/06-11:20:19, st_mtime=2015/08/06-11:20:19, st_ctime=2015/08/06-11:20:19}) = 0
fstat(3, {st_dev=makedev(253, 0), st_ino=133580, st_mode=S_IFREG|0644, st_nlink=3, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=8, st_size=3545, st_atime=2015/08/06-11:19:44, st_mtime=2014/10/27-19:50:51, st_ctime=2014/12/03-15:51:08}) = 0
fstat(3, {st_dev=makedev(253, 0), st_ino=133580, st_mode=S_IFREG|0644, st_nlink=3, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=8, st_size=3545, st_atime=2015/08/06-11:19:44, st_mtime=2014/10/27-19:50:51, st_ctime=2014/12/03-15:51:08}) = 0
stat("/etc/localtime", {st_dev=makedev(253, 0), st_ino=133580, st_mode=S_IFREG|0644, st_nlink=3, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=8, st_size=3545, st_atime=2015/08/06-11:19:44, st_mtime=2014/10/27-19:50:51, st_ctime=2014/12/03-15:51:08}) = 0
stat("/etc/localtime", {st_dev=makedev(253, 0), st_ino=133580, st_mode=S_IFREG|0644, st_nlink=3, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=8, st_size=3545, st_atime=2015/08/06-11:19:44, st_mtime=2014/10/27-19:50:51, st_ctime=2014/12/03-15:51:08}) = 0
  File: ‘.’
  Size: 4096      	Blocks: 8          IO Block: 4096   directory
Device: fd00h/64768d	Inode: 16387       Links: 4
Access: (0550/dr-xr-x---)  Uid: (    0/    root)   Gid: (    0/    root)
Context: system_u:object_r:admin_home_t:s0
Access: 2015-08-06 11:43:05.914913328 -0400
Modify: 2015-08-06 11:44:29.016759842 -0400
Change: 2015-08-06 11:44:29.016759842 -0400
 Birth: -
+++ exited with 0 +++


Expected results:

The strace shows nanosecond resolution times, using the Xtim timespec fields.

Comment 1 Dmitry V. Levin 2015-08-09 09:45:14 UTC
Thanks, this feature has been implemented by upstream commit v4.10-302-g525eed3 and will be available in the next strace release.

Comment 2 Fedora Update System 2015-12-25 01:58:33 UTC
strace-4.11-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-bb04a0e0a0

Comment 3 Fedora Update System 2015-12-29 22:24:15 UTC
strace-4.11-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 4 Fedora Update System 2015-12-30 20:57:51 UTC
strace-4.11-1.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-112b6072d9

Comment 5 Fedora Update System 2016-01-24 22:51:10 UTC
strace-4.11-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.