Bug 1056299

Summary: Can not log in from the GDM
Product: [Fedora] Fedora Reporter: Peque <msdeleonpeque>
Component: xorg-x11-drv-intelAssignee: Adam Jackson <ajax>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: ajax, mihai.maruseac, thomas.mey, 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: 2015-06-29 14:38:43 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
gdb log of crash in drm_intel_gem_bo_free()
none
Fix SIGSEGV for heigth = 0 and width = 0 in libdrm memory alloc none

Description Peque 2014-01-21 22:50:54 UTC
Description of problem:
Con not log in from the GDM to my user graphical session.

Version-Release number of selected component (if applicable):
xorg-x11-drv-intel.x86_64 0:2.21.15-5.fc20

How reproducible:
Fedora 20 (64), fully updated. DELL XPS15 with external monitor connected through the Display Port. After introducing my password, I only see a black screen and then the GDM appears again. I can open my graphical session either if I unplug the external monitor before trying to log in from the GDM or if I log in from the tty (e.g. CTRL + ALT + F2) and then execute "startx". Although, if I do this and let the screen lock itself, then I will not be able to log in again.

Actual results:
You can not log in as normaly.

Expected results:
You should be able to log in normaly, as I have been doing in past Fedora versions and with an older xorg-x11-drv-intel version.

Additional info:
Downgrading to xorg-x11-drv-intel.x86_64 0:2.21.15-4.fc20 fixes the problem. May be related to #1036377. Willing to provide additional information if needed. Thanks for your help.

Comment 1 Thomas Meyer 2014-02-06 22:19:50 UTC
The only commit between -4 and -5 seems to be this patch:

http://pkgs.fedoraproject.org/cgit/xorg-x11-drv-intel.git/commit/?h=f20&id=4846ba71f32c7a2243504d71f0bcc0e5f4115160

Comment 2 Thomas Meyer 2014-02-07 18:37:34 UTC
The gdm log file shows this backtrace:

have a master to look out for
(EE)
(EE) Backtrace:
(EE) 0: /usr/bin/Xorg (OsLookupColor+0x129) [0x473899]
(EE) 1: /lib64/libpthread.so.0 (__restore_rt+0x0) [0x362460f74f]
(EE) 2: /lib64/libdrm_intel.so.1 (drm_intel_bufmgr_fake_init+0xf2b) [0x7fefe4cb424b]
(EE) 3: /lib64/libdrm_intel.so.1 (drm_intel_bufmgr_fake_init+0x2c84) [0x7fefe4cb7914]
(EE) 4: /usr/lib64/xorg/modules/drivers/intel_drv.so (_init+0xd57aa) [0x7fefe508684a]
(EE) 5: /usr/lib64/xorg/modules/drivers/intel_drv.so (_init+0xd149d) [0x7fefe507e30d]
(EE) 6: /usr/bin/Xorg (xf86PruneDuplicateModes+0x1eb7) [0x4cee57]
(EE) 7: /usr/bin/Xorg (RRCrtcSet+0x5d5) [0x50ca15]
(EE) 8: /usr/bin/Xorg (ProcRRSetCrtcConfig+0x3f6) [0x50dbd6]
(EE) 9: /usr/bin/Xorg (SendErrorToClient+0x427) [0x43a3d7]
(EE) 10: /usr/bin/Xorg (_init+0x3b1a) [0x42c02a]
(EE) 11: /lib64/libc.so.6 (__libc_start_main+0xf5) [0x3623a21d65]
(EE) 12: /usr/bin/Xorg (_start+0x29) [0x428c45]
(EE) 13: ? (?+0x29) [0x29]
(EE)
(EE) Segmentation fault at address 0x8
(EE)
Fatal server error:
(EE) Caught signal 11 (Segmentation fault). Server aborting
(EE)
(EE)
Please consult the Fedora Project support
         at http://wiki.x.org
 for help.

Comment 3 Thomas Meyer 2014-02-07 18:57:14 UTC
This is what I see when I attach the the Xorg server spawned by gdm via gdb:

(gdb) bt
#0  0x0000003623aec147 in writev () from /lib64/libc.so.6
#1  0x000000000047a1e7 in _XSERVTransSocketWritev (ciptr=0x31ab210, buf=0x7fff91c43530, size=1) at /usr/include/X11/Xtrans/Xtranssock.c:2157
#2  0x000000000047092d in FlushClient (who=who@entry=0x31a9d80, oc=oc@entry=0x31a9d10, __extraBuf=__extraBuf@entry=0x0, extraCount=extraCount@entry=0) at io.c:912
#3  0x0000000000470e0f in FlushAllOutput () at io.c:655
#4  0x000000000043a1e5 in Dispatch () at dispatch.c:454
#5  0x00000000004288da in main (argc=12, argv=0x7fff91c43798, envp=<optimized out>) at main.c:298

