bugGNU Octave - Bugs: bug #52061, Memory issue whenever Java JVM is...

 
 

bug #52061: Memory issue whenever Java JVM is used

Submitter:  Rik <rik5>
Submitted:  Tue 19 Sep 2017 06:36:00 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  Invalid / Not an Octave Bug Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Mon 09 Oct 2017 12:38:56 AM UTC, comment #19: 

I resurected some old (Core 2 duo) laptop and it also does NOT
crash. So it looks like the newish CPUs are causing the problem.

On i7 I compiled a minimal version

../configure JAVA_HOME=/usr/lib/jvm/java-9  CFLAGS="-ggdb3 -O0 -pipe" CXXFLAGS="-ggdb3 -O0 -pipe" FFLAGS="-ggdb3 -O0 -pipe" --enable-address-sanitizer-flags --without-qt  --without-fltk --without-opengl --without-osmesa --disable-docs

so I do not need top bother with LD_PRELOAD=libasan.so
(which seems to be changing things a little).
Then running under gdb I get:


octave:1> __java_init__

Program received signal SIGSEGV, Segmentation fault.
0x00007fffbbdcf4f3 in ?? ()
Missing separate debuginfos,
<...deleted...>
(gdb) bt
#0  0x00007fffbbdcf4f3 in ?? ()
#1  0x0000000000000246 in ?? ()
#2  0x00007fffbbdcf280 in ?? ()
#3  0x00007fffd5e8cee0 in Abstract_VM_Version::_vm_major_version ()
   from /usr/lib/jvm/java-9-openjdk-9.0.0.181-1.fc27.x86_64/lib/server/libjvm.so
#4  0x00007fffffffa000 in ?? ()
#5  0x00007fffd5954728 in VM_Version::get_processor_features ()
    at /usr/src/debug/java-9-openjdk-9.0.0.181-1.fc27.x86_64/openjdk/hotspot/src/cpu/x86/vm/vm_version_x86.cpp:530
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb) quit


vm_version_x86.cpp:530 is:

 get_cpu_info_stub(&_cpuid_info);

The file is attached.

Dmitri.
--




