Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ecf-dev] possible memory problem regarding ServiceTracker?

Here's the bug:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=488045

Fixed in ECF 3.13+

Scott


On 5/26/2016 7:08 AM, Scott Lewis wrote:
Hi Peter,

This was a bug having to do with the use of the class resolver....never calling ServiceTracker.close. I can't remember the bug right now but I will look it up later and reply to this email. In any event, it has been fixed in more recent versions. Which version are you on?

Thanks,

Scott


On 5/26/2016 3:10 AM, Peter Hermsdorf wrote:
Hi all,

recently I had an OutOfMemory on one of our app servers which is connected to some 150 rcp clients via ecf. In the memory dump (1GB heap) I recognized about 437000 ServiceTracker instances which, from my point of view, seems too many.

Local testing with a profiler showed, that the application server creates 11 instances of ServiceTracker for each client "connect". After closing the Client these instances stay there - they do not seem to get closed / garbage collected.

In Production the application server is running for a long time and clients come and go the whole day so this could sum up.

Please see below for the stacktraces of the ServiceTracker creation when one client connects.

Thanks for any hints or thoughts about this problem.

Best regards, Peter

PS: our setup
* we use the generic provider
* server exports / client imports 3 remote services


******* created 23681044
java.lang.Exception
at org.osgi.util.tracker.ServiceTracker.<init>(ServiceTracker.java:214) at org.eclipse.ecf.core.util.ClassResolverObjectInputStream.getClassResolver(ClassResolverObjectInputStream.java:88) at org.eclipse.ecf.core.util.ClassResolverObjectInputStream.resolveClass(ClassResolverObjectInputStream.java:98) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1612) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1517) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
at org.eclipse.ecf.provider.generic.SOContainerGroup.readConnectRequestMessage(SOContainerGroup.java:87) at org.eclipse.ecf.provider.generic.SOContainerGroup.handleAccept(SOContainerGroup.java:104)
    at org.eclipse.ecf.provider.comm.tcp.Server$2.run(Server.java:96)
    at java.lang.Thread.run(Thread.java:745)
******* created 33227769
java.lang.Exception
at org.osgi.util.tracker.ServiceTracker.<init>(ServiceTracker.java:214) at org.eclipse.ecf.core.util.ClassResolverObjectInputStream.getClassResolver(ClassResolverObjectInputStream.java:88) at org.eclipse.ecf.core.util.ClassResolverObjectInputStream.resolveClass(ClassResolverObjectInputStream.java:98) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1612) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1517) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
at org.eclipse.ecf.provider.generic.SOContainer.deserializeContainerMessage(SOContainer.java:530) at org.eclipse.ecf.provider.generic.SOContainer.processAsynch(SOContainer.java:868) at org.eclipse.ecf.provider.generic.SOContainer$2.handleAsynchEvent(SOContainer.java:206) at org.eclipse.ecf.provider.comm.tcp.Client.handleRcv(Client.java:383)
    at org.eclipse.ecf.provider.comm.tcp.Client$4.run(Client.java:356)
    at java.lang.Thread.run(Thread.java:745)
******* created 1588972
java.lang.Exception
at org.osgi.util.tracker.ServiceTracker.<init>(ServiceTracker.java:214) at org.eclipse.ecf.core.util.ClassResolverObjectInputStream.getClassResolver(ClassResolverObjectInputStream.java:88) at org.eclipse.ecf.core.util.ClassResolverObjectInputStream.resolveClass(ClassResolverObjectInputStream.java:98) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1612) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1517) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
at org.eclipse.ecf.provider.generic.SOContainer.defaultDeserializeSharedObjectMessage(SOContainer.java:1009) at org.eclipse.ecf.provider.generic.SOContainer$1.deserializeMessage(SOContainer.java:163) at org.eclipse.ecf.provider.generic.SOContainer.deserializeSharedObjectMessage(SOContainer.java:1041) at org.eclipse.ecf.provider.generic.SOContainer.handleSharedObjectMessage(SOContainer.java:710) at org.eclipse.ecf.provider.generic.SOContainer.processAsynch(SOContainer.java:885) at org.eclipse.ecf.provider.generic.SOContainer$2.handleAsynchEvent(SOContainer.java:206) at org.eclipse.ecf.provider.comm.tcp.Client.handleRcv(Client.java:383)
    at org.eclipse.ecf.provider.comm.tcp.Client$4.run(Client.java:356)
    at java.lang.Thread.run(Thread.java:745)
