This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 229355 - Subversion commit fails with a 'Busy' error message, subsequent cleanup causes 'pristine text not found' errors
Summary: Subversion commit fails with a 'Busy' error message, subsequent cleanup cause...
Status: RESOLVED FIXED
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Subversion (show other bugs)
Version: 7.3
Hardware: PC Windows 8
: P3 normal with 1 vote (vote)
Assignee: Ondrej Vrabec
URL:
Keywords:
: 219699 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-05-04 21:11 UTC by johnpm
Modified: 2014-03-12 08:50 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (42.65 KB, text/plain)
2013-05-04 21:11 UTC, johnpm
Details
Log file for BUSY error on commit (93.31 KB, application/octet-stream)
2013-05-07 21:09 UTC, johnpm
Details
messages.log (50.50 KB, application/octet-stream)
2013-05-20 18:19 UTC, johnpm
Details
Profiler snapshot after dismissing dialog w/ svn busy (50.99 KB, application/octet-stream)
2013-10-17 20:36 UTC, johncorrigan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description johnpm 2013-05-04 21:11:41 UTC
Product Version = NetBeans IDE 7.3 (Build 201302132200)
Operating System = Windows 8 version 6.2 running on amd64
Java; VM; Vendor = 1.7.0_10
Runtime = Java HotSpot(TM) 64-Bit Server VM 23.6-b04

Using subversion with the defaul SvnKit client.

After attempting a commit an error message appears saying the server is 'Busy'. The changes list continues to show all the changed files. Trying again produces a message saying to run cleanup. Running cleanup causes a new error message to appear on the next commit attempt, 'Pristine text not found'. The only cure at this stage seems to be to delete the whole .svn directory and do a fresh checkout. Note that the original commit did actually succeed and all the changed files were in the repo.
Comment 1 johnpm 2013-05-04 21:11:50 UTC
Created attachment 134109 [details]
IDE log
Comment 2 Ondrej Vrabec 2013-05-07 08:26:57 UTC
The messages.log does not contain any traces of the error or any subversion related problem. Please attach the log from the session where the error occurred and reopen. Thanks.
> The only cure at this stage seems to be to delete the whole .svn directory and
> do a fresh checkout.
Have you tried update? That one may download what's missing.
Comment 3 johnpm 2013-05-07 21:09:20 UTC
Created attachment 134203 [details]
Log file for BUSY error on commit

Found the log file, was actually using 7.2.1 when I got the error and upgraded to 7.3 to see if it would fix it.
Comment 4 Ondrej Vrabec 2013-05-11 05:39:32 UTC

*** This bug has been marked as a duplicate of bug 229597 ***
Comment 5 johnpm 2013-05-20 18:19:17 UTC
Created attachment 134653 [details]
messages.log
Comment 6 johnpm 2013-05-20 18:40:31 UTC
Problem occurred again, this time with 7.3 on commit of approx 20 files:
"org.apache.subversion.javahl.ClientException: E200030: BUSY"

messages.log attached.

Tried running update, gave locked message:
"org.apache.subversion.javahl.ClientException: E155004: Working copy 'C:\Users\John\Documents\xxxxxx\software\source' locked
E155004: 'C:\Users\John\Documents\xxxxxx' is already locked."

Ran 'cleanup working copy', gave another busy error:
"org.apache.subversion.javahl.ClientException: E200030: BUSY"

Shut down and restarted IDE, was then able to run 'cleanup working copy' but refreshing status still showed all original changed files and repo browser showed changes had not been committed. Tried to commit again and commit seemed to work for most files but got message:
"org.apache.subversion.javahl.ClientException: E155032: Commit failed (details follow):
E155032: Pristine text not found"

and versioning status showed one 'locally new' file which was not new. 

Tried update, got message:
"org.apache.subversion.javahl.ClientException: E155004: There are unfinished work items in 'C:\Users\John\Documents\RoomEQ_Wizard'; run 'svn cleanup' first."

Tried to run cleanup and got 
"org.apache.subversion.javahl.ClientException: E155032: Pristine text not found"

Deleted .svn directory and ran a fresh checkout to get things working again.
Comment 7 Ondrej Vrabec 2013-05-20 18:50:32 UTC
I suggest you switch to JavaHL then. Install a subversion client coming with JavaHL bindings (SlikSVN for example) and switch to JavaHL in Tools -> Options -> Miscellaneous -> Versioning -> Subversion | Preferred Subversion Client. That should work without problems. I will try and file a bug to SvnKit
Comment 8 amoeba 2013-05-21 20:30:19 UTC
I am also frequently getting "E200030" errors from SVN in NetBeans 7.3 using svnkit.  (Windows 7 x64 Java 1.7.0_17).

I did not have this problem with earlier versions of NetBeans.

