You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by James Taylor <jt...@4lane.com> on 2002/02/14 14:04:28 UTC

Tracing aspects in JCS (stratum)

I began initial work on adding a tracing aspect for JCS to stratum. To
facilitate testing I added a simple junit test called TestJCS. Currently
if you do a clean checkout of stratum and execute 'ant -f
build-test.xml' that test (and others) should run and succeed.

To enable the tracing aspects you need to set the following properties
(I do so in my stratum specific build.properties):
    
    aspectj.home={path where aspectj is}/aspectj1.0
    build.includes.aspects = true
    build.includes.tracing.aspects = true 
    
Then if you build and run tests (ant -f build-test.xml again) it will
compile with ajc and weave tracing into all classes under
org.apache.stratum.jcs.

However when the test runs you may get some unexpected results. For
myself ( blackdown j2sdk 1.3.1-FCS / debian linux ) and Pete Kazmier (
sun jdk 1.3.1_01 / redhat linux ) it fails with a signal 11. On my
machine specifically it prints:

        [junit] Running org.apache.stratum.jcs.TestJCS
    An irrecoverable stack overflow has occurred.
    
    An unexpected exception has been detected in native code outside the VM.
    Unexpected Signal : 11 occurred at PC=0x40387791
    
However Pete tried it on IBM's jdk and reported:
    
    I downloaded the IBM jit JVM:
    
    Java version "1.3.0"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0)
    Classic VM (build 1.3.0, J2RE 1.3.0 IBM build cx130-20010925 (JIT
    enabled: jitc))
    
    And gave the stratum unit test a whirl with aspects enabled.  Good
    news, it doesn't segfault, but it never finishes running either. 
    The JVM is just sucking up all the cpu and just keeps on running
    once it hits the TestJCS unit test.  
    
So, some very curious behavior. I'd be interested to know what happens
on other operating system / VM combinations. So, if you have access to
another os or VM combination please try the unit tests and see what
happens. Let me know what happens. If it fails in a new and interesting
send me the output. If it succeeds (crossed fingers) send me the
contents of bin/test/logs/jcs.log.

I'm quite stumped right now, so if anybody has any ideas I'd love to
hear them, or you can just dig into the code. It would be great to get
this resolved since the tracing aspects will be useful across many
projects, but especially in JCS as a way of cleaning up a lot of the
existing trace logging.

Thanks,
James Taylor


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>