(file #42098)

Dmitri A. Sergatskov <dasergatskov>
Sun 08 Oct 2017 05:12:58 PM UTC, comment #18: 

Since this issue comes up again for macOSX, I must add that
I have a computer where it does not crash (XEon + Nvidia) but it
still crashes on AMD CPU/AMD GPU and i7/AMD systems.

All computers run approximately the same software otherwise
(Fedora 26 or 27-beta now).

So may be we should re-open it.

Dmitri

Dmitri A. Sergatskov <dasergatskov>
Thu 21 Sep 2017 12:53:35 AM UTC, comment #17: 

I don't want to have alloc-dealloc mismatches, but you're right that most of this looks like it is happening in external libraries and/or would be very hard to debug.  I think we can leave it alone for now and concentrate on more immediate problems.

Rik <rik5>
Group administrator
Wed 20 Sep 2017 08:54:10 PM UTC, comment #16: 

Here is another one:


 ASAN_OPTIONS="leak_check_at_exit=0" LD_PRELOAD="libasan.so.4:libGLX_mesa.so.0" ./run-octave -g --no-gui
=================================================================
==21065==ERROR: AddressSanitizer: alloc-dealloc-mismatch (malloc vs operator delete) on 0x613000000040
    #0 0x7f52480d3fd0 in operator delete(void*) (/lib64/libasan.so.4+0xe0fd0)
    #1 0x55c2bec41c62  (/usr/libexec/gdb+0x1bcc62)
    #2 0x55c2beeda20e  (/usr/libexec/gdb+0x45520e)
    #3 0x55c2beeaca64  (/usr/libexec/gdb+0x427a64)
    #4 0x55c2bee22d4f  (/usr/libexec/gdb+0x39dd4f)
    #5 0x55c2beb9072a  (/usr/libexec/gdb+0x10b72a)
    #6 0x7f52448f3509 in __libc_start_main (/lib64/libc.so.6+0x20509)
    #7 0x55c2beb92859  (/usr/libexec/gdb+0x10d859)

0x613000000040 is located 0 bytes inside of 334-byte region [0x613000000040,0x61300000018e)
allocated by thread T0 here:
    #0 0x7f52480d1850 in malloc (/lib64/libasan.so.4+0xde850)
    #1 0x55c2bee32240 in operator new(unsigned long) (/usr/libexec/gdb+0x3ad240)

SUMMARY: AddressSanitizer: alloc-dealloc-mismatch (/lib64/libasan.so.4+0xe0fd0) in operator delete(void*)
==21065==HINT: if you don't care about these errors you may set ASAN_OPTIONS=alloc_dealloc_mismatch=0
==21065==ABORTING


So i cannot start gdb. it is all looks false positive to me so far. But I will keep an eye on it.

Dmitri.
--




Dmitri A. Sergatskov <dasergatskov>
Wed 20 Sep 2017 08:47:26 PM UTC, comment #15: 

Most of those seems to come from external libraries (e.g. Qt).
Here is a simplest example:


octave:1> plot(1:3)
octave:2> print("t1.png")
octave:3> quit
=================================================================
==20601==ERROR: AddressSanitizer: alloc-dealloc-mismatch (operator new vs free) on 0x61f000068280
    #0 0x7f111dcbf4b8 in __interceptor_free (/lib64/libasan.so.4+0xde4b8)
    #1 0x7f10e9053fe4  (/usr/lib64/dri/nouveau_dri.so+0x4bafe4)
    #2 0x7f10e9052082  (/usr/lib64/dri/nouveau_dri.so+0x4b9082)
    #3 0x7f10e907a844  (/usr/lib64/dri/nouveau_dri.so+0x4e1844)
    #4 0x7f10e907bf2b  (/usr/lib64/dri/nouveau_dri.so+0x4e2f2b)
    #5 0x7f10e8df1267  (/usr/lib64/dri/nouveau_dri.so+0x258267)
    #6 0x7f10e8df1f29  (/usr/lib64/dri/nouveau_dri.so+0x258f29)
    #7 0x7f10e8db80f4  (/usr/lib64/dri/nouveau_dri.so+0x21f0f4)
    #8 0x7f10e8e09cbd  (/usr/lib64/dri/nouveau_dri.so+0x270cbd)
    #9 0x7f10e8e04f8b  (/usr/lib64/dri/nouveau_dri.so+0x26bf8b)
    #10 0x7f10e8e050da  (/usr/lib64/dri/nouveau_dri.so+0x26c0da)
    #11 0x7f10e8e09daa  (/usr/lib64/dri/nouveau_dri.so+0x270daa)
    #12 0x7f10e8c2ad32  (/usr/lib64/dri/nouveau_dri.so+0x91d32)
    #13 0x7f10e8dc1ed9  (/usr/lib64/dri/nouveau_dri.so+0x228ed9)
    #14 0x7f10e8f7bb2c  (/usr/lib64/dri/nouveau_dri.so+0x3e2b2c)
    #15 0x7f10e8f7acb2  (/usr/lib64/dri/nouveau_dri.so+0x3e1cb2)
    #16 0x7f111d9b783e  (/lib64/libGLX_mesa.so.0+0x4983e)
    #17 0x7f111d988599  (/lib64/libGLX_mesa.so.0+0x1a599)
    #18 0x7f10fe2223b0  (/usr/lib64/qt5/plugins/xcbglintegrations/libqxcb-glx-integration.so+0x93b0)
    #19 0x7f10fe2223d8  (/usr/lib64/qt5/plugins/xcbglintegrations/libqxcb-glx-integration.so+0x93d8)
    #20 0x7f1119b8dd5a in QOpenGLContext::destroy() (/lib64/libQt5Gui.so.5+0x12cd5a)
    #21 0x7f1119b8e176 in QOpenGLContext::~QOpenGLContext() (/lib64/libQt5Gui.so.5+0x12d176)
    #22 0x7f1119b8e188 in QOpenGLContext::~QOpenGLContext() (/lib64/libQt5Gui.so.5+0x12d188)
    #23 0x7f111ebfc41a in QGLContext::reset() (/lib64/libQt5OpenGL.so.5+0x2341a)
    #24 0x7f111ebffef2 in QGLContext::~QGLContext() (/lib64/libQt5OpenGL.so.5+0x26ef2)
    #25 0x7f111ebfff88 in QGLContext::~QGLContext() (/lib64/libQt5OpenGL.so.5+0x26f88)
    #26 0x7f111ebfb806 in QGLWidget::~QGLWidget() (/lib64/libQt5OpenGL.so.5+0x22806)
    #27 0x7f111d4f1aba in QtHandles::GLCanvas::~GLCanvas() ../libgui/graphics/GLCanvas.cc:52
    #28 0x7f111d4f1ae7 in QtHandles::GLCanvas::~GLCanvas() ../libgui/graphics/GLCanvas.cc:53
    #29 0x7f111984c0f7 in QObjectPrivate::deleteChildren() (/lib64/libQt5Core.so.5+0x2750f7)
    #30 0x7f111a0aba03 in QWidget::~QWidget() (/lib64/libQt5Widgets.so.5+0x19ca03)
    #31 0x7f111d4d841c in QtHandles::ContainerBase::~ContainerBase() (/d2/home/dima/src/octave/gcc_asan/libgui/.libs/liboctgui.so.2+0x4b741c)
    #32 0x7f111d4d6d12 in QtHandles::Container::~Container() ../libgui/graphics/Container.cc:46
    #33 0x7f111d4d6d3f in QtHandles::Container::~Container() ../libgui/graphics/Container.cc:47
    #34 0x7f111984c0f7 in QObjectPrivate::deleteChildren() (/lib64/libQt5Core.so.5+0x2750f7)
    #35 0x7f111a0aba03 in QWidget::~QWidget() (/lib64/libQt5Widgets.so.5+0x19ca03)
    #36 0x7f111d4f166c in QtHandles::FigureWindowBase::~FigureWindowBase() ../libgui/graphics/FigureWindow.h:33
    #37 0x7f111d4f12de in QtHandles::FigureWindow::~FigureWindow() ../libgui/graphics/FigureWindow.cc:41
    #38 0x7f111d4f130b in QtHandles::FigureWindow::~FigureWindow() ../libgui/graphics/FigureWindow.cc:42
    #39 0x7f111d507603 in QtHandles::Object::finalize() ../libgui/graphics/Object.cc:140
    #40 0x7f111d50701b in QtHandles::Object::slotFinalize() ../libgui/graphics/Object.cc:110
    #41 0x7f111d47b9e8 in QtHandles::Object::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) libgui/graphics/moc-Object.cc:93
    #42 0x7f11198468d9 in QObject::event(QEvent*) (/lib64/libQt5Core.so.5+0x26f8d9)
    #43 0x7f111a0695db in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/lib64/libQt5Widgets.so.5+0x15a5db)
    #44 0x7f111a070c73 in QApplication::notify(QObject*, QEvent*) (/lib64/libQt5Widgets.so.5+0x161c73)
    #45 0x7f111981e626 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (/lib64/libQt5Core.so.5+0x247626)
    #46 0x7f111982085a in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (/lib64/libQt5Core.so.5+0x24985a)
    #47 0x7f111986cdd2  (/lib64/libQt5Core.so.5+0x295dd2)
    #48 0x7f1108e29246 in g_main_context_dispatch (/lib64/libglib-2.0.so.0+0x4a246)
    #49 0x7f1108e295e7  (/lib64/libglib-2.0.so.0+0x4a5e7)
    #50 0x7f1108e2967b in g_main_context_iteration (/lib64/libglib-2.0.so.0+0x4a67b)
    #51 0x7f111986ce4e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (/lib64/libQt5Core.so.5+0x295e4e)
    #52 0x7f111981d609 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (/lib64/libQt5Core.so.5+0x246609)
    #53 0x7f111982527b in QCoreApplication::exec() (/lib64/libQt5Core.so.5+0x24e27b)
    #54 0x7f111d30e41d in octave::gui_application::execute() ../libgui/src/octave-gui.cc:248
    #55 0x402315 in main ../src/main-gui.cc:104
    #56 0x7f110eaf1509 in __libc_start_main (/lib64/libc.so.6+0x20509)
    #57 0x401b39 in _start (/d2/home/dima/src/octave/gcc_asan/src/.libs/lt-octave-gui+0x401b39)

0x61f000068280 is located 0 bytes inside of 2976-byte region [0x61f000068280,0x61f000068e20)
allocated by thread T0 here:
    #0 0x7f111dcc1158 in operator new(unsigned long) (/lib64/libasan.so.4+0xe0158)
    #1 0x7f10e9053f70  (/usr/lib64/dri/nouveau_dri.so+0x4baf70)
    #2 0x7f10e9051e9d  (/usr/lib64/dri/nouveau_dri.so+0x4b8e9d)

SUMMARY: AddressSanitizer: alloc-dealloc-mismatch (/lib64/libasan.so.4+0xde4b8) in __interceptor_free
==20601==HINT: if you don't care about these errors you may set ASAN_OPTIONS=alloc_dealloc_mismatch=0
==20601==ABORTING


Note print() is important. Just plot and exit does not trigger it.

Dmitri.
--



Dmitri A. Sergatskov <dasergatskov>
Wed 20 Sep 2017 08:34:51 PM UTC, comment #14: 

Okay, I'll close this bug.  Maybe you want to open up another bug report for the alloc-dealloc-mismatch errors?

Rik <rik5>
Group administrator
Wed 20 Sep 2017 06:26:37 PM UTC, comment #13: 

I get few alloc-dealloc-mismatch errors, so I did:


ASAN_OPTIONS="leak_check_at_exit=0:alloc_dealloc_mismatch=0" ./run-octave -f --no-gui
...
octave:1> test ov-class.cc-tst
PASSES 50 out of 50 tests
octave:2> __java_init__
ans =  1
octave:3> __octave_config_info__ ("hg_id")
ans = a1801e80bb11
octave:4> __octave_config_info__("WARN_CXXFLAGS")
ans =  -Wall -W -Wshadow -Wold-style-cast -Wformat -Wpointer-arith -Wwrite-strings -Wcast-align -Wcast-qual -fsanitize=address -fno-omit-frame-pointer
octave:5> quit


It passes

ASAN_OPTIONS="leak_check_at_exit=0:alloc_dealloc_mismatch=0" LD_PRELOAD="libasan.so.4:libGLX_mesa.so.0" make check


Also did some plots etc...

Dmitri.
--


Dmitri A. Sergatskov <dasergatskov>
Wed 20 Sep 2017 04:36:57 PM UTC, comment #12: 

That is good news.  I don't run a bleeding edge system so I can't test this, but am willing to close the bug if it is really a problem with the Address Sanitizer.

Do you find any other issues with the JVM?  Other more ordinary memory leaks, etc.?  For example, does this show any problems


./run-octave -f --no-gui
test ov-class.cc
exit


compared to the base leak log for


./run-octave -f --no-gui
exit



Rik <rik5>
Group administrator
Wed 20 Sep 2017 04:31:11 PM UTC, comment #11: 

As of "a1801e80bb11" I do not see java crashes any more.
There were also a minor gcc update
(7.2.1-1 to 7.2.1-2 see:
https://koji.fedoraproject.org/koji/buildinfo?buildID=971026
for the changelog that includes some fixes for sanitizer
sanitizer/63361, sanitizer/81923)

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Wed 20 Sep 2017 10:37:42 AM UTC, comment #10: 

Philip,

Did you build it with libasan?
(configure --enable-address-sanitizer-flags)

Dmitri.

Dmitri A. Sergatskov <dasergatskov>
Wed 20 Sep 2017 06:32:44 AM UTC, comment #9: 

Again FWIW, the same Octave, yet cross-built for w64, runs fine on Windows 10 as well w. Oracle Java).

