Hi!

Thank you for your effort on this bug. I must admit I felt a bit lost,
and gave up in my head a little bit.

> Are the results for "who" from "rust-coreutils" and "coreutils" identical
for the in development Ubuntu 26.04 distribution?

I've been using `who` from gnu-coreutils:
```
[vhaudiquet@k6 ~]$ dpkg -S /usr/bin/who
coreutils-from-gnu: /usr/bin/who
```

However, changing to uutils (rust coreutils) does not change `who` output:
...
[vhaudiquet@k6 ~]$ apt install coreutils-from-uutils
[vhaudiquet@k6 ~]$ dpkg -S /usr/bin/who
coreutils-from-uutils: /usr/bin/who
[vhaudiquet@k6 ~]$ who
[vhaudiquet@k6 ~]$
```

> The Gnulib code used by GNU Inetutils for reading utmp information
> without the /var/run/utmp file, but with "configure --enable-systemd",
> can synthesize "seatN" and probably "sshd" entries for the .ut_line field.
> This should be the cause for the observed test failures.

This looks promising! Then it would mean that the bug affecting
inetutils and the output of `last` being similar is only a
'coincidence', they just both detect 'seat0' sessions. And maybe there
is a filter in place in `who` code, that contrary to the one in
inetutils is too agressive and ends up removing every session, even
the one of the user ?

Maybe looking into the code for `who` could be a good idea... I will
try to do that.

However, I recall from our previous conversations that you would not
want to implement such a filter because of possible breaks on non-GNU
systems, right?

Thank you for your findings!

Valentin

On Tue, 18 Nov 2025 at 13:55, Erik Auerswald <[email protected]> wrote:
>
> Hello Valentin,
>
> On Wed, Nov 12, 2025 at 01:05:29PM +0100, Valentin Haudiquet wrote:
> > [...]
> > > Do you see any suspicious lines in the output of the "w", "who",
> > > and/or "last" commands?  I.e., any entry in the TTY column that does
> > > not look like a TTY, or a missing entry in that column?
> >
> > Yes ! w and who are normal, but last shows:
> > ```
> > [vhaudiquet@x1c inetutils <merge-lp2130124-resolute>]$ last
> > vhaudiqu tty2         tty2             Thu Nov  6 12:00 - still logged in
> > vhaudiqu seat0        login screen     Thu Nov  6 12:00 - still logged in
> > [...]
> > ```
>
> I am still trying to understand where these entries come from.
>
> The Gnulib code used by GNU Inetutils for reading utmp information
> without the /var/run/utmp file, but with "configure --enable-systemd",
> can synthesize "seatN" and probably "sshd" entries for the .ut_line field.
> This should be the cause for the observed test failures.
>
> On Ubuntu 22.04, the "last" program comes from the "util-linux" package,
> the "w" program comes the "procps" package, and the "who" program from the
> "coreutils" package.  On Ubuntu 26.04, "last" might come from the "wtmpdb"
> package, and "who" might come from the "rust-coreutils".  Of these, only
> "coreutils" is an obvious candidate for using the same Gnulib code as
> GNU Inetutils.
>
> Are the results for "who" from "rust-coreutils" and "coreutils" identical
> for the in development Ubuntu 26.04 distribution?
>
> > However, that is also the case on Questing and older Ubuntu releases.
> > And to my understanding that is normal :)
>
> I'd say this happened after removing /var/run/utmp, as at least Ubuntu
> 22.04, still having /var/run/utmp, does not show these utmp entries.
>
> > [...]
> > Something must have changed, that before did not pick up those
> > sessions and now picks them up instead of the right one ?
>
> It seems to me as if replacing /var/run/utmp with the "wtmpdb" mechanism
> might have been this change.  This seems to have introduced the utmp
> entries that misdirect syslogd, resulting in errors while using them
> and thus triggering test failures.
>
> Thanks,
> Erik

Reply via email to