Debian Bug report logs - #1031175
strace: bogus (on the order of 2^54) tv_nsec readings for clock_nanosleep_time64() on armel

version graph

Package: strace; Maintainer for strace is Steve McIntyre <[email protected]>; Source for strace is src:strace (PTS, buildd, popcon).

Reported by: наб <[email protected]>

Date: Sun, 12 Feb 2023 19:33:02 UTC

Severity: normal

Found in version strace/6.1-0.1

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to [email protected], Steve McIntyre <[email protected]>:
Bug#1031175; Package strace. (Sun, 12 Feb 2023 19:33:04 GMT) (full text, mbox, link).


Acknowledgement sent to наб <[email protected]>:
New Bug report received and forwarded. Copy sent to Steve McIntyre <[email protected]>. (Sun, 12 Feb 2023 19:33:04 GMT) (full text, mbox, link).


Message #5 received at [email protected] (full text, mbox, reply):

From: наб <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Subject: strace: bogus (on the order of 2^54) tv_nsec readings for clock_nanosleep_time64() on armel
Date: Sun, 12 Feb 2023 20:28:34 +0100
[Message part 1 (text/plain, inline)]
Package: strace
Version: 5.10-1
Version: 6.1-0.1
Severity: normal

Dear Maintainer,

When running this test program under strace, built with
  cc qwe.c -g -target arm-linux-gnueabi -o qwe -fuse-ld=lld
(binary attached):
-- >8 --

       #include <sys/types.h>
       #include <sys/stat.h>
       #include <fcntl.h>
	       #include <unistd.h>


int main() {
int fd = open("/sys/class/leds/ACT/brightness", O_WRONLY);

char dupa[] = {'0', '1'};
for(int q = 0;;++q) {
		          ssize_t pwrite(int fd, const void *buf, size_t count, off_t offset);
				  pwrite(fd, &dupa[q%2], 1, 0);
				  sleep(1);
}

}
-- >8 --

I observe 
-- >8 --
# strace /tmp/qwe
execve("/tmp/qwe", ["/tmp/qwe"], 0xbeb5d800 /* 13 vars */) = 0
brk(NULL)                               = 0x1b29000
uname({sysname="Linux", nodename="ciastko-malinowe", ...}) = 0
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=10129, ...}) = 0
mmap2(NULL, 10129, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb6f54000
close(3)                                = 0
openat(AT_FDCWD, "/lib/arm-linux-gnueabi/libc.so.6", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\\y\1\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1340264, ...}) = 0
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f52000
mmap2(NULL, 1409596, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6dcd000
mprotect(0xb6f11000, 61440, PROT_NONE)  = 0
mmap2(0xb6f20000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x143000) = 0xb6f20000
mmap2(0xb6f23000, 8764, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb6f23000
close(3)                                = 0
set_tls(0xb6f52bf0)                     = 0
mprotect(0xb6f20000, 8192, PROT_READ)   = 0
mprotect(0x4a0000, 4096, PROT_READ)     = 0
mprotect(0xb6f57000, 4096, PROT_READ)   = 0
munmap(0xb6f54000, 10129)               = 0
openat(AT_FDCWD, "/sys/class/leds/ACT/brightness", O_WRONLY) = 3
pwrite64(3, "0", 1, 0)                  = 1
clock_nanosleep_time64(CLOCK_REALTIME, 0, {tv_sec=1, tv_nsec=20839490557837312}, 0xbea51638) = 0
pwrite64(3, "1", 1, 0)                  = 1
clock_nanosleep_time64(CLOCK_REALTIME, 0, {tv_sec=1, tv_nsec=20839490557837312}, 0xbea51638) = 0
pwrite64(3, "0", 1, 0)                  = 1
clock_nanosleep_time64(CLOCK_REALTIME, 0, {tv_sec=1, tv_nsec=20839490557837312}, 0xbea51638) = 0
pwrite64(3, "1", 1, 0)                  = 1
clock_nanosleep_time64(CLOCK_REALTIME, 0, {tv_sec=1, tv_nsec=20839490557837312}, 0xbea51638) = 0
pwrite64(3, "0", 1, 0)                  = 1
clock_nanosleep_time64(CLOCK_REALTIME, 0, {tv_sec=1, tv_nsec=20839490557837312}, 0xbea51638) = 0
...
-- >8 --
(the precise tv_nsec value changes, as does the pointer due to ASLR;
 I'm assuming those are related effects).

Affects the official bullseye package and my sid (6.1-0.1) rebuild.

-- System Information:
Debian Release: 11.5
Architecture: armel

Kernel: Linux 5.10.0-18-rpi (UP)
Kernel taint flags: MOD_STAGING UNSIGNED
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages strace depends on:
ii  libc6        2.31-13+deb11u4

strace recommends no packages.

strace suggests no packages.

-- no debconf information
[qwe.zst (application/zstd, attachment)]
[signature.asc (application/pgp-signature, inline)]

Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Tue May 13 08:51:04 2025; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.