[MDEV-541] Galera: A deadlock breaks the whole client session (makes it non-functional) Created: 2012-09-20  Updated: 2012-09-20  Resolved: 2012-09-20

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 5.5.25-galera
Fix Version/s: 5.5.28a-galera

Type: Bug Priority: Blocker
Reporter: Elena Stepanova Assignee: Seppo Jaakola
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Blocks
blocks MDEV-523 Galera: Server crashes with SIGABRT, ... Closed
Relates

 Description   

Any basic scenario which involves concurrent modification of table structure or contents on two nodes, renders the 'victim' connection (the one where the transaction is rolled back) non-functional.

The problem was introduced with revno 3352 (works okay on revno 3351, breaks on 3352).

Please see the following example:

 
# Execute on the 1st node
 
drop table if exists t1;
create table t1 (i int primary key) engine=InnoDB;
insert into t1 values (1),(2);
begin;
update t1 set i=i+2;
 
# Execute on the 2nd node
 
begin;
update t1 set i=i+4;
commit;
 
# Execute on the 1st node
 
commit;
 
# ERROR 1213 (40001): Deadlock found when trying to get lock; try restarting transaction
 
# This ^^ deadlock is expected. The following aren't:
 
show status;
# ERROR 1213 (40001): Deadlock found when trying to get lock; try restarting transaction
 
select 1;
# ERROR 1213 (40001): Deadlock found when trying to get lock; try restarting transaction
 
rollback;
# ERROR 1213 (40001): Deadlock found when trying to get lock; try restarting transaction
 
commit;
# ERROR 1213 (40001): Deadlock found when trying to get lock; try restarting transaction

etc. I haven't found a cure except for closing the client session and opening a new one.

My server command line:

mysqld --no-defaults --datadir=data2 --wsrep_provider=galera-23.2.1-src/libgalera_smm.so --wsrep_sst_method=rsync --core --binlog-format=row --default-storage-engine=InnoDB --innodb_autoinc_lock_mode=2 --innodb_locks_unsafe_for_binlog=1 --innodb_flush_log_at_trx_commit=0 --log-error=log.err --basedir=maria-5.5-galera/ --port=8307 --loose-lc-messages-dir=maria-5.5-galera/sql/share --socket=/tmp/galera-2.sock --tmpdir=maria-5.5-galera/data2/tmp --general-log=1 --wsrep_cluster_address=gcomm://127.0.0.1:4567?gmcast.listen_addr=tcp://127.0.0.1:4566 --core



 Comments   
Comment by Seppo Jaakola [ 2012-09-20 ]

MDEV-541 is a regression from the fix for MDEV-523

Comment by Seppo Jaakola [ 2012-09-20 ]

regression bug, affects client sessions, which were idle during cluster abort happened

Comment by Seppo Jaakola [ 2012-09-20 ]

Fix merged from upstream with: http://bazaar.launchpad.net/~maria-captains/maria/maria-5.5-galera/revision/3354

Comment by Elena Stepanova [ 2012-09-20 ]

Reopening for a moment just to add 'Galera' prefix to the subject (helps to manage issues)

Generated at Thu Feb 08 06:29:31 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.