Below is the list of changes that have just been committed into a local
5.0 repository of msvensson. When msvensson does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-06-07 09:48:37+02:00, msvensson@pilot.(none) +1 -0
Bug#28690 mysql-enterprise-gpl-5.0.40-linux-i686-glibc won't start on Debian Sarge
- Only use the "hack for bug in NTPL" if using NTPL, by dynamically
checking the thd_lib_detected flag
mysys/my_thr_init.c@stripped, 2007-06-07 09:48:36+02:00, msvensson@pilot.(none) +24 -20
Only start the "dummy thread hack for bug in NPTL" - if using NPTL.
If the system uses LinuxThreads it's not needed, it actually causes
the "pthread manager" to be started as root and thus all subsequent
threads will also run as root although mysqld drops root privileges,
this in turns causes mysqld to deadlock since the mysqlds main thread
running as <user> can't send signals to a process owned by root.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: msvensson
# Host: pilot.(none)
# Root: /data/msvensson/mysql/bug28690/my50-bug28690
--- 1.44/mysys/my_thr_init.c 2007-04-20 19:49:04 +02:00
+++ 1.45/mysys/my_thr_init.c 2007-06-07 09:48:36 +02:00
@@ -87,27 +87,31 @@ my_bool my_thread_global_init(void)
fprintf(stderr,"Can't initialize threads: error %d\n", pth_ret);
return 1;
}
-
-#ifdef NPTL_PTHREAD_EXIT_BUG
-
-/*
- BUG#24507: Race conditions inside current NPTL pthread_exit() implementation.
-
- To avoid a possible segmentation fault during concurrent executions of
- pthread_exit(), a dummy thread is spawned which initializes internal variables
- of pthread lib. See bug description for thoroughfull explanation.
-
- TODO: Remove this code when fixed versions of glibc6 are in common use.
-*/
-
- pthread_t dummy_thread;
- pthread_attr_t dummy_thread_attr;
-
- pthread_attr_init(&dummy_thread_attr);
- pthread_attr_setdetachstate(&dummy_thread_attr,PTHREAD_CREATE_DETACHED);
-
-
pthread_create(&dummy_thread,&dummy_thread_attr,nptl_pthread_exit_hack_handler,NULL);
+#ifdef NPTL_PTHREAD_EXIT_BUG
+ /*
+ BUG#24507: Race conditions inside current NPTL pthread_exit()
+ implementation.
+
+ To avoid a possible segmentation fault during concurrent
+ executions of pthread_exit(), a dummy thread is spawned which
+ initializes internal variables of pthread lib. See bug description
+ for a full explanation.
+
+ TODO: Remove this code when fixed versions of glibc6 are in common
+ use.
+ */
+ if (thd_lib_detected == THD_LIB_NPTL)
+ {
+ pthread_t dummy_thread;
+ pthread_attr_t dummy_thread_attr;
+
+ pthread_attr_init(&dummy_thread_attr);
+ pthread_attr_setdetachstate(&dummy_thread_attr, PTHREAD_CREATE_DETACHED);
+
+ pthread_create(&dummy_thread,&dummy_thread_attr,
+ nptl_pthread_exit_hack_handler, NULL);
+ }
#endif
#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
| Thread |
|---|
| • bk commit into 5.0 tree (msvensson:1.2506) BUG#28690 | msvensson | 7 Jun |