I have a scenerio in SAP DB 7.4.3.7 (and I believe it'll happen on 7.3
also) on Linux where four users appear to be deadlocked.  It takes at
least 4 users to make this case happen reliably and quickly.  I have a
table with a single column and a single row, where a stored procedure
will select the row from the table and then update it.  The stored
procedure is execute with repeatable reads.

Here are a couple of snapshots from the LOCKSTATISTICS table when this
deadlock-like behavior is occuring.

dbmcli on DBT2>sql_execute select * from lockstatistics
OK
END     
604;'                6010';0;'';55;'DBT';'20030113';'00220458';'';'     
4970';(null);(null);(null);'row_exclusive';'write';1369;'cl004.pdx.osdl.net';'DBT';'B';'';9;'';'x'FFFE000000000001''
605;'                6011';0;'';80;'DBT';'20030113';'00220459';'';'     
4970';(null);(null);(null);'row_exclusive';'write';1370;'cl004.pdx.osdl.net';'DBT';'B';'';9;'';'x'FFFE000000000001''
606;'                6013';0;'';56;'DBT';'20030113';'00220500';'';'     
4970';(null);(null);(null);'row_exclusive';'write';1373;'cl004.pdx.osdl.net';'DBT';'B';'';9;'';'x'FFFE000000000001''
607;'                6008';0;'';81;'DBT';'20030113';'00220501';'';'     
4970';(null);'row_share';(null);'row_exclusive';'write';1376;'cl004.pdx.osdl.net';'DBT';'B';'';9;'';'x'FFFE000000000001''

---
dbmcli on DBT2>sql_execute select * from lockstatistics
OK
END     
604;'                6010';0;'';55;'DBT';'20030113';'00220458';'';'     
4940';(null);(null);(null);'row_exclusive';'write';1369;'cl004.pdx.osdl.net';'DBT';'B';'';9;'';'x'FFFE000000000001''
605;'                6011';0;'';80;'DBT';'20030113';'00220459';'';'     
4940';(null);(null);(null);'row_exclusive';'write';1370;'cl004.pdx.osdl.net';'DBT';'B';'';9;'';'x'FFFE000000000001''
606;'                6013';0;'';56;'DBT';'20030113';'00220500';'';'     
4940';(null);(null);(null);'row_exclusive';'write';1373;'cl004.pdx.osdl.net';'DBT';'B';'';9;'';'x'FFFE000000000001''
607;'                6008';0;'';81;'DBT';'20030113';'00220501';'';'     
4940';(null);'row_share';(null);'row_exclusive';'write';1376;'cl004.pdx.osdl.net';'DBT';'B';'';9;'';'x'FFFE000000000001''

---


The source code and table creation and population script can be
retrieved from:

http://www.osdl.org/archive/markw/lock_test/lock_test.tar.gz

It's a multi-processed odbc application.  It can be built simply by
typing make, and the program is execute with:

sqlmef2 -d dbt2 -t 4

with -d <connect string> and -t <number of processes>

A trace of my test can be retrieved from:

http://www.osdl.org/archive/markw/lock_test/lock_test.out.gz

Let me know if there any more information I can provide.

Thanks!
-- 
Mark Wong - - [EMAIL PROTECTED]
Open Source Development Lab Inc - A non-profit corporation
15275 SW Koll Parkway - Suite H - Beaverton OR, 97006
(503)-626-2455 x 32 (office)
(503)-626-2436      (fax)
http://www.osdl.org/archive/markw/

_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to