******* created 8301198
java.lang.Exception
at org.osgi.util.tracker.ServiceTracker.<init>(ServiceTracker.java:214) at org.eclipse.ecf.core.util.ClassResolverObjectInputStream.getClassResolver(ClassResolverObjectInputStream.java:88) at org.eclipse.ecf.core.util.ClassResolverObjectInputStream.resolveClass(ClassResolverObjectInputStream.java:98) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1612) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1517) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
at org.eclipse.ecf.provider.generic.SOContainer.deserializeContainerMessage(SOContainer.java:530) at org.eclipse.ecf.provider.generic.SOContainer.processAsynch(SOContainer.java:868) at org.eclipse.ecf.provider.generic.SOContainer$2.handleAsynchEvent(SOContainer.java:206) at org.eclipse.ecf.provider.comm.tcp.Client.handleRcv(Client.java:383)
    at org.eclipse.ecf.provider.comm.tcp.Client$4.run(Client.java:356)
    at java.lang.Thread.run(Thread.java:745)
******* created 23539477
java.lang.Exception
at org.osgi.util.tracker.ServiceTracker.<init>(ServiceTracker.java:214) at org.eclipse.ecf.core.util.ClassResolverObjectInputStream.getClassResolver(ClassResolverObjectInputStream.java:88) at org.eclipse.ecf.core.util.ClassResolverObjectInputStream.resolveClass(ClassResolverObjectInputStream.java:98) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1612) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1517) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
at org.eclipse.ecf.provider.generic.SOContainer.defaultDeserializeSharedObjectMessage(SOContainer.java:1009) at org.eclipse.ecf.provider.generic.SOContainer$1.deserializeMessage(SOContainer.java:163) at org.eclipse.ecf.provider.generic.SOContainer.deserializeSharedObjectMessage(SOContainer.java:1041) at org.eclipse.ecf.provider.generic.SOContainer.handleSharedObjectMessage(SOContainer.java:710) at org.eclipse.ecf.provider.generic.SOContainer.processAsynch(SOContainer.java:885) at org.eclipse.ecf.provider.generic.SOContainer$2.handleAsynchEvent(SOContainer.java:206) at org.eclipse.ecf.provider.comm.tcp.Client.handleRcv(Client.java:383)
    at org.eclipse.ecf.provider.comm.tcp.Client$4.run(Client.java:356)
    at java.lang.Thread.run(Thread.java:745)
******* created 28666476
java.lang.Exception
at org.osgi.util.tracker.ServiceTracker.<init>(ServiceTracker.java:214) at org.eclipse.ecf.core.util.ClassResolverObjectInputStream.getClassResolver(ClassResolverObjectInputStream.java:88) at org.eclipse.ecf.core.util.ClassResolverObjectInputStream.resolveClass(ClassResolverObjectInputStream.java:98) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1612) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1517) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
at org.eclipse.ecf.provider.generic.SOContainer.deserializeContainerMessage(SOContainer.java:530) at org.eclipse.ecf.provider.generic.SOContainer.processAsynch(SOContainer.java:868) at org.eclipse.ecf.provider.generic.SOContainer$2.handleAsynchEvent(SOContainer.java:206) at org.eclipse.ecf.provider.comm.tcp.Client.handleRcv(Client.java:383)
    at org.eclipse.ecf.provider.comm.tcp.Client$4.run(Client.java:356)
    at java.lang.Thread.run(Thread.java:745)
******* created 24957018
java.lang.Exception
at org.osgi.util.tracker.ServiceTracker.<init>(ServiceTracker.java:214) at org.eclipse.ecf.core.util.ClassResolverObjectInputStream.getClassResolver(ClassResolverObjectInputStream.java:88) at org.eclipse.ecf.core.util.ClassResolverObjectInputStream.resolveClass(ClassResolverObjectInputStream.java:98) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1612) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1517) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
at org.eclipse.ecf.provider.generic.SOContainer.defaultDeserializeSharedObjectMessage(SOContainer.java:1009) at org.eclipse.ecf.provider.generic.SOContainer$1.deserializeMessage(SOContainer.java:163) at org.eclipse.ecf.provider.generic.SOContainer.deserializeSharedObjectMessage(SOContainer.java:1041) at org.eclipse.ecf.provider.generic.SOContainer.handleSharedObjectMessage(SOContainer.java:710) at org.eclipse.ecf.provider.generic.SOContainer.processAsynch(SOContainer.java:885) at org.eclipse.ecf.provider.generic.SOContainer$2.handleAsynchEvent(SOContainer.java:206) at org.eclipse.ecf.provider.comm.tcp.Client.handleRcv(Client.java:383)
    at org.eclipse.ecf.provider.comm.tcp.Client$4.run(Client.java:356)
    at java.lang.Thread.run(Thread.java:745)