Comment 4 Thomas Meyer 2014-02-07 19:11:01 UTC
Adding Option "NoTrapSignals" to the xorg.conf file and stepping over the SIGPIPE, gives another entry in the xorg log file:

Errors from xkbcomp are not fatal to the X server
(EE)
(EE) Backtrace:
(EE) 0: /usr/bin/Xorg (OsLookupColor+0x129) [0x473759]
(EE) 1: /lib64/libpthread.so.0 (__restore_rt+0x0) [0x362460f74f]
(EE) 2: /usr/bin/Xorg (RRCrtcDetachScanoutPixmap+0x42) [0x50bbb2]
(EE) 3: /usr/bin/Xorg (RRCrtcDetachScanoutPixmap+0x182) [0x50bde2]
(EE) 4: /usr/bin/Xorg (RegisterResourceName+0x232) [0x45cf52]
(EE) 5: /usr/bin/Xorg (FreeClientResources+0x97) [0x45df47]
(EE) 6: /usr/bin/Xorg (FreeAllResources+0x47) [0x45e007]
(EE) 7: /usr/bin/Xorg (_init+0x3b3e) [0x42c03e]
(EE) 8: /lib64/libc.so.6 (__libc_start_main+0xf5) [0x3623a21d65]
(EE) 9: /usr/bin/Xorg (_start+0x29) [0x428c35]
(EE) 10: ? (?+0x29) [0x29]
(EE)
(EE) Segmentation fault at address 0x418
(EE)
Fatal server error:
(EE) Caught signal 11 (Segmentation fault). Server aborting
(EE)
(EE)

Comment 5 Thomas Meyer 2014-02-09 13:01:07 UTC
(In reply to Thomas Meyer from comment #2)
> The gdm log file shows this backtrace:
> 
> have a master to look out for
> (EE)
> (EE) Backtrace:
> (EE) 0: /usr/bin/Xorg (OsLookupColor+0x129) [0x473899]
> (EE) 1: /lib64/libpthread.so.0 (__restore_rt+0x0) [0x362460f74f]
> (EE) 2: /lib64/libdrm_intel.so.1 (drm_intel_bufmgr_fake_init+0xf2b)
> [0x7fefe4cb424b]
> (EE) 3: /lib64/libdrm_intel.so.1 (drm_intel_bufmgr_fake_init+0x2c84)
> [0x7fefe4cb7914]
> (EE) 4: /usr/lib64/xorg/modules/drivers/intel_drv.so (_init+0xd57aa)
> [0x7fefe508684a]
> (EE) 5: /usr/lib64/xorg/modules/drivers/intel_drv.so (_init+0xd149d)
> [0x7fefe507e30d]
> (EE) 6: /usr/bin/Xorg (xf86PruneDuplicateModes+0x1eb7) [0x4cee57]
> (EE) 7: /usr/bin/Xorg (RRCrtcSet+0x5d5) [0x50ca15]
> (EE) 8: /usr/bin/Xorg (ProcRRSetCrtcConfig+0x3f6) [0x50dbd6]
> (EE) 9: /usr/bin/Xorg (SendErrorToClient+0x427) [0x43a3d7]
> (EE) 10: /usr/bin/Xorg (_init+0x3b1a) [0x42c02a]
> (EE) 11: /lib64/libc.so.6 (__libc_start_main+0xf5) [0x3623a21d65]
> (EE) 12: /usr/bin/Xorg (_start+0x29) [0x428c45]
> (EE) 13: ? (?+0x29) [0x29]
> (EE)
> (EE) Segmentation fault at address 0x8
> (EE)
> Fatal server error:
> (EE) Caught signal 11 (Segmentation fault). Server aborting
> (EE)
> (EE)
> Please consult the Fedora Project support
>          at http://wiki.x.org
>  for help.

I thinks this is the real underlying problem.

I have this setup:
My laptop has an internal panel and an external monitor attached to it. When I try to login to gnome-seesion via GDM with the external monitor attached, I'll get this crash. When I unplug the external monitor I can login to gnome-session. When the gnome-shell is up and running, I can then reattach the external monitor and I don't get above crash any more.

Backtrace in gdb:
#0  0x00007f59fc00b34b in drm_intel_gem_bo_free (bo=0x44983d0) at intel_bufmgr_gem.c:936
#1  0x00007f59fc00d0a4 in drm_intel_gem_bo_alloc_internal (bufmgr=0x261de20, name=0x7f59fc32e946 "front buffer", size=0, flags=<optimized out>, tiling_mode=1, 
    stride=0) at intel_bufmgr_gem.c:734
