Bug #46977 innodb plugin v1.0.4 requres glibc 2.5 or newer
Submitted: 28 Aug 17:12 Modified: 2 Sep 12:39
Reporter: Matthew Lord
Status: In progress
Category:Server: InnoDB Plugin Severity:S2 (Serious)
Version:1.0.4 OS:Linux
Assigned to: Vasil Dimov Target Version:
Tags: glibc

[28 Aug 17:12] Matthew Lord
Description:
I've only seen this on x86_64 platforms so far but I suspect it affects x86 as well.

If you're glibc version is less than 2.5 you'll encounter one of two errors:
1) ha_innodb.so' (errno: 0 requires glibc 2.5 or later dynamic linker)
2) ld actually tries to link in the library and mysqld dies with a signal 8

How to repeat:
try to use mysql-5.1.37-linux-x86_64-glibc23.tar.gz with
innodb_plugin-1.0.4-linux-x86_64-glibc23.tar.gz 

Suggested fix:
Correct the build process so that only glibc 2.3 or newer is needed.
[2 Sep 12:39] Vasil Dimov
Hello,

I am able to reproduce this:

(gdb) bt
#0  0x00002b9b54ac7b83 in do_lookup_x () from /lib64/ld-linux-x86-64.so.2
#1  0x00002b9b54ac7f9a in _dl_lookup_symbol_x () from /lib64/ld-linux-x86-64.so.2
#2  0x00002b9b54ac9669 in _dl_relocate_object () from /lib64/ld-linux-x86-64.so.2
#3  0x00002b9b552bb733 in dl_open_worker () from /lib/libc.so.6
#4  0x00002b9b54acb7d1 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2
#5  0x00002b9b552badd8 in _dl_open () from /lib/libc.so.6
#6  0x00002b9b54cee115 in dlopen_doit () from /lib/libdl.so.2
#7  0x00002b9b54acb7d1 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2
#8  0x00002b9b54cee64a in _dlerror_run () from /lib/libdl.so.2
#9  0x00002b9b54cee0d2 in dlopen@@GLIBC_2.2.5 () from /lib/libdl.so.2
#10 0x000000000074f50c in plugin_dl_add (dl=0x7fff55fe9480, report=1) at
sql_plugin.cc:387
#11 0x0000000000750ccf in plugin_add (tmp_root=0x7fff55fe93f0, name=0x7fff55fe9470, 
    dl=0x7fff55fe9480, argc=0xcdb430, argv=0xcf6788, report=1) at sql_plugin.cc:733
#12 0x000000000075283f in plugin_init (argc=0xcdb430, argv=0xcf6788, 
    flags=<value optimized out>) at sql_plugin.cc:1490
#13 0x00000000005df355 in init_server_components () at mysqld.cc:3883
#14 0x00000000005e360c in main (argc=<value optimized out>, argv=<value optimized out>)
    at mysqld.cc:4355

ha_innodb.so must be linked with --hash-style=both in order to work on libc 2.3 systems.
Originally we compile it on libc 2.5 system. Binary compiled without --hash-style=both
shows this in objdump -h:

Idx Name          Size      VMA               LMA               File off  Algn
  0 .gnu.hash     000001ec  0000000000000158  0000000000000158  00000158  2**3
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  1 .dynsym       000018c0  0000000000000348  0000000000000348  00000348  2**3
                  CONTENTS, ALLOC, LOAD, READONLY, DATA

Binary compiled with --has-style=both shows:

Idx Name          Size      VMA               LMA               File off  Algn
  0 .hash         0000073c  0000000000000158  0000000000000158  00000158  2**3
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  1 .gnu.hash     000001ec  0000000000000898  0000000000000898  00000898  2**3
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  2 .dynsym       000018c0  0000000000000a88  0000000000000a88  00000a88  2**3
                  CONTENTS, ALLOC, LOAD, READONLY, DATA

(Thanks, Sunny and Marko!)

For 1.0.4 either compile your own ha_innodb.so from source or use the official ones on
libc >=2.5 systems. For 1.0.5 we will fix this problem.

Thank you!
[19 Sep 18:40] JF Prieur
I am a little confused by this bug, I am trying to install plugin version 1.0.4 on Mysql
5.1.37 on Fedora 11. I get this error, but the glibc version on my system is 2.10 so why
am I having this problem? Or is it the fact that the plugin binary was compiled with 2.3
that is causing me to have this issue? Was really looking forwards to trying out this
plugin...
[19 Sep 18:53] JF Prieur
Sorry for the spam, just to let you know that I used the RHEL5 binary and it starts up
without any errors. This is on a 64-bit system FYI.
[21 Sep 7:18] Vasil Dimov
JF Prieur,

Right, the problem occurs if the plugin is used on a too-old libc, not too new :)

Thanks!