Update instructions to get a core dump from X server,

prompted by input from Kirill A. Korinsky, thanks.
This commit is contained in:
matthieu
2024-04-27 18:34:23 +00:00
parent e652bb8dfc
commit 6a5e5b2f67

34
README
View File

@@ -181,35 +181,23 @@ o How to get a core file out of the X server?
Several things are needed: Several things are needed:
1) set kern.nosuidcoredump=2 in /etc/sysctl.conf 1) set kern.nosuidcoredump=3 in /etc/sysctl.conf
2) put
Option "NoTrapSignals" "true" 2) start the X server as root, with the -keepPriv option. If you use
xenodm, you can add the option in /etc/X11/xenodm/Xservers. If you
in the "ServerFlags" section of /etc/X11/xorg.conf. If such a section want to use startx, you need to run it as root, like this:
doesn't exist, it can be added as follow:
Section "ServerFlags"
Option "NoTrapSignals" "true"
EndSection
anywhere in the configuration file.
3) start the X server as root, with the -keepPriv option. A regular
user is not allowed to use this option. If you use xenodm, you can
add the option in /etc/X11/xenodm/Xservers. If you want to use
startx, you need to run it as root, like this:
startx -- /usr/X11R6/bin/X -keepPriv startx -- /usr/X11R6/bin/X -keepPriv
Now the X server will dump core when catching a fatal signal. But it Now the X server should dump core when catching a fatal signal and the
will also not be able to restore the text mode on exit. So be prepared core dump should be in /var/crash/Xorg/<pid>.core.
to log in remotely (serial terminal or ssh) to reboot your machine or
to restart X.
The core dump will be in /var/crash. Alternatively, if the X server is using the modesetting(4) driver
(it's the case with most recent AMD and Intel GPUs), it can be started
as a regular user, without setting kern.nosuidcoredump=3, and the core
dump will be in the current directory where startx was executed.
See also <http://xorg.freedesktop.org/wiki/Development/Documentation/ServerDebugging> See also <http://xorg.freedesktop.org/wiki/Development/Documentation/ServerDebugging>
-- --
$OpenBSD: README,v 1.48 2023/05/07 06:55:21 matthieu Exp $ $OpenBSD: README,v 1.49 2024/04/27 18:34:23 matthieu Exp $