Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#948346: xdm gets killed, but only on sunday, on the first startup (code=killed, signal=USR2)

44 views
Skip to first unread message

Johan Laenen

unread,
Jan 7, 2020, 11:20:03 AM1/7/20
to
Package: xdm
Version: 1:1.1.11-3+b1
Severity: important

Dear Maintainer,

xdm gets killed on sundays at startup time. It only happens once on sunday. When I delete /var/lib/xdm.pid I can proceed with a xdm restart without any problem.

This is what systemd (systemctl status and journalctl -u xdm.service) reports:

● xdm.service - X-Window Display Manager
Loaded: loaded (/lib/systemd/system/xdm.service; indirect; vendor preset: enabled)
Active: failed (Result: signal) since Sun 2020-01-05 08:30:37 CET; 1min 45s ago
Process: 673 ExecStartPre=/bin/sh -c [ "$(cat /etc/X11/default-display-manager 2>/dev/null)" = "/usr/bin/xdm" ] (code=exited, status=0/SUCCESS)
Process: 676 ExecStart=/usr/bin/xdm -nodaemon (code=killed, signal=USR2)
Main PID: 676 (code=killed, signal=USR2)

Jan 05 08:30:31 msi systemd[1]: Starting X-Window Display Manager...
Jan 05 08:30:31 msi systemd[1]: Started X-Window Display Manager.
Jan 05 08:30:34 msi systemd[1]: xdm.service: Main process exited, code=killed, status=12/USR2
Jan 05 08:30:37 msi systemd[1]: xdm.service: Failed with result 'signal'.
-- Logs begin at Sun 2020-01-05 08:30:25 CET, end at Sun 2020-01-05 08:31:56 CET. --
Jan 05 08:30:31 msi systemd[1]: Starting X-Window Display Manager...
Jan 05 08:30:31 msi systemd[1]: Started X-Window Display Manager.
Jan 05 08:30:34 msi systemd[1]: xdm.service: Main process exited, code=killed, status=12/USR2
Jan 05 08:30:37 msi systemd[1]: xdm.service: Failed with result 'signal'.

I have no idea what causes the kill :(

-- System Information:
Debian Release: bullseye/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 5.3.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages xdm depends on:
ii cpp 4:9.2.1-3.1
ii debconf [debconf-2.0] 1.5.73
ii libc6 2.29-3
ii libpam0g 1.3.1-5
ii libselinux1 3.0-1
ii libx11-6 2:1.6.8-1
ii libxau6 1:1.0.8-1+b2
ii libxaw7 2:1.0.13-1+b2
ii libxdmcp6 1:1.1.2-3
ii libxext6 2:1.3.3-1+b2
ii libxft2 2.3.2-2
ii libxinerama1 2:1.1.4-2
ii libxmu6 2:1.1.2-2+b3
ii libxpm4 1:3.5.12-1
ii libxrender1 1:0.9.10-1
ii libxt6 1:1.1.5-1+b3
ii lsb-base 11.1.0
ii procps 2:3.3.15-2+b1
ii x11-utils 7.7+4
ii x11-xserver-utils 7.7+8

xdm recommends no packages.

xdm suggests no packages.

-- Configuration Files:
/etc/X11/xdm/Xresources changed:
Xcursor.theme: whiteglass
xlogin*login.translations: #override \
Ctrl<Key>R: abort-display()\n\
<Key>F1: set-session-argument(failsafe) finish-field()\n\
<Key>Delete: delete-character()\n\
<Key>Left: move-backward-character()\n\
<Key>Right: move-forward-character()\n\
<Key>Home: move-to-begining()\n\
<Key>End: move-to-end()\n\
Ctrl<Key>KP_Enter: set-session-argument(failsafe) finish-field()\n\
<Key>KP_Enter: set-session-argument() finish-field()\n\
Ctrl<Key>Return: set-session-argument(failsafe) finish-field()\n\
<Key>Return: set-session-argument() finish-field()
xlogin*greeting: Welcome to CLIENTHOST
xlogin*namePrompt: \040\040\040\040\040\040\040Login:
xlogin*fail: Login incorrect or forbidden by policy
xlogin*greetFont: -adobe-helvetica-bold-o-normal--24-240-75-75-p-138-iso8859-1
xlogin*font: -adobe-helvetica-medium-r-normal--18-180-75-75-p-98-iso8859-1
xlogin*promptFont: -adobe-helvetica-bold-r-normal--18-180-75-75-p-103-iso8859-1
xlogin*failFont: -adobe-helvetica-bold-r-normal--18-180-75-75-p-103-iso8859-1
xlogin*greetFace: Serif-24:bold:italic
xlogin*face: Helvetica-18
xlogin*promptFace: Helvetica-18:bold
xlogin*failFace: Helvetica-18:bold
xlogin*greetFont: -adobe-helvetica-bold-o-normal--17-120-100-100-p-92-iso8859-1
xlogin*font: -adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-1
xlogin*promptFont: -adobe-helvetica-bold-r-normal--12-120-75-75-p-70-iso8859-1
xlogin*failFont: -adobe-helvetica-bold-o-normal--14-140-75-75-p-82-iso8859-1
xlogin*greetFace: Serif-18:bold:italic
xlogin*face: Helvetica-12
xlogin*promptFace: Helvetica-12:bold
xlogin*failFace: Helvetica-14:bold
xlogin*borderWidth: 1
xlogin*frameWidth: 5
xlogin*innerFramesWidth: 2
xlogin*shdColor: grey30
xlogin*hiColor: grey90
xlogin*background: grey
!xlogin*foreground: darkgreen
xlogin*greetColor: red3
xlogin*failColor: red
*Foreground: black
*Background: #fffff0
xlogin*borderWidth: 3
xlogin*frameWidth: 0
xlogin*innerFramesWidth: 1
xlogin*shdColor: black
xlogin*hiColor: black
xlogin*logoFileName: /usr/share/X11/xdm/pixmaps/debian.xpm
xlogin*logoFileName: /usr/share/X11/xdm/pixmaps/debianbw.xpm
xlogin*useShape: true
xlogin*logoPadding: 10
XConsole.text.geometry: 480x130
XConsole.verbose: true
XConsole*iconic: true
XConsole*font: fixed
Chooser*geometry: 700x500+300+200
Chooser*allowShellResize: false
Chooser*viewport.forceBars: true
Chooser*label.font: *-new century schoolbook-bold-i-normal-*-240-*
Chooser*label.label: XDMCP Host Menu from CLIENTHOST
Chooser*list.font: -*-*-medium-r-normal-*-*-230-*-*-c-*-iso8859-1
Chooser*Command.font: *-new century schoolbook-bold-r-normal-*-180-*

/etc/X11/xdm/Xservers changed:
:0 local /usr/bin/X :0 vt7 -nolisten tcp
:1 local /usr/bin/X :1 vt8 -nolisten tcp

/etc/X11/xdm/Xsetup changed:
if [ -x /usr/bin/numlockx ]; then
/usr/bin/numlockx on
fi
/usr/bin/xli -onroot -fillscreen /usr/share/WindowMaker/Backgrounds/Don-Quixote.jpg


-- debconf information:
xdm/daemon_name: /usr/bin/xdm
xdm/stop_running_server_with_children: false
* shared/default-x-display-manager: xdm

Bernhard Übelacker

unread,
Jan 7, 2020, 7:20:03 PM1/7/20
to
Dear Maintainer,
I could reproduce the issue in a minimal bullseye VM.

From my observations I guess the USR2 signal is sent
by logrotate:

/etc/logrotate.d/xdm:
kill -s USR2 $(cat /var/run/xdm.pid); \

If I read [1] right, then USR2 has a default action of
process termination. Therefore is my guess that log rotation
is started/finishes too fast and the USR2 signal is sent
before xdm replaced the default with its own signal handler.

With a package built with the following line moved near
the top of the main function I could no more
reproduce the issue:

(void) Signal (SIGUSR2, ReopenLogFileNotify);

Kind regards,
Bernhard

[1] https://unix.stackexchange.com/questions/38589/why-does-sigusr1-cause-process-to-be-terminated
debugging.txt

Eduard Bloch

unread,
Jan 10, 2021, 6:20:03 AM1/10/21
to
Control: severity 948346 serious

On Tue, 04 Aug 2020 11:49:17 +0300 =?UTF-8?B?QWxleGFuZGVyIEtsaW1vdg==?= <alse...@inbox.ru> wrote:
>
> The attached seems to work on buster.

Thanks for the patch, also thanks to Bernhard for investigation.

The patch could be used but it just working around symptoms. I see
multiple bugs involved here.

a) logrotate job using a plain kill. This is racy, even with SysV init.
We can do it better (systemctl kill function).

