Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
9f4ee16b
Commit
9f4ee16b
authored
Mar 11, 2015
by
Jan Lindström
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-7619: Improve long semaphore wait output
Add holder thread_id, file_name and line to output.
parent
ba43735c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
12 deletions
+17
-12
storage/innobase/sync/sync0arr.cc
storage/innobase/sync/sync0arr.cc
+10
-6
storage/xtradb/sync/sync0arr.cc
storage/xtradb/sync/sync0arr.cc
+7
-6
No files found.
storage/innobase/sync/sync0arr.cc
View file @
9f4ee16b
...
...
@@ -500,16 +500,13 @@ sync_array_cell_print(
if
(
mutex
)
{
fprintf
(
file
,
"Mutex at %p created file %s line %lu, lock var %lu
\n
"
#ifdef UNIV_SYNC_DEBUG
"Last time reserved in file %s line %lu, "
#endif
/* UNIV_SYNC_DEBUG */
"Last time reserved by thread %lu in file %s line %lu, "
"waiters flag %lu
\n
"
,
(
void
*
)
mutex
,
innobase_basename
(
mutex
->
cfile_name
),
(
ulong
)
mutex
->
cline
,
(
ulong
)
mutex
->
lock_word
,
#ifdef UNIV_SYNC_DEBUG
mutex
->
thread_id
,
mutex
->
file_name
,
(
ulong
)
mutex
->
line
,
#endif
/* UNIV_SYNC_DEBUG */
(
ulong
)
mutex
->
waiters
);
}
...
...
@@ -528,8 +525,10 @@ sync_array_cell_print(
" RW-latch at %p created in file %s line %lu
\n
"
,
(
void
*
)
rwlock
,
innobase_basename
(
rwlock
->
cfile_name
),
(
ulong
)
rwlock
->
cline
);
writer
=
rw_lock_get_writer
(
rwlock
);
if
(
writer
!=
RW_LOCK_NOT_LOCKED
)
{
if
(
writer
&&
writer
!=
RW_LOCK_NOT_LOCKED
)
{
fprintf
(
file
,
"a writer (thread id %lu) has"
" reserved it in mode %s"
,
...
...
@@ -552,6 +551,11 @@ sync_array_cell_print(
(
ulong
)
rwlock
->
last_s_line
,
rwlock
->
last_x_file_name
,
(
ulong
)
rwlock
->
last_x_line
);
fprintf
(
file
,
"Holder thread %lu file %s line %lu
\n
"
,
rwlock
->
thread_id
,
rwlock
->
file_name
,
rwlock
->
line
);
}
}
else
{
ut_error
;
...
...
storage/xtradb/sync/sync0arr.cc
View file @
9f4ee16b
...
...
@@ -522,15 +522,12 @@ sync_array_cell_print(
if
(
mutex
)
{
fprintf
(
file
,
"Mutex at %p '%s', lock var %lu
\n
"
#ifdef UNIV_SYNC_DEBUG
"Last time reserved in file %s line %lu, "
#endif
/* UNIV_SYNC_DEBUG */
"Last time reserved by thread %lu in file %s line %lu, "
"waiters flag %lu
\n
"
,
(
void
*
)
mutex
,
mutex
->
cmutex_name
,
(
ulong
)
mutex
->
lock_word
,
#ifdef UNIV_SYNC_DEBUG
mutex
->
thread_id
,
mutex
->
file_name
,
(
ulong
)
mutex
->
line
,
#endif
/* UNIV_SYNC_DEBUG */
(
ulong
)
mutex
->
waiters
);
}
...
...
@@ -608,6 +605,10 @@ sync_array_cell_print(
rwlock
->
last_x_file_name
,
(
ulong
)
rwlock
->
last_x_line
);
fprintf
(
file
,
"Holder thread %lu file %s line %lu
\n
"
,
rwlock
->
thread_id
,
rwlock
->
file_name
,
rwlock
->
line
);
/* If stacktrace feature is enabled we will send a SIGUSR2
signal to thread that has locked RW-latch with write mode.
Signal handler will then dump the current stack to error log. */
...
...
@@ -741,7 +742,7 @@ sync_array_detect_deadlock(
depth
);
if
(
ret
)
{
fprintf
(
stderr
,
"Mutex %p owned by thread %lu file %s line %lu
\n
"
,
"Mutex %p owned by thread %lu file %s line %lu
\n
"
,
mutex
,
(
ulong
)
os_thread_pf
(
mutex
->
thread_id
),
mutex
->
file_name
,
(
ulong
)
mutex
->
line
);
sync_array_cell_print
(
stderr
,
cell
,
&
r
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment