HandlerSocket-Plugin-for-MySQL icon indicating copy to clipboard operation
HandlerSocket-Plugin-for-MySQL copied to clipboard

Issues with handlersocket

Open ErikGoldman opened this issue 15 years ago • 4 comments

I'm building handlersocket against MySQL 5.1.51 and I'm getting a bunch of problems.

First of all, when I try to shut down MySql, I get: [egoldman@turtle-06 5.1.51]$ sudo /etc/init.d/mysql stop Shutting down MySQL.*** glibc detected *** /usr/sbin/mysqld: double free or corruption (!prev): 0x0000000009237bc0 *** ======= Backtrace: ========= /lib64/libc.so.6[0x3402e7230f] /lib64/libc.so.6(cfree+0x4b)[0x3402e7276b] /usr/lib64/mysql/plugin/handlersocket.so(_ZN4dena9dbcontext11term_threadEv+0x3d)[0x2aaaab5d858d] /usr/lib64/mysql/plugin/handlersocket.so(_ZN4dena15hstcpsvr_worker3runEv+0x75)[0x2aaaab5e1905] /usr/lib64/mysql/plugin/handlersocket.so(_ZN4dena6threadINS_13worker_throbjEE11thread_mainEPv+0xd)[0x2aaaab5e5a8d] /lib64/libpthread.so.0[0x3403a0673d] /lib64/libc.so.6(clone+0x6d)[0x3402ed3d1d] [...]

and then when I try to run your sample client, I get:

[egoldman@turtle-06 mysql_stuff]$ ./hs_client.pl Can't load '/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/Net/HandlerSocket/HandlerSocket.so' for module Net::HandlerSocket: /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/Net/HandlerSocket/HandlerSocket.so: undefined symbol: _ZN4dena13verbose_levelE at /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/XSLoader.pm line 70. at /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/Net/HandlerSocket.pm line 31 Compilation failed in require at ./hs_client.pl line 5. BEGIN failed--compilation aborted at ./hs_client.pl line 5.

any idea what's going on?

ErikGoldman avatar Oct 29 '10 19:10 ErikGoldman

Maybe the former issue is a compilation problem. I could not reproduce it. If you think it's not a compilation problem, please provide more info so that I can reproduce it.

The latter issue seems to be that the dynamic linker can't find libhsclient.so. Executing 'ldd /path/to/HandlerSocket.so' will show if the dynamic linker can find it or not. If not, add the folder name containing libhsclient.so to /etc/ld.so.conf and execute '/sbin/ldconfig -v' as root.

ahiguti avatar Oct 30 '10 13:10 ahiguti

So, it doesn't seem that it can find the library:

[egoldman@turtle-06 mysql_stuff]$ ldd /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/Net/HandlerSocket/HandlerSocket.so libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00002af8495a1000) libm.so.6 => /lib64/libm.so.6 (0x00002af8498a1000) libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00002af849b24000) libc.so.6 => /lib64/libc.so.6 (0x00002af849d33000) /lib64/ld-linux-x86-64.so.2 (0x0000003402a00000)

but then

[egoldman@turtle-06 mysql_stuff]$ sudo /sbin/ldconfig -v | grep hs libhsclient.so.0 -> libhsclient.so.0.0.0

thoughts?

ErikGoldman avatar Nov 01 '10 17:11 ErikGoldman

Also, when compiling the perl module, I get:

[egoldman@turtle-06 perl-Net-HandlerSocket]$ perl Makefile.PL 
Note (probably harmless): No library found for -lhsclient
Writing Makefile for Net::HandlerSocket

but then I see

[egoldman@turtle-06 perl-Net-HandlerSocket]$ ls /usr/local/lib
libhsclient.a  libhsclient.la  libhsclient.so  libhsclient.so.0  libhsclient.so.0.0.0

ErikGoldman avatar Nov 01 '10 19:11 ErikGoldman

The ldd result shows that HandlerSocket.so is not linked against libhsclient.so. If -lhsclient is not found, compiling HandlerSocket.so must fail. I have no idea how you compiled HandlerSocket.so.

ahiguti avatar Nov 01 '10 22:11 ahiguti