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: Mon, 30 Apr 2018 19:20:54 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0

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

All the following is on a box with an Intel Core i5-2500K CPU, on which under
gdb the 'javaaddpath (".")' instruction terminates the octave process:

octave:1> javaaddpath (".")

Thread 8 "QThread" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffc6c85700 (LWP 23040)]
0x00007fff97a2a4f3 in ?? ()
(gdb)


I can confirm that creating a .gdbinit containing "handle SIGSEGV nostop
print
pass" makes octave survive the first SIGSEGV, but line 4 is still
fatal with the same signal:


> gdb --args octave --norc --no-gui
GNU gdb (Debian 7.12-6+b1) 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) javaaddpath (".")
Undefined command: "javaaddpath".  Try "help".
(gdb) run
Starting program: /usr/bin/octave --norc --no-gui
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
process 22977 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 0x7fffdf465700 (LWP 22981)]
[New Thread 0x7fffdec64700 (LWP 22982)]
[New Thread 0x7fffda463700 (LWP 22983)]
[New Thread 0x7fffd1edc700 (LWP 22984)]
[New Thread 0x7fffc7c87700 (LWP 22985)]
[New Thread 0x7fffc7486700 (LWP 22986)]
[New Thread 0x7fffc6c85700 (LWP 22987)]
[New Thread 0x7fffc6484700 (LWP 22988)]
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'.

octave:1> javaaddpath (".")

Thread 8 "QThread" received signal SIGSEGV, Segmentation fault.
[New Thread 0x7fffb7d0e700 (LWP 22989)]
[New Thread 0x7fffb7c0c700 (LWP 22990)]
[New Thread 0x7fffb7b0a700 (LWP 22991)]
[New Thread 0x7fffb7a08700 (LWP 22992)]
[New Thread 0x7fffb7906700 (LWP 22993)]
[New Thread 0x7fffb7804700 (LWP 22994)]
[New Thread 0x7fffb7702700 (LWP 22995)]
[New Thread 0x7fffb7600700 (LWP 22996)]
[New Thread 0x7fffb74fe700 (LWP 22997)]
[New Thread 0x7fffb53d6700 (LWP 22998)]
[New Thread 0x7fffb52d4700 (LWP 22999)]
[New Thread 0x7fffb49d2700 (LWP 23000)]
[New Thread 0x7fffb48d0700 (LWP 23001)]
[New Thread 0x7fffb47cf700 (LWP 23002)]
[New Thread 0x7fffb46ce700 (LWP 23003)]
[New Thread 0x7fffb45cd700 (LWP 23004)]
[New Thread 0x7fffb44cc700 (LWP 23005)]
[New Thread 0x7fffb43cb700 (LWP 23006)]
[New Thread 0x7fffb42ca700 (LWP 23007)]
[New Thread 0x7fffb41c9700 (LWP 23008)]
[New Thread 0x7fff955ff700 (LWP 23009)]
[New Thread 0x7fff954fe700 (LWP 23010)]
octave:2> fmt = imformats ();
octave:3> graph = javaObject ("Baz");
octave:4> graph.addNodes (1:1e8);

Thread 8 "QThread" received signal SIGSEGV, Segmentation fault.
panic: Segmentation fault -- stopping myself...
attempting to save variables to 'octave-workspace'...
warning: save: unable to save java objects, skipping
save to 'octave-workspace' complete

