DB deadlock while user is logging in

LATEST Official version.
Questions and discussions - NO ISSUES
FOR ISSUES => http://mantis.testlink.org

Moderators: Amaradana, TurboPT, TL Developers

Post Reply
MarekWa
TestLink user
Posts: 2
Joined: Tue Sep 22, 2015 5:23 pm
Location: Warsaw, Poland

DB deadlock while user is logging in

Post by MarekWa »

Hi

Some time ago a user sent me a message that he gets a weird error while trying to log in:

Code: Select all

============================================================================== 
 DB Access Error - debug_print_backtrace() OUTPUT START 
 ============================================================================== 
#0  database->exec_query() called at [C:\Bitnami\testlink-1.9.11-0\apps\testlink\htdocs\lib\functions\logger.class.php:706]
#1  tlEventManager->deleteEventsFor() called at [C:\Bitnami\testlink-1.9.11-0\apps\testlink\htdocs\lib\functions\logger.class.php:133]
#2  tlLogger->deleteEventsFor() called at [C:\Bitnami\testlink-1.9.11-0\apps\testlink\htdocs\login.php:214]
#3  renderLoginScreen() called at [C:\Bitnami\testlink-1.9.11-0\apps\testlink\htdocs\login.php:75]
 ============================================================================== 
I found this in TL logs:

Code: Select all

ERROR ON exec_query() - database.class.php <br />1213 - Deadlock found when trying to get lock; try restarting transaction - DELETE FROM transactions WHERE id IN ( SELECT id FROM ( SELECT id FROM transactions t WHERE (SELECT COUNT(0) FROM events e WHERE e.transaction_id = t.id) = 0) XX )<br />THE MESSAGE : DELETE FROM transactions WHERE id IN ( SELECT id FROM ( SELECT id FROM transactions t WHERE (SELECT COUNT(0) FROM events e WHERE e.transaction_id = t.id) = 0) XX ) Query failed: errorcode[1213] errormsg:Deadlock found when trying to get lock; try restarting transaction
TL: 1.9.11
OS: windows
DB: MYSQL
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Re: DB deadlock while user is logging in

Post by fman »

1) please follow the guidelines => issues on Mantis
2) request is done to reporter to do fresh install with lates available version, retest and provide feedback
3) without clear steps to reproduce is very difficult to do any action
MarekWa
TestLink user
Posts: 2
Joined: Tue Sep 22, 2015 5:23 pm
Location: Warsaw, Poland

Re: DB deadlock while user is logging in

Post by MarekWa »

I will post steps to reproduce as soon as I find them. Right now I know that it happens to more than one user. They just have to log in and be quite unlucky. I'll try to investigate in from DB side.
Post Reply