[ 
https://issues.apache.org/jira/browse/DERBY-6011?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13530544#comment-13530544
 ] 

Karl Wright commented on DERBY-6011:
------------------------------------

I added code to dump the order in which FOR UPDATE queries occur within all 
such transactions.  Here is a sample:

{code}
C:\wip\mcf\trunk\tests\rss\test-derby-output>tail -f manifoldcf.log
 WARN 2012-12-12 19:34:55,191 (Startup thread) - Updating: 
003B8F747BBAD5C268EB77CA597CBEE8DDA51D2C 
3DFAA926101B8F5E105345E9FA8F6FF6E2503E25 
99C0CD575F36553F77EB7AA75FF482E70493AA37 
B431F3383185EF8B73935CC448011AA5A8A45EEF 
B915311D0951A301FAC8C259FA4D3945BDC80EE9 
C3F374EA2B2B9B4EDEB1FBBE6911A64732C6038B 
E6BA898A8951E6CAAFC9339646BA0FD753F32F41 
EA9515103B9821D7FF82DF135A7054DCA24A263E 
F04C0F1EFA841CF9CB57532577169FAD61EFD20B 
F9060099494ABDD229F9B31A2CECB5BB2DAF3877
 WARN 2012-12-12 19:34:57,751 (Worker thread '20') - Updating: 
019DC959C3D2D81AA500308882553E08E2128F3A 
033689A1424C66E5C15F3A553ED632D7711F18C7 
0BCB5FB2AE27DBBA7743A70CB57714496A30EBBD 
26278F7F152D729150F293C3109A1D9A58AD21C6 
2D6080272A03EE908F9802D4EED6AC51D6C12225 
77200A152ABAA4267532747B5D07589A5C1D2702 
965B87D0FEE7880E6862209BD0B9538A86771879 
B157D34358568EADF670474ED35AF0AB62550708 
BFCF552C4D14CE9630C428D9F3C197B70308C81B 
F3059DC934196A6F84D6BED8277CB2E77D0AE97F
 WARN 2012-12-12 19:34:57,761 (Worker thread '21') - Updating: 
0CDC72CE178F4A53C54B31EEAA879ED10C8ABF50 
28B8DB65AFC0E07477BE019559275F5DDEB5265A 
695D963FFA7E075984DD905A47399E344319BD75 
6B89F81ACE4851223423E57F3B48C9440F6BDAA9 
7709C357A9A72915959503F100BD9416E153EF69 
814B53D19EC2EEFA286E6E607DEF5381676E5CA8 
8776852699BABF0D4653840312C2FCD3CB35D196 
8E2E6580C863C2AA6ACD90D4B47A78C636BE0176 
8FCA17A6EEBCC7AD17C4DEA053B8531BC40E5D87 
B5E611CB37699E2061FAB5359CC1CA8AEB9544E2
 WARN 2012-12-12 19:34:57,761 (Worker thread '27') - Updating: 
06EF09998C07EE279680EFB40D8D173B953BBB41 
089C4A318256A5BE24751A18C15B12534088AE53 
18ECC28594B73C11C8A0E29D2647BD8C0BCFCFB0 
236BC8FC47E522279D04B03F9F24173CEEBC3CC4 
2B2B03FBC06D85FD6F1D9F2FD06DB135D14EAA01 
5347BE04928401EFE2B95BCD9B3E79DB5BC41001 
5E55A3510C77E35EABB49CF0E2DD8D69ECB3B9F7 
9FC003AE98DBAC93A78F8DBD8B5E05C40941C4EF 
D835783891D230FFB4B620195404A682310F6B28 
DE398FAFF2E0A5B14FB464C4797E22C589A3356C
 WARN 2012-12-12 19:34:57,761 (Worker thread '28') - Updating: 
19EA2C455D02F87BD90F42697A383329C87528EB 
254A4AB5D1225F9BA950D6C57163F75C6CFFFFC0 
28326FC3D745333CDDBEC3773E287852070A181E 
2E01C7863900BB12317EE44ECF2DD3AFEE91521E 
307883028721A1CCB7022E5836F453083E799960 
53823AB0FF908EB8FFD3132DC4FC5B98E299B9A6 
6F37A1F53B5788CFBD34CCFF6C3BE39F164CA220 
949A65754EADE71A345AA79A0F3873210F161F73 
9F2B2BBDFE7CCC8C96978AD7C264AD8037F2CC15 
C565A81AB0F3F726FDAD117F4107A417D473ED90
 WARN 2012-12-12 19:34:57,761 (Worker thread '25') - Updating: 
42B481A0A216F2427C32510AF60BC454003C404E 
5ED258F4A057352BEA7FF004C99547F180A29569 
7BED6B0D45CCD9AA2AD2104877581EE58DE422E9 
84AB9FA028CC720613F52B5CB9A6892D17D3E245 
BBA0A8216C1BDD1DF9C13D5375D0C02EB3F95DB2 
C79FE39946B6928EB7205F7CFFA47A729CF0B661 
CD824F7566B50CE109580D962E6E763C01332397 
DD57F6FE90BB3E32B7FAD7F828CFAF8D935EB348 
F86948D55405C4C116C6976E4F8459A0EE841D0D 
FEFBC683A56504DB7D418ADDBFF37FD53B275500
 WARN 2012-12-12 19:34:57,761 (Worker thread '26') - Updating: 
