Uploaded image for project: 'FishEye'
  1. FishEye
  2. FE-526

SVN scan failes when repository contains files whose names contain non-standard characters (escaped) and symbolic links are versioned

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • High
    • 2.0
    • 1.5.2
    • Indexing
    • I was able to reproduce it only on Linux (as Windows prior Vista does not support symlinks and even on Vista SVN does not support symlinks).

    Description

      This problem occurs in a very special conditions and it was nontrivial to forge such SVN repository which proves FishEye has a bug here.
      This bug occur when all the following conditions apply:

      • SVN and FishEye server must run on some Unix/Linux machines (supporting symbolic links)
      • directories must include special characters which must be escaped while building URL, e.g + or % (e.g. branches/release-bugA+bugB+bugC)
      • there must be a symbolic link inside such directory
      • such directory has been moved (svn move) from outside repository (as configured in FishEye) into it (e.g. whole real SVN repository is http://server/svn, FishEye repository is http://server/svn/projectA and a directory with symbolic link has been moved from http://server/svn/projectB/a+c to http://server/svn/projectA)

      The problem is that in such conditions FishEye follows such path in its scanning algorithm which leads to escaping twice special characters.
      So at some moment http://server/svn/projectB/a+c/symlink is treated as http://server/svn/projectB/a%2Bc/symlink ("+" becomes "%2B"), but then incorrectly it becomes http://server/svn/projectB/a%252Bc/symlink (now % is unnecessarily escaped).
      When FishEye wants to retrieve from SVN repository information using such now corrupted URL it encounters exception and as result repository will not be further scanned at all.

      The sample stack trace is:

      ERROR - Problem processing revisions from repo file:///home/wseliga/lab/tmp/svnrepo/omitdir due to class com.cenqua.fisheye.rep.DbException - Problem getting diff information for rev39
      com.cenqua.fisheye.rep.DbException: Problem getting diff information for rev39
      	at com.cenqua.fisheye.svn.SvnRepositoryScanner.slurpRevisionBlock(SvnRepositoryScanner.java:405)
      	at com.cenqua.fisheye.rep.RepositoryScanner.processRevisions(RepositoryScanner.java:435)
      	at com.cenqua.fisheye.rep.RepositoryScanner.slurpRepository(RepositoryScanner.java:342)
      	at com.cenqua.fisheye.rep.RepositoryScanner.slurp(RepositoryScanner.java:265)
      	at com.cenqua.fisheye.rep.RepositoryScanner.ping(RepositoryScanner.java:197)
      	at com.cenqua.fisheye.svn.SvnRepositoryEngine.doSlurp(SvnRepositoryEngine.java:105)
      	at com.cenqua.fisheye.rep.RepositoryHandle.pingEngine(RepositoryHandle.java:390)
      	at com.cenqua.fisheye.rep.RepositoryHandle.processRequest(RepositoryHandle.java:140)
      	at com.cenqua.fisheye.rep.RepositoryHandle.processRequests(RepositoryHandle.java:127)
      	at com.cenqua.fisheye.rep.RepositoryHandle.queueRequest(RepositoryHandle.java:120)
      	at com.cenqua.fisheye.rep.RepositoryPinger$3$1.run(RepositoryPinger.java:151)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
      	at java.lang.Thread.run(Thread.java:619)
      Caused by: com.cenqua.fisheye.svn.diff.SvnDiffException: Exception walking dir for /omitdir/x+y+z@39
      	at com.cenqua.fisheye.svn.diff.DiffProcessor.processOutsideCopy(DiffProcessor.java:539)
      	at com.cenqua.fisheye.svn.diff.DiffProcessor.processMessage(DiffProcessor.java:273)
      	at com.cenqua.fisheye.svn.diff.DiffFetcher.process(DiffFetcher.java:64)
      	at com.cenqua.fisheye.svn.diff.DiffFetcher.run(DiffFetcher.java:45)
      	... 1 more
      Caused by: com.cenqua.fisheye.rep.RepositoryClientException: org.tigris.subversion.javahl.ClientException: svn: URL 'file:///home/wseliga/lab/tmp/svnrepo/omitdir/x%252By%252Bz/link3' non-existent in revision '39'
      	at com.cenqua.fisheye.svn.SvnThrottledClient.info2(SvnThrottledClient.java:78)
      	at com.cenqua.fisheye.svn.diff.MessageInfo.getInfo(MessageInfo.java:108)
      	at com.cenqua.fisheye.svn.diff.MessageInfo.getInfo(MessageInfo.java:100)
      	at com.cenqua.fisheye.svn.diff.DiffProcessor.addNewFileChangeInfo(DiffProcessor.java:694)
      	at com.cenqua.fisheye.svn.diff.DiffProcessor.addRemoteInfo(DiffProcessor.java:568)
      	at com.cenqua.fisheye.svn.diff.DiffProcessor.access$100(DiffProcessor.java:44)
      	at com.cenqua.fisheye.svn.diff.DiffProcessor$1.visitRemoteEntry(DiffProcessor.java:525)
      	at com.cenqua.fisheye.svn.RepositoryWalker.visitLocalCheckout(RepositoryWalker.java:192)
      	at com.cenqua.fisheye.svn.RepositoryWalker.checkOutAndWalk(RepositoryWalker.java:163)
      	at com.cenqua.fisheye.svn.RepositoryWalker.walkDir(RepositoryWalker.java:92)
      	at com.cenqua.fisheye.svn.diff.DiffProcessor.processOutsideCopy(DiffProcessor.java:537)
      	... 4 more
      Caused by: org.tigris.subversion.javahl.ClientException: svn: URL 'file:///home/wseliga/lab/tmp/svnrepo/omitdir/x%252By%252Bz/link3' non-existent in revision '39'
      	at org.tigris.subversion.javahl.JavaHLObjectFactory.throwException(JavaHLObjectFactory.java:435)
      	at org.tmatesoft.svn.core.javahl.SVNClientImpl.throwException(SVNClientImpl.java:1311)
      	at org.tmatesoft.svn.core.javahl.SVNClientImpl.info2(SVNClientImpl.java:1191)
      	at org.tigris.subversion.javahl.SVNClient.info2(SVNClient.java:338)
      	at com.cenqua.fisheye.svn.SvnThrottledClient.info2(SvnThrottledClient.java:71)
      	... 14 more
      Caused by: org.tmatesoft.svn.core.SVNException: svn: URL 'file:///home/wseliga/lab/tmp/svnrepo/omitdir/x%252By%252Bz/link3' non-existent in revision '39'
      	at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:55)
      	at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:40)
      	at org.tmatesoft.svn.core.wc.SVNWCClient.doInfo(SVNWCClient.java:2021)
      	at org.tmatesoft.svn.core.javahl.SVNClientImpl.info2(SVNClientImpl.java:1177)
      	... 16 more
      ERROR - Repository scanner paused.
      
      

      I am settings priority to critical as it affects existing customers and they have no easy workaround other than excluding whole trees which contain URL-escaped characters.

      Final hint: FAIK we don't need to escape + sign at at all. However the problem will anyway occur for other special characters in filenames.

      Attachments

        Activity

          People

            cmacneill Conor
            wseliga Wojtek Seliga (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: