Bug 309628 - Stack over flow error occured in hp itanium environment while trying to load aspectj1.6.1
Summary: Stack over flow error occured in hp itanium environment while trying to load ...
Status: NEW
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: unspecified   Edit
Hardware: PC other
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-19 03:39 EDT by pandu CLA
Modified: 2010-06-22 04:19 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pandu CLA 2010-04-19 03:39:32 EDT
Build Identifier: 1.6.1

We are getting the stackoverflow error in hpitanium environment  while starting the weblogic server 9.2.3 .We are using the aspectj1.6.1 jar  for weaving.Please let us know the compatible jdk version for aspectj1.6.1 in hpitanium environment.We also see that two files ajcore<timestamp>.txt are creatted in server domain location.The stack trace is as follows.Please let us know what needs to be done.We are currently using jdk1.5.13 in hp itanium environment.

end public abstract class com.metasolv.api.framework.persistence.impl.JdoBean 
 -- (StackOverflowError) null 
null 
java.lang.StackOverflowError 
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) 
        at 
org.aspectj.weaver.patterns.WithinPointcut.findResidueInternal(WithinPointcut. 
java:139) 
        at 
org.aspectj.weaver.patterns.Pointcut.findResidue(Pointcut.java:269) 
        at 
org.aspectj.weaver.patterns.AndPointcut.findResidueInternal(AndPointcut.java:9 
4) 
        at 
org.aspectj.weaver.patterns.Pointcut.findResidue(Pointcut.java:269) 
        at 
org.aspectj.weaver.patterns.AndPointcut.findResidueInternal(AndPointcut.java:9 
4) 
        at 
org.aspectj.weaver.patterns.Pointcut.findResidue(Pointcut.java:269) 
        at 
org.aspectj.weaver.patterns.OrPointcut.findResidueInternal(OrPointcut.java:97) 

        at 
org.aspectj.weaver.patterns.Pointcut.findResidue(Pointcut.java:269) 
        at 
org.aspectj.weaver.patterns.OrPointcut.findResidueInternal(OrPointcut.java:97) 

        at 
org.aspectj.weaver.patterns.Pointcut.findResidue(Pointcut.java:269) 
        at 
org.aspectj.weaver.patterns.OrPointcut.findResidueInternal(OrPointcut.java:97) 

        at 
org.aspectj.weaver.patterns.Pointcut.findResidue(Pointcut.java:269) 
        at 
org.aspectj.weaver.patterns.OrPointcut.findResidueInternal(OrPointcut.java:97) 

        at 
org.aspectj.weaver.patterns.Pointcut.findResidue(Pointcut.java:269) 
        at 
org.aspectj.weaver.patterns.OrPointcut.findResidueInternal(OrPointcut.java:97) 

        at 
org.aspectj.weaver.patterns.Pointcut.findResidue(Pointcut.java:269) 
        at 
org.aspectj.weaver.patterns.OrPointcut.findResidueInternal(OrPointcut.java:97) 

        at 
org.aspectj.weaver.patterns.Pointcut.findResidue(Pointcut.java:269) 
        at 
org.aspectj.weaver.patterns.OrPointcut.findResidueInternal(OrPointcut.java:97) 

        at 
org.aspectj.weaver.patterns.Pointcut.findResidue(Pointcut.java:269) 
        at 
org.aspectj.weaver.patterns.OrPointcut.findResidueInternal(OrPointcut.java:97) 

        at 
org.aspectj.weaver.patterns.Pointcut.findResidue(Pointcut.java:269) 
        at 
org.aspectj.weaver.patterns.OrPointcut.findResidueInternal(OrPointcut.java:97) 


***************************************** 


Reproducible: Always

Steps to Reproduce:
1.Have aspectj.jar in classpath of server script.
2.Deploy the application .
3.Restart the server  in hpitanium environment.
Comment 1 Andrew Clement CLA 2010-04-20 12:11:44 EDT
I've not seen anything like that before.  Do you have a really complicated pointcut?  I'm just wondering why the stack is so deep with the Ors/Ands being invoked again and again.  The ajcore file would show any really big/long pointcuts.

Are you able to try a more recent AspectJ?  Things have changed a lot since 1.6.1.

Is there a Java 6 for HP itanium? That would also be worth trying.
Comment 2 pandu CLA 2010-04-20 13:46:38 EDT
We see that this error is replicated on hp itanium OS.In linux, solaris we are not getting this issue.We are using jdk 1.5.12 .Do u see it as jdk version issue?
Comment 3 Andrew Clement CLA 2010-04-20 20:18:22 EDT
I can only imagine it is a JDK issue - my suggestion to use a later AspectJ would merely be to see if it exercised a sufficiently different codepath through AspectJ that the problem wouldn't be triggered.  As I mentioned, it would also be worth trying Java6 if you have that for the platform.

