Ticket #191 (new bugs)

Opened 12 years ago

SysTimer : Can't be initialized ...

Reported by: hauki Owned by: omsynge
Priority: major Milestone: dCache-1.9.0
Component: core Keywords: build
Cc: Sub Version:

Description

Hi,

while trying to understand those "SysTimer : Can't be initialized ..." messages in the log, I found out that :
1.) the required JNI-library (or whatever the correct term is) libSysTimer.so is not build (tested with svn-trunk, and this library is also not shipped with the rpms).

Then I tried to compile it myself:
The Makefile trunk/build/dcache/core/diskCacheV111/util/Makefile was not running on my build-environment, because of some hard-coded pathes. Using :

all:  libSysTimer.so

SysTimerImpl.o: SysTimerImpl.c diskCacheV111_util_SysTimer.h
        gcc -c SysTimerImpl.c -fPIC -I${JAVA_HOME}/include -I${JAVA_HOME}/include/linux

SysTimer.class: SysTimer.java
        javac SysTimer.java

diskCacheV111_util_SysTimer.h: SysTimer.class
        ${JAVA_HOME}/bin/javah -classpath ../.. -jni diskCacheV111.util.SysTimer

libSysTimer.so: SysTimerImpl.o
        ld -o libSysTimer.so -G -L${JAVA_HOME}/lib SysTimerImpl.o

clean:
        rm SysTimerImpl.o libSysTimer.so diskCacheV111_util_SysTimer_Timestamp.h diskCacheV111_util_SysTimer.h

I could compile the library from the working-dir trunk/build/dcache/core with the command make -C diskCacheV111/util/ -f Makefile all

from the same working-directory, the SystemTimerTest worked with

java -Djava.library.path=diskCacheV111/util diskCacheV111/util/SysTimerTest

For an automated build, the instructions in the ant.xml files are missing.
(Just thinking loud here, but I suppose they should just call the make as me above, add in the packages the file /opt/d-cache/lib/libSysTimer.so and /opt/d-cache/lib should be in the java.library.path, but these are packaging-issues...)

2.) In the source-file build/dcache/core/diskCacheV111/util/SysTimer.java,

I noticed that there is in the method getDifference no error-handling for the case that the SysTimer couldn't be initialized, so I guess it should always produces garbage.

Thank you for fixing that.

Christof

Note: See TracTickets for help on using tickets.