Bug 231068 - x11-servers/xorg-server segmentation fault
Summary: x11-servers/xorg-server segmentation fault
Status: Closed Feedback Timeout
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-x11 (Nobody)
Depends on:
Reported: 2018-09-01 07:11 UTC by Michael Danilov
Modified: 2019-09-14 19:49 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (x11)

Backtrace from Xorg.0.log.old (1.25 KB, text/plain)
2018-09-01 07:11 UTC, Michael Danilov
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Danilov 2018-09-01 07:11:03 UTC
Created attachment 196757 [details]
Backtrace from Xorg.0.log.old

X11 crashes every 10 hours of use or so, it is very hard to pinpoint what triggers it, but I think I get the crash when closing some graphics-intensive program like FlightGear, Blender or Qutebrowser. During the runtime of Xorg the system has been suspended several times, maybe that affects it somehow...

The stack trace is always the same, except for the "3: ? (?+0xe12) [0x7fffffffffa5]" being a bit different for different versions of drm-next-kmod -- see attachment.

The only major changes to my setup before I started getting this were:
-switching to drm-next-kmod, because I'd been getting regular "GPU hung" messages with the default module;
-removing x11-drivers/xf86-video-intel, because modeset driver is now usable unlike the last time I had tried.

My current setup:

FreeBSD 11.2-RELEASE-p2, generic kernel with drm-next-kmod-4.11.g20180822
xorg-server-1.18.4_9,1 using modeset driver

Lenovo B570e
Intel(R) Core(TM) i7-2820QM CPU @ 2.30GHz
Comment 1 Niclas Zeising freebsd_committer 2018-09-01 09:40:17 UTC
How are you installing X, are you compiling from ports or using official pkg packages?
Comment 2 Michael Danilov 2018-09-01 11:06:54 UTC
ports, last updated around 26 Aug
Comment 3 Michael Danilov 2018-10-19 15:34:31 UTC
...anyone? This is driving me insane!
Comment 4 Denis Polygalov 2018-10-20 04:23:31 UTC
(In reply to Michael Danilov from comment #2)
I'm sorry this is not an helpful advise,
I just curious why did you compile
such thing as the whole Xorg from ports?
Is there anything else on your laptop compiled
from ports with maybe non-default options?

Since 2018Q4 all packages necessary to run Xorg on decent hardware without 
compiling from ports (i.e. gpu-firmware-kmod, drm-next-kmod etc.)
are available from binary packages. How about try to switch
back to the "stock" version of Xorg etc?
Comment 5 Michael Danilov 2018-10-20 10:06:40 UTC
(In reply to Denis Polygalov from comment #4)

* Every now and then I add new port / update some of my maintained ports, and at first I have to compile them with Poudriere, so build the rest from ports to make sure I get the same options.
* I have a huge make.conf with features I want or don't want, which not always agree with the defaults that are in pkg.

But last time I checked, Xorg did not have too many options, if any at all?

If it's a safe thing to do I could try and mix pkg and ports to try stock Xorg.
Comment 6 Niclas Zeising freebsd_committer 2018-10-28 10:05:40 UTC
(In reply to Michael Danilov from comment #5)

I don't know why this happens.  It is generally not recommended to mix ports and packages, but it might work.  Any chance you can test with stock packages just to see if the issue goes away?
Comment 7 Michael Danilov 2018-11-07 13:01:24 UTC
Found one more thing. It almost certainly will happen in about an hour after plugging a VGA monitor and running

pkill compton
xout VGA-1 --auto
xout LVDS-1 --off
feh --bg-fill $(find -L ${HOME}/img/wp/ -type f |sort -R |head -1)
compton -b
Comment 8 Michael Danilov 2018-11-07 13:03:13 UTC
Typically after I log out (through WM exit, not Ctrl-Alt-Backspace) and then log back in after a while, then that with some probability will happen in around 2 minutes.
Comment 9 Michael Danilov 2018-12-01 20:58:18 UTC
It happens independently of xrandr output toggling.

Typically when I launch something using accelerated graphics like qutebrowser or blender. So it must be some new "feature" of the Intel driver...
Comment 10 Walter Schwarzenfeld freebsd_triage 2019-08-08 00:40:16 UTC
Is this still relevant?
Comment 11 Niclas Zeising freebsd_committer 2019-09-14 19:49:06 UTC
Feedback timeout