Summary: | emerge --jobs does not emerge buildtime dependencies soon enough(?) | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Richard <shiningarcanine> |
Component: | Core - Dependencies | Assignee: | Portage team <dev-portage> |
Status: | RESOLVED FIXED | ||
Severity: | minor | CC: | at, esigra |
Priority: | High | Keywords: | InVCS |
Version: | 2.2 | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 335925 |
Description
Richard
2010-07-04 01:19:30 UTC
By the way, the old profile was default/linux/x86/10.0. I've seen reports like this before, I've checked the code, and I couldn't find anything wrong. It works like this: In the Scheduler class there is a method called _choose_pkg which chooses the next build. It uses the _dependent_on_scheduled_merges method to search a directed graph for unsatisfied dependencies. Members of the graph are marked complete by the _task_complete method. This code is single-threaded using a poll loop. If you can reproduce the initial state and post emerge --pretend --debug output for that command that results in failure, it might give some clue about what causes this. (In reply to comment #2) > I've seen reports like this before, I've checked the code, and I couldn't find > anything wrong. It works like this: > > In the Scheduler class there is a method called _choose_pkg which chooses the > next build. It uses the _dependent_on_scheduled_merges method to search a > directed graph for unsatisfied dependencies. Members of the graph are marked > complete by the _task_complete method. This code is single-threaded using a > poll loop. > > If you can reproduce the initial state and post emerge --pretend --debug output > for that command that results in failure, it might give some clue about what > causes this. > Unfortunately, I did not perform a backup prior to the upgrade, so the initial state has been lost. Perhaps the issue is present in one of the helper functions, such that it is behaving close to how it should be, but not perfectly, leading to this bug. Have you tried doing unit testing to verify that all of the helper functions are behaving correctly (e.g. there is no off by 1 error in one of them that would cause this)? (In reply to comment #3) > Perhaps the issue is present in one of the helper functions, such that it is > behaving close to how it should be, but not perfectly, leading to this bug. I looked again, and now I think I found the bug. Here's the fix: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=e89da47d4ef51fba3d5a03f1b379d9ad02190d22 > Have you tried doing unit testing to verify that all of the helper functions > are behaving correctly (e.g. there is no off by 1 error in one of them that > would cause this)? No, there aren't any tests for this yet. I suppose we could write a test that schedules a fake dependency graph and double checks the choices. It might be hard to create a state that would trigger this bug though. It's not a lot of code and I just needed to look at it more carefully. (In reply to comment #4) > (In reply to comment #3) > > Perhaps the issue is present in one of the helper functions, such that it is > > behaving close to how it should be, but not perfectly, leading to this bug. > > I looked again, and now I think I found the bug. Here's the fix: > > http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=e89da47d4ef51fba3d5a03f1b379d9ad02190d22 > > > Have you tried doing unit testing to verify that all of the helper functions > > are behaving correctly (e.g. there is no off by 1 error in one of them that > > would cause this)? > > No, there aren't any tests for this yet. I suppose we could write a test that > schedules a fake dependency graph and double checks the choices. It might be > hard to create a state that would trigger this bug though. It's not a lot of > code and I just needed to look at it more carefully. > (In reply to comment #4) > (In reply to comment #3) > > Perhaps the issue is present in one of the helper functions, such that it is > > behaving close to how it should be, but not perfectly, leading to this bug. > > I looked again, and now I think I found the bug. Here's the fix: > > http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=e89da47d4ef51fba3d5a03f1b379d9ad02190d22 Is there any chance that this fix will be backported to portage-2.1.8.x? I had planned to test it after it had been pushed into the portage testing tree through a revision of a sys-apps/portage, but since that has not happened so far, I have manually applied it to my systems. So far, I have had no issues. Yes, this fix will be included in 2.1.8.4 which will be released later this month. *** Bug 331387 has been marked as a duplicate of this bug. *** This is in 2.2_rc68, but I'll leave this bug open until it's in an unmasked version. This is fixed in 2.1.9. |