glshim


If you set up opath you shouldn't need NOSPAWN.

That said, I changed the value of NOSPAWN. It now needs to be a valid file system path (a file will be created by that name), which you also pass into libgl_remote
 
Without the NOSPAWN I get nothing more after
"libGL: built on Mar 15 2016 10:06:02"
and nothing happens.

If I give a valid file system path to the NOSPAWN parameter, I get the same "connect: Connection refused Aborted" message

(Still with 0.42 on Pandora with Exagear)
 
What was your order of running NOSPAWN/remote? Remember Exagear runs in a chroot so you need to use a path inside there for NOSPAWN and the absolute path for libgl_remote.
 
Starting the remote first definitely helped :)
Now glxgears displays a window but it stays empty and the remote gives this output:
libGL: built on Mar 15 2016 21:34:58
libGL:loaded: libGLES_CM.so
libGL:loaded: libEGL.so
WSEGL_InitialiseDisplay: DRI2OpenConnection failed
Unable to initialize EGL display.
ERROR: EGL Error detected: EGL_NOT_INITIALIZED (0x3001)
ERROR: EGL Error detected: EGL_NOT_INITIALIZED (0x3001)
 
Yay! It's working with default drivers! Thanks a lot lunixbochs and Ptitseb!
Now that I've got glxgears working, is it possible to get glshim to work with wine? Right now when I try I get this:
err:wgl:has_opengl glAccum not found in libGL, disabling OpenGL.
 
I'm on break from fixing WINE as my last effort on that went toward completely rebuilding remote rendering instead :)

Someone (probably me) just needs to sit down with glshim and WINE and tweak glshim until it passes all the weird initialization checks in WINE.
 
Ah... looking at my gog library, I don't have many OpenGL games running on Linux that don't already have a port. I'll need to check on my steam account if there are any Linux games that can realistically run with Exagear...
 
I'm surprised this commit fixed that, but that's great (but this commit, I think, broken the icon in blender, so I'll have to work on this).

About the option, there is very little options by default. I can add some, but for now, there is mostly just "-O3", so no fpu=neon and all are compiled.
 
About the option, there is very little options by default. I can add some, but for now, there is mostly just "-O3", so no fpu=neon and all are compiled.
sorry i meant definitions like -DUSE_DRAWTEX not options...i should define this to have working on Pandora ?
 
@ptitSeb Remember the time I tried running the Chromium browser under glshim and some people could swear it was running faster? Well, it seems glshim has become much better, exposing more features, and that has made Chromium visibly slower in the same experiment. Probably not worth investigating, so just FYI.
 
@ptitSeb Remember the time I tried running the Chromium browser under glshim and some people could swear it was running faster? Well, it seems glshim has become much better, exposing more features, and that has made Chromium visibly slower in the same experiment. Probably not worth investigating, so just FYI.
Ah, that's strange.
I need to work on some other feature next, namely PBuffer and PixBuffer, and the latest, I think, is use by Chromium, so it may again change things. (no ETA for those features yet, as I haven't started working on them).
 
Or rather, that was the case last time I tried. Presently chromium hangs on start-up doing:

Code:
glX stub: glXCreatePbuffer
glX stub: glXDestroyPbuffer
 
Hi ptitSeb,
I have built your glshim library (master branch, simply "cmake .; make GL") on my Banana Pi pro under armbian linux (debian jessie with kernel 3.4.112).
It works fine with GLU from libglu1-mesa, but every program I try except glxgears segfaults at the end. For example, gl_smoke benchmark outputs:
Code:
user@bananapi:/usr/lib/globs/benchmarks/GL_smoke$ ./gl_smoke
LIBGL: Initialising glshim
libGL:loaded: libGLESv1_CM.so
libGL:loaded: libEGL.so
libGL: built on Jun 12 2016 06:12:01
LIBGL: Current folder is:/usr/lib/globs/benchmarks/GL_smoke
libGL: warning, gles_glBlendFuncSeparate is NULL
fps = 33.4
Segmentation fault
And here's the strace output
Code:
socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC, 0) = 3
connect(3, {sa_family=AF_LOCAL, sun_path=@"/tmp/.X11-unix/X0"}, 20) = 0
[...]
shutdown(3, SHUT_RDWR)  = 0
close(3)  = 0
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x25} ---
rt_sigaction(SIGSEGV, {SIG_DFL, [SEGV], SA_RESTORER|SA_RESTART, 0xb6c5cae1}, {0xb6f1ecf5, [], SA_RESTORER, 0xb6c5cae1}, 8) = 0
rt_sigaction(SIGINT, NULL, {SIG_DFL, [], SA_RESTORER, 0xb6c5cae1}, 8) = 0
rt_sigaction(SIGTERM, NULL, {SIG_DFL, [], SA_RESTORER, 0xb6c5cae1}, 8) = 0
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x4d0} ---
+++ killed by SIGSEGV +++
In every other program I've tried, the crash always happens at the end, when the connection to the X servers is closed. I'll try to find the function where this happens and debug (perhaps next week), but perhaps you have some hints on this?