Philip Nienhuis <philipnienhuis>
Group Member
Wed 20 Sep 2017 06:27:46 AM UTC, comment #8: 

FWIW, I can't reproduce the segfault on Mageia Linux 64b with Octave-4.3.0+ (hg id  8a6747c6db1a, from Sep 17)

>> __java_init__
ans =  1



>> jobj = javaObject ("java.lang.StringBuffer", "Hello World")
jobj =

<Java object: java.lang.StringBuffer>


(Java = java-1.8.0-openjdk, v. 1.8.0.141 rel. 1.b16.1.mga6)

Looks like the segfault is related to the specific Java implementation on your boxes.

Philip Nienhuis <philipnienhuis>
Group Member
Wed 20 Sep 2017 05:28:14 AM UTC, comment #7: 

Using gdb to trace through the code, the actual line that causes the segfault is line 210 in liboctave/util/oct-shlib.cc.


  library = dlopen (file.c_str (), flags);


At that point, the file variable is


"/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/libjvm.so"


The flags variable is 258.

It certainly seems like this is just something wrong with libjvm.so.  I tried changing the flags to the minimum, RTLD_LAZY, but it didn't help.

Rik <rik5>
Group administrator
Wed 20 Sep 2017 04:55:36 AM UTC, comment #6: 

