rpms/mysql/F-11 mysql-ndb-stacksize.patch, NONE, 1.1 mysql.spec, 1.117, 1.118

Tom Lane tgl at fedoraproject.org
Wed Apr 15 22:08:13 UTC 2009


Author: tgl

Update of /cvs/pkgs/rpms/mysql/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv26874

Modified Files:
	mysql.spec 
Added Files:
	mysql-ndb-stacksize.patch 
Log Message:
Increase stack size of ndbd threads for safety's sake.

mysql-ndb-stacksize.patch:

--- NEW FILE mysql-ndb-stacksize.patch ---
Raise minimum stack size in ndb code to be a uniform 32K (64K on 64-bit
platforms).  This is in response to an episode where glibc needed 8K of
stack to run malloc(), resulting in ndbd crashing at launch.  While that
was acknowledged to be a glibc bug (see bz #494631), byte-shaving here
isn't any better an idea than it is in the main mysql server.

Note: the request gets rounded up to at least PTHREAD_STACK_MIN, which
is 128K on PPC; otherwise we would need to do something about including
the stack guard size explicitly, since it's so much larger on PPC than
elsewhere.  At some point we might want to use our my_setstacksize()
hack in NdbThread_Create().


diff -Naur mysql-5.1.33.orig/storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp mysql-5.1.33/storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
--- mysql-5.1.33.orig/storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp	2009-03-13 17:54:07.000000000 -0400
+++ mysql-5.1.33/storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp	2009-04-15 14:00:04.000000000 -0400
@@ -106,8 +106,8 @@
 AsyncFile::doStart() 
 {
   // Stacksize for filesystem threads
-  // An 8k stack should be enough
-  const NDB_THREAD_STACKSIZE stackSize = 8192;
+  // don't make this too small
+  const NDB_THREAD_STACKSIZE stackSize = 32768;
 
   char buf[16];
   numAsyncFiles++;


Index: mysql.spec
===================================================================
RCS file: /cvs/pkgs/rpms/mysql/F-11/mysql.spec,v
retrieving revision 1.117
retrieving revision 1.118
diff -u -r1.117 -r1.118
--- mysql.spec	7 Apr 2009 23:41:39 -0000	1.117
+++ mysql.spec	15 Apr 2009 22:07:42 -0000	1.118
@@ -1,6 +1,6 @@
 Name: mysql
 Version: 5.1.33
-Release: 1%{?dist}
+Release: 2%{?dist}
 Summary: MySQL client programs and shared libraries
 Group: Applications/Databases
 URL: http://www.mysql.com
@@ -31,6 +31,7 @@
 Patch6: mysql-stack-guard.patch
 Patch7: mysql-plugin-bug.patch
 Patch8: mysql-setschedparam.patch
+Patch9: mysql-ndb-stacksize.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 BuildRequires: gperf, perl, readline-devel, openssl-devel
@@ -172,6 +173,7 @@
 %patch6 -p1
 %patch7 -p1
 %patch8 -p1
+%patch9 -p1
 
 libtoolize --force
 aclocal
@@ -637,6 +639,10 @@
 %{_mandir}/man1/mysql_client_test.1*
 
 %changelog
+* Wed Apr 15 2009 Tom Lane <tgl at redhat.com> 5.1.33-2
+- Increase stack size of ndbd threads for safety's sake.
+Related: #494631
+
 * Tue Apr  7 2009 Tom Lane <tgl at redhat.com> 5.1.33-1
 - Update to MySQL 5.1.33.
 - Disable use of pthread_setschedparam; doesn't work the way code expects.




More information about the fedora-extras-commits mailing list