PS. the issue is reproducible with lunixbochs' version as well
[doublepost=1465706807,1465706426][/doublepost]Oh, and I have another question (but I'm being plain lazy here, so feel free not to answer): is there any progress regarding OpenGL under exagear? Does it work? Is there an important post I have missed which I should read?

I'm asking because I see you're discussing wine stuff here.
 
@dimag0g : I haven't see this behavor on my side. I test glshim on pandora and odroid and I get no crash at the end. I'm interested in a Backtrace at the segfault.

About OpenG / exagear, you have to ask @lunixbochs. I don't work on that (and I don't own exagear).
 
Unfortunately I couldn't get the trace which goes all the way to the libGL code:
Code:
user@bananapi:~$ gdb /usr/lib/globs/benchmarks/GL_pointz/gl_pointz
(gdb) r
Starting program: /usr/lib/globs/benchmarks/GL_pointz/gl_pointz
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
LIBGL: Initialising glshim
libGL:loaded: libGLESv1_CM.so
libGL:loaded: libEGL.so
libGL: built on Jun 12 2016 06:12:01
LIBGL: Current folder is:/home/user
[New Thread 0xb5e493f0 (LWP 13497)]
[New Thread 0xb56493f0 (LWP 13498)]
[New Thread 0xb4e493f0 (LWP 13499)]
fps = 144.8

Program received signal SIGSEGV, Segmentation fault.
0xb69ae7ba in __GI___pthread_mutex_lock (mutex=0x0) at pthread_mutex_lock.c:66
66    pthread_mutex_lock.c: No such file or directory.
(gdb) bt
#0  0xb69ae7ba in __GI___pthread_mutex_lock (mutex=0x0)
    at pthread_mutex_lock.c:66
#1  0xb6ddc278 in pthread_mutex_lock (mutex=<optimized out>) at forward.c:192
#2  0xb6b73494 in XrmDestroyDatabase (db=0x2e090) at ../../src/Xrm.c:2653
#3  0xb6b6378a in _XFreeDisplayStructure (dpy=dpy@entry=0x136a0)
    at ../../src/OpenDis.c:618
#4  0xb6b57eb8 in XCloseDisplay (dpy=0x136a0) at ../../src/ClDisplay.c:72
#5  0xb6f73590 in ?? () from /usr/lib/arm-linux-gnueabihf/libSDL-1.2.so.0
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

