Petals CDK

Memory leak because resources of JBIBuilderDescriptor resources are not freed

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 5.1.3
  • Fix Version/s: 5.1.4, 5.3.0
  • Component/s: runtime
  • Security Level: Public
  • Description:

    The JBIBuliderDescriptor uses several static resources that are not freed when shutdowning the component. So a memory-leak occurs.

  • Environment:
    -

Issue Links

Activity

Hide
Christophe DENEUX added a comment - Thu, 29 Mar 2012 - 12:21:40 +0200

Two commits was merged in trunk

Show
Christophe DENEUX added a comment - Thu, 29 Mar 2012 - 12:21:40 +0200 Two commits was merged in trunk
Hide
Christophe DENEUX added a comment - Tue, 27 Mar 2012 - 16:54:54 +0200

CAUTION: new commit (svn#31905) in branch to prevent NPE when restarting/reinstalling the component, the JBIDescriptorBuilder must be freed by destructors

Show
Christophe DENEUX added a comment - Tue, 27 Mar 2012 - 16:54:54 +0200 CAUTION: new commit (svn#31905) in branch to prevent NPE when restarting/reinstalling the component, the JBIDescriptorBuilder must be freed by destructors
Hide
Christophe DENEUX added a comment - Thu, 22 Mar 2012 - 14:33:11 +0100

To merge in trunk

Show
Christophe DENEUX added a comment - Thu, 22 Mar 2012 - 14:33:11 +0100 To merge in trunk
Hide
Christophe DENEUX added a comment - Thu, 22 Mar 2012 - 14:32:57 +0100

Fixed in branch petals-enterprise-3.1.x

The method JBIBootstrap.init(InstallationContext) must manage the installation context: are we in an installation context or in an uninstallation context. JBIBuilderDescriptor is not needed into an uninstallation context.

Show
Christophe DENEUX added a comment - Thu, 22 Mar 2012 - 14:32:57 +0100 Fixed in branch petals-enterprise-3.1.x The method JBIBootstrap.init(InstallationContext) must manage the installation context: are we in an installation context or in an uninstallation context. JBIBuilderDescriptor is not needed into an uninstallation context.
Hide
Christophe DENEUX added a comment - Thu, 15 Mar 2012 - 14:24:12 +0100

Two JBIBuilderDescriptors are used by a component:

  1. one by the bootstrap part,
  2. and one by the runtime part.

The JBIBuilderDescriptor of the runtime part can be easily fixed introducing a method close() to free static resources (set to null).
But the fix of the JBIBuilderDescriptor of the boostrap part is more difficult because the boostrap is initialized when unloading the component installer:

[Petals.Container.Components.petals-bc-mail]-INFO 2012-03-15 11:52:51,050 Stop component...
[Petals.Container.Components.petals-bc-mail]-FINE 2012-03-15 11:52:51,050 Calling specific stop...
[Petals.Container.Components.petals-bc-mail]-FINE 2012-03-15 11:52:51,081 Specific stop done.
[Petals.Container.Components.petals-bc-mail]-FINE 2012-03-15 11:52:51,097 Stopping the notification service
[Petals.Container.Components.petals-bc-mail]-FINE 2012-03-15 11:52:51,112 Notifications are not active, do not unregister on broker
[Petals.Container.Components.petals-bc-mail]-FINE 2012-03-15 11:52:51,331 Thread 'petals-bc-mail -JBI Acceptor Thread #2' interrupted, stop accepting JBI messages
[Petals.Container.Components.petals-bc-mail]-INFO 2012-03-15 11:52:51,347 Component stopped
[Petals.Container.Components.petals-bc-mail]-FINE 2012-03-15 11:52:51,331 Thread 'petals-bc-mail -JBI Acceptor Thread #3' interrupted, stop accepting JBI messages
[Petals.Container.Components.petals-bc-mail]-FINE 2012-03-15 11:52:51,331 Thread 'petals-bc-mail -JBI Acceptor Thread #1' interrupted, stop accepting JBI messages
[Petals.JBI-Management.InstallationServiceImpl]-INFO 2012-03-15 11:52:51,362 Component 'petals-bc-mail' stopped
[Petals.Container.Components.petals-bc-mail]-INFO 2012-03-15 11:52:51,409 Shut down component...
[Petals.Container.Components.petals-bc-mail]-FINE 2012-03-15 11:52:51,425 Calling specific shut down...
[Petals.Container.Components.petals-bc-mail]-FINE 2012-03-15 11:52:51,440 Specific shut down done.
[Petals.Container.Components.petals-bc-mail]-INFO 2012-03-15 11:52:51,440 Component shut down
[Petals.JBI-Management.InstallationServiceImpl]-INFO 2012-03-15 11:52:51,440 Component 'petals-bc-mail' shut down
[Petals.JBI-Management.InstallationServiceImpl]-SEVERE 2012-03-15 11:52:51,456 Failed to initialize Component Bootstrap
javax.jbi.JBIException: Bootstrap failure on INIT
        at org.ow2.petals.container.thread.BootstrapThread.doTask(BootstrapThread.java:114)
        at org.ow2.petals.container.thread.AbstractThread.run(AbstractThread.java:110)
Caused by: java.lang.NullPointerException
        at org.ow2.petals.component.framework.jbidescriptor.JBIDescriptorBuilder.buildJavaJBIDescriptor(JBIDescriptorBuilder.java:269)
        at org.ow2.petals.component.framework.JBIBootstrap.init(JBIBootstrap.java:107)
        at org.ow2.petals.container.thread.BootstrapThread.doTask(BootstrapThread.java:104)
        ... 1 more
[Petals.JBI-Management.InstallationServiceImpl]-INFO 2012-03-15 11:52:51,925 Installer of the component 'petals-bc-mail' succesfully unloaded
Show
Christophe DENEUX added a comment - Thu, 15 Mar 2012 - 14:24:12 +0100 Two JBIBuilderDescriptors are used by a component:
  1. one by the bootstrap part,
  2. and one by the runtime part.
The JBIBuilderDescriptor of the runtime part can be easily fixed introducing a method close() to free static resources (set to null). But the fix of the JBIBuilderDescriptor of the boostrap part is more difficult because the boostrap is initialized when unloading the component installer:
[Petals.Container.Components.petals-bc-mail]-INFO 2012-03-15 11:52:51,050 Stop component...
[Petals.Container.Components.petals-bc-mail]-FINE 2012-03-15 11:52:51,050 Calling specific stop...
[Petals.Container.Components.petals-bc-mail]-FINE 2012-03-15 11:52:51,081 Specific stop done.
[Petals.Container.Components.petals-bc-mail]-FINE 2012-03-15 11:52:51,097 Stopping the notification service
[Petals.Container.Components.petals-bc-mail]-FINE 2012-03-15 11:52:51,112 Notifications are not active, do not unregister on broker
[Petals.Container.Components.petals-bc-mail]-FINE 2012-03-15 11:52:51,331 Thread 'petals-bc-mail -JBI Acceptor Thread #2' interrupted, stop accepting JBI messages
[Petals.Container.Components.petals-bc-mail]-INFO 2012-03-15 11:52:51,347 Component stopped
[Petals.Container.Components.petals-bc-mail]-FINE 2012-03-15 11:52:51,331 Thread 'petals-bc-mail -JBI Acceptor Thread #3' interrupted, stop accepting JBI messages
[Petals.Container.Components.petals-bc-mail]-FINE 2012-03-15 11:52:51,331 Thread 'petals-bc-mail -JBI Acceptor Thread #1' interrupted, stop accepting JBI messages
[Petals.JBI-Management.InstallationServiceImpl]-INFO 2012-03-15 11:52:51,362 Component 'petals-bc-mail' stopped
[Petals.Container.Components.petals-bc-mail]-INFO 2012-03-15 11:52:51,409 Shut down component...
[Petals.Container.Components.petals-bc-mail]-FINE 2012-03-15 11:52:51,425 Calling specific shut down...
[Petals.Container.Components.petals-bc-mail]-FINE 2012-03-15 11:52:51,440 Specific shut down done.
[Petals.Container.Components.petals-bc-mail]-INFO 2012-03-15 11:52:51,440 Component shut down
[Petals.JBI-Management.InstallationServiceImpl]-INFO 2012-03-15 11:52:51,440 Component 'petals-bc-mail' shut down
[Petals.JBI-Management.InstallationServiceImpl]-SEVERE 2012-03-15 11:52:51,456 Failed to initialize Component Bootstrap
javax.jbi.JBIException: Bootstrap failure on INIT
        at org.ow2.petals.container.thread.BootstrapThread.doTask(BootstrapThread.java:114)
        at org.ow2.petals.container.thread.AbstractThread.run(AbstractThread.java:110)
Caused by: java.lang.NullPointerException
        at org.ow2.petals.component.framework.jbidescriptor.JBIDescriptorBuilder.buildJavaJBIDescriptor(JBIDescriptorBuilder.java:269)
        at org.ow2.petals.component.framework.JBIBootstrap.init(JBIBootstrap.java:107)
        at org.ow2.petals.container.thread.BootstrapThread.doTask(BootstrapThread.java:104)
        ... 1 more
[Petals.JBI-Management.InstallationServiceImpl]-INFO 2012-03-15 11:52:51,925 Installer of the component 'petals-bc-mail' succesfully unloaded

People

Dates

  • Created:
    Thu, 15 Mar 2012 - 14:14:51 +0100
    Updated:
    Thu, 29 Mar 2012 - 12:21:40 +0200
    Resolved:
    Thu, 29 Mar 2012 - 12:21:40 +0200