[MDEV-11386] advance-toolchain non-current ld cache preventing installation Created: 2016-11-29 Updated: 2017-03-02 Due: 2017-03-03 Resolved: 2017-03-02 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Platform Power, Platform RedHat |
| Affects Version/s: | 10.0, 10.1, 10.2.4 |
| Fix Version/s: | 10.0.30, 10.1.22, 10.2.5 |
| Type: | Bug | Priority: | Major |
| Reporter: | Jimmy Halim | Assignee: | Sergey Vojtovich |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | contribution, foundation, patch | ||
| Environment: |
mariadb version 10.0 and mariadb version 10.1 for linux |
||
| Attachments: |
|
| Sprint: | 10.0.30 |
| Description |
|
I try to install mariadb version 10.0 and version 10.1 for RedHat Enterprise Linux 7.2 ppc64. it's run successfully but when i try to start the services. it show error : "error while loading shared libraries: libjemalloc.so.1: cannot open shared object file: No such file". Really need your help ASAP on this issue. |
| Comments |
| Comment by Elena Stepanova [ 2016-11-29 ] | |||||||||||||||||||||||||
|
Which packages are you trying to install, exactly? Please paste the full file name for the server package, for example. | |||||||||||||||||||||||||
| Comment by Jimmy Halim [ 2016-12-07 ] | |||||||||||||||||||||||||
|
i just installed mariadb 10.1 on my ppc64 server, but while installing there some errors appear which is jemalloc errors (see file attached) i already analyzed it and seems mariadb cannot create system tables because of it (jemalloc error). but on process install, there's jemalloc on the package and seems to be ok with packages install | |||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2016-12-26 ] | |||||||||||||||||||||||||
|
The attachment does not show anything useful, only the warning that the key is not installed, which in itself doesn't mean much. | |||||||||||||||||||||||||
| Comment by Pramudya Aditya [ 2016-12-27 ] | |||||||||||||||||||||||||
|
Hai Elena Heres the error files Jimmy is my friend and we tried to install MariaDB 10.1 on PPC64 IBM. jemalloc already installed but the error seems around in jemalloc. and the effect was MariaDB cannot create system tables on default directory (/var/lib/mysql). why this happened? | |||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2016-12-27 ] | |||||||||||||||||||||||||
|
danblack, In the buildbot config, we have this comment which might be relevant:
And so we build packages for Red Hat 7 with jemalloc, but for Red Hat 7.1 – without. However, we don't seem to provide 7.1 packages currently. On the other hand, pramudyapp says that it does not work even on a machine where jemalloc is installed – I guess either it's a wrong jemalloc, or it's installed in a wrong location? svoj, also FYI. | |||||||||||||||||||||||||
| Comment by Pramudya Aditya [ 2016-12-28 ] | |||||||||||||||||||||||||
|
@Elena Stepanova I already installed again (MariaDB 10.1.20) from fresh OS installation and seems not working again. The error showing caused by jemalloc again. I was looking for error log on /var/lib/mysql and that was same error clue again on the attachment before (dev-hcms.appdb.err). I have no clue at all right now. our machine is RHEL 7.2 (Maipo) and here its when i ran ldd <path to mysqld> linux-vdso64.so.1 => (0x00003fff98400000) i tried to execute command => lscpu | grep -y byte. And the result is : Big Endian (fyi, check attachment for full error log while installation) | |||||||||||||||||||||||||
| Comment by Pramudya Aditya [ 2016-12-28 ] | |||||||||||||||||||||||||
|
Hai finally MariaDB already installed with a 'little bit tricky'. I saw jemalloc.so.1 cannot be load by mysqld service so i tried running mysqld_safe with parameter malloc-lib and then pointing to /usr/lib64/libjemalloc.so.1 But seems not finish already, i must install system database which is mysql db itself. So i tried to copy mysql db folder on another mariadb server to my ppc server. Then mysqld_safe is running now But i know that way was 'naive' way, my question is why libjemalloc.so.1 cannot be loaded by mysqld script (which is mariadb service) on PPC? It doesnt supposed to be like that | |||||||||||||||||||||||||
| Comment by Daniel Black [ 2017-01-09 ] | |||||||||||||||||||||||||
|
I'm not usually doing packages (but I probably should). I'll look into the cause of this tomorrow after I get a RHEL7.2 BE instance going. Notes so far: As M4t and pramudyapp indicate, this is a PPC64 (big endian) install. I'm curious as to why a BE install was chosen over a LE. FYI I haven't enabled CRC32 performance related for Big endian so setting innodb_checksum_algorithm=none may give you performance benefit, especially i you choose to stay on a BE platform. picture.JPG seem to indicate that the jemalloc was installed from EPEL however error1_installation.jpg seem to indicate retrieval from yum.mariadb.org. There might be some library version incompatibility of the libraries needed by jemalloc. As RHEL7.2 is using systemd I assume mysqld_safe shouldn't actually be used. https://mariadb.com/kb/en/mariadb/systemd/ has no direct equivalent documented however it should be possible to set LD_PRELOAD environment variable in systemd to the jemalloc path. The last question as to why any special attention is needed for libjemalloc is still most pertinent and I'll attempt to resolve this. | |||||||||||||||||||||||||
| Comment by Daniel Black [ 2017-01-10 ] | |||||||||||||||||||||||||
|
Ok problem confirmed. Apologies - I was wrong about systemd - seems the RHEL builds don't install/use the systemd service file ( On adding strace to the mysqld_safe in the init script the following was found:
This can be corrected with the following:
To create system tables the following is suggested (rather than copying from another instance):
So for final workarounds: In the install log it seems advance-toolchain-at8.0-runtime.ppc64 is installed before jemalloc was. The advance-toolchain installs /etc/cron.d/at8.0-7_ldconfig which has a helper that seems to watch inotify_add_watch(3, "/etc/ld.so.cache", IN_MODIFY) and triggers its own cache rebuild at any time the /etc/ld.so.cache is rebuilt. Unfortunately this isn't started on the install of advance-toolchain-at8.0-runtime. I'll raise this with the advance-toolchain developers for a potential solution there. As an interim workaround is the following acceptable?
| |||||||||||||||||||||||||
| Comment by Pramudya Aditya [ 2017-01-12 ] | |||||||||||||||||||||||||
|
Hi @Daniel Black Let me try as you suggested above, the server location is on another office and can't remote from outside. I will try again in next week. Thank you!!! | |||||||||||||||||||||||||
| Comment by Daniel Black [ 2017-01-12 ] | |||||||||||||||||||||||||
|
The above workaround is for creating new packages. In the meantime for new installs with the existing packages the following should work: as root:
I'd like some feedback as to why you chose a BE install for PPC64 on a new machine too. Not a bad thing but LE overall is more tested. The same error as above will probably occur with the LE so the same workaound will apply if you choose a ppc64le install. Email me off bug report danielgb@au1.ibm.com if you don't want it to put it here. | |||||||||||||||||||||||||
| Comment by Pramudya Aditya [ 2017-01-19 ] | |||||||||||||||||||||||||
|
Hi @Daniel Black Have you check your personal email?. I sent you email before. Maybe this issue could be fix in new updates? Thank you anyway | |||||||||||||||||||||||||
| Comment by Daniel Black [ 2017-01-23 ] | |||||||||||||||||||||||||
|
Test using RPM build with the changes from https://github.com/MariaDB/server/pull/291 This was build with at10.0 however the same applies with at8.0.
The targets of the Advance Toolchain development are AT 10 release (10.0-3) that will be available [in] March and the next AT 8.0 will be available only [in] April. Looking at https://github.com/MariaDB/server/releases it seems 10.0.29 was 9 days ago and 10.1.21 was 5 days ago making the targets of 10.0.30 and 10.1.22 on https://jira.mariadb.org/projects/MDEV?selectedItem=com.atlassian.jira.jira-projects-plugin%3Arelease-page& are going to be extended. As such 10.2.4 seems like a good goal for the pull request (is | |||||||||||||||||||||||||
| Comment by Daniel Black [ 2017-02-15 ] | |||||||||||||||||||||||||
|
serg, easy workaround in pull request. Acceptable for 10.2.4? | |||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2017-02-19 ] | |||||||||||||||||||||||||
|
1. I'd rather not use bash-isms, this could be done like
2. You wrote "Temporary Workaround ....will be corrected in Advance Toolchain 10.0-3 and 8.0-8". When, do you think, it could happen? | |||||||||||||||||||||||||
| Comment by Daniel Black [ 2017-02-19 ] | |||||||||||||||||||||||||
|
ack. The targets of the Advance Toolchain development are AT 10 release (10.0-3) that will be available in March and the next AT 8.0 will be available in April. | |||||||||||||||||||||||||
| Comment by Daniel Black [ 2017-03-01 ] | |||||||||||||||||||||||||
|
The advance-toolchain source/build is now public https://github.com/advancetoolchain/advance-toolchain - I have an internal IBM bug report that references this bug. I've noticed that the release candidate hasn't fixed this yet. | |||||||||||||||||||||||||
| Comment by Sergey Vojtovich [ 2017-03-02 ] | |||||||||||||||||||||||||
|
Pushed amended version of Daniel's fix. danblack, do you still believe that use of ATC is justified? It gives some performance benefits at cost of painful maintenance issues (both for us and our users). Also how ATC plans to fix that? The only viable solution is to substitute ldconfig with some script that would run both system wide and ATC ldconfig. Cron job is not reasonable solution. | |||||||||||||||||||||||||
| Comment by Daniel Black [ 2017-03-02 ] | |||||||||||||||||||||||||
|
The better solution is for a ld.so that reads both cache files. I'll convey the maintenance burden and see what the fix plan is. I'll look at AT performance in the near future. |