Bug #11603 "Asked for 196608 thread stack, but got 126976"
Submitted: 28 Jun 2005 6:11 Modified: 4 Jul 2005 13:59
Reporter: Sulaiman Aleem Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Installing Severity:S1 (Critical)
Version:4.1.12 OS:Linux (Red Hat Fedora 3)
Assigned to: CPU Architecture:Any

[28 Jun 2005 6:11] Sulaiman Aleem
Description:
After obtaining a SeLinux update through the RedHat Network the Mysql server failed to start. So Uninstall and Reinstalled version 4.1.12. I even went back to the RedHat RPM version 3.23.xx then tried to upgrad back to 4.1.12. I have also tried all of the solutions offered in the documentation and user groupd but all I get is this error:

**************************************************************************************************************
[root@ns0 rpm]# rpm -iv *.rpm
warning: MySQL-bench-4.1.12-1.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5Preparing packages for installation...
MySQL-devel-4.1.12-1
MySQL-client-4.1.12-1
MySQL-bench-4.1.12-1
MySQL-embedded-4.1.12-1
MySQL-server-4.1.12-1
050628  1:59:11 [Warning] Asked for 196608 thread stack, but got 126976
050628  1:59:11 [Warning] Can't create test file /var/lib/mysql/ns0.lower-test
050628  1:59:11 [ERROR] Can't create interrupt-thread (error 11, errno: 4)
Installation of system tables failed!

Examine the logs in /var/lib/mysql for more information.
You can also try to start the mysqld daemon with:
/usr/sbin/mysqld --skip-grant &
You can use the command line tool
/usr/bin/mysql to connect to the mysql
database and look at the grant tables:

shell> /usr/bin/mysql -u root mysql
mysql> show tables

Try 'mysqld --help' if you have problems with paths. Using --log
gives you a log in /var/lib/mysql that may be helpful.

The latest information about MySQL is available on the web at
http://www.mysql.com
Please consult the MySQL manual section: 'Problems running mysql_install_db',
and the manual section that describes problems on your OS.
Another information source is the MySQL email archive.
Please check all of the above before mailing us!
And if you do mail us, you MUST use the /usr/bin/mysqlbug script!
Starting MySQL...................................[FAILED]
MySQL-shared-compat-4.1.11-0
[root@ns0 rpm]#
********************************************************************************************************
Also the  /usr/bin/mysqlbug says:

SEND-PR: -*- send-pr -*-
SEND-PR: Lines starting with `SEND-PR' will be removed automatically, as
SEND-PR: will all comments (text enclosed in `<' and `>').
SEND-PR:
From: root
To: mysql@lists.mysql.com
Subject: [50 character or so descriptive subject here (for reference)]

>Description:
	<precise description of the problem (multiple lines)>
>How-To-Repeat:
	<code/input/activities to reproduce the problem (multiple lines)>
>Fix:
	<how to correct or work around the problem, if known (multiple lines)>

>Submitter-Id:	<submitter ID>
>Originator:	root
>Organization:
 <organization of PR author (multiple lines)>
>MySQL support: [none | licence | email support | extended email support ]
>Synopsis:	<synopsis of the problem (one line)>
>Severity:	<[ non-critical | serious | critical ] (one line)>
>Priority:	<[ low | medium | high ] (one line)>
>Category:	mysql
>Class:		<[ sw-bug | doc-bug | change-request | support ] (one line)>
>Release:	mysql-4.1.12-standard (MySQL Community Edition - Standard (GPL))

>C compiler:    2.95.3
>C++ compiler:  2.95.3
>Environment:
	<machine, os, target, libraries (multiple lines)>
System: Linux ns0.freshsoftware-internal.net 2.6.11-1.35_FC3 #1 Mon Jun 13 00:52:08 EDT 2005 i686 athlon i386 GNU/Linux
Architecture: i686

Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc
GCC: Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-java-awt=gtk --host=i386-redhat-linux
Thread model: posix
gcc version 3.4.3 20050227 (Red Hat 3.4.3-22.fc3)
Compilation info: CC='gcc'  CFLAGS='-O2 -mcpu=i486 -fno-strength-reduce'  CXX='gcc'  CXXFLAGS='-O2 -mcpu=i486 -fno-strength-reduce 	          -felide-constructors -fno-exceptions -fno-rtti 		  '  LDFLAGS=''  ASFLAGS=''
LIBC: 
lrwxrwxrwx  1 root root 13 Apr 21 19:16 /lib/libc.so.6 -> libc-2.3.5.so
-rwxr-xr-x  1 root root 1505808 Apr  7 06:58 /lib/libc-2.3.5.so
-rw-r--r--  1 root root 2409956 Apr  7 06:03 /usr/lib/libc.a
-rw-r--r--  1 root root 204 Apr  7 05:29 /usr/lib/libc.so
lrwxrwxrwx  1 root root 10 Apr 20 18:31 /usr/lib/libc-client.a -> c-client.a
lrwxrwxrwx  1 root root 16 Apr 20 18:31 /usr/lib/libc-client.so -> libc-client.so.0
-rwxr-xr-x  1 root root 767432 Sep 20  2004 /usr/lib/libc-client.so.0
Configure command: ./configure '--disable-shared' '--with-mysqld-ldflags=-all-static' '--with-client-ldflags=-all-static' '--with-comment=MySQL Community Edition - Standard (GPL)' '--with-server-suffix=-standard' '--without-embedded-server' '--without-berkeley-db' '--with-innodb' '--without-vio' '--without-openssl' '--enable-assembler' '--enable-local-infile' '--with-mysqld-user=mysql' '--with-unix-socket-path=/var/lib/mysql/mysql.sock' '--prefix=/' '--with-extra-charsets=complex' '--exec-prefix=/usr' '--libexecdir=/usr/sbin' '--libdir=/usr/lib' '--sysconfdir=/etc' '--datadir=/usr/share' '--localstatedir=/var/lib/mysql' '--infodir=/usr/share/info' '--includedir=/usr/include' '--mandir=/usr/share/man' '--enable-thread-safe-client' '--with-readline' 'CC=gcc' 'CFLAGS=-O2 -mcpu=i486 -fno-strength-reduce' 'CXXFLAGS=-O2 -mcpu=i486 -fno-strength-reduce 	          -felide-constructors -fno-exceptions -fno-rtti 		  ' 'CXX=gcc'

