Return-Path: X-Original-To: apmail-felix-dev-archive@www.apache.org Delivered-To: apmail-felix-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 074F5D825 for ; Fri, 7 Sep 2012 02:42:31 +0000 (UTC) Received: (qmail 72746 invoked by uid 500); 7 Sep 2012 02:42:30 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 72695 invoked by uid 500); 7 Sep 2012 02:42:30 -0000 Mailing-List: contact dev-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list dev@felix.apache.org Received: (qmail 72685 invoked by uid 99); 7 Sep 2012 02:42:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Sep 2012 02:42:30 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [76.13.13.46] (HELO smtp107.prem.mail.ac4.yahoo.com) (76.13.13.46) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 07 Sep 2012 02:42:22 +0000 Received: (qmail 46407 invoked from network); 7 Sep 2012 02:42:01 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=DKIM-Signature:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Content-Transfer-Encoding:Message-Id:References:To:X-Mailer; b=Khx7IWXuB2UI2uhP54bIvkR5rWUHKAjoEfJhzZheJWDs1U57wK2fIFbrksw7UJXbmKcUgf4oEnsxdv3gkRkun8QuN1hnrrytRRsXovLMBWSnc5bbM6k+LPKOY9VvY/foVwralbzoKn1NDlWcCZNJKD0DsyhvuDjNpnfOw9a3Tlo= ; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1346985721; bh=C3hiMS7VzYJwZDZ1fSzv4ID4hgGbT9+cNhdFF8Aymeg=; h=X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Content-Transfer-Encoding:Message-Id:References:To:X-Mailer; b=4AWWGj4kXSA2QyBcyDU2VjEuUX0u0nkceImx7SL5a1tnic/p7b6E9EC8wfTS2srgIQEeNaLHcUzJrCxbvsbURH2j1oODaLX452jivdK9WkrV7jJOzDC71QrXNLTORO0Hx62asOZdc/QueUQa/RyM97LYnkycsPf7iFUUjyU9NPY= X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: euM94NUVM1kskPCMElp.gocQpSC8VBIqamPciu2WrmxQtQo we4JmoLEcIHKEkB2duwXBI6ky_Qnx4lJ78boYWVDuTnlf8x2Fnu41M3PwSFI Xgl5m_pYZ6SNLh7vgVmGqUGb3DUB27gdO.pkM_H_mEpEpruwVF7ez.mSqHMI lpOZXlKcC7mourQk.UZqHf_xbWLscAdlE6CQdjSEHB_qgRCy3Nw2w2v5EIqO KjJivOlMUtxPIgkMebrd5b1IwCSduKMUlRCcLfXA.EEzid3tn3tCkPK_lx1. T_KvvJI22mb3IQdYnWO6LqYeBTb3SLG.Z03jPrygAOQNtyLeULj5qYK1LJ19 Y4bWGzqjaF6k3MWcFgWCrz8JZ89qlgzEGoPqibY8vbIALmS8RqXReWrs3.j7 PHCeGGNAXmeKakJSwkDYL4.v.lv_p.tjeyJqNjL9cbRdz2XG1yRmv7m_o84Y 82bZV9YSfWPCVA7Az7viDpBe6zlgwP_s09U336ZZgMuxkrdLRiH47.ghbS4j ZjoRltfBTK6f16wAAGQvn X-Yahoo-SMTP: .9oIUzyswBANsYgUm_5uPui0skTnzGJXJQ-- Received: from [10.0.1.12] (david_jencks@98.246.196.64 with plain) by smtp107.prem.mail.ac4.yahoo.com with SMTP; 06 Sep 2012 19:42:00 -0700 PDT Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1084) Subject: Re: SCR could not obtain state lock after 5 seconds From: David Jencks In-Reply-To: Date: Thu, 6 Sep 2012 19:41:59 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <61F7297E-5A11-4EF0-AFEA-2BBB668397F7@yahoo.com> References: <7B457C22-967F-486D-92FE-8D9FF59A3C61@yahoo.com> <078AC2F8-BC19-4675-8248-779C5D6C7F76@yahoo.com> <6C04A2F3-24C4-433B-B2B9-73761B45978E@yahoo.com> <2FFE988D-6D0A-4BFC-A893-58C7488C772D@adobe.com> <7E07E4E3-856E-437C-BCAE-D3987B8CB86B@yahoo.com> To: dev@felix.apache.org X-Mailer: Apple Mail (2.1084) I opened https://issues.apache.org/jira/browse/FELIX-3658 for the first = problem and think I have a simple fix. For the second problem, it looks like whenever you disable a component = its component id is set to -1. So the problem must be something with = re-enabling it. I haven't looked further. thanks! david jencks On Sep 6, 2012, at 1:22 PM, Pierre De Rop wrote: > Hi David, >=20 > I don't know if it's related to the problem you are talking about, but = I > just noticed a problem which might also be related to ServiceFactory. >=20 > here it is: >=20 > When you have a delayed component "A", which is activated because = another > component "B" has a dependency on it (dynamic, cardinality=3D0..N), = then when > you manually disable "A" (from the "scr:disable" shell commandl), you = then > get an "java.lang.IllegalStateException: ungetServiceDisabled" error: >=20 > g! scr:list > Id State Name > [ 2] [active ] test.disable.A > [ 0] [active ] test.disable.B > [ 1] [active ] test.disable.LogTracker > g! scr:disable 2 > Component test.disable.A disabled > g! ERROR: Bundle test.scr.deadlock2 [9] ServiceRegistrationImpl: Error > ungetting service. (java.lang.IllegalStateException: = ungetServiceDisabled) > java.lang.IllegalStateException: ungetServiceDisabledLogTracker: = L=3DINFO, > T=3DThread[Thread-1,5,main], M=3DServiceEvent UNREGISTERING >=20 > at > = org.apache.felix.scr.impl.manager.AbstractComponentManager$State.ungetServ= ice(AbstractComponentManager.java:1308) > at > = org.apache.felix.scr.impl.manager.ImmediateComponentManager.ungetService(I= mmediateComponentManager.java:693) > at > = org.apache.felix.framework.ServiceRegistrationImpl.ungetFactoryUnchecked(S= erviceRegistrationImpl.java:349) > at > = org.apache.felix.framework.ServiceRegistrationImpl.ungetService(ServiceReg= istrationImpl.java:258) > at > = org.apache.felix.framework.ServiceRegistry.ungetService(ServiceRegistry.ja= va:389) > at = org.apache.felix.framework.Felix.ungetService(Felix.java:3432) > at > = org.apache.felix.framework.BundleContextImpl.ungetService(BundleContextImp= l.java:486) > at > = org.apache.felix.scr.impl.manager.DependencyManager.ungetService(Dependenc= yManager.java:913) > at > = org.apache.felix.scr.impl.manager.DependencyManager.serviceRemoved(Depende= ncyManager.java:480) > at > = org.apache.felix.scr.impl.manager.DependencyManager.serviceChanged(Depende= ncyManager.java:250) > at > = org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallb= ack(EventDispatcher.java:932) > at > = org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(Event= Dispatcher.java:793) > at > = org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDisp= atcher.java:543) > at > org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4260) > at org.apache.felix.framework.Felix.access$000(Felix.java:74) > at = org.apache.felix.framework.Felix$1.serviceChanged(Felix.java:390) > at > = org.apache.felix.framework.ServiceRegistry.unregisterService(ServiceRegist= ry.java:148) > at > = org.apache.felix.framework.ServiceRegistrationImpl.unregister(ServiceRegis= trationImpl.java:127) > at > = org.apache.felix.scr.impl.manager.AbstractComponentManager.unregisterCompo= nentService(AbstractComponentManager.java:759) > at > = org.apache.felix.scr.impl.manager.AbstractComponentManager$State.doDeactiv= ate(AbstractComponentManager.java:1354) > at > = org.apache.felix.scr.impl.manager.AbstractComponentManager$Disabled.deacti= vate(AbstractComponentManager.java:1428) > at > = org.apache.felix.scr.impl.manager.AbstractComponentManager.deactivateInter= nal(AbstractComponentManager.java:619) > at > = org.apache.felix.scr.impl.manager.AbstractComponentManager$2.run(AbstractC= omponentManager.java:419) > at > = org.apache.felix.scr.impl.ComponentActorThread.run(ComponentActorThread.ja= va:98) > at java.lang.Thread.run(Thread.java:662) > stop >=20 > I also noticed that when you disable an immediate component, then we = have > no exceptions, but under the shell, the component id is then set to = "-1", > and you then can't re-enable it anymore, but this is another kind of > problem, I think. >=20 >=20 > Are we talking about the same kind of ServiceFactory problem or should = I > create a separate jira issue ? >=20 > regards; > /pierre >=20 >=20 >=20 > On Thu, Sep 6, 2012 at 6:31 PM, David Jencks = wrote: >=20 >> Looking forward to any review :-) >>=20 >> I've found an additional problem with ServiceFactory components that = I'm >> trying to fix.... >>=20 >> david jencks >>=20 >> On Sep 6, 2012, at 2:54 AM, Pierre De Rop wrote: >>=20 >>> Hi David, >>>=20 >>> I'm happy to see that the test helped, and it seems that fixing this >> issue was not an easy task, >>> congratulation ! >>>=20 >>> For now, I can't reply to your question about the = bind/unbind/updated >> method, because I have not yet fully reviewed your fix, but this is = an >> excellent exercise for me and I will take time to understand the = changes >> you made. >>>=20 >>> So, from my side, I confirm, the testcase is now passing. >>>=20 >>> However, I have a minor remark: the felix log level is now forced to >> debug: see systemProperty( "ds.loglevel" ).value( "debug" ) in the >> ComponentTestBase class), and I think that it might be better to run = the >> concurrent test in warn level, as before, because debug logs might = reduce >> the chances to reproduce any potential concurrency issues ... Anyway, = I >> tried to run the testcase with ds.loglevel=3Dwarn, and it is also = passing OK. >>>=20 >>> So, now, I will run again my nightly integration tests, in order to = do >> more validation. >>>=20 >>> thanks again. >>> /pierre >>>=20 >>> On Thu, Sep 6, 2012 at 12:23 AM, David Jencks = >> wrote: >>> I finally got everything to work :-) (see caveats in the bug = report). >>>=20 >>> The itest was extremely helpful :-) >>>=20 >>> One of the changes I made that perhaps could use some review is that >> once the bind/unbind/updated methods are set, they are never cleared = from >> the dependency manager. I don't think this is really a problem. = Have I >> missed something? >>>=20 >>> We talked a bit a while ago about sharing the bind/unbind/updated >> methods among dependency managers and trying to make them look up the >> methods only once. I've moved most of the dependencyManager state = out of >> the dependency managers, so we might be able to move the rest of the = state >> out and share the dependency managers among all the component = managers for >> the same component. This might be better post 1.8 however. >>>=20 >>> Please try out the changes and let me know if you find more = problems! >>>=20 >>> thanks >>> david jencks >>>=20 >>> On Sep 2, 2012, at 11:02 PM, David Jencks wrote: >>>=20 >>>> Excellent! >>>>=20 >>>> I've been working on my idea how to fix this, but I'm still at the >> stage of getting the existing integration tests to pass. At least = some >> stuff works :-) >>>>=20 >>>> Looking forward to trying out your test case... >>>>=20 >>>> david jencks >>>>=20 >>>> On Sep 2, 2012, at 6:58 AM, Pierre De Rop wrote: >>>>=20 >>>>> Hi, >>>>>=20 >>>>> I committed in revision 1379968 a (candidate) integration test, = which >> seems >>>>> to reproduce the problem. >>>>> Hope it will help. >>>>>=20 >>>>> regards; >>>>> /pierre >>>>>=20 >>>>> On Fri, Aug 31, 2012 at 2:08 PM, Pierre De Rop < >> pierre.derop@gmail.com>wrote: >>>>>=20 >>>>>> Hi Felix, >>>>>>=20 >>>>>> ok, I will try to do it. >>>>>>=20 >>>>>> regards; >>>>>> /pierre >>>>>>=20 >>>>>> On Fri, Aug 31, 2012 at 1:58 PM, Felix Meschberger < >> fmeschbe@adobe.com>wrote: >>>>>>=20 >>>>>>> Hi, >>>>>>>=20 >>>>>>> Am 31.08.2012 um 02:20 schrieb Pierre De Rop: >>>>>>>=20 >>>>>>>> Hi David, >>>>>>>>=20 >>>>>>>> I have progressed and it seems that now I can reproduce the >> problem, >>>>>>> using >>>>>>>> a sample code. >>>>>>>> It's a sample inspired from the scenario that you suggested in = your >>>>>>>> previous post, with A > B > C, and A > C ... >>>>>>>>=20 >>>>>>>> I will create a jira issue and will attach the sample to it. >>>>>>>=20 >>>>>>> Thanks alot. >>>>>>>=20 >>>>>>> Would be great if we could integrate that sample as an = integration >> test >>>>>>> case. >>>>>>>=20 >>>>>>> Regards >>>>>>> Felix >>>>>>>=20 >>>>>>>> ... >>>>>>>=20 >>>>>>=20 >>>>>>=20 >>>>=20 >>>=20 >>>=20 >>=20 >>=20