running with valgrind suggests there are some problems in the proprietary libMali driver, for which there is no source:
Code:
user@bananapi:~$ valgrind --leak-check=yes --track-origins=yes /usr/lib/globs/benchmarks/GL_pointz/gl_pointz
==13515== Memcheck, a memory error detector
==13515== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==13515== Using Valgrind-3.10.0 and LibVEX; rerun with -h for copyright info
==13515== Command: ./gl_pointz
==13515==
LIBGL: Initialising glshim
libGL:loaded: libGLESv1_CM.so
libGL:loaded: libEGL.so
libGL: built on Jun 12 2016 06:12:01
LIBGL: Current folder is:/home/user
==13515== Conditional jump or move depends on uninitialised value(s)
==13515==    at 0x5A89406: ??? (in /usr/lib/mali/libMali.so)
==13515==  Uninitialised value was created by a stack allocation
==13515==    at 0x5A93130: ??? (in /usr/lib/mali/libMali.so)
==13515==
==13515== Conditional jump or move depends on uninitialised value(s)
==13515==    at 0x4890C94: ??? (in /usr/lib/arm-linux-gnueabihf/libSDL-1.2.so.0.11.4)
==13515==  Uninitialised value was created by a heap allocation
==13515==    at 0x483E394: malloc (in /usr/lib/valgrind/vgpreload_memcheck-arm-linux.so)
==13515==
==13515== Conditional jump or move depends on uninitialised value(s)
==13515==    at 0x5A86CEE: ??? (in /usr/lib/mali/libMali.so)
==13515==  Uninitialised value was created by a stack allocation
==13515==    at 0x5A93130: ??? (in /usr/lib/mali/libMali.so)
==13515==
fps = 1.4
==13515== Use of uninitialised value of size 4
==13515==    at 0x4E437BA: pthread_mutex_lock (pthread_mutex_lock.c:66)
==13515==    by 0x4A76277: pthread_mutex_lock (forward.c:192)
==13515==    by 0x4BFE493: XrmDestroyDatabase (Xrm.c:2653)
==13515==    by 0x4BEE789: _XFreeDisplayStructure (OpenDis.c:618)
==13515==    by 0x4BE2EB7: XCloseDisplay (ClDisplay.c:72)
==13515==    by 0x489458F: ??? (in /usr/lib/arm-linux-gnueabihf/libSDL-1.2.so.0.11.4)
==13515==  Uninitialised value was created by a heap allocation
==13515==    at 0x483E394: malloc (in /usr/lib/valgrind/vgpreload_memcheck-arm-linux.so)
==13515==
==13515== Invalid read of size 4
==13515==    at 0x4E437BA: pthread_mutex_lock (pthread_mutex_lock.c:66)
==13515==    by 0x4A76277: pthread_mutex_lock (forward.c:192)
==13515==    by 0x4BFE493: XrmDestroyDatabase (Xrm.c:2653)
==13515==    by 0x4BEE789: _XFreeDisplayStructure (OpenDis.c:618)
==13515==    by 0x4BE2EB7: XCloseDisplay (ClDisplay.c:72)
==13515==    by 0x489458F: ??? (in /usr/lib/arm-linux-gnueabihf/libSDL-1.2.so.0.11.4)
==13515==  Address 0xc is not stack'd, malloc'd or (recently) free'd
==13515==
==13515== Conditional jump or move depends on uninitialised value(s)
==13515==    at 0x49FDE52: signal (signal.c:36)
==13515==    by 0x4870CFD: ??? (in /usr/lib/arm-linux-gnueabihf/libSDL-1.2.so.0.11.4)
==13515==  Uninitialised value was created by a heap allocation
==13515==    at 0x483E394: malloc (in /usr/lib/valgrind/vgpreload_memcheck-arm-linux.so)
==13515==
==13515== Use of uninitialised value of size 4
==13515==    at 0x49FDE74: __sigismember (sigset.h:116)
==13515==    by 0x49FDE74: signal (signal.c:46)
==13515==    by 0x4870CFD: ??? (in /usr/lib/arm-linux-gnueabihf/libSDL-1.2.so.0.11.4)
==13515==  Uninitialised value was created by a heap allocation
==13515==    at 0x483E394: malloc (in /usr/lib/valgrind/vgpreload_memcheck-arm-linux.so)
==13515==
==13515== Use of uninitialised value of size 4
==13515==    at 0x49FDE7A: __sigaddset (sigset.h:117)
==13515==    by 0x49FDE7A: signal (signal.c:44)
==13515==    by 0x4870CFD: ??? (in /usr/lib/arm-linux-gnueabihf/libSDL-1.2.so.0.11.4)
==13515==  Uninitialised value was created by a heap allocation
==13515==    at 0x483E394: malloc (in /usr/lib/valgrind/vgpreload_memcheck-arm-linux.so)
==13515==
==13515== Conditional jump or move depends on uninitialised value(s)
==13515==    at 0x49FDFF6: sigaction (sigaction.c:37)
==13515==    by 0x49FDE93: signal (signal.c:47)
==13515==    by 0x4870CFD: ??? (in /usr/lib/arm-linux-gnueabihf/libSDL-1.2.so.0.11.4)
==13515==  Uninitialised value was created by a heap allocation
==13515==    at 0x483E394: malloc (in /usr/lib/valgrind/vgpreload_memcheck-arm-linux.so)
==13515==
==13515== Syscall param rt_sigaction(signum) contains uninitialised byte(s)
==13515==    at 0x49EF8E6: __libc_do_syscall (libc-do-syscall.S:44)
==13515==    by 0x49FDF81: __libc_sigaction (sigaction.c:80)
==13515==    by 0x49FDE93: signal (signal.c:47)
==13515==    by 0x4870CFD: ??? (in /usr/lib/arm-linux-gnueabihf/libSDL-1.2.so.0.11.4)
==13515==  Uninitialised value was created by a heap allocation
==13515==    at 0x483E394: malloc (in /usr/lib/valgrind/vgpreload_memcheck-arm-linux.so)
==13515==
==13515== Syscall param rt_sigaction(act->sa_mask) points to uninitialised byte(s)
==13515==    at 0x49EF8E6: __libc_do_syscall (libc-do-syscall.S:44)
==13515==    by 0x49FDF81: __libc_sigaction (sigaction.c:80)
==13515==    by 0x49FDE93: signal (signal.c:47)
==13515==    by 0x4870CFD: ??? (in /usr/lib/arm-linux-gnueabihf/libSDL-1.2.so.0.11.4)
==13515==  Address 0xbdc61494 is on thread 1's stack
==13515==  in frame #1, created by __libc_sigaction (sigaction.c:62)
==13515==  Uninitialised value was created by a heap allocation
==13515==    at 0x483E394: malloc (in /usr/lib/valgrind/vgpreload_memcheck-arm-linux.so)
==13515==
==13515== Invalid read of size 4
==13515==    at 0x4BF6466: XSync (Sync.c:42)
==13515==    by 0x4894483: ??? (in /usr/lib/arm-linux-gnueabihf/libSDL-1.2.so.0.11.4)
==13515==  Address 0x4d0 is not stack'd, malloc'd or (recently) free'd
==13515==
==13515==
==13515== Process terminating with default action of signal 11 (SIGSEGV)
==13515==  Access not within mapped region at address 0x4D0
==13515==    at 0x4BF6466: XSync (Sync.c:42)
==13515==    by 0x4894483: ??? (in /usr/lib/arm-linux-gnueabihf/libSDL-1.2.so.0.11.4)
==13515==  If you believe this happened as a result of a stack
==13515==  overflow in your program's main thread (unlikely but
==13515==  possible), you can try to increase the size of the
==13515==  main thread stack using the --main-stacksize= flag.
==13515==  The main thread stack size used in this run was 8388608.
==13515==
==13515== HEAP SUMMARY:
==13515==     in use at exit: 230,084 bytes in 772 blocks
==13515==   total heap usage: 15,740 allocs, 14,968 frees, 12,760,451 bytes allocated
==13515==
==13515== 116 (28 direct, 88 indirect) bytes in 1 blocks are definitely lost in loss record 2 of 10
==13515==    at 0x4840AA8: calloc (in /usr/lib/valgrind/vgpreload_memcheck-arm-linux.so)
==13515==
==13515== 137 bytes in 10 blocks are definitely lost in loss record 3 of 10
==13515==    at 0x483E394: malloc (in /usr/lib/valgrind/vgpreload_memcheck-arm-linux.so)
==13515==
==13515== 1,092 (76 direct, 1,016 indirect) bytes in 2 blocks are definitely lost in loss record 7 of 10
==13515==    at 0x4840CE8: realloc (in /usr/lib/valgrind/vgpreload_memcheck-arm-linux.so)
==13515==
==13515== 2,976 bytes in 29 blocks are possibly lost in loss record 8 of 10
==13515==    at 0x4840AA8: calloc (in /usr/lib/valgrind/vgpreload_memcheck-arm-linux.so)
==13515==
==13515== LEAK SUMMARY:
==13515==    definitely lost: 241 bytes in 13 blocks
==13515==    indirectly lost: 1,104 bytes in 39 blocks
==13515==      possibly lost: 2,976 bytes in 29 blocks
==13515==    still reachable: 225,763 bytes in 691 blocks
==13515==         suppressed: 0 bytes in 0 blocks
==13515== Reachable blocks (those to which a pointer was found) are not shown.
==13515== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==13515==
==13515== For counts of detected and suppressed errors, rerun with: -v
==13515== ERROR SUMMARY: 21 errors from 16 contexts (suppressed: 138 from 9)
Killed
 
Back
Top