[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] equinox bundle akin to felix fileinstall

Sadly, this is an ongoing issue with fileinstall even in the latest release (3.2.6).

It seems that fileinstall thread isÂinterruptedÂwhile waiting for the refresh to complete.


On Mon, Jun 18, 2012 at 8:38 AM, Thomas Watson <tjwatson@xxxxxxxxxx> wrote:

I think part of the problem is that file install is not waiting for the refresh operation to complete before attempting to start all the bundles. ÂSee https://issues.apache.org/jira/browse/FELIX-3414

What I think ends up happening is that file install calls start on the bundles it has just installed after it has called an async refresh packages operation. ÂThis grabs a state change lock for the bundle. ÂNow this lock prevents the refresh packages background thread to obtain the state change lock for the bundle that is being activated. ÂYou may want to give the latest file install code a try to see if it fixes your issue.

Tom



Inactive hide details for "hbdrawn" ---06/15/2012 07:13:53 PM---I think the operation of refreshing for uninstalledBundles and "hbdrawn" ---06/15/2012 07:13:53 PM---I think the operation of refreshing for uninstalledBundles and updatedBundles is required, but not for installBundlesãAnd ma


    From:

"hbdrawn" <hbdrawn@xxxxxxxxxx>

    To:

"Equinox development mailing list" <equinox-dev@xxxxxxxxxxx>,

    Date:

06/15/2012 07:13 PM

    Subject:

[equinox-dev] ååï ååï equinox bundle akin to felix fileinstall




I think the Âoperation of refreshing for uninstalledBundles and updatedBundles is required, but not for installBundlesãAnd maybe there are some faults just like what Raymond said.
------------------
åäæçïåéèè||æäæ
Â


------------------ ååéä ------------------
åää:Â"Raymond Auge"<raymond.auge@xxxxxxxxxxx>;
åéæé:Â2012å6æ16æ(ææå) åæ5:49
æää:Â"Equinox development mailing list"<equinox-dev@xxxxxxxxxxx>;
äé:ÂRe: [equinox-dev]ååï equinox bundle akin to felix fileinstall

On Fri, Jun 15, 2012 at 10:23 AM, hbdrawn <hbdrawn@xxxxxxxxxx> wrote:
    i encoutered Âthe same problem before.After checked out the code,i found the spilthÂcode in the line of 502(maybe the original code had been modified Âsomewhere,so the line is not correct maybe,but the code below is right,please check it) in the DirectoryWatcher.java( function process):
    Â
    toRefresh.addAll( uninstalledBundles );
    toRefresh.addAll(updatedBundles);
    //toRefresh.addAll( installedBundles );

This actually does seem to be the issue. Again I'm not sure who is at fault because internally equinox is performing a refresh on bundles using a separate thread which would clearly seem to violate the code in AbstractBundle.beginStateChange which will quite clearly throw an error it a separate thread has the bundle in a dirty state.

Perhaps there is no need for felix file install to actually force a package refresh? Wouldn't that be automatically done by the framework itself on an install/update/deletion?

Perhaps it's because it's trying to perform the process as a batch?

Here is the exact code in question:

    // Handle deleted artifacts
    // We do the operations in the following order:
    // uninstall, update, install, refresh & start.
    Collection uninstalledBundles = uninstall(deleted);
    Collection updatedBundles = update(modified);
    Collection installedBundles = install(created);
   Â
    Set toRefresh = new HashSet();
    toRefresh.addAll( uninstalledBundles );
    toRefresh.addAll(updatedBundles);
    toRefresh.addAll( installedBundles );
    findBundlesWithFragmentsToRefresh( toRefresh );
    findBundlesWithOptionalPackagesToRefresh( toRefresh );
    if (toRefresh.size() > 0)
    {
      // Refresh if any bundle got uninstalled or updated.
      refresh((Bundle[]) toRefresh.toArray(new Bundle[toRefresh.size()]));
    }

The error results from the second last line above, but if we comment the line as bdrawn mentions above, then it eliminates the error, but does it leave the system in a state it shouldn't be in?

--
Raymond AugÃÂÂ| Senior Software Architect |ÂLiferay, Inc.Â

---

8-9 October 2012 |ÂLiferay North America SymposiumÂ| liferay.com/northamerica2012

16-17 October 2012 |ÂLiferay Europe SymposiumÂ| liferay.com/europe2012

24-25 October 2012 |ÂLiferay Spain SymposiumÂ| liferay.com/spain2012

_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev


_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev




--
Raymond Augà Â|ÂSenior Software Architect |ÂLiferay, Inc.Â

---

24-25 October 2012 |ÂLiferayÂSpain SymposiumÂ|Âliferay.com/spain2012

16 November 2012 |ÂLiferayÂItaly SymposiumÂ|Âliferay.com/italy2012



GIF image

GIF image