JOGL on ODROID-XU3 Lite

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

JOGL on ODROID-XU3 Lite

andreas_dr
Hallo,

i just have a fresh installation of Ubuntu 14.04 on a fresh ODROID-XU3 Lite.

I get the following error when starting my jogamp based game. This error is OpenGL relatated whereas my engine will use GLES2 which is available on this machine.

--
libGL error: MESA-LOADER: malformed or no PCI ID
libGL error: dlopen /usr/lib/arm-linux-gnueabihf/dri/exynos_dri.so failed (/usr/lib/arm-linux-gnueabihf/dri/exynos_dri.so: cannot open shared object file: No such file or directory)
libGL error: dlopen ${ORIGIN}/dri/exynos_dri.so failed (${ORIGIN}/dri/exynos_dri.so: cannot open shared object file: No such file or directory)
libGL error: dlopen /usr/lib/dri/exynos_dri.so failed (/usr/lib/dri/exynos_dri.so: cannot open shared object file: No such file or directory)
libGL error: unable to load driver: exynos_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: exynos
*** Error in `/usr/bin/java': free(): corrupted unsorted chunks: 0xa180e7f8 ***

Backtrace:
(gdb) bt
#0  __libc_do_syscall () at ../ports/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:44
#1  0xb6eb9f0e in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#2  0xb6ebc766 in __GI_abort () at abort.c:89
#3  0xb6ee0474 in __libc_message (do_abort=<optimized out>, fmt=0xb6f61904 "*** Error in `%s': %s: 0x%s ***\n")
    at ../sysdeps/posix/libc_fatal.c:175
#4  0xb6ee7022 in malloc_printerr (action=1, str=0xb6f61a9c "free(): corrupted unsorted chunks", ptr=<optimized out>) at malloc.c:4996
#5  0xb6ee7a48 in _int_free (av=<optimized out>, p=<optimized out>, have_lock=0) at malloc.c:3840
#6  0xa27429d6 in XFree () from /usr/lib/arm-linux-gnueabihf/libX11.so.6
#7  0xa1fac368 in Java_jogamp_opengl_x11_glx_GLX_dispatch_1glXChooseVisual ()
   from /tmp/jogamp_0000/file_cache/jln4091126271820588169/jln3781205514237873832/libjogl_desktop.so
#8  0xb42763fc in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Any ideas?

Thank you very much.

Best regards
Andreas
Reply | Threaded
Open this post in threaded view
|

Re: JOGL on ODROID-XU3 Lite

gouessej
Administrator
Hi

There is the same problem with xbmc under Ubuntu Linux 14.04 on Odroid:
http://forum.odroid.com/viewtopic.php?f=77&t=4652

Please try the suggestion above and let us know whether it solves your problem.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JOGL on ODROID-XU3 Lite

andreas_dr
Hallo,

thank you for your fast reply.

>Please try the suggestion above and let us know whether it solves your problem.
Which do you mean. There are a lot of somehow unordered suggestions.

I tried a 2 things. Non were working.

>Experience on upgrading Xubuntu 13.10 to 14.04
What I hat to do here did not match my machine software setup. Maybe the problems came by updating. I have had a clean 14.04.

>Using "ODROID Utility"
seemed best way for me. Unfortunatly this XU3 is not supported. I tried anyways. Now my setup is broken.

Maybe there is a better place to ask for help.

Best regards
Andreas
Reply | Threaded
Open this post in threaded view
|

Re: JOGL on ODROID-XU3 Lite

gouessej
Administrator
Hi

In my humble opinion, you shouldn't use this driver. I just claim that there is no problem with JOGL. Why not contacting the people on the forum I quoted? You should solve your OpenGL problem first and if something specific to JOGL goes wrong, you should come back here and maybe fill a bug report.

Edit.: OpenGL ES seems to work on this device with Ubuntu 14.04 according to the screen capture on the homepage.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JOGL on ODROID-XU3 Lite

andreas_dr
Hi,

Disabling glx module in XOrg fixes the problem! After adding the following to /etc/X11/xorg.conf GLES2 works with JOGL.

  Section "Module"
          Disable         "glx"
  EndSection

Thank you.

Best regards
Andreas
Reply | Threaded
Open this post in threaded view
|

Re: JOGL on ODROID-XU3 Lite

gouessej
Administrator
Thank you for the feedback, it might be useful for someone else :)
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JOGL on ODROID-XU3 Lite

Xerxes Rånby
In reply to this post by andreas_dr
andreas_dr wrote
Disabling glx module in XOrg fixes the problem! After adding the following to /etc/X11/xorg.conf GLES2 works with JOGL.

  Section "Module"
          Disable         "glx"
  EndSection

Thank you! adding Disable "glx" made GLES2 work with JOGL on the ODROID-C Rev 3 as well!
Reply | Threaded
Open this post in threaded view
|

