summaryrefslogtreecommitdiff
path: root/innobase/sync
diff options
context:
space:
mode:
authorunknown <heikki@hundin.mysql.fi>2004-03-11 10:38:37 +0200
committerunknown <heikki@hundin.mysql.fi>2004-03-11 10:38:37 +0200
commit4d47802f25b6bada333ce9136266344329eb5a01 (patch)
tree4df4c01cdaf7a830bd650a24bb003fe406ac7634 /innobase/sync
parent06b776f910b19b4a3a7e0372b496a60231f8b52e (diff)
downloadmariadb-git-4d47802f25b6bada333ce9136266344329eb5a01.tar.gz
sync0arr.c, os0file.h:
Print always the count of pending pread() and pwrite() calls if there is a long semaphore wait innobase/include/os0file.h: Print always the count of pending pread() and pwrite() calls if there is a long semaphore wait innobase/sync/sync0arr.c: Print always the count of pending pread() and pwrite() calls if there is a long semaphore wait
Diffstat (limited to 'innobase/sync')
-rw-r--r--innobase/sync/sync0arr.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/innobase/sync/sync0arr.c b/innobase/sync/sync0arr.c
index 4854b40409e..06e9fdcd63d 100644
--- a/innobase/sync/sync0arr.c
+++ b/innobase/sync/sync0arr.c
@@ -14,6 +14,7 @@ Created 9/5/1995 Heikki Tuuri
#include "sync0sync.h"
#include "sync0rw.h"
#include "os0sync.h"
+#include "os0file.h"
#include "srv0srv.h"
/*
@@ -940,6 +941,16 @@ sync_array_print_long_waits(void)
"InnoDB: ###### Starts InnoDB Monitor for 30 secs to print diagnostic info:\n");
old_val = srv_print_innodb_monitor;
+ /* If some crucial semaphore is reserved, then also the InnoDB
+ Monitor can hang, and we do not get diagnostics. Since in
+ many cases an InnoDB hang is caused by a pwrite() or a pread()
+ call hanging inside the operating system, let us print right
+ now the values of pending calls of these. */
+
+ fprintf(stderr,
+"InnoDB: Pending preads %lu, pwrites %lu\n", (ulong)os_file_n_pending_preads,
+ (ulong)os_file_n_pending_pwrites);
+
srv_print_innodb_monitor = TRUE;
os_event_set(srv_lock_timeout_thread_event);