diff options
author | unknown <heikki@hundin.mysql.fi> | 2002-07-16 13:59:24 +0300 |
---|---|---|
committer | unknown <heikki@hundin.mysql.fi> | 2002-07-16 13:59:24 +0300 |
commit | daede62b02cbd6a9e46638d02624839c361f9650 (patch) | |
tree | dce15e4c28e05f33cd965262e7d7339b896ccaa5 /innobase | |
parent | 335c58d1c2c2359c7abafa5d2ed7fc1a374bb7b1 (diff) | |
download | mariadb-git-daede62b02cbd6a9e46638d02624839c361f9650.tar.gz |
os0thread.h, srv0srv.c:
Increase max number of waiting threads to 10000 and put diagnostic prints if this value is exceeded
innobase/srv/srv0srv.c:
Increase max number of waiting threads to 10000 and put diagnostic prints if this value is exceeded
innobase/include/os0thread.h:
Increase max number of waiting threads to 10000 and put diagnostic prints if this value is exceeded
Diffstat (limited to 'innobase')
-rw-r--r-- | innobase/include/os0thread.h | 6 | ||||
-rw-r--r-- | innobase/srv/srv0srv.c | 26 |
2 files changed, 29 insertions, 3 deletions
diff --git a/innobase/include/os0thread.h b/innobase/include/os0thread.h index 2e4b6f0f6ee..0d6fa5a8f37 100644 --- a/innobase/include/os0thread.h +++ b/innobase/include/os0thread.h @@ -12,8 +12,10 @@ Created 9/8/1995 Heikki Tuuri #include "univ.i" -/* Maximum number of threads which can be created in the program */ -#define OS_THREAD_MAX_N 1000 +/* Maximum number of threads which can be created in the program; +this is also the size of the wait slot array for MySQL threads which +can wait inside InnoDB */ +#define OS_THREAD_MAX_N 10000 /* Possible fixed priorities for threads */ #define OS_THREAD_PRIORITY_NONE 100 diff --git a/innobase/srv/srv0srv.c b/innobase/srv/srv0srv.c index 556a4256e9e..80de52dc4a1 100644 --- a/innobase/srv/srv0srv.c +++ b/innobase/srv/srv0srv.c @@ -2001,7 +2001,31 @@ srv_table_reserve_slot_for_mysql(void) while (slot->in_use) { i++; - ut_a(i < OS_THREAD_MAX_N); + + if (i >= OS_THREAD_MAX_N) { + + ut_print_timestamp(stderr); + + fprintf(stderr, +" InnoDB: There appear to be %lu MySQL threads currently waiting\n" +"InnoDB: inside InnoDB, which is the upper limit. Cannot continue operation.\n" +"InnoDB: We intentionally generate a seg fault to print a stack trace\n" +"InnoDB: on Linux. But first we print a list of waiting threads.\n", i); + + for (i = 0; i < OS_THREAD_MAX_N; i++) { + + slot = srv_mysql_table + i; + + fprintf(stderr, +"Slot %lu: thread id %lu, type %lu, in use %lu, susp %lu, time %lu\n", + i, (ulint)(slot->id), + slot->type, slot->in_use, + slot->suspended, + (ulint)difftime(ut_time(), slot->suspend_time)); + } + + ut_a(0); + } slot = srv_mysql_table + i; } |