You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-commits@incubator.apache.org by "Jarosław Wypychowski (JIRA)" <ji...@apache.org> on 2007/05/10 11:56:15 UTC

[jira] Created: (IVY-497) Ant project reference lost from context on multiple ant calls in single thread

Ant project reference lost from context on multiple ant calls in single thread
------------------------------------------------------------------------------

                 Key: IVY-497
                 URL: https://issues.apache.org/jira/browse/IVY-497
             Project: Ivy
          Issue Type: Bug
          Components: Ant
    Affects Versions: 1.4.1
            Reporter: Jarosław Wypychowski


If resolve task calls an ant trigger which calls an ant task which calls resolve which calls ... 
Ant project reference is kept within IvyContext thread local map of weakly referenced objects. On concurrent ant calls the project information is being overwritten by temporary ant projects, which after cleanup by GC result in inability to call a trigger.

A solution would be to stack project references within the IvyContext map. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (IVY-497) Ant project reference lost from context on multiple ant calls in single thread

Posted by "Jarosław Wypychowski (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IVY-497?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jarosław Wypychowski updated IVY-497:
-------------------------------------

    Attachment: IVY-497-2.diff

A version of the previous patch
This one renames IvyContext.top to IvyContext.peek,
introduces IvyTask.prepareTask and IvyTask.finalizeTask and moves IvyTask.execute to final.

> Ant project reference lost from context on multiple ant calls in single thread
> ------------------------------------------------------------------------------
>
>                 Key: IVY-497
>                 URL: https://issues.apache.org/jira/browse/IVY-497
>             Project: Ivy
>          Issue Type: Bug
>          Components: Ant
>    Affects Versions: 1.4.1
>            Reporter: Jarosław Wypychowski
>         Attachments: IVY-497-1.diff, IVY-497-2.diff
>
>
> If resolve task calls an ant trigger which calls an ant task which calls resolve which calls ... 
> Ant project reference is kept within IvyContext thread local map of weakly referenced objects. On concurrent ant calls the project information is being overwritten by temporary ant projects, which after cleanup by GC result in inability to call a trigger.
> A solution would be to stack project references within the IvyContext map. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (IVY-497) Ant project reference lost from context on multiple ant calls in single thread

Posted by "Jarosław Wypychowski (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IVY-497?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jarosław Wypychowski updated IVY-497:
-------------------------------------

    Attachment: IVY-497-1.diff

IvyContext  extended with push/pop/top
IvyTask got execute() and abstract doExecute
all tasks updated
triggers updated to use IvyContext.top

> Ant project reference lost from context on multiple ant calls in single thread
> ------------------------------------------------------------------------------
>
>                 Key: IVY-497
>                 URL: https://issues.apache.org/jira/browse/IVY-497
>             Project: Ivy
>          Issue Type: Bug
>          Components: Ant
>    Affects Versions: 1.4.1
>            Reporter: Jarosław Wypychowski
>         Attachments: IVY-497-1.diff
>
>
> If resolve task calls an ant trigger which calls an ant task which calls resolve which calls ... 
> Ant project reference is kept within IvyContext thread local map of weakly referenced objects. On concurrent ant calls the project information is being overwritten by temporary ant projects, which after cleanup by GC result in inability to call a trigger.
> A solution would be to stack project references within the IvyContext map. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (IVY-497) Ant project reference lost from context on multiple ant calls in single thread

Posted by "Xavier Hanin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IVY-497?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Xavier Hanin resolved IVY-497.
------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.0-alpha-2

I've applied your patch, thanks a lot for your valuable contribution!

> Ant project reference lost from context on multiple ant calls in single thread
> ------------------------------------------------------------------------------
>
>                 Key: IVY-497
>                 URL: https://issues.apache.org/jira/browse/IVY-497
>             Project: Ivy
>          Issue Type: Bug
>          Components: Ant
>    Affects Versions: 1.4.1
>            Reporter: Jarosław Wypychowski
>             Fix For: 2.0.0-alpha-2
>
>         Attachments: IVY-497-1.diff, IVY-497-2.diff
>
>
> If resolve task calls an ant trigger which calls an ant task which calls resolve which calls ... 
> Ant project reference is kept within IvyContext thread local map of weakly referenced objects. On concurrent ant calls the project information is being overwritten by temporary ant projects, which after cleanup by GC result in inability to call a trigger.
> A solution would be to stack project references within the IvyContext map. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (IVY-497) Ant project reference lost from context on multiple ant calls in single thread

Posted by "Jarosław Wypychowski (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IVY-497?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jarosław Wypychowski updated IVY-497:
-------------------------------------

    Attachment: IVY-497-3.diff

A stupid bug in a patch that is already applied.

In IvyContext.pop(String,Object) I've put checking on the expectedValue too early. A patch on the patch is in attachment.


> Ant project reference lost from context on multiple ant calls in single thread
> ------------------------------------------------------------------------------
>
>                 Key: IVY-497
>                 URL: https://issues.apache.org/jira/browse/IVY-497
>             Project: Ivy
>          Issue Type: Bug
>          Components: Ant
>    Affects Versions: 1.4.1
>            Reporter: Jarosław Wypychowski
>             Fix For: 2.0.0-alpha-2
>
>         Attachments: IVY-497-1.diff, IVY-497-2.diff, IVY-497-3.diff
>
>
> If resolve task calls an ant trigger which calls an ant task which calls resolve which calls ... 
> Ant project reference is kept within IvyContext thread local map of weakly referenced objects. On concurrent ant calls the project information is being overwritten by temporary ant projects, which after cleanup by GC result in inability to call a trigger.
> A solution would be to stack project references within the IvyContext map. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (IVY-497) Ant project reference lost from context on multiple ant calls in single thread

Posted by "Xavier Hanin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IVY-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12494848 ] 

Xavier Hanin commented on IVY-497:
----------------------------------

Good catch, I've applied your patch.

> Ant project reference lost from context on multiple ant calls in single thread
> ------------------------------------------------------------------------------
>
>                 Key: IVY-497
>                 URL: https://issues.apache.org/jira/browse/IVY-497
>             Project: Ivy
>          Issue Type: Bug
>          Components: Ant
>    Affects Versions: 1.4.1
>            Reporter: Jarosław Wypychowski
>             Fix For: 2.0.0-alpha-2
>
>         Attachments: IVY-497-1.diff, IVY-497-2.diff, IVY-497-3.diff
>
>
> If resolve task calls an ant trigger which calls an ant task which calls resolve which calls ... 
> Ant project reference is kept within IvyContext thread local map of weakly referenced objects. On concurrent ant calls the project information is being overwritten by temporary ant projects, which after cleanup by GC result in inability to call a trigger.
> A solution would be to stack project references within the IvyContext map. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.