Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 614110

Summary: sys-apps/portage: BinpkgFetcher.lock triggers event loop recursion
Product: Portage Development Reporter: Zac Medico <zmedico>
Component: Core - Interface (emerge)Assignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal Keywords: InVCS
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=613990
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 591760, 651804    

Description Zac Medico gentoo-dev 2017-03-28 04:16:10 UTC
The BinpkgFetcher.lock method calls async_lock.wait(), which triggers event loop recursion until the lock has been acquired. The lock method only appears to be called from the start method (no external callers).
Comment 2 Larry the Git Cow gentoo-dev 2018-04-22 00:56:16 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=adf2e6dd57b5bcaa4a668e3085024ebc3224a2ca

commit adf2e6dd57b5bcaa4a668e3085024ebc3224a2ca
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2018-04-21 19:18:08 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2018-04-22 00:50:57 +0000

    BinpkgFetcher: use async lock (bug 614110)
    
    In order to avoid event loop recursion, convert the
    _BinpkgFetcherProcess.lock() method to an async_lock
    method for use by BinpkgFetcher.
    
    Bug: https://bugs.gentoo.org/614110
    Reviewed-by: Brian Dolbec <dolsen@gentoo.org>

 pym/_emerge/BinpkgFetcher.py | 53 +++++++++++++++++++++++++++-----------------
 1 file changed, 33 insertions(+), 20 deletions(-)}
Comment 3 Zac Medico gentoo-dev 2018-07-02 18:40:33 UTC
Fixed in portage-2.3.40-r1.