Fisheye stopping SVN indexing at certain revision with StackOverflowError
Asked by Jens Kretzschmar:

Last week we updated to Atlassian Fisheye/Crucible 3.0.0. Two days later the scanner/indexer stopped at a certain revision (our repository is on SVN) and since then displays that this same revision is processed. Restarting the indexer and later Fisheye didn't help. Fisheye lists new revisions arriving so it's not completely SVN-locked-up. Crucible reviews can still be created - but only for older revisions.

This is the exception we find in the logs:

```
2013-06-13 17:16:23,801 DEBUG [IncrementalPinger1 ] fisheye IndexingPingRequest-doRequest - Exception during FishEye Incremental Indexing of rocket: java.lang.StackOverflowErrorjava.lang.StackOverflowError        at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)        at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)        at java.util.regex.Pattern$Slice.match(Pattern.java:3482)        at java.util.regex.Pattern$Branch.match(Pattern.java:4114)        at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)        at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)        at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)        at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)        at java.util.regex.Pattern$Branch.match(Pattern.java:4114)        at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)        at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)        at java.util.regex.Pattern$NotBehind.match(Pattern.java:4714)        at java.util.regex.Pattern$Curly.match0(Pattern.java:3782)        at java.util.regex.Pattern$Curly.match(Pattern.java:3744)        at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)        at java.util.regex.Pattern$Loop.match(Pattern.java:4295)        at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)        at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)        at java.util.regex.Pattern$NotBehind.match(Pattern.java:4719)        at java.util.regex.Pattern$Curly.match0(Pattern.java:3782)        at java.util.regex.Pattern$Curly.match(Pattern.java:3744)        at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)        at java.util.regex.Pattern$Loop.matchInit(Pattern.java:4314)        at java.util.regex.Pattern$Prolog.match(Pattern.java:4251)        at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)        at java.util.regex.Matcher.match(Matcher.java:1127)        at java.util.regex.Matcher.lookingAt(Matcher.java:579)        at com.cenqua.fisheye.svn.SvnPathRule.apply(SvnPathRule.java:85)        at com.cenqua.fisheye.svn.SvnLogicalPathMatcher.findBestMatch(SvnLogicalPathMatcher.java:193)        at com.cenqua.fisheye.svn.SvnLogicalPathMatcher.findBestMatch(SvnLogicalPathMatcher.java:171)        at com.cenqua.fisheye.svn.SvnLogicalPathMatcher.getContainerId(SvnLogicalPathMatcher.java:240)        at com.cenqua.fisheye.svn.SvnLogicalPathMatcher.isTag(SvnLogicalPathMatcher.java:256)        at com.cenqua.fisheye.svn.SvnLogicalPathMatcher.getTagRoot(SvnLogicalPathMatcher.java:114)        at com.atlassian.fisheye.svn.Svn2Cache.listDirs(Svn2Cache.java:135)        at com.atlassian.fisheye.svn.Svn2AncestryProcessor.getLatestDirChangeUpto(Svn2AncestryProcessor.java:313)        at com.atlassian.fisheye.svn.Svn2AncestryProcessor.getLatestDirChangeUpto(Svn2AncestryProcessor.java:315)        at com.atlassian.fisheye.svn.Svn2AncestryProcessor.getLatestDirChangeUpto(Svn2AncestryProcessor.java:315)        at com.atlassian.fisheye.svn.Svn2AncestryProcessor.getLatestDirChangeUpto(Svn2AncestryProcessor.java:315)        at com.atlassian.fisheye.svn.Svn2AncestryProcessor.getLatestDirChangeUpto(Svn2AncestryProcessor.java:315)        at com.atlassian.fisheye.svn.Svn2AncestryProcessor.getLatestDirChangeUpto(Svn2AncestryProcessor.java:315)        at com.atlassian.fisheye.svn.Svn2AncestryProcessor.getLatestDirChangeUpto(Svn2AncestryProcessor.java:315).... many more
```

We increased the Stack Size (now 32 MB), the Heap Space is 13 GB. Today we updated to Fisheye/Crucible 3.0.1 - the exception remained.

If it's really a problem with a regex - I found this one: [java.lang.StackOverflowError while using a RegEx to Parse big strings](http://stackoverflow.com/questions/7509905/java-lang-stackoverflowerror-while-using-a-regex-to-parse-big-strings) - where would you search for the cause? Could it be really something in the revision? The revision itself is an SVN Copy...

Any ideas or help greatly appreciated!


Answers:
author: Jens Kretzschmar
body: Atlassian developed two patches and the second one seems to be working. It will eventually be released as Fisheye 3.0.2


author: Jens Kretzschmar
body: Hi Richard,

thanks for getting back to us. We filed a ticket and delivered the logs: <https://support.atlassian.com/browse/FSH-11941>

It seems to have something to do with Cumber commits to the Repository. If they lead to a deep directory structure of if Fisheye stumbles over some special characters I can't say.

Thanks for your support!

Jens


author: rstephens
body: Hi Jens,

Looking at that code, I suspect the reason for that stack trace is the getLatestDirChangeUpto() calls - do you have a very deep directory structure at any point in your repository?

This looks like a bug but to diagnose it we would need other information like the Fisheye logs leading up to the exception, and ideally some information about the structure of your repsotiroy such as the output from 'svn log -v'. Please file a support request.

Kind Regards,  
Richard Stephens


Tags: fisheye-crucible-administration