Bug 259402

Summary: x11-servers/xorg-server: stopping X makes system unresponsive
Product: Ports & Packages Reporter: p5B2EA84B3
Component: Individual Port(s)Assignee: freebsd-x11 (Nobody) <x11>
Status: Closed Overcome By Events    
Severity: Affects Some People CC: grahamperrin, janusz7z
Priority: --- Flags: bugzilla: maintainer-feedback? (x11)
Version: Latest   
Hardware: Any   
OS: Any   

Description p5B2EA84B3 2021-10-24 13:04:31 UTC
When shutting down a X user session system hangs with black screen not reaching the shell prompt in tty0. The system is completely inresponsive to keyboard or mouse events. Black screen with cursor in upper left corner and unmovable mouse-pointer in the middle.

I now upgraded x11-servers/xorg-server 1.20.11_3,1 -> 1.20.13,1 but the problem was there for some weeks before, persisting this upgrade.

Searching for solutions I found others having exactly the same problem too:
https://forums.freebsd.org/threads/i-cannot-stop-x.82545/

There I learned that first switching to tty0 and killing X there at least gives me a terminal prompt again:

(II) AIGLX: Suspending AIGLX clients for VT switch                                                                              
^Cxinit: connection to X server lost                                                                                            
                                                                                                                       
waiting for X server to shut down XIO:  fatal IO error 4 (Interrupted system call) on X server ":0"                             

      after 179932 requests (179929 known processed) with 0 events remaining.                                                   

..........                                                                                                                      

xinit: X server slow to shut down, sending KILL signal                                                                          
                                                                                                                           waiting for server to die                                                                                                       

xinit: unexpected signal 2                                                                                                      
-------

No clues in the xorg logfile.
looking at ps aux after shutdown (via ssh from other box) shows no more X-related processes.
Comment 1 Graham Perrin freebsd_committer freebsd_triage 2021-11-01 05:54:35 UTC
(In reply to p5B2E9A8F from comment #0)

> exactly the same problem too: 
> <https://forums.freebsd.org/threads/i-cannot-stop-x.82545/> …

There are a mixture of systems. 

Which version of FreeBSD do you run, exactly?

freebsd-version -kru

uname -aKU
Comment 2 p5B2EA84B3 2021-11-01 08:32:15 UTC
> pkg info xorg-server
xorg-server-1.20.13,1
Name           : xorg-server
Version        : 1.20.13,1
Installed on   : Sat Oct 23 19:04:09 2021 UTC
Origin         : x11-servers/xorg-server
Architecture   : FreeBSD:12:i386       <------ 
Prefix         : /usr/local
Categories     : x11-servers
Licenses       : MIT
Maintainer     : x11@FreeBSD.org
WWW            : http://www.freedesktop.org/Software/xorg
Comment        : X.Org X server and related programs
Options        :
	DEVD           : off
	SUID           : on
	UDEV           : on
Shared Libs required:
	libgbm.so.1
	libxshmfence.so.1
	libGL.so.1
	libudev.so.0
	libpixman-1.so.0
	libXdmcp.so.6
	libcrypto.so.11
	libXau.so.6
	libepoxy.so.0
	libunwind.so.8
	libdrm.so.2
	libpciaccess.so.0
	libXfont2.so.2
Shared Libs provided:
	libvgahw.so
	libint10.so
	libexa.so
	libshadow.so
	libvbe.so
	libfbdevhw.so
	libshadowfb.so
	libglamoregl.so
	libwfb.so
	libglx.so
	libfb.so
Annotations    :
	FreeBSD_version: 1202000
	build_timestamp: 2021-10-23T15:10:00+0000
	built_by       : poudriere-git-3.3.99.20211017_2
	cpe            : cpe:2.3:a:x.org:xorg-server:1.20.13:::::freebsd12:x86
	port_checkout_unclean: no
	port_git_hash  : 59fea54dcf
	ports_top_checkout_unclean: no
	ports_top_git_hash: 7ce9c7d876
	repo_type      : binary
	repository     : local
Flat size      : 4.38MiB
Description    :
This package contains the X.Org X server and some associated programs.

WWW: http://www.freedesktop.org/Software/xorg
Comment 3 Graham Perrin freebsd_committer freebsd_triage 2021-11-03 00:54:32 UTC
(In reply to p5B2E9A8F from comment #2)

> FreeBSD:12:i386

Does not tell the exact version.
Comment 4 p5B2EA84B3 2021-11-03 10:23:39 UTC
> freebsd-version -kru
12.2-RELEASE-p6
12.2-RELEASE-p6
12.2-RELEASE-p6
Comment 5 Graham Perrin freebsd_committer freebsd_triage 2021-11-06 23:03:00 UTC
(In reply to p5B2E9A8F from comment #4)

Thanks, that's somewhat outdated. Is the issue reproducible with an up-to-date release?
Comment 6 p5B2EA84B3 2021-11-08 15:16:28 UTC
I do not think that my system is "outdated". I patch my systems only if they are affected and not for looking better. 

What has changed is the version of the port. 

If you can tell me which release patch solves the port problem, I'll spend you a beer.
Comment 7 Graham Perrin freebsd_committer freebsd_triage 2022-03-24 05:35:10 UTC
Consider <https://forums.freebsd.org/posts/561249>