[MDEV-5905] Creating tmp. memory table kills the server Created: 2014-03-19 Updated: 2014-03-26 Resolved: 2014-03-26 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 5.5.36, 10.0.9 |
| Fix Version/s: | 5.5.37, 10.0.10 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Slawomir Pryczek | Assignee: | Michael Widenius |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | upstream | ||
| Environment: |
FC 20, Tokudb installed from binary distribution found on tokudb website |
||
| Attachments: |
|
| Description |
|
Version: 5.5.36-tokudb-7.1.5-MariaDB-log It seems that's data or structure dependent, if i do SELECT `domain` instead of `id` it won't crash. Also when i switch to other table, and do SELECT `id` it won't crash. Table:
After issuing this query the DB is killed
I made some other steps:
For DB dump please contact me on email if you like to see, sorry, there's some domain data so don't want to share in public. pslawek83 Attaching dump... BTW: We had problems with making mariadb with toku running on FC20, compilation error then we compiled using mysql_release (instead of Release) but we ended up with debug version. Anything you can suggest that's tested? (OS + compile? OS + binary?) Thanks everyone as always |
| Comments |
| Comment by Slawomir Pryczek [ 2014-03-20 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
We have nailed down the error to this config line. After 20GB limit it seems that at random number the DB is crashing while creating memory table, like in attached log. The server has 128GB of RAM. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Slawomir Pryczek [ 2014-03-20 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Another update, after issuing that query it appears that it's retutning correctly, just the VERY NEXT query is killing the server (that's query to get status from navicat)... In command line you need to issue the query and then issue | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2014-03-24 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi Slawomir, If the problem only occurs on TokuDB build of MariaDB (the one that you downloaded from TokuDB site), but does not occur on the MariaDB release of the same number, then the better place to file the bug would probably be here: https://github.com/Tokutek/mariadb-5.5/issues . But it makes sense to check first that it is indeed Tokutek-build-specific. Please note that if you just need MariaDB with TokuDB engine, and don't have any particular preferences for Tokutek builds, you can use the regular MariaDB release, it contains TokuDB engine, you just need to enable it. Use the MariaDB yum repo as described in https://downloads.mariadb.org/mariadb/repositories/#mirror=mephi&distro=Fedora&distro_release=fedora20-amd64&version=5.5 After you started the server, run INSTALL SONAME 'ha_tokudb'. The TokuDB engine will be installed. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Slawomir Pryczek [ 2014-03-25 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Error logs from other versions / distributions | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Slawomir Pryczek [ 2014-03-25 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
SQL File to test the bug | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Slawomir Pryczek [ 2014-03-25 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi Elena, thank you for the answer... Actually the problem wasn't reproduced on .35 because config was different on this server when i checked, sorry for confusion. I was able to reproduce on .34 (debian wheezy from repo) and also .35 installed from mariadb, when config was changed in console. Versions strings are: I created some very small table without indexes, and the bug is still there. SQL for testing: SET max_heap_table_size = 1024*1024*1024*20; CREATE TEMPORARY TABLE __somerandomtablename81872 ENGINE=MEMORY When i run the query both servers were killed or restarted... (sometimes it just restarts mysqld server, sometimes kills it - the process just hangs up and won't accept any new connections) Im attaching all logs and SQL file to reproduce that. Very important: i was only able to get this bug when i connected to server from remote machines. From local mysql console, it seems working normally. So may be networking related. I can give you access to the server with debian/.34 as it's my own dev machine, so you can see... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Slawomir Pryczek [ 2014-03-25 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Another quick comment... when i do: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2014-03-25 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Slawomir, Thanks a lot for the test case. I was able to reproduce the crash with it. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2014-03-25 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi Slawomir, It turns out the bug is reproducible on Oracle MySQL. In such cases we also file reports at bugs.mysql.com to inform upstream about the problem. Do you prefer to do it yourself, or should we do it on your behalf? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2014-03-25 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Even though it is an upstream bug, maybe we should not wait for the upstream fix. I've attached mdev5905.test - the very same data/query as Slawomir reported, just put together in one file. It causes a crash, here is the stack trace from 5.5 revno 4115, revision-id revision-id: holyfoot@askmonty.org-20140323144448-ehflksuvchgcr49y:
Here is also mdev5905-2.test - the minimal test case. It does not necessarily cause a crash, but produces valgrind warnings:
Also, both cases produce "Error: Freeing unallocated data or underrun buffer mysys/safemalloc.c:179, mysys/my_malloc.c:120, sql/sql_plugin.cc:1272, sql/sql_plugin.cc:1329, sql/sql_lex.cc:553, sql/sql_class.cc:3236, sql/sql_parse.cc:5817, sql/sql_parse.cc:1081" on a debug version Both test cases should be re-checked after the fix. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Slawomir Pryczek [ 2014-03-25 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi Elena, Thanks | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2014-03-26 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Refiled as http://bugs.mysql.com/bug.php?id=72128 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Michael Widenius [ 2014-03-26 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Pushed into 5.5 |