ode-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Abdulkadir Yaman (Issue Comment Edited) (JIRA)" <j...@apache.org>
Subject [jira] [Issue Comment Edited] (ODE-943) NoClassDefFoundError for org.apache.log4j.helpers.AbsoluteTimeDateFormat in SimpleScheduler.doLoadImmediate() leads memory leak
Date Tue, 11 Oct 2011 05:06:29 GMT

    [ https://issues.apache.org/jira/browse/ODE-943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13124367#comment-13124367
] 

Abdulkadir Yaman edited comment on ODE-943 at 10/11/11 5:05 AM:
----------------------------------------------------------------

I worked around this issue by wrapping log4j dependency as a bundle in servicemix. More elegant
solution would be to add a wrapper bundle entry for log4j library in jbi-karaf/src/main/resources/features.xml
as follows;

<features>
<feature name="ode-core-deps" version="1.3.5">
<feature>transaction</feature>
<bundle>wrap:mvn:log4j/log4j/1.2.13</bundle>
...........
...........
............
<bundle>
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.saxon/9.1.0.8_1
</bundle>
<bundle>
mvn:org.apache.geronimo.components/geronimo-connector/2.1.3
</bundle>
</feature>
........

Currently servicemix acquires http://repo1.maven.org/maven2/org/apache/ode/ode-jbi-karaf/1.3.5/ode-jbi-karaf-1.3.5-features.xml
to install necessary dependencies and core components(correct me if i am wrong). This also
has to be changed if we want servicemix 4.3.0 version to work correctly. However i am not
sure if  changing existing/already uploaded files in repo1.maven is elegant or not.   
                
      was (Author: abdulkadiryaman):
    I worked around this issue by wrapping log4j dependency as a bundle in servicemix. More
elegant solution would be to add a wrapped bundle entry for log4j library in jbi-karaf/src/main/resources/features.xml
as follows;

<features>
<feature name="ode-core-deps" version="1.3.5">
<feature>transaction</feature>
<bundle>wrap:mvn:log4j/log4j/1.2.13</bundle>
...........
...........
............
<bundle>
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.saxon/9.1.0.8_1
</bundle>
<bundle>
mvn:org.apache.geronimo.components/geronimo-connector/2.1.3
</bundle>
</feature>
........

Currently servicemix acquires http://repo1.maven.org/maven2/org/apache/ode/ode-jbi-karaf/1.3.5/ode-jbi-karaf-1.3.5-features.xml
to install necessary dependencies and core components(correct me if i am wrong). This also
has to be changed if we want servicemix 4.3.0 version to work correctly. However i am not
sure if  changing existing/already uploaded files in repo1.maven is elegant or not.   
                  
> NoClassDefFoundError for org.apache.log4j.helpers.AbsoluteTimeDateFormat in SimpleScheduler.doLoadImmediate()
leads memory leak
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: ODE-943
>                 URL: https://issues.apache.org/jira/browse/ODE-943
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime, JBI Integration
>    Affects Versions: 1.3.5, 1.4
>         Environment: Ubuntu 11.04 64bit, Oracle JDK 1.6, Servicemix 4.3.0
>            Reporter: Abdulkadir Yaman
>
> On a fresh installation of Servicemix 4.3.0 does not expose org.apache.log4j.helpers
by default although Pax logging bundle contains this package. At line:707 of Ode_1.3.5 version
and line:732 of trunk,  AbsoluteTimeDateFormat f = new AbsoluteTimeDateFormat(); line leads
to NoClassDefFoundError for org.apache.log4j.helpers.AbsoluteTimeDateFormat. As this error
is a subclass of throwable, it is not caught in catch() block.
> This issue leads to huge memory leak under load as _processedSinceLastLoadTask.clear();
line can not be reached ever, 1 million requests will make your 1gb heap size drained and
get your servicemix in a fullgc cycles.
> I worked around this issue by wrapping log4j jar into servicemix by karaf@ osgi:install
-s wrap:mvn:log4j/log4j/1.2.13 , and restarting whole system. 
> Also log4j dependencies are imported as resolution:optional in MANIFEST-MF in ode-jbi
bundle. 
> To reproduce;
> 1 - reduce heap size in servicemix executable
> 2 - add jvm option : -verbosegc to watch gc and fullgc cycles on karaf console or -Xloggc:somefile.out
for tailing a file for output
> 3 - set KARAF_DEBUG=true in case you want to debug and see _processedSinceLastLoadTask.size()
shows increasing number of entries
> 3 - download servicemix 4.3.0 from apache
> 4 - in karaf console, features:install ode
> 5 - deploy a simple bpel flow,   features:install examples-ode-ping-pong
> 6 - generate load either via JMeter or Soapui
> 7 - take a heap dump either via jmap or via JConsole finding mbean  com.sun.management-->HotSpotDiagnostic-->
operations --> dumpHeap(heapdump.snapshot) , you can find dump file under $SMX_HOME
> 8 - analyse it via yourkit profiler or jprofiler, whatever suits you, you will see one
object retain most of the memory, which is  org/apache/ode/scheduler/simple/SimpleScheduler
on object explorer window.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message