And doing the same with java-9:

octave:1> __java_init__

Program received signal SIGSEGV, Segmentation fault.
0x00007fffc3c1d4f3 in ?? ()
Missing separate debuginfos, use: dnf debuginfo-install GraphicsMagick-1.3.26-3.fc26.x86_64 GraphicsMagick-c++-1.3.26-3.fc26.x86_64 arpack-3.5.0-1.fc26.x86_64 atlas-3.10.2-16.fc26.x86_64 blas-3.6.1-4.fc26.x86_64 bzip2-libs-1.0.6-22.fc26.x86_64 cyrus-sasl-lib-2.1.26-32.fc26.x86_64 expat-2.2.4-1.fc26.x86_64 fftw-libs-double-3.3.5-4.fc26.x86_64 fftw-libs-single-3.3.5-4.fc26.x86_64 fontconfig-2.12.5-1.fc26.x86_64 freetype-2.7.1-9.fc26.x86_64 gl2ps-1.4.0-1.fc26.x86_64 glibc-2.25-10.fc26.x86_64 hdf5-1.8.18-5.fc26.x86_64 keyutils-libs-1.5.10-1.fc26.x86_64 krb5-libs-1.15.1-28.fc26.x86_64 lapack-3.6.1-4.fc26.x86_64 lcms2-2.8-3.fc26.x86_64 libICE-1.0.9-9.fc26.x86_64 libSM-1.2.2-5.fc26.x86_64 libX11-1.6.5-2.fc26.x86_64 libXau-1.0.8-7.fc26.x86_64 libXext-1.3.3-5.fc26.x86_64 libcom_err-1.43.4-2.fc26.x86_64 libcrypt-nss-2.25-10.fc26.x86_64 libcurl-7.53.1-10.fc26.x86_64 libgcc-7.2.1-2.fc26.x86_64 libgfortran-7.2.1-2.fc26.x86_64 libglvnd-0.2.999-24.20170818git8d4d03f.fc26.x86_64 libglvnd-glx-0.2.999-24.20170818git8d4d03f.fc26.x86_64 libgomp-7.2.1-2.fc26.x86_64 libidn2-2.0.4-1.fc26.x86_64 libnghttp2-1.21.1-1.fc26.x86_64 libpng-1.6.28-2.fc26.x86_64 libpsl-0.18.0-1.fc26.x86_64 libquadmath-7.2.1-2.fc26.x86_64 libselinux-2.6-7.fc26.x86_64 libssh2-1.8.0-2.fc26.x86_64 libstdc++-7.2.1-2.fc26.x86_64 libtool-ltdl-2.4.6-17.fc26.x86_64 libunistring-0.9.7-1.fc26.x86_64 libuuid-2.30.1-1.fc26.x86_64 libxcb-1.12-3.fc26.x86_64 ncurses-libs-6.0-8.20170212.fc26.x86_64 nspr-4.16.0-1.fc26.x86_64 nss-3.32.0-1.1.fc26.x86_64 nss-softokn-freebl-3.32.0-1.2.fc26.x86_64 nss-util-3.32.0-1.0.fc26.x86_64 openblas-0.2.20-2.fc26.x86_64 openldap-2.4.45-1.fc26.x86_64 openssl-libs-1.1.0f-7.fc26.x86_64 pcre-8.41-1.fc26.x86_64 qrupdate-1.1.2-10.fc26.x86_64 readline-7.0-5.fc26.x86_64 suitesparse-4.4.6-8.fc26.x86_64 xz-libs-5.2.3-2.fc26.x86_64 zlib-1.2.11-2.fc26.x86_64
(gdb) bt
#0  0x00007fffc3c1d4f3 in ?? ()
#1  0x0000000000000246 in ?? ()
#2  0x00007fffc3c1d280 in ?? ()
#3  0x00007fffddc99ee0 in Abstract_VM_Version::_vm_major_version () from /usr/lib/jvm/java-9-openjdk-9.0.0.181-1.fc26.x86_64/lib/server/libjvm.so
#4  0x00007fffffffae50 in ?? ()
#5  0x00007fffdd75a728 in VM_Version::get_processor_features () at /usr/src/debug/java-9-openjdk-9.0.0.181-1.fc26.x86_64/openjdk/hotspot/src/cpu/x86/vm/vm_version_x86.cpp:530
Backtrace stopped: previous frame inner to this frame (corrupt stack?)


Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Wed 20 Sep 2017 04:26:31 AM UTC, comment #5: 

