Bug #35506 MySQL Crashes when a remote connection is made

Submitted: 23 Mar 2008 21:10 Modified: 24 Mar 2008 20:59
Reporter: Ruben - Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.51a OS:Linux (Debian stable)
Assigned to: CPU Architecture:Any
Tags: Connection, Debian, linux, optimized, pentium-builder, pgcc

[23 Mar 2008 21:10] Ruben -
Description:
MySQL crashes when a remote connection is made to the server. Server crashes with this stack:

[21:56:39] root@swbforum:~/mysqldebug# /usr/local/mysql/bin/resolve_stack_dump -s mysqld.sym -n mysql.stack
0x80dfb2d handle_segfault + 621
0x8388366 __pthread_sighandler + 102
(nil)
0xb7efc2e8 __stop___libc_freeres_ptrs + -1348856024
0xb7ef18c9 __stop___libc_freeres_ptrs + -1348899575
0xb7ef191d __stop___libc_freeres_ptrs + -1348899491
0xb7d710da __stop___libc_freeres_ptrs + -1350474470
0xb7d71757 __stop___libc_freeres_ptrs + -1350472809
0x83b55b1 __new_gethostbyaddr_r + 209
0x83b5429 gethostbyaddr + 121
0x80e6724 _Z14ip_to_hostnameP7in_addrPj + 68
0x8100607 handle_one_connection + 935
0x83838e4 pthread_start_thread + 420
0x83b323a __clone + 106

This is a custom compiled mysql version to gain performance. I think the optimized compile causes the error.

Other information:
>Release:       mysql-5.0.51a (Source distribution)
>C compiler:    gcc.real (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
>C++ compiler:  gcc.real (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
System: Linux swbforum 2.6.19.1 #1 SMP Mon Dec 25 21:30:11 CET 2006 i686 GNU/Linux
Architecture: i686

Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gcc /usr/bin/cc
GCC: Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr --with-tune=i686 --enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
Compilation info: CC='gcc'  CFLAGS=''  CXX='gcc -O3'  CXXFLAGS=''  LDFLAGS=''  ASFLAGS=''
LIBC:
lrwxrwxrwx 1 root root 13 2008-02-26 11:12 /lib/libc.so.6 -> libc-2.3.6.so
-rwxr-xr-x 1 root root 1147548 2008-01-19 13:14 /lib/libc-2.3.6.so
-rw-r--r-- 1 root root 2602934 2008-01-19 13:14 /usr/lib/libc.a
-rwxr-xr-x 1 root root 204 2008-01-19 12:53 /usr/lib/libc.so
Configure command: ./configure '--localstatedir=/data/mysql' '--with-mysqld-ldflags=-all-static' '--with-mysqld-user=mysql' '--with-charset=latin1' '--prefix=/usr/local/mysql' 'CXX=gcc -O3'

This is compiled with Debian's pentium-builder enabled (export  DEBIAN_BUILDARCH=pentium)

How to repeat:
Connect to mysql server.

Suggested fix:
enable skip-networking causes the server to close it's network port. The bug doesn't occur anymore because no remote connections can be made.
[24 Mar 2008 6:09] Shane Bester
starting with --skip-name-resolve can be a temporary workaround
[24 Mar 2008 8:43] Alexey Kopytov
Ruben,

This is most likely a duplicate of bug #24611. Please check the error log, it should have the following:
"
You are running a statically-linked LinuxThreads binary on an NPTL system.
This can result in crashes on some distributions due to LT/NPTL conflicts.
You should either build a dynamically-linked binary, or force LinuxThreads
to be used with the LD_ASSUME_KERNEL environment variable. Please consult
the documentation for your distribution on how to do that.
"

Can you verify that mysqld started with LD_ASSUME_KERNEL="2.4.1" does not crash?
[24 Mar 2008 8:46] Valeriy Kravchuk
Thank you for a problem report. Please, try to repeat with -O2 and/or older gcc version and inform about the results.
[24 Mar 2008 18:22] Ruben -
Hi,

Alexey Kopytov's changed worked. I have the same message in my error log and starting with LD_ASSUME_KERNEL="2.4.1" makes it work.
[24 Mar 2008 20:59] Sveta Smirnova
Thank you for the feedback.

Closed as duplicate of bug #24611.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.043 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.