Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000368 [SVNKit] bug major always 2010-04-23 18:14 2010-05-06 22:53
Reporter kurron View Status public  
Assigned To oka
Priority normal Resolution open  
Status assigned   Product Version 1.3.x
Summary 0000368: SVNKit causes svnserve.exe to consume 99% CPU under Windows
Description We have a problem in our application where we sometimes see a CPU spike. We also see it during our integration tests. After a bit of investigation I've been able to nail down the reproduction scenario:
* single core Windows XP box
* get SVNKit to throw an exception. Our integration test tried to lock a file that was already locked. The small reproduction scenario I'll include with this bug tries to add a two-level deep directory to the repo.

SVNKit appears to complete its tasks and the program behaves as expected but the side effect of causing the CPU to spike is intolerable. I've reproduced this using both virtual machines and real hardware. Using a single CPU you can recreate the effect almost at will. Multi-core environments seem resistant to the bug. I also ran the test program under a single core Ubuntu VM and was unable to cause the spike, so it might be a Windows specific bug, but I'm just guessing. I watched SVNKit in the debugger and found that pausing will cause the problem to disappear. If you let it run all the way through without stopping at break points, you can see the problem There aren't many threads running so I'm not exactly sure what is going on.

I've attached an executable jar that prints some information about what it assumes and how to control it. Inside the jar is the source file to the class that can trigger the spike.
Additional Information Windows XP with SP2 or SP3

java version "1.6.0_19"
Java(TM) SE Runtime Environment (build 1.6.0_19-b04)
Java HotSpot(TM) Client VM (build 16.2-b04, mixed mode, sharing)

svnserve, version 1.6.9 (r901367)
   compiled Jan 21 2010, 22:00:47

Copyright (C) 2000-2009 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/ [^]
This product includes software developed by CollabNet (http://www.Collab.Net/). [^]
The following repository back-end (FS) modules are available:
* fs_fs : Module for working with a plain file (FSFS) repository.
Cyrus SASL authentication is available.
Tags No tags attached.
planned for version 1.2.x
Attached Files ? file icon TriggerCpuSpike.java [^] (3,437 bytes) 2010-04-23 18:23
log file icon svnkit.0.log [^] (3,274 bytes) 2010-04-23 18:31

- Relationships

-  Notes
(0000827)
kurron (reporter)
2010-04-23 18:22

Looks like my JAR file is too big to attach so I'll upload the .java file instead.
(0000840)
oka (administrator)
2010-05-04 20:37

So far I can not reproduce this problem, however I'm trying to do that on multi-core CPU using "affinity" process option (so that both svnserve and java runs on the same core) and I have only Windows 7 64-bit to test on.

Could you try using latest version of SVNKit (1.3.3) and svnserve (1.6.11) to see if it resolves the problem.
(0000842)
kurron (reporter)
2010-05-05 21:54

I upgraded the Subversion server to 1.6.11 and SVNKit to 1.3.3 and I still see the same behavior under a 32-bit, single core Windows XP box. The combination of Windows and single core seems to be the key. I don't have access to 64-bit Windows so I can't say if that makes a difference or not. Let me know if you want me to try something else.
(0000843)
kurron (reporter)
2010-05-05 22:00

Might it be possible for you to create a virtualized 32-bit Windows machine on your 64-bit box? That is how I initially found the problem. I have a Virtual Box VM running 32-bit XP which allows me to see the problem. I've also verified that it fails under a real single-core 32-bit machine. Just a thought.
(0000844)
oka (administrator)
2010-05-06 22:53

Thank you, I'll try to reproduce this problem with the VM approach.

- Issue History
Date Modified Username Field Change
2010-04-23 18:14 kurron New Issue
2010-04-23 18:22 kurron Note Added: 0000827
2010-04-23 18:23 kurron File Added: TriggerCpuSpike.java
2010-04-23 18:24 kurron Issue Monitored: kurron
2010-04-23 18:31 kurron File Added: svnkit.0.log
2010-05-04 16:28 oka Status new => assigned
2010-05-04 16:28 oka Assigned To => oka
2010-05-04 20:37 oka Note Added: 0000840
2010-05-05 21:54 kurron Note Added: 0000842
2010-05-05 22:00 kurron Note Added: 0000843
2010-05-06 22:53 oka Note Added: 0000844


Mantis 1.1.0[^]
Copyright © 2000 - 2007 Mantis Group
Powered by Mantis Bugtracker