does not work with xserver 1.18.3 : core dump at kgem->retire() + different PixmapSyncDirtyHelper prototype
Submitted by Jason Vas Dias
Assigned to Chris Wilson @ickle
Description
Having checked out & built the latest xf86-video-intel source code from git:
$ git tag | while read tag; do echo (git show --format='COMMIT_TIME:%ct' "
tag" | sed -n '/^COMMIT_TIME:/{s/^COMMIT_TIME://;p;}') "$tag"; done | sort -n | tail -n 1
1419172872 2.99.917
$ git checkout -f 2.99.917
( which is from rather a long time ago - 2014-12-21 - but is latest version
in GIT as of writing : 2016-04-25)
, against latest version of Xorg server from GIT : 1.18.3 ,
and all of its dependencies from their latest GIT versions,
it initially failed to build because evidently the prototype of
the server's PixmapSyncDirtyHelper has changed:
$ diff -U0 src/uxa/intel_driver.c~ src/uxa/intel_driver.c
--- src/uxa/intel_driver.c~ 2016-04-25 23:29:59.385985184 +0000
+++ src/uxa/intel_driver.c 2016-04-25 19:12:15.635826279 +0000
@@ -645 +645 @@
-
PixmapSyncDirtyHelper(dirty, &pixregion);<br>
-
PixmapSyncDirtyHelper(dirty/*, &pixregion*/);<br>
, and once it did build , then it generates a segmentation violation (SIGSEGV)
and would core dump if ulimit allows - here is the gdb stack trace of the
Xorg server version 1.18.3, with which this version of xf86-video intel seems
not to be fully compatible:
<quote>``<pre>
GNU gdb (GDB) 7.11
...
Reading symbols from /usr/build/linux/xserver/hw/xfree86/Xorg...done.
[New LWP 4538]
[New LWP 4544]
[New LWP 4543]
[New LWP 4545]
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib64/libthread_db.so.1".
Core was generated by `Xorg -logverbose :0 vt04'.
Program terminated with signal SIGABRT, Aborted.
#0 0x00007f93f8f4b1f8 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54<br>
54 return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig);<br>
[Current thread is 1 (Thread 0x7f93facf38c0 (LWP 4538))]<br>
(gdb) t a a bt<br>
<br>
Thread 4 (Thread 0x7f93f31cd700 (LWP 4545)):<br>
#0 pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185<br>
#1 0x00007f93f5370761 in __run__ (arg=0x1add7d0) at /usr/os_src/xorg/driver/xf86-video-intel/src/sna/sna_threads.c:70<br>
#2 0x00007f93f8d02394 in start_thread (arg=0x7f93f31cd700) at pthread_create.c:333<br>
#3 0x00007f93f8fff8ed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109<br>
<br>
Thread 3 (Thread 0x7f93f41cf700 (LWP 4543)):<br>
#0 pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185<br>
#1 0x00007f93f5370761 in __run__ (arg=0x1add6f0) at /usr/os_src/xorg/driver/xf86-video-intel/src/sna/sna_threads.c:70<br>
#2 0x00007f93f8d02394 in start_thread (arg=0x7f93f41cf700) at pthread_create.c:333<br>
#3 0x00007f93f8fff8ed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109<br>
<br>
Thread 2 (Thread 0x7f93f39ce700 (LWP 4544)):<br>
#0 pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185<br>
#1 0x00007f93f5370761 in __run__ (arg=0x1add760) at /usr/os_src/xorg/driver/xf86-video-intel/src/sna/sna_threads.c:70<br>
#2 0x00007f93f8d02394 in start_thread (arg=0x7f93f39ce700) at pthread_create.c:333<br>
#3 0x00007f93f8fff8ed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109<br>
<br>
Thread 1 (Thread 0x7f93facf38c0 (LWP 4538)):<br>
#0 0x00007f93f8f4b1f8 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54<br>
#1 0x00007f93f8f4c64a in __GI_abort () at abort.c:89<br>
#2 0x0000000000585ade in OsAbort () at /usr/os_src/xorg/xserver/os/utils.c:1408<br>
#3 0x000000000047568c in ddxGiveUp (error=error@entry=EXIT_ERR_ABORT) at /usr/os_src/xorg/xserver/hw/xfree86/common/xf86Init.c:1066<br>
#4 0x000000000047573a in AbortDDX (error=error@entry=EXIT_ERR_ABORT) at /usr/os_src/xorg/xserver/hw/xfree86/common/xf86Init.c:1110<br>
#5 0x000000000058aff2 in AbortServer () at /usr/os_src/xorg/xserver/os/log.c:874<br>
#6 0x000000000058bda8 in FatalError (f=f@entry=0x5b7970 "Caught signal %d (%s). Server aborting\n") at /usr/os_src/xorg/xserver/os/log.c:1015<br>
#7 0x00000000005835ce in OsSigHandler (signo=11, sip=<optimized out>, unused=<optimized out>) at /usr/os_src/xorg/xserver/os/osinit.c:150<br>
#8 <signal handler called><br>
#9 0x0000000000000000 in ?? ()<br>
#10 0x00007f93f52f0254 in kgem_retire (kgem=kgem@entry=0x7f93fac5a000) at /usr/os_src/xorg/driver/xf86-video-intel/src/sna/kgem.c:2789<br>
#11 0x00007f93f52f1cdb in kgem_cleanup_cache (kgem=0x7f93fac5a000) at /usr/os_src/xorg/driver/xf86-video-intel/src/sna/kgem.c:4023<br>
#12 0x00007f93f52f1e38 in __kgem_bo_map__cpu (kgem=kgem@entry=0x7f93fac5a000, bo=0x1adf330) at /usr/os_src/xorg/driver/xf86-video-intel/src/sna/kgem.c:536<br>
#13 0x00007f93f52f1e67 in kgem_bo_map__cpu (kgem=kgem@entry=0x7f93fac5a000, bo=<optimized out>) at /usr/os_src/xorg/driver/xf86-video-intel/src/sna/kgem.c:6347<br>
#14 0x00007f93f52f5adb in kgem_bo_map__cpu (bo=<optimized out>, kgem=0x7f93fac5a000) at /usr/os_src/xorg/driver/xf86-video-intel/src/sna/kgem.c:1496<br>
#15 kgem_new_batch (kgem=kgem@entry=0x7f93fac5a000) at /usr/os_src/xorg/driver/xf86-video-intel/src/sna/kgem.c:1471<br>
#16 0x00007f93f52f6408 in kgem_init (kgem=kgem@entry=0x7f93fac5a000, fd=<optimized out>, dev=<optimized out>, gen=gen@entry=61) at /usr/os_src/xorg/driver/xf86-video-intel/src/sna/kgem.c:1631<br>
#17 0x00007f93f533d5a9 in sna_pre_init (scrn=0x1add040, probe=<optimized out>) at /usr/os_src/xorg/driver/xf86-video-intel/src/sna/sna_driver.c:651<br>
#18 0x000000000047741b in InitOutput (pScreenInfo=pScreenInfo@entry=0x8207a0 <screenInfo>, argc=argc@entry=4, argv=argv@entry=0x7ffcca8481e8) at /usr/os_src/xorg/xserver/hw/xfree86/common/xf86Init.c:583<br>
#19 0x0000000000438694 in dix_main (argc=4, argv=0x7ffcca8481e8, envp=<optimized out>) at /usr/os_src/xorg/xserver/dix/main.c:204<br>
#20 0x00007f93f8f38710 in __libc_start_main (main=0x424030 <main>, argc=4, argv=0x7ffcca8481e8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffcca8481d8) at ../csu/libc-start.c:289<br>
#21 0x0000000000424069 in _start () at ../sysdeps/x86_64/start.S:118<br>
(gdb) up<br>
#1 0x00007f93f8f4c64a in __GI_abort () at abort.c:89<br>
89 raise (SIGABRT);<br>
(gdb) up<br>
#2 0x0000000000585ade in OsAbort () at /usr/os_src/xorg/xserver/os/utils.c:1408<br>
1408 abort();<br>
(gdb) up<br>
#3 0x000000000047568c in ddxGiveUp (error=error@entry=EXIT_ERR_ABORT) at /usr/os_src/xorg/xserver/hw/xfree86/common/xf86Init.c:1066<br>
1066 OsAbort();<br>
(gdb) up<br>
#4 0x000000000047573a in AbortDDX (error=error@entry=EXIT_ERR_ABORT) at /usr/os_src/xorg/xserver/hw/xfree86/common/xf86Init.c:1110<br>
1110 ddxGiveUp(error);<br>
(gdb) up<br>
#5 0x000000000058aff2 in AbortServer () at /usr/os_src/xorg/xserver/os/log.c:874<br>
874 AbortDDX(EXIT_ERR_ABORT);<br>
(gdb) up<br>
#6 0x000000000058bda8 in FatalError (f=f@entry=0x5b7970 "Caught signal %d (%s). Server aborting\n") at /usr/os_src/xorg/xserver/os/log.c:1015<br>
1015 AbortServer();<br>
(gdb) up<br>
#7 0x00000000005835ce in OsSigHandler (signo=11, sip=<optimized out>, unused=<optimized out>) at /usr/os_src/xorg/xserver/os/osinit.c:150<br>
150 FatalError("Caught signal %d (%s). Server aborting\n",<br>
(gdb) up<br>
#8 <signal handler called><br>
(gdb) u<br>
The program is not being run.<br>
(gdb) up<br>
#9 0x0000000000000000 in ?? ()<br>
(gdb) up<br>
#10 0x00007f93f52f0254 in kgem_retire (kgem=kgem@entry=0x7f93fac5a000) at /usr/os_src/xorg/driver/xf86-video-intel/src/sna/kgem.c:2789<br>
2789 kgem->retire(kgem);<br>
(gdb) p kgem-retire<br>
No symbol "retire" in current context.<br>
(gdb) p kgem->retire<br>
$1 = (void (*)(struct kgem *)) 0x0<br>
(gdb) q<br>
```<br>
<br>
</pre></quote> <br>
<br>
As you can see, the kgem->retire function pointer is NULL. <br>
<br>
The above leads me to suspect this package is no longer maintained /<br>
kept working with recent versions of the Xorg software stack - is this<br>
the case ?<br>
<br>
Any suggestions how to fix to make it work with latest Xserver 1.18.3 ?<br>
<br>
If I just make the modification to sna/kgem.c :<br>
<br>
+++ if( kgem->retire != NULL ) <br>
kgem->retire(kgem);<br>
<br>
rather than letting it core dump, then the Xserver hangs and <br>
never goes into graphics mode - it wrote this line to the log:<br>
<br>
[ 809.057] (II) GLX: Initialized DRI2 GL provider for screen 0<br>
<br>
but never displays any graphics or proceeds any farther.<br>
<br>
Is there a recommended X-server version this version of xf86-video-intel<br>
is known to work with ?