[MDEV-17953] MariaDB 10.2.19 with TokuDB incompatible with Jemalloc 5+ Created: 2018-12-09 Updated: 2018-12-20 Resolved: 2018-12-20 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Compiling, Packaging |
| Affects Version/s: | 10.2.19 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Critical |
| Reporter: | Ján Regeš | Assignee: | Sergei Golubchik |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | jemalloc, tokudb | ||
| Environment: |
Gentoo Linux |
||
| Issue Links: |
|
||||||||
| Description |
|
Hi, after update to newer packages in my Gentoo Linux (MariaDB 10.2.19 with TokuDB support and latest Jemalloc 5.1.0), mysql failed to start with error below (cannot allocate memory in static TLS block). After downgrade jemalloc to version 4.5.0 it works fine. Probably, it's related to Proposed solution is maybe disabling jemalloc support or mask to jemalloc version under 5? Thank you.
|
| Comments |
| Comment by Sergei Golubchik [ 2018-12-11 ] | |||
|
You're right. It's the same issue as The thing is, there are, basically, two ways to install MariaDB — RPM/DEB packages, where we know that the run-time configuration won't be much different from the build configuration, and we can install files in /etc. And binary tarballs, that are just unpacked anywhere on the filesystem. In the first case we we don't link TokuDB with jemalloc, but preload it with LD_PRELOAD. This needs some changes in files in /etc. In the second case we link with jemalloc statically and our build host uses old jemalloc. Gentoo should be more like the first case, but it builds using the bintar way. I'll see what we can do here... | |||
| Comment by Ján Regeš [ 2018-12-11 ] | |||
|
Sergei, thank you very much! Just for now, we'll temporarily mask jemalloc 5+ versions. | |||
| Comment by Sergei Golubchik [ 2018-12-15 ] | |||
|
grknight, so far as I cannot see a good fix that will work for Gentoo and won't make bintar builds worse for everyone else (normally people build tokudb just in case, and use mysqld_safe or systemd). But I see you do this for tcmalloc:
You can do the same for jemalloc and it should solve the issue for Gentoo. | |||
| Comment by Sergei Golubchik [ 2018-12-20 ] | |||
|
jan.reges, another option that you could is to LD_PRELOAD jemalloc. This will work with jemalloc 5 too. I think that if you set LD_PRELOAD in a /etc/conf.d/ file, it'll affect mysqld just fine. | |||
| Comment by Ján Regeš [ 2018-12-20 ] | |||
|
Hi Sergei, I reported your solution to Gentoo ticket system: https://bugs.gentoo.org/673470 Thank you for your time. Merry Christmas and a Happy New Year |