b) service file not cleaning up the pid file. That file should be gone
even when service terminates.

c) xdm refusing to start when the pid file exists, although the process
is no longer running. It could check whether it's still active, and/or
maybe just kill it and evaluate the errno.

I am setting this to RC severity because it's just NOT ok and obvious to
fix. Going to change mentioned things and NMU this in a couple of weeks
if there is no further reaction from maintainers.

Best regards,
Eduard.

--
Atheismus ist keine Philosophie, er ist noch nicht ein mal eine
Weltsicht. Er ist schlichtweg die Weigerung, ohne Grund das Gegenteil
des Offensichtlichen zu glauben.

Adrian Bunk

unread,
Jan 25, 2021, 12:20:03 AM1/25/21
to
On Sun, Jan 10, 2021 at 12:10:16PM +0100, Eduard Bloch wrote:
>...
> I am setting this to RC severity because it's just NOT ok and obvious to
> fix. Going to change mentioned things and NMU this in a couple of weeks
> if there is no further reaction from maintainers.

Could you make an upload to DELAYED instead of further waiting?

> Best regards,
> Eduard.

Thanks
Adrian

Chris Hofstaedtler

unread,
Feb 7, 2021, 7:50:03 PM2/7/21
to
* Eduard Bloch <e...@gmx.de> [210208 00:43]:
> > Could you make an upload to DELAYED instead of further waiting?
>
> I am no longer waiting, today is timeout day. Will use 7-DAY DELAYED
> queue, should be appropriate.

That upload somehow did not make it into the archive?

Chris

Julien Cristau

unread,
Feb 8, 2021, 4:00:03 AM2/8/21
to
On Mon, Feb 08, 2021 at 09:41:17AM +0100, Eduard Bloch wrote:
> @Julien: okay to add myself as Uploader and upload?

No.

Cheers,
Julien

Georg KÖRBL

unread,
Aug 4, 2021, 8:10:03 PM8/4/21
to
Vielen Dank für die Informationen, die ich über Ihr Facebook-Profil
über Sie erhalten habe. Ich benötige jedoch Ihre Mithilfe, um
humanitäre Hilfe zu verteilen, um das Projekt entsprechend finanziell
zu arrangieren.
Grüße.

Richmond

unread,
Nov 20, 2021, 11:00:04 AM11/20/21
to
Hi,

I had this problem too, and worked around it:

Configure logrotate /etc/logrotate.d/xdm remove weekly and put
size=1G
 
0 new messages