bugGNU Octave - Bugs: bug #41652, Octave builds but crashes when...


bug #41652: Octave builds but crashes when trying to use gcj for java support

Submitter:  Mike Miller <mtmiller>
Submitted:  Fri 21 Feb 2014 02:01:41 AM UTC
Category:  Configuration and Build System Severity:  2 - Minor
Priority:  1 - Later Item Group:  Segfault, Bus Error, etc.
Status:  Wont Fix Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 3.8.0 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment (Rich Markup)

Comment Type & Canned Response:


Sat 01 Oct 2016 12:03:44 AM UTC, comment #3: 

Closing as won't fix because gcj has been removed from gcc upstream.

Mike Miller <mtmiller>
Project Administrator
Sat 22 Feb 2014 08:32:49 PM UTC, comment #2: 

I've been able to reproduce this with a couple different versions of gcj using our class loader, same result, so I've filed a bug with gcc upstream at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60309

Until that is fixed though, it might make sense to have some kind of a test in configure. This is a very specific case and probably not that important to most users, so I may not get around to working on such a test for a while.

Mike Miller <mtmiller>
Project Administrator
Fri 21 Feb 2014 04:03:19 AM UTC, comment #1: 

A simple call to JNI_CreateJavaVM does not crash when run with gcj. The thing that seems to be crashing gcj for me is the class loader option, -Djava.system.class.loader=... The call crashes no matter what class name is actually given to that option, whether it's "org.octave.OctClassLoader" or a nonexistent class "foo".

OpenJDK throws a ClassNotFoundException if the loader name can't be loaded and works correctly in the normal case. Gcj throws a SIGABRT for me whether the class name is valid or not. Tested with gcj 4.6 and 4.8, both crash the same way.

Should we bother trying to handle this very specific failure in configure or just report to gcc upstream and avoid compiling Octave with gcj for now? This has come up in the Debian packaging, where gcj is the default Java implementation for several architectures.

Mike Miller <mtmiller>
Project Administrator
Fri 21 Feb 2014 02:01:41 AM UTC, original submission:  

When building and testing Octave using gcj as the JRE, building succeeds but crashes at runtime or when running the test suite. On Debian x86-64,

$ ../configure JAVA_HOME=/usr/lib/jvm/java-gcj
$ make all
$ make check
  build-gcj/libinterp/octave-value/ov-class.cc-tst ............panic: Aborted -- stopping myself...
octave exited with signal 6

Under gdb, the backtrace shows the error is occurring inside of the JNI_CreateJavaVM function.

I wonder if something could be done in the configure script to try to initialize the JVM from a test program and try to catch this error there? I'll see if I can get the same crash to occur with a simple stub test program.

Mike Miller <mtmiller>
Project Administrator


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by rik5 (Updated the item)
  • -email is unavailable- added by mtmiller (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only project members can vote.





    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-10-01 mtmiller StatusPostponed Wont Fix
        Open/ClosedOpen Closed
    2015-02-02 rik5 Priority5 - Normal 1 - Later
    2014-02-22 mtmiller Severity3 - Normal 2 - Minor
        StatusNone Postponed

    Back to the top

    Powered by Savane 3.9