***********************************************************************************************************

I have ran into simular problems with MYSQL after RedHat updates but this time I am ready  just ready to shoot the computer. I also am not a full time administrator and do not have an interested in trying to compile MYSQL from source. After reading the doc's about doing so I am convinced that it would be easier to pull my hair out. Please provide a simple and easy to under stand solution.

Sincerely,
Eric

How to repeat:
Trying installing the same version on RH Fedora 3 or I can give U SHH access to my private server.
[29 Jun 2005 4:56] Sulaiman Aleem
I was able to get MYSQL to install editing /etc/selinux/config to say: 

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#	enforcing - SELinux security policy is enforced.
#	permissive - SELinux prints warnings instead of enforcing.
#	disabled - SELinux is fully disabled.
SELINUX=permissive
# SELINUXTYPE= type of policy in use. Possible values are:
#	targeted - Only targeted network daemons are protected.
#	strict - Full SELinux protection.
SELINUXTYPE=targeted

I still got the thread warning but at least the install and restart is worked after changing enforcing to permissive. I hope that this helps.

Thanx Allah
[4 Jul 2005 13:59] MySQL Verification Team
HI!

Thank you for writting to us.

Regarding SELinux, we are preparing scripts that will deal with SELinux and RH AS/EL 4.0 security issues. However, those will take some time.

Regarding thread stack warning, you can ignore it. It comes from the fact that our special glibc library, with which mysqld binary is linked, is patched with maximum of 
128 K thread stack.

However, default thread stack is set to 198 K, as this is required due to some bugs present in 2.3 glibc. As glibc binary which we use for static linking is a very stable 2.2 , there is nothing to worry about.
[14 Jul 2005 15:46] Virgil Cui
I have the same problem as Sulaiman's. And strange enough, I have 2 boxes both running Redhat Fedora3 with mysql 3.23.58. One works fine after ugrade to 4.1.12; the other has the same problem. I have the exactly upgrade sequences for both machines. (also chown mysql:mysql /var/lib/mysql along with its subdirectorys and files)

rpm -Uvh MySQL-shared-compat-4.1.11-0.i386.rpm
rpm -Uvh MySQL-server-4.1.12-1.i386.rpm
rpm -Uvh MySQL-client-4.1.12-1.i386.rpm
rpm -Uvh MySQL-bench-4.1.12-1.i386.rpm
rpm -Uvh MySQL-devel-4.1.12-1.i386.rpm
rpm -Uvh MySQL-embedded-4.1.12-1.i386.rpm

In fact, the one has problem was fine after upgrade but before reboot. However, after reboot, it just keep failure.
In the syslog, I can see a lot of such errors.
====
Jul 14 09:32:44 m8 kernel: audit(1121347964.990:0): avc:  denied  {
write } for  pid=3645 exe=/usr/sbin/mysqld name=mysql dev=hda2 ino=3859675 scont
ext=user_u:system_r:mysqld_t tcontext=root:object_r:var_lib_t tclass=dir
====

And in the boot.log, it shows the error as below
====
Jul 14 09:31:23 m8 mysql: MySQL PID file could not be found!
Jul 14 09:31:23 m8 lsb_log_message: MySQL PID file could not be foun
d! failed
Jul 14 09:31:23 m8 mysql:
Jul 14 09:31:23 m8 rc: Stopping mysql:  succeeded
====

Anyway, after I change the selinux settings in /etc/selinux/config as Sulaiman mentioned in his previous message, and reboot the box. At this time, mysql still didn't come up. But it comes up now after I uninstall server package and install it again.
rpm -e --nodeps MySQL-server-4.1.12-1.i386.rpm
rpm -i MySQL-server-4.1.12-1.i386.rpm

BTW, the only difference in my mind between my 2 boxes is that. The fine one I applied all the available updates from Redhat before upgrade mysql. The pain one I upgraded to mysql, and then applied the last 3 days updates from Redhat.

Hopefully it can help.