[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ecf-dev] OOM Error using custom RegistrySharedObject and HostContainerSelector - Full Post

Looking at the build log [1], Scott forgot to update the version number of the pom.xml. If you push a fix through Gerrit [2] I will release it (I don't have desktop access atm). If you are in a real hurry you can also fix and build ECF locally [3].

Cheers,

Wim



[1]Âhttps://hudson.eclipse.org/ecf/job/ecf-tycho.master/71/console
[2]Âhttps://wiki.eclipse.org/ECF/Contributions#Patches_with_a_signed_CLA
[3]Âhttps://github.com/eclipse/ecf/blob/master/CONTRIBUTING.md



On Mon, Mar 20, 2017 at 10:35 AM, Peter Hermsdorf <peter.hermsdorf@xxxxxxxxx> wrote:

Hi all,

Scott tried to provide a fix for this bug. He commented on the bug that the fix should be available at

http://download.eclipse.org/rt/ecf/snapshot/site.p2/?d

but it is not. I need version 4.2.200.qualifier of bundle org.eclipse.ecf.provider.remoteservice.

Maybe someone familiar with the ecf build could point me to the download location for this fix!?

I'm a little in a hurry for that fix, since i will be away for two weeks starting at tomorrow ;)

Thanks. Bye Peter


Am 17.03.2017 um 08:20 schrieb Peter Hermsdorf:

Hi Scott,

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

I'm wondering that no one else stumbled upon this issue ....

Thanks for your help!

Bye Peter


Am 17.03.2017 um 05:14 schrieb Scott Lewis:
Hi Peter,

This seems to be a bug.ÂÂ Please open a bug report with the info you've already provided, and I will fix in time for our next minor release (3.13.6).ÂÂ I've already pretty much written the fix, so this can all go quick.

Thanks,

Scott

On 3/16/2017 4:40 AM, Peter Hermsdorf wrote:

I now removed our custom code - I don't think it has something to do with this issue.

current state:

on every client connect one ore more (depending on the number of published services) "ID targetContainerID" Objects are added to a List in the Map localRegistryUnregistrationTargets in the RegistrySharedObject on the Server Side.

the call stack is:

Daemon Thread [org.eclipse.ecf.remoteservice.IRemoteServiceContainerAdapter:run] (Suspended (breakpoint at line 1633 in RegistrySharedObject))ÂÂÂ
 owns: RemoteServiceRegistryImpl (id=252)ÂÂÂ
ÂÂÂ RegistrySharedObject.addTargetForUnregister(RemoteServiceRegistrationImpl, ID) line: 1633ÂÂÂ
ÂÂÂ RegistrySharedObject.sendAddRegistrations(ID, Integer, RemoteServiceRegistrationImpl[]) line: 1253ÂÂÂ
ÂÂÂ RegistrySharedObject.sendRegistryUpdate(ID, Integer) line: 775ÂÂÂ
ÂÂÂ RegistrySharedObject.handleRegistryUpdateRequest(ID, Integer) line: 1128ÂÂÂ
ÂÂÂ GeneratedMethodAccessor35.invoke(Object, Object[]) line: not availableÂÂÂ
ÂÂÂ DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43ÂÂÂ
ÂÂÂ Method.invoke(Object, Object...) line: 498ÂÂÂ
ÂÂÂ SharedObjectMsg.doInvoke(Object) line: 323ÂÂÂ
ÂÂÂ SharedObjectMsg.invoke(Object) line: 290ÂÂÂ
ÂÂÂ RegistrySharedObject.handleSharedObjectMsg(SharedObjectMsg) line: 1843ÂÂÂ
ÂÂÂ RegistrySharedObject(BaseSharedObject).handleSharedObjectMsg(ID, SharedObjectMsg) line: 467ÂÂÂ
ÂÂÂ RegistrySharedObject(BaseSharedObject).handleSharedObjectMsgEvent(ISharedObjectMessageEvent) line: 457ÂÂÂ
ÂÂÂ SharedObjectMsgEventProcessor.processSharedObjectMsgEvent(ISharedObjectMessageEvent) line: 41ÂÂÂ
ÂÂÂ SharedObjectMsgEventProcessor.processEvent(Event) line: 36ÂÂÂ
ÂÂÂ RegistrySharedObject(BaseSharedObject).fireEventProcessors(Event) line: 192ÂÂÂ
ÂÂÂ RegistrySharedObject(BaseSharedObject).handleEvent(Event) line: 126ÂÂÂ
ÂÂÂ SOWrapper.svc(Event) line: 182ÂÂÂ
ÂÂÂ SOWrapper$2.run() line: 138ÂÂÂ
ÂÂÂ Thread.run() line: 745ÂÂÂ

I don't see any code that removed entries from the List in Map when the Client disconnects. So the List (and with it the Map localRegistryUnregistrationTargets) grows until there is no memory left.

Any help on this topic would greatly be appreciated.

thx Peter


Am 15.03.2017 um 15:52 schrieb Peter Hermsdorf:
Hi all,

sorry for double posting - hotkeys are evil sometimes...

for custom error handling on server side (please see previous discussion on this list as of 27.06.2014 with the subject "Exception Handling of Remote Calls") we use a derived HostContainerSelector and a derived RegistrySharedObject. See code below.

The problem seems to be that we create a instance of RegistrySharedObject (P4RegistrySharedObject()) wich gets added to org.eclipse.ecf.provider.remoteservice.generic.RegistrySharedObject.localRegistryUnregistrationTargets but "no one" calls org.eclipse.ecf.provider.remoteservice.generic.RegistrySharedObject.sendUnregister(RemoteServiceRegistrationImpl) when the remote client disconnects.
So the Map grows over time and finally the server run's into an OutOfMemory Exception after some time.

Any suggestions where the Problem is or what is missing from the implementation?

thanks in advance!

Best Regards, Peter

BTW: we are running ECF 3.13.1.v20160405-1820

extended HostContainerSelector:

ÂÂÂ @Override
ÂÂÂ protected IRemoteServiceContainer createRSContainer(
ÂÂÂÂÂÂÂÂÂÂÂ @SuppressWarnings("rawtypes") final ServiceReference serviceReference, final Map<String, Object> properties,
ÂÂÂÂÂÂÂÂÂÂÂ final ContainerTypeDescription containerTypeDescription) throws SelectContainerException {
ÂÂÂÂÂÂÂ final ISharedObjectContainer container = (ISharedObjectContainer) createContainer(serviceReference, properties,
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ containerTypeDescription);
ÂÂÂÂÂÂÂ final ID adapterID = IDFactory.getDefault().createStringID(IRemoteServiceContainerAdapter.class.getName());
ÂÂÂÂÂÂÂ final ISharedObjectManager manager = container.getSharedObjectManager();
ÂÂÂÂÂÂÂ ISharedObject so = manager.getSharedObject(adapterID);
ÂÂÂÂÂÂÂ if (so == null) {
ÂÂÂÂÂÂÂÂÂÂÂ so = new P4RegistrySharedObject();
ÂÂÂÂÂÂÂÂÂÂÂ try {
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ manager.addSharedObject(adapterID, so, null);
ÂÂÂÂÂÂÂÂÂÂÂ } catch (final SharedObjectAddException e) {
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ throw new P4ServerException(e);
ÂÂÂÂÂÂÂÂÂÂÂ }
ÂÂÂÂÂÂÂ }
ÂÂÂÂÂÂÂ return new RemoteServiceContainer(container, (IRemoteServiceContainerAdapter) so);
ÂÂÂ }


P4RegistrySharedObject extends RegistrySharedObject and just implements a custom getSerializableException method - since the original one is private, it's a copy of the executeRequest method.

_______________________________________________
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




_______________________________________________
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