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, 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
Christophe DENEUX made changes - Thu, 15 Mar 2012 - 14:24:12 +0100
Field Original Value New Value
Priority Major [ 3 ]
Assignee Mathieu Carrolle [ mcarrolle ] Christophe DENEUX [ cdeneux ]
Status New [ 10000 ] Open [ 10002 ]
Christophe DENEUX made changes - Thu, 22 Mar 2012 - 14:28:55 +0100
Link This issue blocks PETALSDISTRIB-2 [ PETALSDISTRIB-2 ]
Christophe DENEUX made changes - Thu, 22 Mar 2012 - 14:29:56 +0100
Status Open [ 10002 ] In Progress [ 10003 ]
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.
Christophe DENEUX made changes - Thu, 22 Mar 2012 - 14:32:57 +0100
Status In Progress [ 10003 ] Resolved [ 10004 ]
Fix Version/s 5.1.4 [ 10328 ]
Resolution Fixed [ 1 ]
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
Christophe DENEUX made changes - Thu, 22 Mar 2012 - 14:33:11 +0100
Status Resolved [ 10004 ] Open [ 10002 ]
Resolution Fixed [ 1 ]
Christophe DENEUX made changes - Thu, 22 Mar 2012 - 14:33:20 +0100
Fix Version/s 5.3.0 [ 10338 ]
Christophe DENEUX made changes - Thu, 22 Mar 2012 - 14:35:40 +0100
Summary Memory leak because resources of JBIBuilderDescriptor are not freed Memory leak because resources of JBIBuilderDescriptor resources are not freed
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
Christophe DENEUX made changes - Thu, 29 Mar 2012 - 11:35:09 +0200
Status Open [ 10002 ] In Progress [ 10003 ]
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
Christophe DENEUX made changes - Thu, 29 Mar 2012 - 12:21:40 +0200
Status In Progress [ 10003 ] Resolved [ 10004 ]
Resolution Fixed [ 1 ]
Transition Status Change Time Execution Times Last Executer Last Execution Date
New New Open Open
9m 21s
1
Christophe DENEUX
Thu, 15 Mar 2012 - 14:24:12 +0100
Open Open In Progress In Progress
7d 5m
1
Christophe DENEUX
Thu, 22 Mar 2012 - 14:29:56 +0100
In Progress In Progress Resolved Resolved
3m 1s
1
Christophe DENEUX
Thu, 22 Mar 2012 - 14:32:57 +0100
Resolved Resolved Open Open
14s
1
Christophe DENEUX
Thu, 22 Mar 2012 - 14:33:11 +0100
Open Open In Progress In Progress
6d 20h 1m
1
Christophe DENEUX
Thu, 29 Mar 2012 - 11:35:09 +0200
In Progress In Progress Resolved Resolved
46m 31s
1
Christophe DENEUX
Thu, 29 Mar 2012 - 12:21:40 +0200



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