Bug 89992 - SIGSEGV - Opening form in database file
Summary: SIGSEGV - Opening form in database file
Status: CLOSED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
4.5.0.0.alpha0+ Master
Hardware: x86-64 (AMD64) macOS (All)
: high critical
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-13 15:07 UTC by Alex Thurgood
Modified: 2015-04-30 10:38 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
full bt at sigsegv (43.67 KB, text/plain)
2015-03-13 15:10 UTC, Alex Thurgood
Details
Full bt navigating Form 3 (120.51 KB, text/plain)
2015-03-13 15:26 UTC, Alex Thurgood
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Thurgood 2015-03-13 15:07:50 UTC
Testing bug 89982, opened ODB file attached to that report.

After confirming that the first form doesn't open and gives an error, attempted to open the second form in the list.

LO hangs with SIGSEGV :

warn:sw:66590:1:sw/inc/swrect.hxx:296: SVRect() without Width or Height
warn:sw:66590:1:sw/inc/swrect.hxx:296: SVRect() without Width or Height
warn:legacy.osl:66590:1:unotools/source/config/moduleoptions.cxx:585: unknown factory
warn:legacy.osl:66590:1:unotools/source/config/moduleoptions.cxx:585: unknown factory
warn:legacy.osl:66590:1:unotools/source/config/moduleoptions.cxx:585: unknown factory
warn:legacy.osl:66590:1:unotools/source/config/moduleoptions.cxx:585: unknown factory
warn:legacy.osl:66590:1:unotools/source/config/moduleoptions.cxx:585: unknown factory
warn:legacy.osl:66590:1:unotools/source/config/moduleoptions.cxx:585: unknown factory
warn:legacy.osl:66590:1:unotools/source/config/moduleoptions.cxx:585: unknown factory
warn:legacy.osl:66590:1:unotools/source/config/moduleoptions.cxx:585: unknown factory
warn:legacy.osl:66590:1:unotools/source/config/moduleoptions.cxx:585: unknown factory
warn:legacy.osl:66590:1:unotools/source/config/moduleoptions.cxx:585: unknown factory
warn:legacy.osl:66590:1:unotools/source/config/moduleoptions.cxx:585: unknown factory
warn:legacy.osl:66590:1:unotools/source/config/moduleoptions.cxx:585: unknown factory
warn:legacy.osl:66590:1:unotools/source/config/moduleoptions.cxx:585: unknown factory
warn:legacy.osl:66590:1:unotools/source/config/moduleoptions.cxx:585: unknown factory
warn:legacy.osl:66590:1:unotools/source/config/moduleoptions.cxx:585: unknown factory
warn:legacy.osl:66590:1:unotools/source/config/moduleoptions.cxx:585: unknown factory
warn:legacy.osl:66590:1:unotools/source/config/moduleoptions.cxx:585: unknown factory
warn:legacy.osl:66590:1:unotools/source/config/moduleoptions.cxx:585: unknown factory
warn:legacy.osl:66590:1:unotools/source/config/moduleoptions.cxx:585: unknown factory
warn:sw:66590:1:sw/inc/swrect.hxx:296: SVRect() without Width or Height
warn:sw:66590:1:sw/inc/swrect.hxx:296: SVRect() without Width or Height
warn:sw:66590:1:sw/inc/swrect.hxx:296: SVRect() without Width or Height
warn:sw:66590:1:sw/inc/swrect.hxx:296: SVRect() without Width or Height
Process 66590 stopped
* thread #37: tid = 0x6a4e8, 0x0000000129801e69, stop reason = signal SIGSEGV
    frame #0: 0x0000000129801e69
-> 0x129801e69:  movl   0x8(%r10), %ebx
   0x129801e6d:  movl   $0xffffffff, %r10d
   0x129801e73:  cmpl   $0xc, %r8d
   0x129801e77:  je     0x12980204f
Comment 1 Alex Thurgood 2015-03-13 15:10:45 UTC
Created attachment 114079 [details]
full bt at sigsegv
Comment 2 Alex Thurgood 2015-03-13 15:13:38 UTC
under lldb, one can recover from the sigsegv and continue, the ouput is then :
(lldb) c
Process 66590 resuming
warn:sw.resizeview:66590:1:sw/source/core/view/vdraw.cxx:237: Trying to move anchor from invalid page - fix layouting!
warn:sw.resizeview:66590:1:sw/source/core/view/vdraw.cxx:237: Trying to move anchor from invalid page - fix layouting!
Comment 3 Alex Thurgood 2015-03-13 15:23:41 UTC
Open 3rd form in list of forms :

lldb output :

java.lang.IncompatibleClassChangeError
java.lang.IncompatibleClassChangeError
warn:legacy.osl:66590:16:connectivity/source/drivers/jdbc/JStatement.cxx:669: caught an exception!
in function:virtual sal_Bool connectivity::java_sql_Statement_Base::convertFastPropertyValue(com::sun::star::uno::Any &, com::sun::star::uno::Any &, sal_Int32, const com::sun::star::uno::Any &)
type: com.sun.star.lang.WrappedTargetRuntimeException
message: java.lang.IncompatibleClassChangeError

