Ivy
  1. Ivy
  2. IVY-956

Latest Compatible Conflict Manager + Extra Attributes in Dependencies' IVY files == inifinite loop

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-RC1
    • Fix Version/s: 2.2.0-RC1
    • Component/s: None
    • Labels:
      None
    • Environment:

      Windows XP
      Java 6

      Description

      When using the Latest Compatible Conflict Manager with the resolution of modules/revisions that contain extra attributes, you get into an infinite loop.

      The dependencies on my repository contains this in their <info/> element:

      <info organisation="CAE-VSK" module="VSK-FC" revision="0.54.0.0" status="Development" publication="20081016173017" buddies="" approver="Somebody">
      

      If the ivy.xml that I would like to resolve contains this:

       <dependencies>
        <dependency org="CAE-VSK" name="VSK-FC" rev="0.53.0.1" transitive="false" force="true" conf="BuildTimeDependencies-&gt;*" policydependency="true">
        </dependency>
        <dependency org="CAE-VSK" name="VSK-FC" rev="[0.50.0.0,0.55.0.0]" transitive="false" force="true" conf="BuildTimeDependencies-&gt;*">
        </dependency>
       </dependencies>
      

      then the ResolveEngine gets into an infinite loop with this being displayed over and over again:

      [ivy:resolve]   found CAE-VSK#VSK-FC#MAIN;0.54.1.0 in attribs
      [ivy:resolve]   [0.54.1.0] CAE-VSK#VSK-FC#MAIN;[0.50.0.0,0.55.0.0]
      [ivy:resolve] BLACKLISTING [CAE-VSK#VSK-FC#MAIN;0.54.1.0 blacklisted to evict CAE-VSK#VSK-FC#MAIN;0.54.1.0 in favor of CAE-VSK#VSK-FC#MAIN;0.53.0.1 in CAE#TESTA#MAIN;working@pc6346 for BuildTimeDependencies]
      

      I'm going to attach 2 tests – one that operates on a repository that contains revs with NO attribs and one that operates on a repository that contains revs WITH attribs.

      Thanks,

      Scott

        Issue Links

          Activity

          Hide
          Maarten Coene added a comment -

          ok, I'll mark is as fixed then.
          Please reopen if you encounter the problem again.

          Maarten

          Show
          Maarten Coene added a comment - ok, I'll mark is as fixed then. Please reopen if you encounter the problem again. Maarten
          Hide
          Michael Fraenkel added a comment -

          Just tried 2.2.0.20091116231910.jar and that worked.
          I guess its fixed. Not sure what I did wrong the first time.

          Show
          Michael Fraenkel added a comment - Just tried 2.2.0.20091116231910.jar and that worked. I guess its fixed. Not sure what I did wrong the first time.
          Hide
          Maarten Coene added a comment -

          Michael,

          I couldn't reproduce your problem, I receive an error (as expected) when I try an example similar to yours. Did you try with current trunk version, or did you test 2.1.0 ?
          Could you also provide more details (ivy.xml, console log, ...) or a test case?

          Maarten

          Show
          Maarten Coene added a comment - Michael, I couldn't reproduce your problem, I receive an error (as expected) when I try an example similar to yours. Did you try with current trunk version, or did you test 2.1.0 ? Could you also provide more details (ivy.xml, console log, ...) or a test case? Maarten
          Hide
          Michael Fraenkel added a comment -

          My bad....

          I forgot to re-enable the latest-compatible conflict manager.
          It still loops forever.

          Show
          Michael Fraenkel added a comment - My bad.... I forgot to re-enable the latest-compatible conflict manager. It still loops forever.
          Hide
          Michael Fraenkel added a comment -

          Good news is that it doesn't loop anymore.
          But in my case, all my test cases fail just the same with the wrong revision selected, or a conflict not detected.
          I am looking further to see where it went wrong.

          Show
          Michael Fraenkel added a comment - Good news is that it doesn't loop anymore. But in my case, all my test cases fail just the same with the wrong revision selected, or a conflict not detected. I am looking further to see where it went wrong.
          Hide
          Maarten Coene added a comment -

          It is possible that this issue has been fixed by a change made for IVY-1115. Could you give it a try?

          Maarten

          Show
          Maarten Coene added a comment - It is possible that this issue has been fixed by a change made for IVY-1115 . Could you give it a try? Maarten
          Hide
          Michael Fraenkel added a comment -

          I too am hitting the infinite loop.

          I have an app and two dependencies (dep1 and dep2).
          app depends on dep1 rev=[1.0.0, 1.1.0[ and dep2 rev=1.0.0
          dep2 depends on dep1 rev=[1.1.0, 1.2.0[

          The theory is that this would fail. If I use the latest conflict manager, the resolve succeeds with the wrong revision.
          I switched to the latest compatible manager which just loops. Like shown above, it blacklists one of the dynamic revisions, and then restarts the resolve. However, none of the evictions/blacklists are looked at so I end up resolving the same sets of revisions.

          Show
          Michael Fraenkel added a comment - I too am hitting the infinite loop. I have an app and two dependencies (dep1 and dep2). app depends on dep1 rev=[1.0.0, 1.1.0[ and dep2 rev=1.0.0 dep2 depends on dep1 rev=[1.1.0, 1.2.0[ The theory is that this would fail. If I use the latest conflict manager, the resolve succeeds with the wrong revision. I switched to the latest compatible manager which just loops. Like shown above, it blacklists one of the dynamic revisions, and then restarts the resolve. However, none of the evictions/blacklists are looked at so I end up resolving the same sets of revisions.
          Hide
          Scott Hebert added a comment -

          Hi Guys,

          Any news on this issue?

          Thanks

          Scott

          Show
          Scott Hebert added a comment - Hi Guys, Any news on this issue? Thanks Scott
          Hide
          Scott Hebert added a comment -

          Hey Maarten,

          No worries... :> You guys rock!

          Should I post this on the mailing list? Or does receive these JIRA notifications?

          Thanks,

          Scott

          Show
          Scott Hebert added a comment - Hey Maarten, No worries... :> You guys rock! Should I post this on the mailing list? Or does receive these JIRA notifications? Thanks, Scott
          Hide
          Maarten Coene added a comment -

          No sorry, I had been too busy with creating the RC2 release.
          But I think it would be best that Xavier takes a look at this, because I must admit I don't know that peace of Ivy good enough to see how to fix it.

          Show
          Maarten Coene added a comment - No sorry, I had been too busy with creating the RC2 release. But I think it would be best that Xavier takes a look at this, because I must admit I don't know that peace of Ivy good enough to see how to fix it.
          Hide
          Scott Hebert added a comment -

          Just wondering if there has been any progress on this?

          Thanks,

          Scott

          Show
          Scott Hebert added a comment - Just wondering if there has been any progress on this? Thanks, Scott
          Hide
          Scott Hebert added a comment -

          I also testing the above swap in SVN trunk and it still hangs....

          Scott

          Show
          Scott Hebert added a comment - I also testing the above swap in SVN trunk and it still hangs.... Scott
          Hide
          Scott Hebert added a comment -

          Hi Maarten,

          Thanks for the fix...it works as is...but...

          if we swap the order of the dependencies in the ivy.xml from this:

           <dependencies>
            <dependency org="CAE-VSK" name="VSK-FC" rev="0.53.0.1" transitive="false" force="true" conf="BuildTimeDependencies-&gt;*" policydependency="true">
            </dependency>
            <dependency org="CAE-VSK" name="VSK-FC" rev="[0.50.0.0,0.55.0.0]" transitive="false" force="true" conf="BuildTimeDependencies-&gt;*">
            </dependency>
           </dependencies>
          

          to this:

           <dependencies>
            <dependency org="CAE-VSK" name="VSK-FC" rev="[0.50.0.0,0.55.0.0]" transitive="false" force="true" conf="BuildTimeDependencies-&gt;*">
            </dependency>
            <dependency org="CAE-VSK" name="VSK-FC" rev="0.53.0.1" transitive="false" force="true" conf="BuildTimeDependencies-&gt;*" policydependency="true">
            </dependency>
           </dependencies>
          

          I still get a hang...

          Thanks,

          Scott

          Show
          Scott Hebert added a comment - Hi Maarten, Thanks for the fix...it works as is...but... if we swap the order of the dependencies in the ivy.xml from this: <dependencies> <dependency org= "CAE-VSK" name= "VSK-FC" rev= "0.53.0.1" transitive= "false" force= "true" conf= "BuildTimeDependencies-&gt;*" policydependency= "true" > </dependency> <dependency org= "CAE-VSK" name= "VSK-FC" rev= "[0.50.0.0,0.55.0.0]" transitive= "false" force= "true" conf= "BuildTimeDependencies-&gt;*" > </dependency> </dependencies> to this: <dependencies> <dependency org= "CAE-VSK" name= "VSK-FC" rev= "[0.50.0.0,0.55.0.0]" transitive= "false" force= "true" conf= "BuildTimeDependencies-&gt;*" > </dependency> <dependency org= "CAE-VSK" name= "VSK-FC" rev= "0.53.0.1" transitive= "false" force= "true" conf= "BuildTimeDependencies-&gt;*" policydependency= "true" > </dependency> </dependencies> I still get a hang... Thanks, Scott
          Hide
          Maarten Coene added a comment -

          The problem is even worse in current SVN trunk: both your tests gets into an infinite loop.
          I've tried to commit a fix into SVN trunk, could you please give it a try and post your feedback quickly so I can add it to RC2 tomorrow.

          Show
          Maarten Coene added a comment - The problem is even worse in current SVN trunk: both your tests gets into an infinite loop. I've tried to commit a fix into SVN trunk, could you please give it a try and post your feedback quickly so I can add it to RC2 tomorrow.
          Hide
          Scott Hebert added a comment -

          As well, it is important to note that if I remove the Extra Attribs from the Dependencies' IVY files, the resolve succeeds...

          Show
          Scott Hebert added a comment - As well, it is important to note that if I remove the Extra Attribs from the Dependencies' IVY files, the resolve succeeds ...

            People

            • Assignee:
              Maarten Coene
              Reporter:
              Scott Hebert
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development