Bug #20329 4.1.20 crashes on startup, reproducable
Submitted: 8 Jun 2006 0:46 Modified: 9 Jun 2006 1:23
Reporter: Rodalpho Carmichael Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:4.1.20 OS:Linux (Redhat ES3)
Assigned to: CPU Architecture:Any

[8 Jun 2006 0:46] Rodalpho Carmichael
Description:
I have a RHES3 server running 4.1.9-standard official mysql.com binary distrib. Problem is that our app likes to hold open connections, and we're hitting the 1024 thread limit in linuxthreads. We already checked and verified beyond a shadow of a doubt that it isn't the linux kernel at fault, max_connections is set to 2000 in my.cnf, etc.

So anyway, the seemingly obvious fix is to recompile mysql with linuxthreads set to allow >1000 connections. Luckily, the stock redhat ES3 linuxthreads allows 16000 connections. So, I tried the dynamically-linked mysql.com binaries. No dice, it crashes 4 times per second. Next I tried the official redhat RPMs. They too crash 4 times per second. So lastly I tried recompiling from source with the built-in RHES3 linuxthreads as follows:

./configure --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --prefix=/usr/local/mysqlsrc

Compiled fine, started it up, crashes 4X per second. Note that starting up the 4.1.19 server without our datadir works fine-- no crashes. It must be something with our datafiles and/or tablespace files, but no clue how to figure out what.

Will attach errorlog snippet, my.cnf, and a resolved stacktrace.

How to repeat:
Starting the server will crash every time.

Suggested fix:
Stop it crashing.
[8 Jun 2006 0:47] Rodalpho Carmichael
my.cnf file

Attachment: my.cnf (application/octet-stream, text), 3.13 KiB.

[8 Jun 2006 0:48] Rodalpho Carmichael
errorlog snippet

Attachment: errorlog.txt (text/plain), 2.51 KiB.

[8 Jun 2006 0:48] Rodalpho Carmichael
resolved stacktrace

Attachment: stacktrace.out (application/octet-stream, text), 415 bytes.

[8 Jun 2006 8:03] Sveta Smirnova
Thank you for taking the time to report a problem.  Unfortunately
you are not using a current version of the product your reported a
problem with -- the problem might already be fixed. Please download
a new version from http://www.mysql.com/downloads/

If you are able to reproduce the bug with one of the latest versions,
please change the version on this bug report to the version you
tested and change the status back to "Open".  Again, thank you for
your continued support of MySQL.

Additional info:

It could be that mysqld is trying to allocate more memory than kernel+glibc allow.
[8 Jun 2006 18:30] Rodalpho Carmichael
Hi,

I just tried 4.1.20 and got the same error. The machine has 2GB of RAM, but doesn't give any errors using the official mysql.com 4.1.9-standard binaries. I also tried dropping the key buffer from 64mb to 32mb and the innodb buffer from 512m to 256m... same crash errors. Any thoughts?

thanks,
Rodalpho
[9 Jun 2006 1:23] Rodalpho Carmichael
For anyone lurking around, MySQL support fixed this problem by asking us to rebuild the mysql (authentication) DB. I assume there's a bug _somewhere_, as 4.1.9 was fine and 4.1.20 crashed. Thanks for the response.
[9 Jul 2006 15:01] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/8959