I usually keep the "Subversion" window open.  It might be that that window is trying to update it's status while the commit is taking place.  If two threads are trying to access the ".svn/wc.db" database at the same time, that could cause the E200030 error.
Comment 9 Ondrej Vrabec 2013-05-22 10:38:48 UTC
As amoeba pointed out this is probably caused by one thread blocking svn commit for a long time and the commit eventually gives up and leaves the WC in a corrupted state. No idea however what thread may cause this. Could you make a profiler snapshot (http://wiki.netbeans.org/FitnessViaPartnership) while the IDE is committing and attach the snapshot when you get the error?
Comment 10 amoeba 2013-05-22 16:49:46 UTC
I would be happy to make a profiler snapshot, but I do not understand the instructions given in your link.  I can not find the "Profile Me Now!" button in the toolbar of NetBeans 7.3
Comment 11 Ondrej Vrabec 2013-05-23 07:34:25 UTC
(In reply to comment #10)
> I would be happy to make a profiler snapshot, but I do not understand the
> instructions given in your link.  I can not find the "Profile Me Now!" button
> in the toolbar of NetBeans 7.3
hmm, not sure if the wiki describes it correctly. Have you tried right-clicking in the toolbar and activating Performance toolbar? Then the button should be available: Profile the IDE!
Comment 12 amoeba 2013-05-23 15:50:06 UTC
Thanks.  That works to allow me to turn on the self-profiler.  I'll attach a dump if I'm ever able to reproduce this bug while the profiler is on.
Comment 13 Ondrej Vrabec 2013-06-06 06:48:55 UTC
*** Bug 219699 has been marked as a duplicate of this bug. ***
Comment 14 Ondrej Vrabec 2013-06-26 11:58:48 UTC
can anyone attach the profiler snapshot?
Comment 15 Ondrej Vrabec 2013-08-15 09:13:49 UTC
nothing i can do without the snapshot
Comment 16 johncorrigan 2013-08-27 20:30:10 UTC
I just received this error message during a commit. After reading this thread I decided to try refreshing the status in the SVN window. That seemed to clear up the problem. Seems like the problem is related to the SVN window as I have not had this issue with the window closed.

Perhaps need some sort of check in the SVN window to determine if another SVN process is ongoing and if so postpone the update?
Comment 17 amoeba 2013-08-27 21:07:59 UTC
(In reply to johncorrigan from comment #16)
> Seems like the problem is related to the SVN window
> as I have not had this issue with the window closed.
> 

I also believe that the problem only occurs with the SVN "Versioning Output" window open.  It might be good to review that code to make sure that window doesn't update itself while some other SVN operation is on-going.

I have not seen this problem again in the last few months, so I have been unable to provide a profiler snapshot.
Comment 18 Ondrej Vrabec 2013-08-30 12:07:57 UTC
well, i may need to set an exclusive mutex for subversion commands handled by SVNKit, but please try to get at least one snapshot so i can verify that's the reason. Because setting an exclusive mutex for whole working copies might be dangerous.
Comment 19 Ondrej Vrabec 2013-08-30 12:09:47 UTC
(In reply to Ondrej Vrabec from comment #18)
> Because setting an exclusive mutex for whole working
> copies might be dangerous.
I mean dangerous or at least not desired when there is no need to
Comment 20 johncorrigan 2013-09-05 19:18:14 UTC
I am able to reproduce the error by performing a "Subversion"->"Switch To Copy..." from the context menu of a project while the Subversion window is open. However, I was unable to create a snapshotfrom the profiler. The Subversion error message is displayed in a modal dialog, preventing me from creating a snapshot until the error message is dismissed.

Is there another method for getting creating the snapshot?
Comment 21 Ondrej Vrabec 2013-09-06 07:28:55 UTC
getting the snapshot may be tiresome work. You have to start profiling *before* you run commit/switch/update etc. and then "hope" you'd get the error. Starting profiling when you get the error is sadly too late.
Comment 22 johncorrigan 2013-09-11 18:03:54 UTC
@Ondrej Vrabec:

I had the profiler running. I can reproduce the error. What I can't figure out how to do is to take a snapshot while the error condition is present because the dialog box informing me of the error prevents me from clicking on the snapshot button...

Am I missing something?
Comment 23 Ondrej Vrabec 2013-09-11 18:24:57 UTC
(In reply to johncorrigan from comment #22)
> I had the profiler running. I can reproduce the error. What I can't figure
> out how to do is to take a snapshot while the error condition is present
> because the dialog box informing me of the error prevents me from clicking
> on the snapshot button...
Close the error dialog and click on the profiler button again to stop profiling... simple
Comment 24 johncorrigan 2013-10-17 20:36:16 UTC
Created attachment 141227 [details]
Profiler snapshot after dismissing dialog w/ svn busy

I took this snapshot after Netbeans complained about SVN being busy.
Comment 25 Ondrej Vrabec 2013-11-06 10:04:25 UTC
i decided to introduce a read/write mutex that runs write commands exclusively and should not be interrupted by other read commands that may undesirably lock the working copy. I expect regressions (even deadlocks) so heavy testing is needed.

fix: http://hg.netbeans.org/core-main/rev/f0c145d3d412
Comment 26 TorC 2014-03-12 08:33:12 UTC
I’ve been having this problem with both Netbeans 7.4 and 7.2, and I’m wondering how to get a hold of your solution. Is it included in any of the binary releases of netbeans?
Comment 27 Ondrej Vrabec 2014-03-12 08:50:16 UTC
(In reply to TorC from comment #26)
> I’ve been having this problem with both Netbeans 7.4 and 7.2, and I’m
> wondering how to get a hold of your solution. Is it included in any of the
> binary releases of netbeans?
It will be available in NetBeans 8.0 (will be released soon). Will not be part of 7.4 or any previous release.