Your message dated Wed, 30 Apr 2025 07:54:46 +0000
with message-id <e1ua2hg-00bs1k...@fasolo.debian.org>
and subject line Bug#1103152: fixed in runit 2.2.0-3
has caused the Debian Bug report #1103152,
regarding Starts 2nd getty on hvc0, making console login (almost) impossible
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
1103152: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1103152
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: getty-run
Version: 2.2.0-2
Severity: critical
Justification: makes console logins all but impossible, thus arguably breaking 
the entire system

Hi,

I have a VPS that's a domU guest, so its console is /dev/hvc0.

I had my own getty service on it, called getty-hvc0.

During a dist-upgrade, the getty-run package was pulled in, and a(n IMO 
misleadingly named) getty-ttyS0 service enabled by default.

This system doesn't have a /dev/ttyS0, but that doesn't stop the getty-ttyS0 
service from doing this:

--- 8< ---

root /etc/sv/getty-ttyS0 # sh -xveu ./run
#!/usr/bin/env /lib/runit/invoke-run

# get device from kernel command line, override ./env/SGETTY
if grep  'console=' /proc/cmdline ; then
        kconsole=$(grep -o  '\bconsole=[^ ]*' /proc/cmdline)
        #TODO: only a subset of this parameter is supported: no uart[8250]/brl, 
no options
        #full format: see 
