[MDEV-9380] MariaDB server crashes with CONNECT engine ODBC and MySQL driver Created: 2016-01-07 Updated: 2020-11-06 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - Connect |
| Affects Version/s: | 10.1.10 |
| Fix Version/s: | 10.1 |
| Type: | Bug | Priority: | Major |
| Reporter: | Robert Dyas | Assignee: | Olivier Bertrand |
| Resolution: | Unresolved | Votes: | 2 |
| Labels: | connect-engine | ||
| Environment: |
CentOS7 (standard Google Compute Engine image) |
||
| Attachments: |
|
||||||||||||
| Issue Links: |
|
||||||||||||
| Description |
|
MariaDB server crashes when I select from a CONNECT table of type ODBC that uses the MySQL 5.3 ODBC connector. Note that I CAN select from a CONNECT table that uses ODBC and FreeTDS driver, and that both the FreeTDS driver and MySQL driver work fine in isql. For example, the following works without any problem:
This is with a clean install of CentOS 7 Google Compute Engine, as follows:
Please let me know what else you need! |
| Comments |
| Comment by Robert Dyas [ 2016-01-07 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Please let me know if there is any additional info you need on this. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Olivier Bertrand [ 2016-01-11 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I did have problems using the MySQL ODBC connector. For instance, in the documentation under "Multiple ODBC tables" I have inserted this: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Robert Dyas [ 2016-01-12 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The big reason not to use the MYSQL table type is that the databases are remote and, as far as I can see, there is no way to do a MYSQL table type with an SSL connection. If there is, that would solve my problem. Also, are there any other ODBC connectors you tried that are known to be incompatible? We have a near term need for DB2 also. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Alexander Barkov [ 2016-01-13 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
It seems to work fine on my box: OS version: Fedora 23 odbcinst.ini:
odbc.ini:
SQL script:
it returned the list of the tables without any problems:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Alexander Barkov [ 2016-01-13 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I did not use SSL though. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Alexander Barkov [ 2016-01-13 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I tried ConnectSE+ODBC on Linux with:
and on Windows:
Olivier, which combinations did you try? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Alexander Barkov [ 2016-01-13 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
One of our users also successfully connected to the Intersystems Caché server. There were some SELinux related problems initially though, but they were solved. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Robert Dyas [ 2016-01-13 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Via isql I could get an ODBC connection with and without SSL, but via CONNECT I could not get it to work even without SSL. I wonder if the problem is related to unixODBC? You were on 2.3.4 while centos7 is on 2.3.1. Note previous to my centos7 test I tried and failed to get it working on Ubuntu trusty. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Olivier Bertrand [ 2016-01-13 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
On Windows 7 I loaded MySQL connector version 5.3.04 and tried your case using the ANSI and Unicode drivers with no problems:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Olivier Bertrand [ 2016-01-13 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The CONNECT tests are done using the Oracle, Postgres, Sqlite3, and XLS drivers and pass on all platform supporting them. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Alexander Barkov [ 2016-01-14 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Olivier, it seems there are some problems with table discovery. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Alexander Barkov [ 2016-01-14 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Olivier, please also have a look into this one: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Robert Dyas [ 2016-01-14 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Note that in the odbcinst.ini file there are three different MySQL ODBC drivers; I have tried each of them without success. odbcinst.ini file:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Robert Dyas [ 2016-01-14 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Version info for the above drivers is below. My tests have been with the 5.3.x drivers, not the 5.2.x
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Olivier Bertrand [ 2016-01-14 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I also used the ANSI and Unicode drivers and both work fine. In the present case, we are in a situation because I cannot reproduce the bug Alexander has. By the way, it does not seem to be coming from the MySQL connector not handling SQLPrepare because the same connector works fine on my Windows machine. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Robert Dyas [ 2016-01-15 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Is it possible for you to try a linux distro with unixODBC 2.3.1? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Robert Dyas [ 2016-02-19 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Is there anything I can provide you to help with this bug? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Olivier Bertrand [ 2016-02-19 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Please explain what really happens. The title speak of a crash, then your description shows an indefinite loop. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Robert Dyas [ 2016-02-19 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
This issue of crashing appears very specific to the MySQL ODBC driver. It will take me a few days to build up an environment just for testing this... if you would like I can do so and then run some more tests. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Olivier Bertrand [ 2016-02-20 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Both 9414 and 9415 traces possibly show that the crash occurs in the MySQL connector. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Chris Calender (Inactive) [ 2016-12-12 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Seeing this in 10.0.16 as well. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Olivier Bertrand [ 2016-12-12 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Signal 11 generally shows that one of the numerous infamous DEBUG_ASSERT MariaDB is full off has triggered a crash. Are you using a DEBUG version? Another thing that could help me, because I am unable to reproduce this, would be to set the connect_xtrace variable to 1 or 2 allowing to see what was executed before the crash. Note also that using ODBC to connect to MySQL or MariaDB is a bad idea. You should use instead the MYSQL table type or the FEDERATED(X) storage engine. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Chris Calender (Inactive) [ 2016-12-12 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Nope, not a debug version: 10.0.16-MariaDB-log | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Chris Calender (Inactive) [ 2016-12-12 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Olivier, can you see the "private" comment? It has the exact query run - which is a simple SELECT: SELECT * FROM t1 LIMIT 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Chris Calender (Inactive) [ 2016-12-12 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi Olivier, Also, regarding this comment: "Note also that using ODBC to connect to MySQL or MariaDB is a bad idea. You should use instead the MYSQL table type or the FEDERATED(X) storage engine." I'm not quite sure what you mean. I mean, I read the following page, which says you can use CONNECT with ODBC: Unless I am misunderstanding something. Presumably that is the case, so if you could please elaborate a little more, that would be most appreciated, as the link above makes it seem like this should be possible. And regardless, there still seems to be some crashing bug that needs fixed, so I think we should attempt to resolve this. Also, regarding connect_xtrace, I'm not so sure they can set this in production, since it requires both a restart and the --console option. I'm not sure of any production system where one can start using --console if they are not already. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Olivier Bertrand [ 2016-12-13 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
In the document you mention in you last comment, there is a paragraph beginning with "Caution" that already was warning the user about using ODBC to connect to MySQL or MariaDB. But the general idea about all this is:
In addition, if you really need to have a connection that is independent of the data source (like using the TBL type to access many data sources) CONNECT now features the JDBC table type. I still understand that it is important to find the cause of a crash and I shall continue to work on this but things are very difficult when bugs cannot be reproduced. This is why I was telling you about tracing, not as a general thing to do, but just to add it to the log report you can attach to this JIRA report (using preferably a DEBUG version of the server) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Olivier Bertrand [ 2016-12-13 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Looking into the error log snippet I see:
Did the crash happened during the query or when trying to cancel it because it was looping? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Chris Calender (Inactive) [ 2016-12-13 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
HI Olivier, Sorry, but I am still a little confused. The caution is about using CONNECT to connect to a MySQL/MariaDB table. However, this is not the case. They are trying to access a OneTick ODBC table from another source in their MariaDB instance using CONNECT. So it seems like it is the other way around from what you are stating, but perhaps I am missing something. Also, I do not see how I would create a FederatedX table to accomplish this, nor do I see how changing the type to MYSQL would make a difference either. All of the federated examples show it connecting to another MySQL/MariaDB table, but that is not the case here. Please advise. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Olivier Bertrand [ 2016-12-14 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
My turn to be confused. MariaDB server crashes when I select from a CONNECT table of type ODBC that uses the MySQL 5.3 ODBC connector. Note that I CAN select from a CONNECT table that uses ODBC and FreeTDS driver, and that both the FreeTDS driver and MySQL driver work fine in isql. I understood that this report was about crashes occurring when using the MySQL ODBC connector. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Chris Calender (Inactive) [ 2016-12-14 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hehe, understandable. First, perhaps I should not have added my comments to this existing bug. I thought it was close enough to what I was seeing, and there was not a resolution to this bug, so (at the time) I thought it would be a good idea to add what I'd seen to this bug report. I see now that was not a good idea. Can you start at just what I posted, as I really cannot comment on what happened previously? Or, would it be better if I contacted you outside of this bug report? |