[
https://issues.jboss.org/browse/WFLY-9849?page=com.atlassian.jira.plugin....
]
Scott Marlow commented on WFLY-9849:
------------------------------------
For example, one of the weak references to the org.hibernate.internalSessionFactoryImpl
is:
{code}
Class Name
| Ref. Objects | Shallow Heap | Ref. Shallow Heap | Retained Heap
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
class java.lang.reflect.Proxy @ 0xe01da968 System Class
| 1 | 24 | 144 | 7,152
'- proxyClassCache java.lang.reflect.WeakCache @ 0xe00ea488
| 1 | 32 | 144 |
7,088
'- map java.util.concurrent.ConcurrentHashMap @ 0xe00ea4d8
| 1 | 64 | 144 |
4,208
'- table java.util.concurrent.ConcurrentHashMap$Node[16] @ 0xe00ea518
| 1 | 80 | 144 |
4,144
'- [2] java.util.concurrent.ConcurrentHashMap$Node @ 0xff265af0
| 1 | 32 | 144 |
1,376
'- next java.util.concurrent.ConcurrentHashMap$Node @ 0xff265f60
| 1 | 32 | 144 |
464
'- key java.lang.reflect.WeakCache$CacheKey @ 0xff265f80
| 1 | 32 | 144 |
32
'- referent org.jboss.modules.ModuleClassLoader @ 0xe077cde8
| 1 | 88 | 144 |
161,776
'- classes java.util.Vector @ 0xe077cf48
| 1 | 32 | 144 |
65,312
'- elementData java.lang.Object[2560] @ 0xff1d0588
| 1 | 10,256 | 144 |
65,280
'- [1448] class
org.hibernate.proxy.pojo.javassist.JavassistProxyFactory$2 @ 0xff2049c0| 1 |
0 | 144 | 0
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
{code}
I'll look again at the heap dump that you posted and verify if the leaked session
factories have strong references.
Hibernate session related leak on module undeployment
-----------------------------------------------------
Key: WFLY-9849
URL:
https://issues.jboss.org/browse/WFLY-9849
Project: WildFly
Issue Type: Bug
Affects Versions: 11.0.0.Final, 12.0.0.Final
Environment: * Ubuntu 16.04.3 LTS
* OpenJDK 1.8.0_151
* Wildfly 11.0.0.Final
Seems to occur at least on CentOS 7/OpenJDK 1.8.0_151 also.
Reporter: Joni Syri
Assignee: Scott Marlow
In some cases it seems that removing deployment from the Wildfly, doesn't free up
{{org.hibernate.internal.SessionFactoryImpl}}- instance related to the deployment. (plus
some other Hibernate related classes). This can be seen by taking memory dump with
VisualVM and looking up {{SessionFactoryImpl}} instances.
This leads to cumulative memory leak in cases, where application is repeatedly
deployed/undeployed (or updated).
updated: Seems to occur on 12.0.0.Final also
Memory dumps can be found at
https://drive.google.com/drive/folders/1WbHB6hRpr_lrc4yb4yxWLpeObmJlNCzD (wildfly-leak-1
is after first deployment, wildfly-leak-2 after few re-deploys)
server.log
https://drive.google.com/file/d/1I32OTnPWeopVEtRC3ol-pjkH2dlkLizD/view?us...
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)