******* created 21093621
java.lang.Exception
at org.osgi.util.tracker.ServiceTracker.<init>(ServiceTracker.java:214) at org.eclipse.ecf.core.util.ClassResolverObjectInputStream.getClassResolver(ClassResolverObjectInputStream.java:88) at org.eclipse.ecf.core.util.ClassResolverObjectInputStream.resolveClass(ClassResolverObjectInputStream.java:98) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1612) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1517) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
at org.eclipse.ecf.provider.generic.SOContainer.deserializeContainerMessage(SOContainer.java:530) at org.eclipse.ecf.provider.generic.SOContainer.processAsynch(SOContainer.java:868) at org.eclipse.ecf.provider.generic.SOContainer$2.handleAsynchEvent(SOContainer.java:206) at org.eclipse.ecf.provider.comm.tcp.Client.handleRcv(Client.java:383)
    at org.eclipse.ecf.provider.comm.tcp.Client$4.run(Client.java:356)
    at java.lang.Thread.run(Thread.java:745)
******* created 6684209
java.lang.Exception
at org.osgi.util.tracker.ServiceTracker.<init>(ServiceTracker.java:214) at org.eclipse.ecf.core.util.ClassResolverObjectInputStream.getClassResolver(ClassResolverObjectInputStream.java:88) at org.eclipse.ecf.core.util.ClassResolverObjectInputStream.resolveClass(ClassResolverObjectInputStream.java:98) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1612) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1517) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
at org.eclipse.ecf.provider.generic.SOContainer.defaultDeserializeSharedObjectMessage(SOContainer.java:1009) at org.eclipse.ecf.provider.generic.SOContainer$1.deserializeMessage(SOContainer.java:163) at org.eclipse.ecf.provider.generic.SOContainer.deserializeSharedObjectMessage(SOContainer.java:1041) at org.eclipse.ecf.provider.generic.SOContainer.handleSharedObjectMessage(SOContainer.java:710) at org.eclipse.ecf.provider.generic.SOContainer.processAsynch(SOContainer.java:885) at org.eclipse.ecf.provider.generic.SOContainer$2.handleAsynchEvent(SOContainer.java:206) at org.eclipse.ecf.provider.comm.tcp.Client.handleRcv(Client.java:383)
    at org.eclipse.ecf.provider.comm.tcp.Client$4.run(Client.java:356)
    at java.lang.Thread.run(Thread.java:745)
******* created 32530145
java.lang.Exception
at org.osgi.util.tracker.ServiceTracker.<init>(ServiceTracker.java:214) at org.eclipse.ecf.core.util.ClassResolverObjectInputStream.getClassResolver(ClassResolverObjectInputStream.java:88) at org.eclipse.ecf.core.util.ClassResolverObjectInputStream.resolveClass(ClassResolverObjectInputStream.java:98) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1612) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1517) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
at org.eclipse.ecf.provider.generic.SOContainer.deserializeContainerMessage(SOContainer.java:530) at org.eclipse.ecf.provider.generic.SOContainer.processAsynch(SOContainer.java:868) at org.eclipse.ecf.provider.generic.SOContainer$2.handleAsynchEvent(SOContainer.java:206) at org.eclipse.ecf.provider.comm.tcp.Client.handleRcv(Client.java:383)
    at org.eclipse.ecf.provider.comm.tcp.Client$4.run(Client.java:356)
    at java.lang.Thread.run(Thread.java:745)
******* created 86212
java.lang.Exception
at org.osgi.util.tracker.ServiceTracker.<init>(ServiceTracker.java:214) at org.eclipse.ecf.core.util.ClassResolverObjectInputStream.getClassResolver(ClassResolverObjectInputStream.java:88) at org.eclipse.ecf.core.util.ClassResolverObjectInputStream.resolveClass(ClassResolverObjectInputStream.java:98) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1612) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1517) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
at org.eclipse.ecf.provider.generic.SOContainer.defaultDeserializeSharedObjectMessage(SOContainer.java:1009) at org.eclipse.ecf.provider.generic.SOContainer$1.deserializeMessage(SOContainer.java:163) at org.eclipse.ecf.provider.generic.SOContainer.deserializeSharedObjectMessage(SOContainer.java:1041) at org.eclipse.ecf.provider.generic.SOContainer.handleSharedObjectMessage(SOContainer.java:710) at org.eclipse.ecf.provider.generic.SOContainer.processAsynch(SOContainer.java:885) at org.eclipse.ecf.provider.generic.SOContainer$2.handleAsynchEvent(SOContainer.java:206) at org.eclipse.ecf.provider.comm.tcp.Client.handleRcv(Client.java:383)
    at org.eclipse.ecf.provider.comm.tcp.Client$4.run(Client.java:356)
    at java.lang.Thread.run(Thread.java:745)


_______________________________________________
ecf-dev mailing list
ecf-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/ecf-dev


_______________________________________________
ecf-dev mailing list
ecf-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/ecf-dev




Back to the top