#2  0x00007f59fc309262 in intel_allocate_framebuffer (scrn=scrn@entry=0x260eeb0, width=width@entry=0, height=height@entry=0, cpp=<optimized out>, 
    out_pitch=out_pitch@entry=0x7fff83f68f50, out_tiling=out_tiling@entry=0x7fff83f68f4c) at intel_memory.c:240
#3  0x00007f59fc304f55 in intel_xf86crtc_resize (scrn=0x260eeb0, width=0, height=0) at intel_display.c:1551
#4  0x00000000004cccf9 in xf86RandR12ScreenSetSize (pScreen=0x2636900, width=0, height=0, mmWidth=0, mmHeight=0) at xf86RandR12.c:699
#5  0x000000000050c3a4 in rrCheckPixmapBounding (h=0, w=0, y=0, x=0, rr_crtc=0x262c430, pScreen=0x2636900) at rrcrtc.c:510
#6  RRCrtcSet (crtc=0x262c430, mode=0x0, x=0, y=0, rotation=rotation@entry=1, numOutputs=numOutputs@entry=0, outputs=outputs@entry=0x0) at rrcrtc.c:554
#7  0x000000000050d566 in ProcRRSetCrtcConfig (client=0x44b4a40) at rrcrtc.c:1167
#8  0x000000000043a327 in Dispatch () at dispatch.c:432
#9  0x00000000004288da in main (argc=12, argv=0x7fff83f69438, envp=<optimized out>) at main.c:298

I think the problem is, that height and width are 0 for some reason.

Comment 6 Thomas Meyer 2014-02-09 13:04:06 UTC
Created attachment 861020 [details]
gdb log of crash in drm_intel_gem_bo_free()

Comment 7 Thomas Meyer 2014-03-05 10:40:47 UTC
Hi,

this crash still happens when trying to start a gnome-session from GDM.

Anything I can do to speedup a fix for this?

Comment 8 Peque 2014-03-05 10:51:34 UTC
Hi there,

Me too, I will be glad to help providing more information/data to fix this problem. :-) (although a little orientation on how to do it will be needed as I am not an expert)

Thanks.

Comment 9 Thomas Meyer 2014-03-05 12:09:04 UTC
I thinks this bug has probably to do with my external usb docking station, that also has an DVI connector, i.e. is an external graphic card.
The driver for the external graphic card is "udl".

The external DVI connector has no monitor attached to it:

[21719.588712] [drm] vendor descriptor length:22 data:22 5f 01 00 20 05 00 01 03 04 02
[21719.640347] Raw EDID:
[21719.640349]          00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[21719.640350]          00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[21719.640351]          00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[21719.640352]          00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[21719.640353]          00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[21719.640354]          00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[21719.640355]          00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[21719.640356]          00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[21719.640359] udl 2-2.1:1.0: DVI-I-2: EDID invalid.
[21719.641246] udl 2-2.1:1.0: fb2: udldrmfb frame buffer device
[21719.641249] [drm] Initialized udl 0.0.1 20120220 on minor 1

I thinks this device somehow confuses/crashes the gnome-session start from gdm.

without the external usb docking station and only the external monitor attached to the i915 external port on my laptop the login via gdm works correctly.

Comment 10 Thomas Meyer 2014-03-06 14:42:39 UTC
Created attachment 871496 [details]
Fix SIGSEGV for heigth = 0 and width = 0 in libdrm memory alloc

Attached patch against the intel driver fixes the problem for me. Please consider to include it in the Fedora RPM release.

Comment 11 Thomas Meyer 2014-03-07 14:45:54 UTC
Upstream bug report: https://bugs.freedesktop.org/show_bug.cgi?id=75844

Comment 12 Peque 2014-06-21 09:43:12 UTC
The new updated package:

2.21.15-7.fc20.x86_64

Does not fix the problem either. Had downgrade again to "2.21.15-4".

Comment 13 Fedora End Of Life 2015-05-29 10:36:43 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 14 Fedora End Of Life 2015-06-29 14:38:43 UTC
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.