Increase stack size of ndbd threads for safety's sake.
This commit is contained in:
parent
af5d0e52a1
commit
d87f3fc06c
27
mysql-ndb-stacksize.patch
Normal file
27
mysql-ndb-stacksize.patch
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
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++;
|
@ -1,6 +1,6 @@
|
|||||||
Name: mysql
|
Name: mysql
|
||||||
Version: 5.1.33
|
Version: 5.1.33
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: MySQL client programs and shared libraries
|
Summary: MySQL client programs and shared libraries
|
||||||
Group: Applications/Databases
|
Group: Applications/Databases
|
||||||
URL: http://www.mysql.com
|
URL: http://www.mysql.com
|
||||||
@ -31,6 +31,7 @@ Patch5: mysql-install-test.patch
|
|||||||
Patch6: mysql-stack-guard.patch
|
Patch6: mysql-stack-guard.patch
|
||||||
Patch7: mysql-plugin-bug.patch
|
Patch7: mysql-plugin-bug.patch
|
||||||
Patch8: mysql-setschedparam.patch
|
Patch8: mysql-setschedparam.patch
|
||||||
|
Patch9: mysql-ndb-stacksize.patch
|
||||||
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
||||||
BuildRequires: gperf, perl, readline-devel, openssl-devel
|
BuildRequires: gperf, perl, readline-devel, openssl-devel
|
||||||
@ -172,6 +173,7 @@ the MySQL sources.
|
|||||||
%patch6 -p1
|
%patch6 -p1
|
||||||
%patch7 -p1
|
%patch7 -p1
|
||||||
%patch8 -p1
|
%patch8 -p1
|
||||||
|
%patch9 -p1
|
||||||
|
|
||||||
libtoolize --force
|
libtoolize --force
|
||||||
aclocal
|
aclocal
|
||||||
@ -637,6 +639,10 @@ fi
|
|||||||
%{_mandir}/man1/mysql_client_test.1*
|
%{_mandir}/man1/mysql_client_test.1*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Apr 15 2009 Tom Lane <tgl@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@redhat.com> 5.1.33-1
|
* Tue Apr 7 2009 Tom Lane <tgl@redhat.com> 5.1.33-1
|
||||||
- Update to MySQL 5.1.33.
|
- Update to MySQL 5.1.33.
|
||||||
- Disable use of pthread_setschedparam; doesn't work the way code expects.
|
- Disable use of pthread_setschedparam; doesn't work the way code expects.
|
||||||
|
Loading…
Reference in New Issue
Block a user