Re: segfaults, working version?
Posted by
Michael Bien on
Jun 21, 2010; 3:12pm
URL: https://forum.jogamp.org/Re-segfaults-working-version-tp911744.html
Hi Michael :)
comments inline...
On 06/21/2010 02:19 PM, notzed [via jogamp] wrote:
All,
I was moving some stuff to a different machine and downloaded a
different jogl/etc than last time because I can't remember where I got
the other one (and that was x64 so I couldn't use it) ... Anyway, it
has the nicer object based api, so I converted the minimal code I have
over to use it.
But .. it just crashes pretty consistently when executing some simple
kernels with "Java Result 139".
could you provide a testcase so I could try to reproduce the crashes?
Small as possible so we can add it to the unit tests... would be cool.
if you are using JOGL:
please call GLProfile.initSingleton() before doing any UI work. This
changed recently to enable some threading optimizations. We try to get
rid of this workaround somehow.
And even when it doesn't, odd things happen like data seemingly not
making it to the buffers by the time I use them - I converted a
bastardised version of the 'simplemandelbrot' demo I found at http://www.jocl.org/samples/samples.html to
the
new api and 9 times out of 10 I get a blank result, and at best a
few inconsistent pixels around the mandelbrot curve show up (but that
indicates the kernel is at least executing).
looks like a missing queue.finish() or queue.readFoo(...,
blockingread=true,...); at the end of the computation. But difficult to
tell without taking a look at the code... (this could even cause the
segfaults above).
I believe all callbacks were disabled in this build, so please don't
use them for now if possible.
I'm using the one from here: http://jogamp.org/deployment/autobuilds/jocl-2010-06-16_12-21-31/,
with
jogl-2.0-pre-20100616-linux-i586.zip on linux x86, with the ati
stream sdk 2.1, and still just using the cpu device so far. I've tried
the sun jdk 1.6.0_20 as well as an older openjdk.
I guess i'm asking - is this stuff at a stage it is expected to be
usable and i'm simply stuffing things up (the 'hellojocl' demo works),
is it premature to be playing with it, and/or is there a version I
should be using and is known to work ok?
we have several junit tests covering a big part of the OpenCL api which
are run basically after each commit on at least 5 machines. The CL core
binding looks stable so far.
There is also a linux related driver bug worth mentioning. For a
workaround, start your program from console and enable signal chaining
with:
export LD_PRELOAD=/usr/lib/jvm/java-6-sun/jre/lib/amd64/libjsig.so
The bug was only reproducible with NV drivers so far (which is fixed in
the upcoming driver release) but it could happen on AMD too...
(in short: some drivers replace mandatory JVM signal handlers which
leads to crashes and very unstable behavior esp in GL-CL interop. apps.)
Regards,
Michael
hope that helps,
Regareds,
Michael Bien