I get:

octave:1> __java_init__

Program received signal SIGSEGV, Segmentation fault.
0x00007fffc6da42b4 in ?? ()
Missing separate debuginfos, use: dnf debuginfo-install GraphicsMagick-1.3.26-3.fc26.x86_64 GraphicsMagick-c++-1.3.26-3.fc26.x86_64 arpack-3.5.0-1.fc26.x86_64 atlas-3.10.2-16.fc26.x86_64 blas-3.6.1-4.fc26.x86_64 bzip2-libs-1.0.6-22.fc26.x86_64 cyrus-sasl-lib-2.1.26-32.fc26.x86_64 expat-2.2.4-1.fc26.x86_64 fftw-libs-double-3.3.5-4.fc26.x86_64 fftw-libs-single-3.3.5-4.fc26.x86_64 fontconfig-2.12.5-1.fc26.x86_64 freetype-2.7.1-9.fc26.x86_64 gl2ps-1.4.0-1.fc26.x86_64 glibc-2.25-10.fc26.x86_64 hdf5-1.8.18-5.fc26.x86_64 keyutils-libs-1.5.10-1.fc26.x86_64 krb5-libs-1.15.1-28.fc26.x86_64 lapack-3.6.1-4.fc26.x86_64 lcms2-2.8-3.fc26.x86_64 libICE-1.0.9-9.fc26.x86_64 libSM-1.2.2-5.fc26.x86_64 libX11-1.6.5-2.fc26.x86_64 libXau-1.0.8-7.fc26.x86_64 libXext-1.3.3-5.fc26.x86_64 libasan-7.2.1-2.fc26.x86_64 libcom_err-1.43.4-2.fc26.x86_64 libcrypt-nss-2.25-10.fc26.x86_64 libcurl-7.53.1-10.fc26.x86_64 libgcc-7.2.1-2.fc26.x86_64 libgfortran-7.2.1-2.fc26.x86_64 libglvnd-0.2.999-24.20170818git8d4d03f.fc26.x86_64 libglvnd-glx-0.2.999-24.20170818git8d4d03f.fc26.x86_64 libgomp-7.2.1-2.fc26.x86_64 libidn2-2.0.4-1.fc26.x86_64 libnghttp2-1.21.1-1.fc26.x86_64 libpng-1.6.28-2.fc26.x86_64 libpsl-0.18.0-1.fc26.x86_64 libquadmath-7.2.1-2.fc26.x86_64 libselinux-2.6-7.fc26.x86_64 libssh2-1.8.0-2.fc26.x86_64 libstdc++-7.2.1-2.fc26.x86_64 libtool-ltdl-2.4.6-17.fc26.x86_64 libunistring-0.9.7-1.fc26.x86_64 libuuid-2.30.1-1.fc26.x86_64 libxcb-1.12-3.fc26.x86_64 mesa-libGLU-9.0.0-11.fc26.x86_64 ncurses-libs-6.0-8.20170212.fc26.x86_64 nspr-4.16.0-1.fc26.x86_64 nss-3.32.0-1.1.fc26.x86_64 nss-softokn-freebl-3.32.0-1.2.fc26.x86_64 nss-util-3.32.0-1.0.fc26.x86_64 openblas-0.2.20-2.fc26.x86_64 openldap-2.4.45-1.fc26.x86_64 openssl-libs-1.1.0f-7.fc26.x86_64 pcre-8.41-1.fc26.x86_64 qrupdate-1.1.2-10.fc26.x86_64 readline-7.0-5.fc26.x86_64 suitesparse-4.4.6-8.fc26.x86_64 xz-libs-5.2.3-2.fc26.x86_64 zlib-1.2.11-2.fc26.x86_64
(gdb) bt
#0  0x00007fffc6da42b4 in ?? ()
#1  0x0000000000000202 in ?? ()
#2  0x00007fffc6da4160 in ?? ()
#3  0x00007fffffffb180 in ?? ()
#4  0x00007fffffffa400 in ?? ()
#5  0x00007fffd71cce9a in VM_Version::get_cpu_info_wrapper () at /usr/src/debug/java-1.8.0-openjdk-1.8.0.144-5.b01.fc26.x86_64/openjdk/hotspot/src/cpu/x86/vm/vm_version_x86.cpp:395
Backtrace stopped: previous frame inner to this frame (corrupt stack?)


Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Tue 19 Sep 2017 07:19:36 PM UTC, comment #4: 