https://www.kernel.org/doc/html/latest/admin-guide/kernel-parameters.html
        kconsole=${kconsole##*=}  #only the last one matches, the kernel writes 
there
        SGETTY=${kconsole%,*}  #discard options if any
        [ "$SGETTY" = 'null' ] && SGETTY=""    #discard null
fi
+ grep console= /proc/cmdline
root=[...] root=/dev/xvda1 console=hvc0 [...]
+ grep -o \bconsole=[^ ]* /proc/cmdline
+ kconsole=console=hvc0
console=hvc0
+ kconsole=hvc0
+ SGETTY=hvc0
+ [ hvc0 = null ]

#don't change here, edit ./env/SGETTY instead
#example: echo ttyS1 > /etc/sv/getty-ttyS0/env/SGETTY
[ -z "$SGETTY" ] && SGETTY=ttyS0
+ [ -z hvc0 ]

if ! test -c /dev/"$SGETTY" ; then
        sv d getty-ttyS0
        echo "/dev/$SGETTY not found: stopping getty-ttyS0"
fi
+ test -c /dev/hvc0
if pgrep -x agetty -t "$SGETTY" || pgrep -x fgetty -t "$SGETTY"; then
    sv d getty-ttyS0
    echo "already another getty on $SGETTY: stopping getty-ttyS0"
fi
+ pgrep -x agetty -t hvc0
+ pgrep -x fgetty -t hvc0

exec 1>&2
+ exec

if [ -e /sbin/fgetty ]; then
    exec chpst -P fgetty /dev/"$SGETTY"
else
    exec /sbin/getty -L "$SGETTY" 9600 vt100
fi
+ [ -e /sbin/fgetty ]
+ exec /sbin/getty -L hvc0 9600 vt100

--- >8 ---

Since I already had a getty on hvc0, the two gettys ended up fighting over the 
console input, making it *very tricky* to log in successfully.

If you think you must go and enable services unconditionally by default, please 
somehow make sure this doesn't happen; for example, add something like this:

if fuser -v "$SGETTY" 2>&1 | grep -q getty; then exec sleep 3600; fi

(Not perfect, but it would have helped me at least.)

(Also, unrelated, but not worth its own bugreport:

1. if /dev/$SGETTY is not found, you stop the service; but maybe the getty will 
appear later, for example when a module is loaded, or a device is (re)connected 
to the system.

2. you hardwired the name of the service into the script. I think it would be 
better to do "exec sv d ." to stop the service, whatever it may be called, as 
the last action, similar how you'd use "exit" in a plain shell script.)

AndrĂ¡s

-- System Information:
Debian Release: trixie/sid
  APT prefers stable-security
  APT policy: (500, 'stable-security'), (350, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.12.20-amd64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=hu_HU.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8
Shell: /bin/sh linked to /usr/bin/dash
Init: runit (via /run/runit.stopit)
LSM: AppArmor: enabled

Versions of packages getty-run depends on:
ii  runit-helper  2.16.4

getty-run recommends no packages.

Versions of packages getty-run suggests:
ii  fgetty  0.7-11

-- no debconf information

-- 
            I'd like to live like a poor person with lots of money.

--- End Message ---
--- Begin Message ---
Source: runit
Source-Version: 2.2.0-3
Done: Lorenzo Puliti <plore...@disroot.org>

We believe that the bug you reported is fixed in the latest version of
runit, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1103...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Lorenzo Puliti <plore...@disroot.org> (supplier of updated runit package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Sat, 26 Apr 2025 22:25:25 +0200
Source: runit
Architecture: source
Version: 2.2.0-3
Distribution: unstable
Urgency: medium
Maintainer: Lorenzo Puliti <plore...@disroot.org>
Changed-By: Lorenzo Puliti <plore...@disroot.org>
Closes: 1103152
Changes:
 runit (2.2.0-3) unstable; urgency=medium
 .
   * getty-run: fix tests for busy getty device (Closes: #1103152)
   * try to improve NEWS for bookworm to trixie upgrade
   * d/copyright: update FSF address
Checksums-Sha1:
 56b2548dd799e66488e43d6ad5ac3fe63d3b7fc5 2053 runit_2.2.0-3.dsc
 297f180f59eff10b5b9e604692c11fdc35e7099f 70008 runit_2.2.0-3.debian.tar.xz
 e2d5d9fdc12bb243a280dcee100e5ed04d9c23a3 5572 runit_2.2.0-3_source.buildinfo
Checksums-Sha256:
 10caac92fd7ce53231d3113f816ea2cacca03c4ba3de98729d47cf4bc6961c68 2053 
runit_2.2.0-3.dsc
 a370d97ade1e0d98eff99ad809a4486599e0512262b6d3d8385c73f35598cac0 70008 
runit_2.2.0-3.debian.tar.xz
 22bf44af6070b20868ce00a23adb6f7cefaeef9fb234917c5c8ee6235901c901 5572 
runit_2.2.0-3_source.buildinfo
Files:
 10e8d5db0cde480d3e2f8547e2d9d117 2053 admin optional runit_2.2.0-3.dsc
 a1d6f9d125984eb479bc5b5c8670d1dd 70008 admin optional 
runit_2.2.0-3.debian.tar.xz
 d9928b3b5dbc44b839e6cd99d477fec6 5572 admin optional 
runit_2.2.0-3_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQHEBAEBCgAuFiEEQGIgyLhVKAI3jM5BH1x6i0VWQxQFAmgR0P8QHGJhZ2VAZGVi
aWFuLm9yZwAKCRAfXHqLRVZDFKzEC/9O6kDBjZdB7XU0KBx3MafJ8B/VbHaSO7Ou
I90QqTwT1qnhD4jjEK0+MMr725Z+Trjbr/YzRWyHioz+TPhrWGns5oecJ/37i7ZO
hMtHsw0wB0SlQpiHf31dZwCVP1XqwdqfLpXYYFlLWeBxNoek0oeWcmEHc2BVzCqJ
/TtINBEZrztqxIbioe4ZmDbrrFjnYZP/qC+H24oFQkNeaANUJj7rbWiqcPeDB1bq
QKJ05MZ3W0C23FI3uOgGjvM/j0ZrckLquq9vzG3k35DdggrbZOtkeok0bNnsEP2V
Qg43ufi1Ugy7Ms57syEVTqhSckMOYnORXGtuJmH8z/6DC5Z0Eznlev62zsFvvXjw
GPFP6VCikS6WhamX4IblkgYrWmCMsUXWe0Utip22Syo4phUYKguUmxFuarXrk2kR
MFqIT/M+FTLmt2PF4QJECcHu3Hxenm8ylWGPFKQKHpdybDn7Nfq3/L2cMoVzLbyN
0KNRId8ECqml7mkaphU3b77mCI9Ud2c=
=ETo/
-----END PGP SIGNATURE-----

Attachment: pgpWauoigzPW2.pgp
Description: PGP signature


--- End Message ---

Reply via email to