tech-x11 archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Xorg built with clang dumps core, with gcc not
On Sun, Feb 01, 2015 at 11:00:01AM +0100, Thomas Klausner wrote:
> Hi!
>
> I'm seeing strange behaviour. I've updated to 7.99.4 from yesterday
> and tried a build with clang as default compiler, i.e. "-V MKLLVM=yes
> -V HAVE_LLVM=yes -V MKGCC=no" in my build.sh command line.
>
> When I installed that kernel and userland, starting X just gave me a
> black screen and I couldn't switch back to console; i.e. X probably
> just died.
>
> Xorg.0.log contains:
> ...
> (==) Log file: "/var/log/Xorg.0.log", Time: Sat Jan 31 21:26:07 2015
> (==) Using config file: "/etc/X11/xorg.conf"
> (II) [KMS] Kernel modesetting enabled.
> (EE) RADEON(0): Cannot position output DVI-0 relative to unknown output Left Monitor
> The XKEYBOARD keymap compiler (xkbcomp) reports:
> > Error: Couldn't lookup keysym
> > Symbol interpretation ignored
> > Error: Couldn't lookup keysym
> > Symbol interpretation ignored
> Errors from xkbcomp are not fatal to the X server
> Can't open display :0
> ...
>
> Then I tried building the same sources with gcc as compiler, and X
> works. Xorg.0.log:
> ...
> (==) Log file: "/var/log/Xorg.1.log", Time: Sat Jan 31 21:26:59 2015
> (==) Using config file: "/etc/X11/xorg.conf"
> (II) [KMS] Kernel modesetting enabled.
> (EE) RADEON(0): Cannot position output DVI-0 relative to unknown output Left Monitor
> The XKEYBOARD keymap compiler (xkbcomp) reports:
> > Error: Couldn't lookup keysym
> > Symbol interpretation ignored
> > Error: Couldn't lookup keysym
> > Symbol interpretation ignored
> Errors from xkbcomp are not fatal to the X server
> xrandr: cannot find mode 1920x1200
> X Error of failed request: BadValue (integer parameter out of range for operation)
> Major opcode of failed request: 118 (X_SetModifierMapping)
> Value in failed request: 0x17
> Serial number of failed request: 15
> Current serial number in output stream: 15
> 2015-01-31 21:27:00 INFO /notion/../ioncore.c:609: ioncore_startup: Starting Notion
> ...
>
> This even works with the kernel built with clang (i.e. gcc /usr/X11R7
> on top of clang /netbsd).
>
> When I start /usr/X11R7/bin/Xorg in gdb (as root), the clang-built X
> works: I can start xterms and a window manager.
>
> Then I noticed that starting X (using startx) as my user gives me an
> Xorg.core file (I thought it didn't do that for setuid root files?!).
> Here's the backtrace:
>
> Program terminated with signal SIGSEGV, Segmentation fault.
> #0 radeon_dri2_unref_buffer (buffer=0x1) at /archive/foreign/xsrc/external/mit/xf86-video-ati/dist/src/radeon_dri2.c:584
> 584 struct dri2_buffer_priv *private = buffer->driverPrivate;
> (gdb) bt
> #0 radeon_dri2_unref_buffer (buffer=0x1) at /archive/foreign/xsrc/external/mit/xf86-video-ati/dist/src/radeon_dri2.c:584
> #1 radeon_dri2_client_state_changed (ClientStateCallback=0x8591a0 <ClientStateCallback>, data=0x0, calldata=<optimized out>)
> at /archive/foreign/xsrc/external/mit/xf86-video-ati/dist/src/radeon_dri2.c:610
> #2 0x000000000046dbdc in _CallCallbacks (pcbl=0x8591a0 <ClientStateCallback>, call_data=0x7f7fffffd3b0)
> at /archive/foreign/xsrc/external/mit/xorg-server/dist/dix/dixutils.c:742
> #3 0x0000000000453ea1 in CallCallbacks (pcbl=<optimized out>, call_data=0x0) at /archive/build/amd64.clang.20150131/usr/X11R7/include/xorg/callback.h:86
> #4 CloseDownClient (client=0x7f7ff5fcda10) at /archive/foreign/xsrc/external/mit/xorg-server/dist/dix/dispatch.c:3461
> #5 0x0000000000453cb7 in Dispatch () at /archive/foreign/xsrc/external/mit/xorg-server/dist/dix/dispatch.c:416
> #6 0x000000000042e417 in main (argc=1, argv=0x7f7fffffd4c8, envp=<optimized out>) at /archive/foreign/xsrc/external/mit/xorg-server/dist/dix/main.c:287
> (gdb)
>
>
> I'm not sure what could be the cause of this. My latest idea is that
> the failed request in the gcc log somehow kills the clang X, perhaps
> because some data structures are packed differently (just guessing).
>
> Does anyone have an idea?
joerg had the idea of trying with a radeon driver built with -O0, and
that does indeed fix the problem.
I.e., radeon_drv.so.6 build with -O2 breaks, -O0 works.
Thomas
Home |
Main Index |
Thread Index |
Old Index