Thread 8 "QThread" received signal SIGSEGV, Segmentation fault.
[Thread 0x7fff954fe700 (LWP 23010) exited]
[Thread 0x7fff955ff700 (LWP 23009) exited]
[Thread 0x7fffb41c9700 (LWP 23008) exited]
[Thread 0x7fffb42ca700 (LWP 23007) exited]
[Thread 0x7fffb43cb700 (LWP 23006) exited]
[Thread 0x7fffb44cc700 (LWP 23005) exited]
[Thread 0x7fffb45cd700 (LWP 23004) exited]
[Thread 0x7fffb46ce700 (LWP 23003) exited]
[Thread 0x7fffb47cf700 (LWP 23002) exited]
[Thread 0x7fffb48d0700 (LWP 23001) exited]
[Thread 0x7fffb49d2700 (LWP 23000) exited]
[Thread 0x7fffb53d6700 (LWP 22998) exited]
[Thread 0x7fffb74fe700 (LWP 22997) exited]
[Thread 0x7fffb7600700 (LWP 22996) exited]
[Thread 0x7fffb7702700 (LWP 22995) exited]
[Thread 0x7fffb7804700 (LWP 22994) exited]
[Thread 0x7fffb7906700 (LWP 22993) exited]
[Thread 0x7fffb7a08700 (LWP 22992) exited]
[Thread 0x7fffb7b0a700 (LWP 22991) exited]
[Thread 0x7fffb7c0c700 (LWP 22990) exited]
[Thread 0x7fffb7d0e700 (LWP 22989) exited]
[Thread 0x7fffc6484700 (LWP 22988) exited]
[Thread 0x7fffc6c85700 (LWP 22987) exited]
[Thread 0x7fffc7486700 (LWP 22986) exited]
[Thread 0x7fffc7c87700 (LWP 22985) exited]
[Thread 0x7fffd1edc700 (LWP 22984) exited]
[Thread 0x7fffda463700 (LWP 22983) exited]
[Thread 0x7fffdec64700 (LWP 22982) exited]
[Thread 0x7fffdf465700 (LWP 22981) exited]
[Thread 0x7ffff7f9b940 (LWP 22977) exited]

Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
(gdb)


For completeness, outside gdb the script from comment #58 always
produces a segfault in line 4, whether with the .gdbinit "handle
SIGSEGV nostop print pass" configuration or ot, and whether run via
"octave --norc --no-gui comment58.m" or "octave-cli --norc
comment58.m":

panic: Segmentation fault -- stopping myself...
attempting to save variables to 'octave-workspace'...
warning: save: unable to save java objects, skipping
warning: called from
    comment58 at line 4 column 1
save to 'octave-workspace' complete


A modified script changing the argument size along the lines of
what Dmitri did, namely:

javaaddpath (".")
fmt = imformats ();
graph = javaObject ("Baz");
for k=1:10
  N=10^k
  graph.addNodes (1:N);
endfor


* outside gdb either segfaults or freezes (CPU load->100%) for k=5 / N=1e5,
* inside gdb, with "handle SIGSEGV nostop print pass" in .gdbinit (otherwise
as usual segfault at first line), shows a curious behaviour:


> gdb --args octave --no-gui --norc comment58inc.m
GNU gdb (Debian 7.12-6+b1) 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 comment58inc.m
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
process 23356 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 0x7fffdf465700 (LWP 23360)]
[New Thread 0x7fffdcc64700 (LWP 23361)]
[New Thread 0x7fffdc463700 (LWP 23362)]
[New Thread 0x7fffd1edc700 (LWP 23363)]
[New Thread 0x7fffc7c87700 (LWP 23364)]
[New Thread 0x7fffc7486700 (LWP 23365)]
[New Thread 0x7fffc6c85700 (LWP 23366)]
[New Thread 0x7fffc6484700 (LWP 23367)]

Thread 8 "QThread" received signal SIGSEGV, Segmentation fault.
[New Thread 0x7fffb7d0e700 (LWP 23368)]
[New Thread 0x7fffb7c0c700 (LWP 23369)]
[New Thread 0x7fffb7b0a700 (LWP 23370)]
[New Thread 0x7fffb7a08700 (LWP 23371)]
[New Thread 0x7fffb7906700 (LWP 23372)]
[New Thread 0x7fffb7804700 (LWP 23373)]
[New Thread 0x7fffb7702700 (LWP 23374)]
[New Thread 0x7fffb7600700 (LWP 23375)]
[New Thread 0x7fffb74fe700 (LWP 23376)]
[New Thread 0x7fffb53d6700 (LWP 23377)]
[New Thread 0x7fffb52d4700 (LWP 23378)]
[New Thread 0x7fffb49d2700 (LWP 23379)]
[New Thread 0x7fffb48d0700 (LWP 23380)]
[New Thread 0x7fffb47cf700 (LWP 23381)]
[New Thread 0x7fffb46ce700 (LWP 23382)]
[New Thread 0x7fffb45cd700 (LWP 23383)]
[New Thread 0x7fffb44cc700 (LWP 23384)]
[New Thread 0x7fffb43cb700 (LWP 23385)]
[New Thread 0x7fffb42ca700 (LWP 23386)]
[New Thread 0x7fffb41c9700 (LWP 23387)]
[New Thread 0x7fff955ff700 (LWP 23388)]
[New Thread 0x7fff954fe700 (LWP 23389)]
N =  10
N =  100
N =  1000
N =  10000
N =  100000

