octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #53733] Panic/segfault when calling Java metho


From: Adrian
Subject: [Octave-bug-tracker] [bug #53733] Panic/segfault when calling Java method after forge:im[read|write]
Date: Fri, 27 Apr 2018 16:21:32 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0

Follow-up Comment #29, bug #53733 (project octave):

I tested several combinations of octave and GNU/Linux kernel versions.
The TLDR; of this comment is that 4.0.3 runs the test fine on kernels
4.9 and 4.15, whereas 4.2.2 produces a segment violation error on all
tested kernels (4.9, 4.14 and 4.15). Combined with the previous
comment #28 this really points to a specific octave bug.

I ran

gdb --args octave --no-gui --norc

then typed 'run' to launch octave

then pasted line by line:


javaaddpath(".")
imwrite(zeros(1000), "foo.png");
graph = javaObject("Baz");
graph.addNodes(1:1000000);


----

_Results_

*octave 4.0.3-3*

GNU/Linux kernel 4.9.0-6-amd64 (Debian 4.9.82-1+deb9u3 (2018-03-02))
libc 2.24
GNU gdb (Debian 7.12-6) 7.12.0.20161007-git

GNU/Linux kernel 4.15.0-3-amd64 (Debian 4.15.17-1 (2018-04-19))
libc 2.27
GNU gdb (Debian 7.12-6+b1) 7.12.0.20161007-git

No error/no segfault under gdb. Only error is from gdb openjdk plugin:


>> javaaddpath(".")
Installing openjdk unwinder
Traceback (most recent call last):
  File
"/usr/share/gdb/auto-load/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/libjvm.so-gdb.py",
line 52, in <module>
    class Types(object):
  File
"/usr/share/gdb/auto-load/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/libjvm.so-gdb.py",
line 66, in Types
    nmethodp_t = gdb.lookup_type('nmethod').pointer()
gdb.error: No type named nmethod.


The other instruction execute fine.

----

*octave 4.2.2*

GNU/Linux kernel 4.9.0-6-amd64 (Debian 4.9.82-1+deb9u3 (2018-03-02))
libc 2.24
GNU gdb (Debian 7.12-6) 7.12.0.20161007-git

under gdb:


octave:1> javaaddpath(".")
error: javaMethod: /usr/lib/jvm/java-9-openjdk-amd64/lib/server/libjvm.so:
failed to load: /usr/lib/jvm/java-9-openjdk-amd64/lib/server/libjvm.so: cannot
open shared object file: No such file or directory
error: called from
    javaaddpath at line 52 column 13


=> I guess this reflects a dependency problem in Debian:
octave 4.2.2 should depend on openjdk-9

once openjdk-9 is installed the 'javaaddpath(".")' instruction indeed passes
without error. A segfault is produced by the last instruction
'graph.addNodes(1:1000000);'. Full log:


nyx:~/tmp/crashtest> gdb --args octave --no-gui --norc
GNU gdb (Debian 7.12-6) 7.12.0.20161007-git
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from octave...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/octave --no-gui --norc
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
process 9112 is executing new program:
/usr/lib/x86_64-linux-gnu/octave/4.2.2/exec/x86_64-pc-linux-gnu/octave-gui
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffdde4f700 (LWP 9116)]
[New Thread 0x7fffdd64e700 (LWP 9117)]
[New Thread 0x7fffd8e4d700 (LWP 9118)]
[New Thread 0x7fffd864c700 (LWP 9119)]
[New Thread 0x7fffd3e4b700 (LWP 9120)]
[New Thread 0x7fffd364a700 (LWP 9121)]
[New Thread 0x7fffcee49700 (LWP 9122)]
[New Thread 0x7fffcc648700 (LWP 9123)]
[New Thread 0x7fffc9e47700 (LWP 9124)]
[New Thread 0x7fffc9646700 (LWP 9125)]
[New Thread 0x7fffc4e45700 (LWP 9126)]
[New Thread 0x7fffc2644700 (LWP 9127)]
[New Thread 0x7fffbfe43700 (LWP 9128)]
[New Thread 0x7fffbd642700 (LWP 9129)]
[New Thread 0x7fffbae41700 (LWP 9130)]
[New Thread 0x7fffb2cd5700 (LWP 9131)]
[New Thread 0x7fffb1ead700 (LWP 9132)]
[New Thread 0x7fffb16ac700 (LWP 9133)]
GNU Octave, version 4.2.2
Copyright (C) 2018 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  For details, type 'warranty'.

Octave was configured for "x86_64-pc-linux-gnu".

Additional information about Octave is available at http://www.octave.org.

Please contribute if you find this software useful.
For more information, visit http://www.octave.org/get-involved.html

Read http://www.octave.org/bugs.html to learn how to submit bug reports.
For information about changes from previous versions, type 'news'.
top - 22:09:44 up 10:13,  5 users,  load average: 0.11, 0.14, 0.06
Tasks: 269 total,   1 running, 267 sleeping,   0 stopped,   0 zombie

