Bug 986542

Summary: Xephyr segfault on some systems
Product: [Fedora] Fedora Reporter: Alphonse Steiner <alphsteiner>
Component: xorg-x11-serverAssignee: X/OpenGL Maintenance List <xgl-maint>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: sergio, xgl-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-29 15:23:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch to fix the segfault. none

Description Alphonse Steiner 2013-07-20 12:19:51 UTC
Created attachment 776146 [details]
Patch to fix the segfault.

This is related to bug #976995 (closed). I prefer to open a new bug report for more clarity.
The command "Xephyr  -ac -br :4" lead to a segfault:

(EE) 
(EE) Backtrace:
(EE) 0: /usr/bin/Xephyr (OsSigHandler+0x29) [0x467a49]
(EE) 1: /lib64/libpthread.so.0 (__restore_rt+0x0) [0x37a8c0ef9f]
(EE) 2: /usr/bin/Xephyr (ephyrHostXVAdaptorGetVideoFormats+0xba) [0x47785a]
(EE) 3: /usr/bin/Xephyr (ephyrInitVideo+0x707) [0x476b37]
(EE) 4: /usr/bin/Xephyr (ephyrInitScreen+0xd8) [0x4722a8]
(EE) 5: /usr/bin/Xephyr (KdScreenInit+0x217) [0x48e2b7]
(EE) 6: /usr/bin/Xephyr (AddScreen+0x71) [0x42ff31]
(EE) 7: /usr/bin/Xephyr (KdInitOutput+0x289) [0x48e799]
(EE) 8: /usr/bin/Xephyr (main+0x1db) [0x41e80b]
(EE) 9: /lib64/libc.so.6 (__libc_start_main+0xf5) [0x37a8821b75]
(EE) 10: /usr/bin/Xephyr (_start+0x29) [0x41ed41]
(EE) 11: ? (?+0x29) [0x29]
(EE) 
(EE) Segmentation fault at address 0x18
(EE) 
Fatal server error:
(EE) Caught signal 11 (Segmentation fault). Server aborting
(EE)

This bug happens on the main system (fresh FC19 install). I cannot reproduce it on vitual systems. It did not happened on FC17.
This is due to the function 'XGetVisualInfo' returning a NULL pointer.

Here a patch to fix it.

Version: xorg-x11-server-Xephyr-1.14.2-5

Comment 1 Sergio Basto 2013-07-23 01:43:59 UTC
Hi, Alphonse Steiner, are you the author of the patch to fix the segfault ? 
if yes , is patch posted to the xorg-devel mailing list, to be merged on git master ?

Comment 2 Alphonse Steiner 2013-07-23 11:04:54 UTC
Yes I am. I have not posted this patch elsewhere than this bugzilla.

Comment 3 Sergio Basto 2013-07-29 01:57:19 UTC
hi, sorry for late response , 
I talked about this patch on xorg devel Mailing list [1]
You may wrote there and try submit the patch, in proper way and sign off it ... 
I'm trying to help you, and thinking about this bug you wrote:  
   
> This is due to the function 'XGetVisualInfo' returning a NULL pointer.
 
if XGetVisualInfo return NULL something is bad configured in your system, I think, I can't reproduce this bug.

  $ LIBGL_DEBUG=verbose glxinfo

what is the output ? 

[1] http://lists.x.org/archives/xorg-devel/2013-July/036960.html

Comment 4 Alphonse Steiner 2013-07-29 15:23:20 UTC
First of all, thank you very much for your consideration. I really do appreciate it.
After a reboot on a new kernel, with new drivers and a few more updates, the segfault does not appear anymore. I do not know what is 'the' update that has fixed it. Maybe the intel driver? Anyway, it is fixed now.
Thanks again.