GNU bug report logs -
#70298
uname -i returns unknown since fedora 38
Previous Next
To reply to this bug, email your comments to 70298 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-coreutils <at> gnu.org
:
bug#70298
; Package
coreutils
.
(Tue, 09 Apr 2024 04:47:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Ondrej Mejzlik <mejzlik.ondrej <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-coreutils <at> gnu.org
.
(Tue, 09 Apr 2024 04:47:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
The command uname returns "unknown" on Fedora 38,39 and probably 40.
There is a similar very old bug here which has not been fixed
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=34905
F38:
[root <at> vm~]# uname -a
Linux vmcom 6.8.4-100.fc38.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Apr 4
20:40:57 UTC 2024 x86_64 GNU/Linux
[root <at> vm~]# uname -i
unknown
Here is the strace output on F38
# strace uname -pi
execve("/usr/bin/uname", ["uname", "-pi"], 0x7ffff4989c48 /* 32 vars */) = 0
brk(NULL) = 0x55fae2442000
arch_prctl(0x3001 /* ARCH_??? */, 0x7ffd9202bd60) = -1 EINVAL (Invalid
argument)
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or
directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=18475, ...},
AT_EMPTY_PATH) = 0
mmap(NULL, 18475, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f6491b8f000
close(3) = 0
openat(AT_FDCWD, "/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`}\2\0\0\0\0\0"...,
832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"...,
784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=2448096, ...},
AT_EMPTY_PATH) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7f6491b8d000
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"...,
784, 64) = 784
mmap(NULL, 1957168, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x7f64919af000
mmap(0x7f64919d5000, 1429504, PROT_READ|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f64919d5000
mmap(0x7f6491b32000, 315392, PROT_READ,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x183000) = 0x7f6491b32000
mmap(0x7f6491b7f000, 24576, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d0000) = 0x7f6491b7f000
mmap(0x7f6491b85000, 32048, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f6491b85000
close(3) = 0
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7f64919ac000
arch_prctl(ARCH_SET_FS, 0x7f64919ac740) = 0
set_tid_address(0x7f64919aca10) = 1320
set_robust_list(0x7f64919aca20, 24) = 0
rseq(0x7f64919ad060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f6491b7f000, 16384, PROT_READ) = 0
mprotect(0x55fae0ff3000, 4096, PROT_READ) = 0
mprotect(0x7f6491bc6000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024,
rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f6491b8f000, 18475) = 0
getrandom("\x1b\x52\xa1\xbf\xb0\x7e\x23\x6b", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x55fae2442000
brk(0x55fae2463000) = 0x55fae2463000
openat(AT_FDCWD, "/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = -1
ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2998, ...}, AT_EMPTY_PATH)
= 0
read(3, "# Locale name alias data base.\n#"..., 4096) = 2998
read(3, "", 4096) = 0
close(3) = 0
openat(AT_FDCWD, "/usr/lib/locale/en_US.UTF-8/LC_IDENTIFICATION",
O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/en_US.utf8/LC_IDENTIFICATION",
O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=369, ...}, AT_EMPTY_PATH)
= 0
mmap(NULL, 369, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f6491b93000
close(3) = 0
openat(AT_FDCWD, "/usr/lib64/gconv/gconv-modules.cache", O_RDONLY) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=27012, ...},
AT_EMPTY_PATH) = 0
mmap(NULL, 27012, PROT_READ, MAP_SHARED, 3, 0) = 0x7f64919a5000
close(3) = 0
futex(0x7f6491b84a6c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
openat(AT_FDCWD, "/usr/lib/locale/en_US.UTF-8/LC_MEASUREMENT",
O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/en_US.utf8/LC_MEASUREMENT",
O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=23, ...}, AT_EMPTY_PATH) =
0
mmap(NULL, 23, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f6491b92000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/locale/en_US.UTF-8/LC_TELEPHONE",
O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/en_US.utf8/LC_TELEPHONE",
O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=59, ...}, AT_EMPTY_PATH) =
0
mmap(NULL, 59, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f6491b91000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/locale/en_US.UTF-8/LC_ADDRESS",
O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/en_US.utf8/LC_ADDRESS",
O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=167, ...}, AT_EMPTY_PATH)
= 0
mmap(NULL, 167, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f6491b90000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/locale/en_US.UTF-8/LC_NAME", O_RDONLY|O_CLOEXEC)
= -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/en_US.utf8/LC_NAME", O_RDONLY|O_CLOEXEC)
= 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=77, ...}, AT_EMPTY_PATH) =
0
mmap(NULL, 77, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f6491b8f000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/locale/en_US.UTF-8/LC_PAPER",
O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/en_US.utf8/LC_PAPER", O_RDONLY|O_CLOEXEC)
= 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=34, ...}, AT_EMPTY_PATH) =
0
mmap(NULL, 34, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f64919a4000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/locale/en_US.UTF-8/LC_MESSAGES",
O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/en_US.utf8/LC_MESSAGES",
O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFDIR|0755, st_size=4096, ...}, AT_EMPTY_PATH)
= 0
close(3) = 0
openat(AT_FDCWD, "/usr/lib/locale/en_US.utf8/LC_MESSAGES/SYS_LC_MESSAGES",
O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=57, ...}, AT_EMPTY_PATH) =
0
mmap(NULL, 57, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f64919a3000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/locale/en_US.UTF-8/LC_MONETARY",
O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/en_US.utf8/LC_MONETARY",
O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=286, ...}, AT_EMPTY_PATH)
= 0
mmap(NULL, 286, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f64919a2000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/locale/en_US.UTF-8/LC_COLLATE",
O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/en_US.utf8/LC_COLLATE",
O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2586930, ...},
AT_EMPTY_PATH) = 0
mmap(NULL, 2586930, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f6491600000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/locale/en_US.UTF-8/LC_TIME", O_RDONLY|O_CLOEXEC)
= -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/en_US.utf8/LC_TIME", O_RDONLY|O_CLOEXEC)
= 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=3284, ...}, AT_EMPTY_PATH)
= 0
mmap(NULL, 3284, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f64919a1000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/locale/en_US.UTF-8/LC_NUMERIC",
O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/en_US.utf8/LC_NUMERIC",
O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=54, ...}, AT_EMPTY_PATH) =
0
mmap(NULL, 54, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f64919a0000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/locale/en_US.UTF-8/LC_CTYPE",
O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/en_US.utf8/LC_CTYPE", O_RDONLY|O_CLOEXEC)
= 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=357584, ...},
AT_EMPTY_PATH) = 0
mmap(NULL, 357584, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f6491948000
close(3) = 0
newfstatat(1, "", {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0), ...},
AT_EMPTY_PATH) = 0
write(1, "unknown unknown\n", 16unknown unknown
) = 16
close(1) = 0
close(2) = 0
exit_group(0) = ?
+++ exited with 0 +++
Is this a bug in uname?
Thank you.
[Message part 2 (text/html, inline)]
Merged 34905 70298.
Request was from
Paul Eggert <eggert <at> cs.ucla.edu>
to
control <at> debbugs.gnu.org
.
(Tue, 09 Apr 2024 07:57:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#70298
; Package
coreutils
.
(Tue, 09 Apr 2024 07:59:04 GMT)
Full text and
rfc822 format available.
Message #10 received at 70298 <at> debbugs.gnu.org (full text, mbox):
On 2024-04-08 10:59, Ondrej Mejzlik wrote:
> The command uname returns "unknown" on Fedora 38,39 and probably 40.
> There is a similar very old bug here which has not been fixed
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=34905
Indeed there is, and I merged your bug report into that old one. It'd be
nice if someone could get to the bottom of that bug.
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#70298
; Package
coreutils
.
(Tue, 09 Apr 2024 09:18:04 GMT)
Full text and
rfc822 format available.
Message #13 received at 70298 <at> debbugs.gnu.org (full text, mbox):
On 4/9/24 12:57 AM, Paul Eggert wrote:
> Indeed there is, and I merged your bug report into that old one. It'd be nice if someone could get to the bottom of that bug.
I decided to look into this a bit, since I also have an unknown
'uname -i' and 'uname -p'.
It seems that this option is a Solaris thing. I found the commit that
it was introduced [1]. It also adds some other Solaris compatibility
stuff, so everything seems to add up so far.
The first function it tries is sysinfo (SI_PLATFORM, ...) which seems
to be a Solaris thing [2]. I think Linux has sysinfo but not
SI_PLATFORM.
Then it tries sysctl (...) with a UNAME_HARDWARE_PLATFORM macro to deal
with the BSDs. I think OpenBSD might be missing that definition in the
#ifdef, but I have no way of testing it at the moment [3].
I'm not sure if 'uname -i', 'uname -p', or 'uname -m' are supposed to
be any different from each other. Maybe someone who knows Solaris can
help more?
Illumios defines 'sysinfo' as an alias to 'systeminfo' [4]. There it
returns an 'extern char *platform' in the given buffer when passed
SI_PLATFORM [5]. I've found the definition of the variable, but I
don't know where it is actually set to something useful [6]. Hopefully
that information helps someone...
[1] https://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=aaeb7a61c4662fd28cf2bc161b740352711538d2
[2] https://github.com/illumos/illumos-gate/blob/cf618897f43ea305e3a426f93bbcef4e8106829c/usr/src/uts/common/sys/systeminfo.h#L86
[3] https://git.savannah.gnu.org/cgit/coreutils.git/tree/src/uname.c#n36
[4] https://github.com/illumos/illumos-gate/blob/master/usr/src/lib/libc/common/sys/sysinfo.S
[5] https://github.com/illumos/illumos-gate/blob/cf618897f43ea305e3a426f93bbcef4e8106829c/usr/src/uts/common/syscall/systeminfo.c#L124
[6] https://github.com/illumos/illumos-gate/blob/master/usr/src/uts/common/conf/param.c#L533
Collin
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#70298
; Package
coreutils
.
(Tue, 09 Apr 2024 12:22:01 GMT)
Full text and
rfc822 format available.
Message #16 received at 70298 <at> debbugs.gnu.org (full text, mbox):
On 09/04/2024 10:17, Collin Funk wrote:
> On 4/9/24 12:57 AM, Paul Eggert wrote:
>> Indeed there is, and I merged your bug report into that old one. It'd be nice if someone could get to the bottom of that bug.
>
> I decided to look into this a bit, since I also have an unknown
> 'uname -i' and 'uname -p'.
>
> It seems that this option is a Solaris thing. I found the commit that
> it was introduced [1]. It also adds some other Solaris compatibility
> stuff, so everything seems to add up so far.
>
> The first function it tries is sysinfo (SI_PLATFORM, ...) which seems
> to be a Solaris thing [2]. I think Linux has sysinfo but not
> SI_PLATFORM.
>
> Then it tries sysctl (...) with a UNAME_HARDWARE_PLATFORM macro to deal
> with the BSDs. I think OpenBSD might be missing that definition in the
> #ifdef, but I have no way of testing it at the moment [3].
>
> I'm not sure if 'uname -i', 'uname -p', or 'uname -m' are supposed to
> be any different from each other. Maybe someone who knows Solaris can
> help more?
>
> Illumios defines 'sysinfo' as an alias to 'systeminfo' [4]. There it
> returns an 'extern char *platform' in the given buffer when passed
> SI_PLATFORM [5]. I've found the definition of the variable, but I
> don't know where it is actually set to something useful [6]. Hopefully
> that information helps someone...
>
> [1] https://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=aaeb7a61c4662fd28cf2bc161b740352711538d2
> [2] https://github.com/illumos/illumos-gate/blob/cf618897f43ea305e3a426f93bbcef4e8106829c/usr/src/uts/common/sys/systeminfo.h#L86
> [3] https://git.savannah.gnu.org/cgit/coreutils.git/tree/src/uname.c#n36
> [4] https://github.com/illumos/illumos-gate/blob/master/usr/src/lib/libc/common/sys/sysinfo.S
> [5] https://github.com/illumos/illumos-gate/blob/cf618897f43ea305e3a426f93bbcef4e8106829c/usr/src/uts/common/syscall/systeminfo.c#L124
> [6] https://github.com/illumos/illumos-gate/blob/master/usr/src/uts/common/conf/param.c#L533
Thanks for looking at this.
From the Fedora side, they dropped a Fedora specific patch for Fedora 38.
https://bugzilla.redhat.com/show_bug.cgi?id=548834
https://bugzilla.redhat.com/show_bug.cgi?id=2208048
cheers,
Pádraig.
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#70298
; Package
coreutils
.
(Wed, 10 Apr 2024 08:38:04 GMT)
Full text and
rfc822 format available.
Message #19 received at 70298 <at> debbugs.gnu.org (full text, mbox):
On 4/9/24 2:21 PM, Pádraig Brady wrote:
> Thanks for looking at this.
> From the Fedora side, they dropped a Fedora specific patch for Fedora 38.
>
> https://bugzilla.redhat.com/show_bug.cgi?id=548834
> https://bugzilla.redhat.com/show_bug.cgi?id=2208048
FWIW: OpenSUSE still has that patch which was kept in sync with Fedora for years:
https://build.opensuse.org/projects/openSUSE:Factory/packages/coreutils/files/coreutils-sysinfo.patch?expand=1
I have no strong opinion about it, but I guess some (build?) scripts rely on this.
Have a nice day,
Berny
This bug report was last modified 1 year and 128 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.