octave:1> javaaddpath(".")
[New Thread 0x7fffb01c0700 (LWP 9134)]
[New Thread 0x7fff8a7ea700 (LWP 9135)]
[New Thread 0x7fff8a6e8700 (LWP 9136)]
[New Thread 0x7fff8a5e6700 (LWP 9137)]
[New Thread 0x7fff8a4e4700 (LWP 9138)]
[New Thread 0x7fff8a3e2700 (LWP 9139)]
[New Thread 0x7fff8a2e0700 (LWP 9140)]
[New Thread 0x7fff8a1de700 (LWP 9141)]
[New Thread 0x7fff8a0dc700 (LWP 9142)]
[New Thread 0x7fff89fda700 (LWP 9143)]
[New Thread 0x7fff89ed8700 (LWP 9144)]
[New Thread 0x7fff89dd6700 (LWP 9145)]
[New Thread 0x7fff89cd4700 (LWP 9146)]
[New Thread 0x7fff88ec5700 (LWP 9147)]
[New Thread 0x7fff88dc3700 (LWP 9148)]
[New Thread 0x7fff88cc1700 (LWP 9149)]
[New Thread 0x7fff88bbf700 (LWP 9150)]
[New Thread 0x7fff88abd700 (LWP 9151)]
[New Thread 0x7fff889bb700 (LWP 9152)]
[New Thread 0x7fff888b9700 (LWP 9153)]
[New Thread 0x7fff887b7700 (LWP 9154)]
[New Thread 0x7fff886b5700 (LWP 9155)]
[New Thread 0x7fff885b3700 (LWP 9156)]
[New Thread 0x7fff884b1700 (LWP 9157)]
[New Thread 0x7fff883af700 (LWP 9158)]
[New Thread 0x7fff882ad700 (LWP 9159)]
[New Thread 0x7fff881ab700 (LWP 9160)]
[New Thread 0x7fff15e57700 (LWP 9161)]
[New Thread 0x7fff15d55700 (LWP 9162)]
[New Thread 0x7fff15c53700 (LWP 9163)]
[New Thread 0x7fff15b51700 (LWP 9164)]
[New Thread 0x7fff144cc700 (LWP 9165)]
[New Thread 0x7fff143ca700 (LWP 9166)]
[New Thread 0x7fff142c9700 (LWP 9167)]
[New Thread 0x7fff141c8700 (LWP 9168)]
[New Thread 0x7fff05fff700 (LWP 9169)]
[New Thread 0x7fff05efe700 (LWP 9170)]
[New Thread 0x7fff05dfd700 (LWP 9171)]
[New Thread 0x7fff05cfc700 (LWP 9172)]
[New Thread 0x7fff05bfb700 (LWP 9173)]
[New Thread 0x7fff05afa700 (LWP 9174)]
[New Thread 0x7fff059f9700 (LWP 9175)]
[New Thread 0x7fff058f8700 (LWP 9176)]
[New Thread 0x7fff057f7700 (LWP 9177)]
[New Thread 0x7fff056f6700 (LWP 9178)]
[New Thread 0x7fff055f5700 (LWP 9179)]
[New Thread 0x7fff054f4700 (LWP 9180)]
[New Thread 0x7fff053f3700 (LWP 9181)]
[New Thread 0x7fff04ec8700 (LWP 9182)]
[New Thread 0x7fff04dc7700 (LWP 9183)]
[New Thread 0x7fff04cc6700 (LWP 9184)]
octave:2> imwrite(zeros(1000), "foo.png");
[New Thread 0x7ffeb3675700 (LWP 9185)]
[New Thread 0x7ffeb2e74700 (LWP 9186)]
[New Thread 0x7ffeb2673700 (LWP 9187)]
[New Thread 0x7ffeb1e72700 (LWP 9188)]
[New Thread 0x7ffeb1671700 (LWP 9189)]
[New Thread 0x7ffeb0e70700 (LWP 9190)]
[New Thread 0x7ffeabfff700 (LWP 9191)]
[New Thread 0x7ffeab7fe700 (LWP 9192)]
[New Thread 0x7ffeaaffd700 (LWP 9193)]
[New Thread 0x7ffeaa7fc700 (LWP 9194)]
[New Thread 0x7ffea9ffb700 (LWP 9195)]
[New Thread 0x7ffea97fa700 (LWP 9196)]
[New Thread 0x7ffea8ff9700 (LWP 9197)]
[New Thread 0x7ffea87f8700 (LWP 9198)]
[New Thread 0x7ffea7ff7700 (LWP 9199)]
octave:3> graph = javaObject("Baz");
octave:4> graph.addNodes(1:1000000);

Thread 18 "QThread" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffb1ead700 (LWP 9132)]
0x00007fff923936da in ?? ()
(gdb) 


This being the stock octave from Debian without symbols, the backtrace is
useless.

p.s.

The 4.0.9 kernel was a fresh Debian stretch/stable install, where octave is at
4.0.3. Octave 4.2.2 and openjdk-9 where then added by adding the
buster/testing sources to apt.

Conversely, the 4.14/4.15 kernel was a testing system with octave at 4.2.2,
then downgraded to 4.0.3 to test this combination also.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?53733>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]