05A24080B87E69BADDA0A18B3FFD15C7585AFDEE 
06115678F7341BDA326CEC24B8EBC61068045500 
1AEFEDD366A61686F0A8A8D26BC6EEC121020F57 
27C2A7B08CB174D797E49A24970E51DAEEF10910 
5C7F49ACB75FD2859A6149C56E465A018C7CAF9B 
8CC7F639CB3459F917AC446A987D4F277A8E3ABB 
C839461E3EEE75420D5C50993023BD4FD89071D1 
CABCC5DB287F47FDA363E88B8E1ADA75181FC44A 
FC14D78A477B160EA8B26170F8B4BD923C408930 
FD0918C5F881ED4E548718557888491B4628CD93
 WARN 2012-12-12 19:34:57,761 (Worker thread '23') - Updating: 
1CFD6C6B4D826A408EC0150A6DD29AB5C3109980 
30453368183133EB1C15E7332107069CC05F8CF4 
5CD048722B14CDE3F9C290F76456DDF0B2651A50 
81B9643732699B6430014FADCE9D912B6FEC837E 
8CDFBD16CA436568AC69DF33D4B3C30BD0F3E969 
D3A1BD538E7B70A47408B34A6FB9FE729C302CD6 
D6A92EE29556CB6DA708C7A62BC81487D9C0154A 
D9186FE82FF92AC4E015B65D629F917811D460AF 
E37AA6500F9169EB4584F8393D4ED7C6B4C0C24F 
FD0753B3F8FF1B5207856BAB18A4E95BC5D565BC
 WARN 2012-12-12 19:34:57,761 (Worker thread '24') - Updating: 
2E95CCE9E2C1B45DE9E072AFDF887C8B71942E85 
2F34184B314A85CB5FC9F7790BD7D6A60D71358B 
47D7D7541742A4BF73AF2EA982B816D91D31618E 
9802024F3BE53EA74EC6AEC988BA83DFD324C0BA 
996569CB471D39FB4447813FE7EE9388671CCD57 
ACA10747868899A55ADC9B639743BFFE13CCCD8D 
B976865B4C25BE2BDDC32772D7323161F289B625 
BA96F4D762F9D3BC38C74469437ECA6BAD426EAF 
BC41C066F89F359F8E4F79C54D076884435A9A5B 
D0E19E1769871A98F620C22B58F6FE9F9ACAC440
 WARN 2012-12-12 19:34:57,771 (Worker thread '22') - Updating: 
0F87592E9B7A46E5ED62CD24494494340CDF9017 
2C25CD30BBA30CF206A2E1F1E790C3177D08DAA3 
2FF4E8863AC478B3907842D9641B2A709CF12B08 
35EA4158F31C1DC82CEA37E623043A6F7E3FF6D3 
40A0F27E071B00D03EC1CE6E87072D4B9833B87B 
4A5D5C909F7C2AEF31F4F5F609693FD9E93F6234 
6821DBDCD0EE1790139249BD5672164DE564744D 
AE7B06C816DD8B0695C3B72346DD44B50031365A 
E66A1117DB7BF457C99C3BEA212D7C6060C6A57F 
EE095CD6ABFF89126C03C619C3B68A25D966C00F
 WARN 2012-12-12 19:34:57,771 (Worker thread '29') - Updating: 
0593EFDEBC69F8EF57E3BBC6C028889F9EF149C5 
08CB4439D7F6F61999FD30D1D25EF47ACA663528 
14582338E03D44F26A15F010C2AFCE2922C784DD 
1D8B8022946E5D57D01627C5063790EE9AC2AD00 
683E03E53C5E3436A630BDDBAC9DCE9020A2F1D3 
BDE5FD21AD2B122E979766D9AD52BC245E9C0240 
E08DBEC97CE8CC5504331D358B94BF66F1939923 
E6E2608BF4A29EAABEAB7D62F3E4013577AADC76 
E9A9AC4471D155B51487B6715FD95A551EC0BB2C 
EFA897EB9FE6ECCC05DBC9F89E90E520C60EAED1
{code}

It appears they all are ordered, as stipulated.  So there is no reason for a 
deadlock to develop, at least among the set of queries as you provided above.


                
> Derby performs very badly (seems to deadlock and timeout) in very simple 
> multi-threaded tests
> ---------------------------------------------------------------------------------------------
>
>                 Key: DERBY-6011
>                 URL: https://issues.apache.org/jira/browse/DERBY-6011
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.7.1.1, 10.8.2.2, 10.9.1.0
>         Environment: Lenovo laptop with SSD's, Windows 7, 64-bit, Sun JDK 
> 1.6.xx
>            Reporter: Karl Wright
>         Attachments: derby.log, manifoldcf.log
>
>
> The Apache ManifoldCF project supports Derby as one of its underlying 
> databases.  Simple tests, however, demonstrate that Derby is apparently 
> deadlocking and timing out repeatedly under multi-thread conditions.  This 
> problem is long-standing, and is not exhibited by any other database 
> ManifoldCF supports, and makes a simple test take between 6x and 12x as long.
> There is a trivial test with demonstrates the problem vs. other databases.  
> Please do the following (once you have java 1.6+, svn 1.7+, and ant 1.7+ 
> available):
> (1) Check out https://svn.apache.org/repos/asf/manifoldcf/trunk
> (2) Run the following ant target to download the dependencies: "ant 
> make-core-deps"
> (3) Run the Derby test: "ant run-rss-tests-derby" . Note the time required - 
> at least 180 seconds, can be up to 360 seconds.
> (4) Run the equivalent HSQLDB test: "ant run-rss-tests-HSQLDB".  This test 
> takes about 31 seconds to run.
> The output of the Derby test can be found in the directory 
> "tests/rss/test-derby-output".  Have a look at manifoldcf.log, where all 
> long-running queries are reported.  Derby.log is also included, which shows 
> only that during the test's cleanup phase the database is deleted before it 
> is shutdown, which is not pertinent to the performance issue.
> I am available to assist with ManifoldCF, if that seems to be required.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to