[MDEV-9091] mysqld crashes on shutdown after running TokuDB tests on Ubuntu Created: 2015-11-06 Updated: 2022-11-10 Resolved: 2022-11-10 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - TokuDB |
| Affects Version/s: | 10.0.22 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Alexander Barkov | Assignee: | Vicențiu Ciorbaru |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | portability | ||
| Issue Links: |
|
||||||||||||||||
| Sprint: | 10.1.9-3 | ||||||||||||||||
| Description |
|
Login to a Ubuntu-15.10 x86_64 machine, e.g. like this:
Run the following commands:
It generates the following output:
Now If I run with gdb:
it displays the following stack trace:
|
| Comments |
| Comment by Alexander Barkov [ 2015-11-06 ] | |||||||||
|
If I compile with the standard debug mode:
or with the release mode without setting the "-g -Wl,-Bsymbolic-functions " flags:
the problem disappears. | |||||||||
| Comment by Otto Kekäläinen [ 2016-11-25 ] | |||||||||
|
This is still present in https://launchpadlibrarian.net/293123979/buildlog_ubuntu-zesty-amd64.mariadb-10.0_10.0.28-2_BUILDING.txt.gz
| |||||||||
| Comment by Vicențiu Ciorbaru [ 2016-11-28 ] | |||||||||
|
This was fixed by:
We should re-enable the tests and see if we get crashes again. | |||||||||
| Comment by Vicențiu Ciorbaru [ 2016-11-28 ] | |||||||||
|
The way this bug happens is that TokuDB on loading of the .so file calls malloc (jemalloc's malloc). Jemalloc in turn sets some thread specific data and attaches destructors to them. The destructor functions come from TokuDB's internally linked jemalloc library. On library unload however, the thread lives on a bit longer and we lose the destructor functions. When the thread finally ends it has no more destructor functions available, so it crashes. Without -Bsymbolic-functions it works, because the server keeps its own copy of jemalloc and without the compile flag, the destructor function is actually from the first occurrence of the symbol (the server's jemalloc library). | |||||||||
| Comment by Elena Stepanova [ 2022-11-10 ] | |||||||||
|
TokuDB is not provided since 10.5. |