what changed to trigger the issue? did you change platform? change the aspectj app? change the jvm?
Comment 4 pandu CLA 2010-04-21 02:43:40 EDT
Our application does not support java 1.6.Please let us know what can be done for this.We are using hp itanium and aspectj 1.6.1 .We are not ready to migrate to higher versions of aspectj as our customers are already live on our product.
Comment 5 Andrew Clement CLA 2010-04-21 11:16:35 EDT
I asked what you did to cause it to start failing, can you give me a hint:

> what changed to trigger the issue? did you change platform? 
> change the aspectj app? change the jvm?

Can you reverse whatever it is you did to cause the problem? (if it was previously not happening).

That bit of WithinPointcut is simply referencing a type 'Literal' - which I assume drives the classload.  If you have a misbehaving classloader then I can imagine a problem with stack overflow. 

I suppose you could put the aspectjweaver.jar higher up the server configuration, that means Literal would be getting looked up by a different classloader - perhaps one that behaves properly.  You could try putting aspectjweaver (I presume you are using aspectjweaver?) on the bootclasspath for the VM perhaps, or somewhere in the server configuration at a higher level than the server script.
Comment 6 pandu CLA 2010-06-21 03:16:24 EDT
Currently we are using following options in startup of server script.

JAVA_OPTIONS="-DserverName=UIM711PatchServer ${JAVA_OPTIONS} -Dmetasolv.home=${METASOLV_HOME}"
JAVA_OPTIONS="${JAVA_OPTIONS} -Dfile.encoding=UTF-8"
JAVA_OPTIONS="${JAVA_OPTIONS} -Djava.io.tmpdir=${METASOLV_HOME}/tmp"
JAVA_OPTIONS="${JAVA_OPTIONS} -Dlog4j.configuration_uim=loggingconfig.xml"
JAVA_OPTIONS="${JAVA_OPTIONS} -Dmslv.logging.watchdog.timer=5000"
JAVA_OPTIONS="${JAVA_OPTIONS} -Dora_uim_tasks_port=13030"
JAVA_OPTIONS="${JAVA_OPTIONS} -Dkodo.jdbc.Schemas=uim711p1"
JAVA_OPTIONS="${JAVA_OPTIONS} -Dkodo.jdbc.DBDictionary=oracle(DefaultSchemaName="uim711p1",UseSchemaName=true)"
JAVA_OPTIONS="${JAVA_OPTIONS} -Djavax.xml.soap.SOAPFactory=weblogic.xml.saaj.SOAPFactoryImpl"
JAVA_OPTIONS="${JAVA_OPTIONS} -javaagent:${THIRDPARTY_LIB}/aspectjweaver.jar -Daj.weaving.verbose=false"
#

Please suggest if I have to keep aspectjweaver.jar above all JAVA_OPTIONS as below.

JAVA_OPTIONS="${JAVA_OPTIONS} -javaagent:${THIRDPARTY_LIB}/aspectjweaver.jar -Daj.weaving.verbose=false"
JAVA_OPTIONS="-DserverName=UIM711PatchServer ${JAVA_OPTIONS} -Dmetasolv.home=${METASOLV_HOME}"
JAVA_OPTIONS="${JAVA_OPTIONS} -Dfile.encoding=UTF-8"
JAVA_OPTIONS="${JAVA_OPTIONS} -Djava.io.tmpdir=${METASOLV_HOME}/tmp"
JAVA_OPTIONS="${JAVA_OPTIONS} -Dlog4j.configuration_uim=loggingconfig.xml"
JAVA_OPTIONS="${JAVA_OPTIONS} -Dmslv.logging.watchdog.timer=5000"
JAVA_OPTIONS="${JAVA_OPTIONS} -Dora_uim_tasks_port=13030"
JAVA_OPTIONS="${JAVA_OPTIONS} -Dkodo.jdbc.Schemas=uim711p1"
JAVA_OPTIONS="${JAVA_OPTIONS} -Dkodo.jdbc.DBDictionary=oracle(DefaultSchemaName="uim711p1",UseSchemaName=true)"
JAVA_OPTIONS="${JAVA_OPTIONS} -Djavax.xml.soap.SOAPFactory=weblogic.xml.saaj.SOAPFactoryImpl"
Comment 7 Andrew Clement CLA 2010-06-21 10:53:35 EDT
as none of the other options introduced an additional agent, I can't see that moving the weaver to first will make any difference.

Are you able to answer any of the questions I've already asked so far:

- do you have a really complicated pointcut?
- are you able to try a more recent AspectJ?
- is there a Java6 you can try?
- has it ever worked? (with an older AspectJ?)
Comment 8 pandu CLA 2010-06-22 04:19:43 EDT
I have tested on latest aspectj 1.6.8 .But still the same issue occurs.We dont have complicated point cut.JDK 6 is not option as our application does not support it.We didnt test with older aspectj(before 1.6.1)  in hp itanium before.

Pandu