[MDEV-10876] MariaDB unresponsive due to long semaphore wait Created: 2016-09-23  Updated: 2023-04-12  Resolved: 2023-04-11

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.1.10
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Sukan Assignee: Jan Lindström (Inactive)
Resolution: Won't Fix Votes: 0
Labels: innodb, lock, semaphore
Environment:

Red Hat Enterprise Linux Server release 6.6 (Santiago)



 Description   

MariaDB was responsive for a long time, queries are in the struck state. Even killing queries is not helping as it is in the killed state for such a long time.

Forcefully killed mysqld, but post restart issue still persists. These errors are logged in errorlogs

InnoDB: Warning: a long semaphore wait:
--Thread 139382773094144 has waited at row0sel.cc line 3056 for 241.00 seconds the semaphore:
S-lock on RW-latch at 0x7f1224fb6120 '&block->lock'
a writer (thread id 139382773094144) has reserved it in mode exclusive
number of readers 0, waiters flag 1, lock_word: 0
Last time read locked in file row0sel.cc line 3231
Last time write locked in file /home/buildbot/buildbot/build/storage/xtradb/buf/buf0buf.cc line 4044
Holder thread 0 file not yet reserved line 0

--Thread 139365758682880 has waited at lock0lock.cc line 7620 for 0.0000 seconds the semaphore:
Mutex at 0x7ec298006068 '&lock_sys->mutex', lock var 1
Last time reserved by thread 139365793367808 in file not yet reserved line 0, waiters flag 1



 Comments   
Comment by Elena Stepanova [ 2016-09-26 ]

Sukan,

Are you really running 10.1.10? There have been many fixes since then, including some for InnoDB. By the nature of the problem, it's nearly impossible to say whether this particular one was fixed, but there are some chances.

Passing to jplindst for his collection of long semaphore waits, just in case.

Comment by Sukan [ 2016-09-30 ]

Yes @Elena. we are running with 10.1.10-MariaDB-log.

MariaDB [(none)]> select @@version;
---------------------

@@version

---------------------

10.1.10-MariaDB-log

---------------------

Waiting to hear more from @Jan Lindstrom.

Comment by Jan Lindström (Inactive) [ 2016-09-30 ]

Hi, can you provide full unedited error log, my.cnf, output from show processlist when stuck, and attach a debugger and provide output from thread apply all bt ? Note that 10.1.10 is not safe for production.

Comment by Sukan [ 2016-09-30 ]

Hi Jan,

Could you let me know the reason for saying that 10.1.10 is not safe for prod.

Comment by Jan Lindström (Inactive) [ 2016-09-30 ]

https://mariadb.org/mariadb-server-versions-remote-root-code-execution-vulnerability-cve-2016-6662/

And if you use encryption, there has been a lot of fixes.

Comment by Jan Lindström [ 2023-04-11 ]

10.1 is EOL.

Generated at Thu Feb 08 07:45:36 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.