Download it now!
Bug 103719 - CRASH - when attempting to connect to remote mysql instance via jdbc connector, failure to recognize Java version with JDK 1.8.0_112
Summary: CRASH - when attempting to connect to remote mysql instance via jdbc connecto...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
5.1.6.2 release
Hardware: All Mac OS X (All)
: highest critical
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: haveBacktrace, regression
: 103939 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-11-05 10:55 UTC by PJG51
Modified: 2016-11-16 20:35 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
full bt (19.00 KB, text/plain)
2016-11-07 08:49 UTC, Alex Thurgood
Details

Note You need to log in before you can comment on or make changes to this bug.
Description PJG51 2016-11-05 10:55:10 UTC
Cannot connect to distant database MySQL : crash.
Cannot test JDBC Connection : crash

LibreOffice : 5.1.6.2
Mac OS X 10.12.1 (latest version)
Java SDK 1.8.0_112 (latest version)
Comment 1 Alex Thurgood 2016-11-05 11:53:15 UTC
@PJG51 : please provide more detail, at present there isn't enough to work with.

1) Which version of the JDBC connector ?

2) How precisely are you connecting over JDBC via the connector, in other words which setup did you choose when you created the ODB file - there are 2 possibilities, and both are not necessarily equal.

3) What kind of network connection are you using ? internal LAN, internet remote host, etc ?

4) Any particular table structure we should be aware of ? (MEMO fields, BLOBs, etc) ?

Setting to NEEDINFO pending requested information, please set back to UNCONFIRMED once you have provided all of the above information
Comment 2 PJG51 2016-11-05 13:01:50 UTC
Which version of the JDBC connector ?

Java SDK 1.8.0_112 (latest version)
MysqlConnector java 5.1.40 (latest version)

How precisely are you connecting over JDBC via the connector, in other words which setup did you choose when you created the ODB file - there are 2 possibilities, and both are not necessarily equal.

It's a MySql Database created before the update with wich I worked before without problem.

What kind of network connection are you using ? internal LAN, internet remote host, etc ?

A standard distant base on my server or lacal base with MAMP, it's the same thing.

Any particular table structure we should be aware of ? (MEMO fields, BLOBs, etc) ?

No one.
Comment 3 Julien Nabet 2016-11-05 15:11:44 UTC
Would it be possible you retrieve some debug information? (see https://wiki.documentfoundation.org/QA/BugReport/Debug_Information#Mac_OSX:_How_to_get_debug_information)
and attach information with this link https://bugs.documentfoundation.org/attachment.cgi?bugid=103719&action=enter ?
Comment 4 PJG51 2016-11-05 16:17:34 UTC
Would it be possible you retrieve some debug information?

No debug information.
LO quits with a message : … unexpected error… etc… following files will be recovered… but there is no file !
And LO starts again.
Comment 5 Alex Thurgood 2016-11-07 07:18:52 UTC
No repro with

Version: 5.2.1.2
Build ID: 31dd62db80d4e60af04904455ec9c9219178d620
Threads CPU : 2; Version de l'OS :Mac OS X 10.12; UI Render : par défaut; 
Locale : fr-FR (fr_FR.UTF-8); Calc: group

using MySQL Connector/J 5.1.39 to a LAN mysql instance.


@PJG51 : what I meant with type of JDBC connection is what is the connection type you see displayed in the bottom left hand corner of the main database window when you open the file ?
Comment 6 Alex Thurgood 2016-11-07 07:20:32 UTC
@PJG51 : In my setup, I'm using the specific MySQL JDBC setup code provided by LO. This displays as MySQL(JDBC) in the bottom left hand corner of the main Base window.
Comment 7 Alex Thurgood 2016-11-07 07:21:52 UTC
I am using JDK 1.8.0_102
Comment 8 Alex Thurgood 2016-11-07 07:58:35 UTC
So, I set up a normal (i.e. default JDBC choice via the wizard) JDBC connection with the following configuration strings :

jdbc: mysql://xxx.xxx.xxx.xxx/mydatabase?zeroDateTimeBehavior=convertToNull

where xxx.xxx.xxx.xxx is an IPV4 address on my LAN using the default mysql 3306 port

and driver class :

com.mysql.jdbc.Driver

and this works fine too, no crashes, in LibreOffice

Version: 5.2.1.2
Build ID: 31dd62db80d4e60af04904455ec9c9219178d620
Threads CPU : 2; Version de l'OS :Mac OS X 10.12; UI Render : par défaut; 
Locale : fr-FR (fr_FR.UTF-8); Calc: group

The zeroDateTimeBehaviour property is just to avoid error messages when opening tables with mysql zero dates, it doesn't make a difference to whether or not I can open my tables.
Comment 9 Alex Thurgood 2016-11-07 08:09:53 UTC
Updated my JDK installation to JDK 1.8.0_112, no crashes when loading ODB file or opening tables once the ODB is loaded.

@PJG51 : there must be something more specific that is causing the crash. Without a sample table and sample data (DML/DDL statements or SQL dump) or other salient details with which to reproduce the crash, we won't be able to move forward much with this report.
Comment 10 Alex Thurgood 2016-11-07 08:30:55 UTC
OK, so just tested against 5162 downloaded today, and I can reproduce the crash.

This is clearly a regression, and shouldn't have happened in a version that is supposed to be "stable".

CONFIRMING
Comment 11 Alex Thurgood 2016-11-07 08:36:20 UTC
The crash occurs irrespective of the JDBC connection type. I could reproduce both with a simple JDBC connection, and a MySQL(JDBC) connection.
Comment 12 Alex Thurgood 2016-11-07 08:42:14 UTC
OK, so running LO 5162 in lld, I see this when the authentication dialog is filled in and I click on OK to send authentication data :

libc++abi.dylib: terminating with unexpected exception of type jfw_plugin::MalformedVersionException
Process 2170 stopped
* thread #1: tid = 0x1394e5f, 0x00007fff925d2dda libsystem_kernel.dylib`__pthread_kill + 10, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
    frame #0: 0x00007fff925d2dda libsystem_kernel.dylib`__pthread_kill + 10
libsystem_kernel.dylib`__pthread_kill:
->  0x7fff925d2dda <+10>: jae    0x7fff925d2de4            ; <+20>
    0x7fff925d2ddc <+12>: movq   %rax, %rdi
    0x7fff925d2ddf <+15>: jmp    0x7fff925cbd6f            ; cerror_nocancel
    0x7fff925d2de4 <+20>: retq   
(lldb) 


The malformed version exception smells like a Java version recognition error - sigh. Has this silly bug raised its head again ? I thought this had been fixed for the 5.1.x branch by Caolan ?
Comment 13 Alex Thurgood 2016-11-07 08:42:58 UTC
@Stephan : more jfw woes, it appears.
Comment 14 Alex Thurgood 2016-11-07 08:49:55 UTC
Created attachment 128540 [details]
full bt
Comment 15 Julien Nabet 2016-11-07 09:00:37 UTC
Alex: I think 5.1 is EOL indeed, I don't think there'll be an LO 5.1.7.
If I well understood, there's no reproduction of this pb in 5.2 branch.
Should it be WFM with target 5.2.2 ?
Comment 16 Alex Thurgood 2016-11-07 09:04:01 UTC
Tested against 

Version: 5.1.5.2
Build ID: 7a864d8825610a8c07cfc3bc01dd4fce6a9447e5
Threads CPU : 2; Version de l'OS :Mac OS X 10.12; UI Render : par défaut; 
Locale : fr-FR (fr_FR.UTF-8); Calc: group


No crash.
Comment 17 Alex Thurgood 2016-11-07 09:13:35 UTC
(In reply to Julien Nabet from comment #15)
> Alex: I think 5.1 is EOL indeed, I don't think there'll be an LO 5.1.7.
> If I well understood, there's no reproduction of this pb in 5.2 branch.
> Should it be WFM with target 5.2.2 ?

Hi Julien,

Indeed, no crashing in 5.2.1.2 (although I haven't tested 5.2.3 yet). 

Even if I understand that 5.1.x is going to be EOL, I really hate how we can release a "bug fix release" for an EOL branch that introduces a regression like this - it really reflects poorly on the way we do things, especially as we encourage people to upgrade to latest bug fixed release.

5.2.x is at the moment classed as "Fresh", whereas 5.1.x is "Still", and I quote from the relevant web site page "LibreOffice Still is the stable version that has undergone more testing (over a longer time)." This kind of marketing speak clearly creates a mismatch between user expectations and the reality of developing our code base.
Comment 18 Stephan Bergmann 2016-11-07 09:14:56 UTC
(In reply to Alex Thurgood from comment #12)
> The malformed version exception smells like a Java version recognition error
> - sigh. Has this silly bug raised its head again ? I thought this had been
> fixed for the 5.1.x branch by Caolan ?

Looks like <https://gerrit.libreoffice.org/#/c/27426/> "https://gerrit.libreoffice.org/#/c/27426/" was only backported to libreoffice-5-1-5, but not to libreoffice-5-1, so the fix disappeared again from LO 5.1.6.  (And follow-up <https://cgit.freedesktop.org/libreoffice/core/commit/?id=a3b3c5fcd7efd3e33a0f0078bd6fd23689c45c41> "Related: tdf#101057 inherit MalformedVersionException from std::exception" appears to not have been backported to any libreoffice-5-1*.
Comment 19 Alex Thurgood 2016-11-07 09:28:52 UTC
Thanks Stephan. So an unfortunate happenstance indeed.

@PJG51 : sorry to say, but your only alternative currently is to either downgrade to 5.1.5.2, or to switch to 5.2.x.


No crashes with 

Version: 5.2.3.3
Build ID: d54a8868f08a7b39642414cf2c8ef2f228f780cf
CPU Threads: 2; OS Version: Mac OS X 10.12; UI Render: default; 
Locale: fr-FR (fr_FR.UTF-8); Calc: group


Closing as WFM because 5.1.x will be EOL in less than a month and as Julien has mentioned, I doubt that there will be any further releases in the 5.1.x line before end of November 2016 (at least, I don't see any programmed as such in the release plan).
Comment 20 PJG51 2016-11-07 16:53:17 UTC
Last tries…

I connected again JDK 1.8.0_91 and it works well, with LO 5.1.6.2 and Sierra 10.12.1.
Strange, isn't it ?

With JDK 1.8.0_112 all version of LO from 5.1.3.x to 5.1.6.2 crashes attempting to connect to com.mysql.jdbc.Driver.

PJG
Comment 21 Stephan Bergmann 2016-11-07 17:04:46 UTC
(In reply to PJG51 from comment #20)
> I connected again JDK 1.8.0_91 and it works well, with LO 5.1.6.2 and Sierra
> 10.12.1.
> Strange, isn't it ?

No, given that the underlying issue is about Java runtime versions with a three digit "update number" ("_112") and that one has a two-digit one ("_91").

> With JDK 1.8.0_112 all version of LO from 5.1.3.x to 5.1.6.2 crashes
> attempting to connect to com.mysql.jdbc.Driver.

The theory is that LO 5.1.5 should work (or else there's maybe yet another issue that's causing a crash for you with LO 5.1.5).
Comment 22 Stephan Bergmann 2016-11-16 20:35:41 UTC
*** Bug 103939 has been marked as a duplicate of this bug. ***