Clicking in the lower controls containing lists causes LO to freeze :
Process 66590 stopped
* thread #37: tid = 0x6a4e8, 0x000000012983bc2f, stop reason = signal SIGSEGV
    frame #0: 0x000000012983bc2f
-> 0x12983bc2f:  movl   0x8(%rsi), %r11d
   0x12983bc33:  cmpl   $0xc, %edx
   0x12983bc36:  je     0x12983bdba
   0x12983bc3c:  movabsq $0x7802e2370, %rdx
(lldb)
Comment 4 Alex Thurgood 2015-03-13 15:26:34 UTC
Created attachment 114083 [details]
Full bt navigating Form 3
Comment 5 Robert Großkopf 2015-03-13 15:54:42 UTC
No problem to open the forms with OpenSUSE 13.2 and
Version: 4.5.0.0.alpha0+
Build ID: 468677c9f5fbdb91f0817674d1c7765e971e4df1
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2015-03-13_01:03:55
Comment 6 Julien Nabet 2015-03-13 16:00:48 UTC
Alex: what precise Java version is installed? (32/64 bits, 1.6, 1.7 ?). Also, what's your precise version of MacOs?

Stephan: noticing message: java.lang.IncompatibleClassChangeError, I wonder if it could be a Java version problem or a special Apple package which should be installed.
Comment 7 Lionel Elie Mamane 2015-03-13 19:38:03 UTC
(In reply to Alex Thurgood from comment #1)
> Created attachment 114079 [details]
> full bt at sigsegv

This looks like one of these internal SIGSEGVs of Java, which Java handles (through its exception mechanism) and are thus normal.
Comment 8 Lionel Elie Mamane 2015-03-13 19:39:08 UTC
(In reply to Alex Thurgood from comment #4)
> Created attachment 114083 [details]
> Full bt navigating Form 3

Same thing: internal Java SIGSEGV, nothing out of the ordinary.
Comment 9 Lionel Elie Mamane 2015-03-13 19:40:20 UTC
(In reply to Alex Thurgood from comment #3)
> Open 3rd form in list of forms :

> java.lang.IncompatibleClassChangeError
> java.lang.IncompatibleClassChangeError

This is a real problem. Incomplete recompile? Try "make clean" and recompile. If still reproducible, then we have a bug.
Comment 10 Alex Thurgood 2015-03-14 12:26:26 UTC
(In reply to Lionel Elie Mamane from comment #9)
> (In reply to Alex Thurgood from comment #3)
> > Open 3rd form in list of forms :
> 
> > java.lang.IncompatibleClassChangeError
> > java.lang.IncompatibleClassChangeError
> 
> This is a real problem. Incomplete recompile? Try "make clean" and
> recompile. If still reproducible, then we have a bug.

This was a fresh build after make clean.

FWIW, the JDK is latest Oracle Java 1.8u40
Comment 11 Alex Thurgood 2015-03-14 12:27:10 UTC
The traces contain mismatch w
Comment 12 Alex Thurgood 2015-03-14 12:55:02 UTC
(In reply to Alex Thurgood from comment #11)
> The traces contain mismatch w

Ignore that last comment.
Comment 13 Stephan Bergmann 2015-03-17 16:34:23 UTC
(In reply to Alex Thurgood from comment #3)
> Open 3rd form in list of forms :
[...]
> java.lang.IncompatibleClassChangeError
[...]

With my --enable-dbgutil master build on Mac OS X 10.10.2 with JDK 1.8.0_25 I can reproduce the "IncompatibleClassChangeError" etc. reporting on stderr (but no crash).

The reason is connectivity/source/drivers/jdbc/JStatement.cxx

> sal_Int32 java_sql_Statement_Base::getResultSetType() throw(SQLException, RuntimeException)
> {
>     static jmethodID mID(NULL);
>     return impl_getProperty("getResultSetType",mID,m_nResultSetType);
> }

using a static jmethodID.  If this function first gets called on a java_sql_PreparedStatement derivation instance (where getMyClass() obtains the java.sql.PreparedStatement interface deriving from java.sql.Statement) and then on a java_sql_Statement derivation instance (where getMyClass() obtains the java.sql.Statement interface), at least the given JDK version rejects the java.sql.Statement.getResultSetType JNI call via the static stored java.sql.PreparedStatement.getResultSetType jmethodID with a java.lang.IncompatibleClassChangeError.

Removing the "static" from "static jmethodID mID(NULL);" would make that go away.  However, that would likely cause a performance regression, and lots of other places in JStatement.cxx (and probably elsewhere) use the same broken idiom, too.  What is rather needed is to redesign the connectivity/source/inc/java/lang/Object.hxx etc. code to properly cache matching class/method pairs.
Comment 14 Julien Nabet 2015-03-17 17:54:03 UTC
Following last Stephen's comment, I put tdf#57872 in See Also
Comment 15 Alex Thurgood 2015-04-30 10:38:09 UTC
Version: 5.0.0.0.alpha1+
Build ID: 950055bcb06c8edcd9062c71184f02bf8e0604e6

now wfm