Just creating the JVM is enough to cause the issue.  The internal Octave function


__java_init__


by itself will cause the segfault.

Rik <rik5>
Group administrator
Tue 19 Sep 2017 07:13:10 PM UTC, comment #3: 

I installed openjdk-8-dbg, but it didn't seem to make a difference.  The backtrace was still short and opaque, although now it references Python for some reason.


Installing openjdk unwinder

Program received signal SIGSEGV, Segmentation fault.
0x00007f847a4db2b4 in ?? ()
(gdb) bt
#0  0x00007f847a4db2b4 in  ()
#1  0x49656e696c65746e in  ()
#2  0x00100800000406e3 in  ()
Python Exception <class 'OverflowError'> int too big to convert:
#3  0xbfebfbff7ffafbbf in  ()#4  0x01c0003f1c004121 in  ()
#5  0x000000000000003f in  ()
#6  0x0000000000000000 in  ()


Rik <rik5>
Group administrator
Tue 19 Sep 2017 06:43:53 PM UTC, comment #2: 

Do you have debug symbols for java installed? On Fedora it is a separate package...

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Tue 19 Sep 2017 06:40:50 PM UTC, comment #1: 

Running under gdb isn't any more helpful.  The backtrace is


(gdb) bt
#0  0x00007ff4c5c8b2b4 in ?? ()
#1  0x0000000000000246 in ?? ()
#2  0x00007ff4c5c8b160 in ?? ()
#3  0x00007ffcd5fb5fc0 in ?? ()
#4  0x00007ffcd5fb5f70 in ?? ()
#5  0x00007ff4d5f876ad in ?? () from /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/libjvm.so
Backtrace stopped: previous frame inner to this frame (corrupt stack?)



