http://defect.opensolaris.org/bz/show_bug.cgi?id=19245

           Summary: History builder bails on index and update using bzr
                    project
    Classification: Development
           Product: opengrok
           Version: unspecified
          Platform: ANY/Generic
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P3
         Component: indexer
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


This is using 11.1 and java:

# java -version
java version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6 1.11.4) (6b24-1.11.4-1ubuntu0.12.04.1)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)


When running index|update with a single sandbox the update
would fail very quickly with a cryptic "error".

root@juju-canonistack-instance-1:/opt/opengrok/bin# ./OpenGrok update 
Loading the default instance configuration ...
Logging filehandler pattern: /var/opengrok/log/opengrok%g.%u.log
19:22:15 INFO: Scanning for repositories...
19:22:16 INFO: Done scanning for repositories (1s)
19:22:16 INFO: Writing configuration to /var/opengrok/etc/configuration.xml
19:22:17 INFO: Done...
19:22:17 INFO: Generating history cache for all repositories ...
19:22:17 INFO: Create historycache for /var/opengrok/src/juju
(BazaarRepository)
Killed

After bisecting the script I found the offender in StdInvocation

root@juju-canonistack-instance-1:/opt/opengrok/bin#
/usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java -Xmx2048m
-Dorg.opensolaris.opengrok.history.git=/usr/bin/git
-Dorg.opensolaris.opengrok.history.Bazaar=/usr/bin/bzr
-Djava.util.logging.config.file=/var/opengrok/logging.properties -jar
/opt/opengrok/bin/../lib/opengrok.jar -P -S -r on -v -c
/usr/bin/ctags-exuberant -a on -W /var/opengrok/etc/configuration.xml -U
localhost:2424 -s /var/opengrok/src -d /var/opengrok/data -H


It's the -H, which btw has no conditional operator. From the logs:
2012-10-22 20:42:00.008+0000 INFO t10 Indexer.prepareIndexer: Generating
history cache for all repositories ...
2012-10-22 20:42:00.066+0000 INFO t11 HistoryGuru.createCache: Create
historycache for /var/opengrok/src/juju (BazaarRepository)
2012-10-22 20:42:00.068+0000 FINE t11 Executor.exec: Executing command
[/usr/bin/bzr, log, -v, ] in directory /var/opengrok/src/juju

That bzr cmd functions fine on it's own so I suspect there's some buffer
problem in the java program itself that's going wrong.

Removing the -H works around the problem though it's a major PITA to
have to patch the main driver script in order to distrib this package, making
this a conditional feature is in order.

Offending source code information for reproduction.
root@juju-canonistack-instance-1:/var/opengrok/src/juju# bzr info
Standalone tree (format: 2a)
Location:
  branch root: .

Related branches:
  parent branch: http://bazaar.launchpad.net/~juju/juju/trunk/
root@juju-canonistack-instance-1:/var/opengrok/src/juju# bzr log | head

Complete steps for reproduction:
juju-log "Installing opengrok 11.1 JAR from tarball"
. /usr/share/charm-helper/sh/net.sh
templocation=`ch_get_file ${grokjar} ${tarball_sha256}`
tar xzf ${templocation} -C /opt
ln -s /opt/opengrok-0.11.1 /opt/opengrok

juju-log "deploying opengrok war to servlet root"
# deploy script scans for common servlets and had hardcoded paths
# should you use tomcat7 this will probably not work.
cd /opt/opengrok/bin && ./OpenGrok deploy

juju-log "creating opengrok src and data store"
mkdir -p /var/opengrok/src /var/opengrok/data

juju-log "acquiring example source code: juju"
bzr branch lp:juju /var/opengrok/src/juju 2>/dev/null

juju-log "indexing..."
cd /opt/opengrok/bin && ./OpenGrok index

-- 
Configure bugmail: http://defect.opensolaris.org/bz/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
opengrok-dev mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opengrok-dev

Reply via email to