You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Mike Rheinheimer (JIRA)" <ji...@apache.org> on 2008/03/19 22:28:29 UTC
[jira] Created: (AXIS2-3641) memory leaks related to unmarshaller
pooling
memory leaks related to unmarshaller pooling
--------------------------------------------
Key: AXIS2-3641
URL: https://issues.apache.org/jira/browse/AXIS2-3641
Project: Axis 2.0 (Axis2)
Issue Type: Bug
Components: jaxws
Reporter: Mike Rheinheimer
Assignee: Mike Rheinheimer
Fix For: 1.4
Attachments: patch.txt
David Strite provides the following comments and attached patch to fix:
Enabling the pooling of the unmarshallers surfaced a few small memory leaks.
1. The first is caused by a race condition creating the innerMap and JAXBContext in JAXBUtils. Currently multiple equivalent JAXBContexts can be created. When the unmarshallers are pooled, the JAXBContext is the key, meaning the JAXBContext and Unmarshaller are kept around. Since only one of these will be in the jaxbMap, the rest are never used but never get cleaned up. Synchronizing around the puts solves this problem.
2. The second leak is caused by the AttachmentUnmarshallers on the JAXB Unmarshaller. The AttachmentUnmarshallers hold on to the MessageContext. These will not be cleaned up until the next request sets a new AttachmentUnmarshaller on that Unmarshaller. Setting the AttachmentUnmarshaller to null before putting the Unmarshaller in the pool resolves this.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Updated: (AXIS2-3641) memory leaks related to unmarshaller
pooling
Posted by "Mike Rheinheimer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-3641?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mike Rheinheimer updated AXIS2-3641:
------------------------------------
Attachment: patch.txt
> memory leaks related to unmarshaller pooling
> --------------------------------------------
>
> Key: AXIS2-3641
> URL: https://issues.apache.org/jira/browse/AXIS2-3641
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: jaxws
> Reporter: Mike Rheinheimer
> Assignee: Mike Rheinheimer
> Fix For: 1.4
>
> Attachments: patch.txt
>
>
> David Strite provides the following comments and attached patch to fix:
> Enabling the pooling of the unmarshallers surfaced a few small memory leaks.
> 1. The first is caused by a race condition creating the innerMap and JAXBContext in JAXBUtils. Currently multiple equivalent JAXBContexts can be created. When the unmarshallers are pooled, the JAXBContext is the key, meaning the JAXBContext and Unmarshaller are kept around. Since only one of these will be in the jaxbMap, the rest are never used but never get cleaned up. Synchronizing around the puts solves this problem.
> 2. The second leak is caused by the AttachmentUnmarshallers on the JAXB Unmarshaller. The AttachmentUnmarshallers hold on to the MessageContext. These will not be cleaned up until the next request sets a new AttachmentUnmarshaller on that Unmarshaller. Setting the AttachmentUnmarshaller to null before putting the Unmarshaller in the pool resolves this.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Resolved: (AXIS2-3641) memory leaks related to unmarshaller
pooling
Posted by "Mike Rheinheimer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-3641?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mike Rheinheimer resolved AXIS2-3641.
-------------------------------------
Resolution: Fixed
Fixed in rev 639025. Thanks David Strite for the fix!
> memory leaks related to unmarshaller pooling
> --------------------------------------------
>
> Key: AXIS2-3641
> URL: https://issues.apache.org/jira/browse/AXIS2-3641
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: jaxws
> Reporter: Mike Rheinheimer
> Assignee: Mike Rheinheimer
> Fix For: 1.4
>
> Attachments: patch.txt
>
>
> David Strite provides the following comments and attached patch to fix:
> Enabling the pooling of the unmarshallers surfaced a few small memory leaks.
> 1. The first is caused by a race condition creating the innerMap and JAXBContext in JAXBUtils. Currently multiple equivalent JAXBContexts can be created. When the unmarshallers are pooled, the JAXBContext is the key, meaning the JAXBContext and Unmarshaller are kept around. Since only one of these will be in the jaxbMap, the rest are never used but never get cleaned up. Synchronizing around the puts solves this problem.
> 2. The second leak is caused by the AttachmentUnmarshallers on the JAXB Unmarshaller. The AttachmentUnmarshallers hold on to the MessageContext. These will not be cleaned up until the next request sets a new AttachmentUnmarshaller on that Unmarshaller. Setting the AttachmentUnmarshaller to null before putting the Unmarshaller in the pool resolves this.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org