Bug 1215361

Summary: "uptime" is dumping core
Product: [openSUSE] openSUSE Tumbleweed Reporter: Neil Rickert <nwr10cst-oslnx>
Component: BasesystemAssignee: Bernhard Voelker <mail>
Status: IN_PROGRESS --- QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: kukuk, mail, mrmazda, nwr10cst-oslnx
Version: Current   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE Tumbleweed   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: tar archive of /run/systemd/sessions
transcript showing problem
typescript showing output of "who /run/utmp"
tar archive of "/run/utmp"

Description Neil Rickert 2023-09-14 22:21:57 UTC
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0
Build Identifier: 

I just updated to 20230913.  This was an update from 20230910.

From before the update:

twleap:support 1% uname -a
Linux twleap 6.4.12-1-default #1 SMP PREEMPT_DYNAMIC Fri Aug 25 08:26:31 UTC 2023 (f5aa89b) x86_64 x86_64 x86_64 GNU/Linux
twleap:support 2% uptime
 16:23:44  up   0:01,  5 users,  load average: 0.67, 0.43, 0.17
twleap:support 3% exit

Script done on 2023-09-14 16:23:46-05:00 [COMMAND_EXIT_CODE="0"]

From after the update (and a reboot):

wleap:rickert 1% uname -a
Linux twleap 6.5.2-1-default #1 SMP PREEMPT_DYNAMIC Fri Sep  8 07:32:27 UTC 2023 (fdde566) x86_64 x86_64 x86_64 GNU/Linux
twleap:rickert 2% uptime
Segmentation fault (core dumped)
twleap:rickert 3% exit

Script done on 2023-09-14 16:44:50-05:00 [COMMAND_EXIT_CODE="139"]

This was in a KVM virtual machine.  However, I had already seen the problem on another system (a bare metal install), which is why I knew to get the output before the update on the VM.

Apologies if this is a duplicate.  The search in bugzilla did not give me anything, and is possibly broken.


Reproducible: Always
Comment 1 Neil Rickert 2023-09-15 01:24:34 UTC
Well, this is really weird.

I have been using GDM for login, and using KDE as desktop environment.

To test something else, I switched to SDDM.  When I login to KDE using SDDM, it seems that "uptime" works perfectly.  So I switched back to GDM, and now it dumps core again.  That's an unexpected weird interaction.

I should have mentioned in the initial report, that "uptime" is from the package "coreutils-systemd".  I also tried "who" and "users" from that package, and they also dumped core.  I did not retry those with SDDM.
Comment 2 Thorsten Kukuk 2023-09-15 12:08:51 UTC
(In reply to Neil Rickert from comment #1)
> Well, this is really weird.
> 
> I have been using GDM for login, and using KDE as desktop environment.
> 
> To test something else, I switched to SDDM.  When I login to KDE using SDDM,
> it seems that "uptime" works perfectly.  So I switched back to GDM, and now
> it dumps core again.  That's an unexpected weird interaction.
> 
> I should have mentioned in the initial report, that "uptime" is from the
> package "coreutils-systemd".  I also tried "who" and "users" from that
> package, and they also dumped core.  I did not retry those with SDDM.

That's the new systemd support of coreutils (please verify that uptime is really linked against libsystemd). If yes, could you please try "/usr/bin/w" from procps? Please make sure that this is also linked against libsystemd.

If "w" works, please provide:
1. the output of w, maybe this gives a hint what gnulib does not like
2. The content of /run/systemd/sessions/ as tar archive, so that I can try to reproduce it and report it to the upstream coreutils maintainer.
Comment 3 Thorsten Kukuk 2023-09-15 12:10:25 UTC
Sorry, uptime and who don't use systemd, even if linked against it, but still /run/utmp.
So I would additional need that file to reproduce, and you can ignore "w". That's not helpful in that case.
Between, does who /run/utmp seg.faults, too?
Comment 4 Neil Rickert 2023-09-15 12:26:32 UTC
Created attachment 869537 [details]
tar archive of /run/systemd/sessions
Comment 5 Neil Rickert 2023-09-15 12:29:15 UTC
Created attachment 869538 [details]
transcript showing problem

I have uploaded the requested tar archive.  And I am uploading a "typescript" file showing that "w" works, that "uptime" crashes, and that it is linked against "libsystemd".
Comment 6 Neil Rickert 2023-09-15 12:45:48 UTC
Created attachment 869539 [details]
typescript showing output of "who /run/utmp"
Comment 7 Neil Rickert 2023-09-15 12:46:33 UTC
Created attachment 869540 [details]
tar archive of "/run/utmp"
Comment 8 Thorsten Kukuk 2023-09-15 13:17:56 UTC
I have to correct me again, it's really logind support in gnulib.
I made an upstream bug report about this.
Thanks for the data!
Comment 9 Bernhard Voelker 2023-09-19 05:51:10 UTC
Request with updated patches from upstream gnulib:
https://build.opensuse.org/request/show/1111796
Comment 10 Felix Miata 2024-02-05 03:56:30 UTC
uptime is now absent from coreutils 9.4-3.2
Comment 11 Neil Rickert 2024-02-06 01:17:58 UTC
(In reply to Felix Miata from comment #10)
> uptime is now absent from coreutils 9.4-3.2

It appears to be in "coreutils-systemd".  It looks as if they split the "coreutil" package.