Thread 8 "QThread" received signal SIGSEGV, Segmentation fault.

Thread 8 "QThread" received signal SIGSEGV, Segmentation fault.

Thread 8 "QThread" received signal SIGSEGV, Segmentation fault.

Thread 8 "QThread" received signal SIGSEGV, Segmentation fault.

Thread 8 "QThread" received signal SIGSEGV, Segmentation fault.

Thread 8 "QThread" received signal SIGSEGV, Segmentation fault.

Thread 8 "QThread" received signal SIGSEGV, Segmentation fault.

Thread 8 "QThread" received signal SIGSEGV, Segmentation fault.

Thread 8 "QThread" received signal SIGSEGV, Segmentation fault.

Thread 8 "QThread" received signal SIGSEGV, Segmentation fault.

Thread 8 "QThread" received signal SIGSEGV, Segmentation fault.

Thread 8 "QThread" received signal SIGSEGV, Segmentation fault.

Thread 8 "QThread" received signal SIGSEGV, Segmentation fault.

Thread 8 "QThread" received signal SIGSEGV, Segmentation fault.

Thread 8 "QThread" received signal SIGSEGV, Segmentation fault.

Thread 8 "QThread" received signal SIGSEGV, Segmentation fault.

Thread 8 "QThread" received signal SIGSEGV, Segmentation fault.

Thread 8 "QThread" received signal SIGSEGV, Segmentation fault.

Thread 8 "QThread" received signal SIGSEGV, Segmentation fault.

Thread 8 "QThread" received signal SIGSEGV, Segmentation fault.

Thread 8 "QThread" received signal SIGSEGV, Segmentation fault.

Thread 8 "QThread" received signal SIGSEGV, Segmentation fault.

Thread 8 "QThread" received signal SIGSEGV, Segmentation fault.

Thread 8 "QThread" received signal SIGSEGV, Segmentation fault.

Thread 8 "QThread" received signal SIGSEGV, Segmentation fault.

Thread 8 "QThread" received signal SIGSEGV, Segmentation fault.

Thread 8 "QThread" received signal SIGSEGV, Segmentation fault.

Thread 8 "QThread" received signal SIGSEGV, Segmentation fault.

Thread 8 "QThread" received signal SIGSEGV, Segmentation fault.

Thread 8 "QThread" received signal SIGSEGV, Segmentation fault.

Thread 8 "QThread" received signal SIGSEGV, Segmentation fault.

Thread 8 "QThread" received signal SIGSEGV, Segmentation fault.

Thread 8 "QThread" received signal SIGSEGV, Segmentation fault.

Thread 8 "QThread" received signal SIGSEGV, Segmentation fault.

Thread 8 "QThread" received signal SIGSEGV, Segmentation fault.

Thread 8 "QThread" received signal SIGSEGV, Segmentation fault.

---Type <return> to continue, or q <return> to quit---


The last line is the pager offering me as many pages of segfault
messages as I had patience scrolling through, and when I quit it
typing 'q <return>', I return to the gdb prompt.

So according to Rik's explanation a large number of SIGSEGV are just caught
inside the JVM for overflow detection. But what causes one signal to be
eventually passed on to octave (or so it seems) ?


    _______________________________________________________

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]