Re: JOGL on ODROID-XU3 Lite

Xerxes Rånby
This post was updated on .
the reason why this fix work is that the ODROID system ships with two opengl drivers

the freesoftware mesa3d drivers installed in /media/familjen/trusty/usr/lib/arm-linux-gnueabihf/mesa /media/familjen/trusty/usr/lib/arm-linux-gnueabihf/mesa-egl
 
and the properitary ARM mali drivers in /media/familjen/trusty/usr/lib/arm-linux-gnueabihf/mali-egl

the mesa3d drivers do not yet have a working free software "lima" driver that supports the latest arm mali GPU's.

by disable glx you make jogamp skip probing for libGL (mesa3d) and instead it first try to initialize using libEGL and libGLESv2 and that  picks up the properitary mali driver.
Reply | Threaded
Open this post in threaded view
|

Re: JOGL on ODROID-XU3 Lite

Xerxes Rånby
This post was updated on .
In reply to this post by andreas_dr
By looking at your backtrace gives a hint that we may have a bug in jogl,
OR that mesa3d has corrupted the heap after the driver failed to initialize,
all we know is that we can see mismatch of malloc and free "a corrupt heap"
when we continue execution efter mesa3d failed to initialize.

I can reproduce this bug on a ODROID-C rev 3 and will check if we can safely detect that the driver has failed.

comments inline below:

andreas_dr wrote
libGL error: MESA-LOADER: malformed or no PCI ID   <----- this indicate that the mesa3d driver is initializing
...
libGL error: failed to load driver: exynos   <------ the mesa3d driver failed to initialize
*** Error in `/usr/bin/java': free(): corrupted unsorted chunks: 0xa180e7f8 ***   <----- this may be a bug on our side that we keep on probing the libGL despite that it failed to initialize. it can also be a corrupt heap caused by mesa3d cleanup.

Backtrace:
(gdb) bt
...
#4  0xb6ee7022 in malloc_printerr (action=1, str=0xb6f61a9c "free(): corrupted unsorted chunks", ptr=<optimized out>) at malloc.c:4996
#5  0xb6ee7a48 in _int_free (av=<optimized out>, p=<optimized out>, have_lock=0) at malloc.c:3840
#6  0xa27429d6 in XFree () from /usr/lib/arm-linux-gnueabihf/libX11.so.6
#7  0xa1fac368 in Java_jogamp_opengl_x11_glx_GLX_dispatch_1glXChooseVisual ()
   from /tmp/jogamp_0000/file_cache/jln4091126271820588169/jln3781205514237873832/libjogl_desktop.so
...
Any ideas?
On the ODROID-C Rev 3 we have a similar crash scenario, that the crash trigger directly after mesa3d libGL has failed to initialize the GPU. crashes seen in the JVM is also an indication of a corrupt heap.
libGL error: MESA-LOADER: malformed or no PCI ID
libGL error: dlopen /usr/lib/arm-linux-gnueabihf/dri/mali_drm_dri.so failed (/usr/lib/arm-linux-gnueabihf/dri/mali_drm_dri.so: cannot open shared object file: No such file or directory)
libGL error: dlopen ${ORIGIN}/dri/mali_drm_dri.so failed (${ORIGIN}/dri/mali_drm_dri.so: cannot open shared object file: No such file or directory)
libGL error: dlopen /usr/lib/dri/mali_drm_dri.so failed (/usr/lib/dri/mali_drm_dri.so: cannot open shared object file: No such file or directory)
libGL error: unable to load driver: mali_drm_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: mali_drm
# A fatal error has been detected by the Java Runtime Environment:
..
# V  [libjvm.so+0x343158]  Klass::search_secondary_supers(Klass*) const+0x10
...
#3  0xa4ccd36c in Java_jogamp_nativewindow_x11_X11Lib_XRenderFindVisualFormat1 ()
   from /tmp/jogamp_0000/file_cache/jln4489495869428337977/jln7893739557114247018/libnativewindow_x11.so


Reply | Threaded
Open this post in threaded view
|

Re: JOGL on ODROID-XU3 Lite

Xerxes Rånby
i have filed a bugreport of the reported issue
https://jogamp.org/bugzilla/show_bug.cgi?id=1166
Reply | Threaded
Open this post in threaded view
|

Re: JOGL on ODROID-XU3 Lite

Xerxes Rånby
This post was updated on .
I have identified what caused the heap corruption during GLX initialization on ARM 32 and created a patch for gluegen that you can try.
https://jogamp.org/bugzilla/show_bug.cgi?id=1166#c10

with the patch applied hardware acceleration is supported using OpenGL ES 1 & 2 using the mali driver and OpenGL 2 will be supported using software emulation using mesa3D, jogl will try use the most hardware accelerated driver available depending on the opengl profile your application requests.