On Mon, 2009-08-03 at 11:36 -0500, Daniel Spiewak wrote: > > Also the troubleshooting guide should describe what can be done if rjb > > once is messed up: one should remove and reinstall rjb with the correct > > JAVA_HOME env variable set. > > (An interesting observation: even if the troubleshooting guide explains > > what's the reason for segfaults both a colleage and I didn't get it > > really (or just didn't read it carefully enough) and didn't get what has > > to be done to fix the segfault.) > > > The segfault is essentially the processor's colorful way of saying "symbol > referencing error" (or NoSuchMethodException in Java-land). At least, it is > in this case. RJB was compiled against a header file for a library (the > JVM) which changed between compile-time and runtime. When this happens, > some code paths will be referencing library symbols which do not exist, or > which have different signatures. In either case, the usual result is a > segfault. Hehe, again a very good explanation :) But after one of your prior emails on this my colleague and I read the troubleshooting again and suddenly got it :)
>
> As discussed earlier, there is also a non-version-switch-related segfault
> which seems to occur in weird places. This is most likely a bug somewhere
> in RJB. The only way to track this down is to compile the RJB native code
> with debug symbols enabled. Then, run `gdb $RUBY_HOME/bin/ruby
> $BUILDR_HOME/_buildr` and enter the "run" command at the resulting prompt (I
> think it's "run" anyway, it's been a while). GDB will automatically stop
> exactly where the segfault will occur. You can use the "list" and "print"
> commands to dig around ("help" shows available options). These sorts of
> segfaults are usually more the equivalent of Java's NullPointerException,
> but not always. Watch out for 0-valued pointers or array indexes well out
> of bounds. Oh, if you want better tooling than GDB, you might be able to
> use Eclipse CDT's debugger to step through, but I've never done it that way.
Ok, thanx for this step by step guide, I'll tell my colleague what he
shall do when he's able to reproduce it with a simple example :)
>
> Bon chance!
On verra...
(that was google.translate('de', 'fr', 'man wird sehen')) :)
Cheers,
Martin
>
> Daniel
signature.asc
Description: This is a digitally signed message part