Rik <rik5>
Group administrator
Tue 19 Sep 2017 06:36:00 PM UTC, original submission:  

The Address Sanitizer detects a segmentation violation whenever the Java interface from Octave is used.  Sample code:


jobj = javaObject ("java.lang.StringBuffer", "Hello World");


The resulting backtrace is very sparse on information, even with "verbose=1" in ASAN_OPTIONS.


==13937==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7fefd69db2b4 bp 0x7fefe71a2260 sp 0x7fffe0568b08 T0)
    #0 0x7fefd69db2b3  (<unknown module>)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV ??:0 ??
==13937==ABORTING


Perhaps a debug version of the JNI interface can be compiled in to get more information.

Rik <rik5>
Group administrator

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #42098:  vm_version_x86.cpp added by dasergatskov (47KiB - text/x-c++src)

 

Depends on the following items: None found

Digest:
   bug dependencies.

 

Carbon-Copy List
  • -email is unavailable- added by dasergatskov (Posted a comment)
  • -email is unavailable- added by rik5 (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 group members can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-10-09 dasergatskov Attached File- Added vm_version_x86.cpp, #42098
    2017-09-20 rik5 StatusConfirmed Invalid / Not an Octave Bug
        Open/ClosedOpen Closed
    2017-09-20 rik5 StatusNone Confirmed
    2017-09-19 rik5 Dependencies- bugs #52062 is dependent

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code