Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 656394 - =sys-apps/portage-2.3.38: emerge -Opv <pkg>: RuntimeError: Event loop stopped before Future completed.
Summary: =sys-apps/portage-2.3.38: emerge -Opv <pkg>: RuntimeError: Event loop stopped...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS, REGRESSION
Depends on:
Blocks: 651804
  Show dependency tree
 
Reported: 2018-05-24 10:25 UTC by Lars Wendler (Polynomial-C) (RETIRED)
Modified: 2018-05-31 04:55 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2018-05-24 10:25:33 UTC
# emerge -Opf ncurses

These are the packages that would be fetched, in order:

Exception in callback AsynchronousTask.wait()
handle: <Handle AsynchronousTask.wait()>
Traceback (most recent call last):
  File "/usr/lib64/python3.6/asyncio/events.py", line 145, in _run
    self._callback(*self._args)
  File "/usr/lib64/python3.6/site-packages/_emerge/AsynchronousTask.py", line 84, in wait
    self._wait_hook()
  File "/usr/lib64/python3.6/site-packages/_emerge/AsynchronousTask.py", line 195, in _wait_hook
    self._exit_listener_stack.pop()(self)
  File "/usr/lib64/python3.6/site-packages/_emerge/EbuildBuild.py", line 107, in _start_with_metadata
    self._prefetch_exit(prefetcher)
  File "/usr/lib64/python3.6/site-packages/_emerge/EbuildBuild.py", line 144, in _prefetch_exit
    retval = fetcher.execute()
  File "/usr/lib64/python3.6/site-packages/_emerge/EbuildFetchonly.py", line 26, in execute
    mydbapi=portdb, tree="porttree")
  File "/usr/lib64/python3.6/site-packages/portage/package/ebuild/doebuild.py", line 863, in doebuild
    rval = _validate_deps(mysettings, myroot, mydo, mydbapi)
  File "/usr/lib64/python3.6/site-packages/portage/package/ebuild/doebuild.py", line 1415, in _validate_deps
    myrepo=mysettings.get("PORTAGE_REPO_NAME"))))
  File "/usr/lib64/python3.6/site-packages/portage/dbapi/porttree.py", line 588, in aux_get
    myrepo=myrepo, loop=loop))
  File "/usr/lib64/python3.6/asyncio/base_events.py", line 455, in run_until_complete
    self.run_forever()
  File "/usr/lib64/python3.6/asyncio/base_events.py", line 409, in run_forever
    raise RuntimeError('This event loop is already running')
RuntimeError: This event loop is already running
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.6/emerge", line 53, in <module>
    retval = emerge_main()
  File "/usr/lib64/python3.6/site-packages/_emerge/main.py", line 1289, in emerge_main
    return run_action(emerge_config)
  File "/usr/lib64/python3.6/site-packages/_emerge/actions.py", line 3317, in run_action
    retval = action_build(emerge_config, spinner=spinner)
  File "/usr/lib64/python3.6/site-packages/_emerge/actions.py", line 541, in action_build
    retval = mergetask.merge()
  File "/usr/lib64/python3.6/site-packages/_emerge/Scheduler.py", line 1019, in merge
    rval = self._merge()
  File "/usr/lib64/python3.6/site-packages/_emerge/Scheduler.py", line 1413, in _merge
    self._main_loop()
  File "/usr/lib64/python3.6/site-packages/_emerge/Scheduler.py", line 1389, in _main_loop
    self._event_loop.run_until_complete(self._main_exit)
  File "/usr/lib64/python3.6/asyncio/base_events.py", line 466, in run_until_complete
    raise RuntimeError('Event loop stopped before Future completed.')
RuntimeError: Event loop stopped before Future completed.
Comment 1 Larry the Git Cow gentoo-dev 2018-05-24 19:45:14 UTC
The bug has been referenced in the following commit(s):

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

commit 28d3c9ed46b16757626b292dd6d7a6cae054b669
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2018-05-24 19:40:10 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2018-05-24 19:42:13 +0000

    doebuild: eliminate redundant aux_get calls (bug 656394)
    
    These redundant aux_get calls triggered event loop recursion
    when called via EbuildFetchonly as reported in bug 656394.
    
    Bug: https://bugs.gentoo.org/656394

 pym/portage/package/ebuild/doebuild.py | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)
Comment 2 Larry the Git Cow gentoo-dev 2018-05-25 03:14:43 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ac46b10eed56b6ab8d2075a774098e2c936c1480

commit ac46b10eed56b6ab8d2075a774098e2c936c1480
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2018-05-25 03:03:12 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2018-05-25 03:10:38 +0000

    sys-apps/portage: version bump to 2.3.39
    
      #646190 - exclude soname deps for internal libs without DT_SONAME
      #655656 - signal wakeup fd BlockingIOError messages
      #655996 - SELinux enhancements for musl and cleanups
      #656394 - emerge -pf RuntimeError event loop is already running
    
    Closes: https://bugs.gentoo.org/655656
    Closes: https://bugs.gentoo.org/656394
    Package-Manager: Portage-2.3.39, Repoman-2.3.9

 sys-apps/portage/Manifest              |   1 +
 sys-apps/portage/portage-2.3.39.ebuild | 284 +++++++++++++++++++++++++++++++++
 2 files changed, 285 insertions(+)
Comment 3 cyrillic 2018-05-31 03:30:28 UTC
portage-9999 continues to generate errors like this :

>>> Installing (1 of 9) dev-vcs/git-2.17.1::gentoo
 * Please read /usr/share/bash-completion/git for Git bash command completion
 * Please read /usr/share/git/git-prompt.sh for Git bash prompt
 * Note that the prompt bash code is now in that separate script
 * These additional scripts need some dependencies:

 *   git-quiltimport  : dev-util/quilt
 *   git-instaweb     : || ( www-servers/lighttpd www-servers/apache www-servers/nginx )

Exception in callback AsynchronousTask.wait()
handle: <Handle AsynchronousTask.wait()>
Traceback (most recent call last):
  File "/usr/lib64/python3.6/asyncio/events.py", line 145, in _run
    self._callback(*self._args)
  File "/usr/lib64/python3.6/site-packages/_emerge/AsynchronousTask.py", line 84, in wait
    self._wait_hook()
  File "/usr/lib64/python3.6/site-packages/_emerge/AsynchronousTask.py", line 195, in _wait_hook
    self._exit_listener_stack.pop()(self)
  File "/usr/lib64/python3.6/site-packages/_emerge/PackageMerge.py", line 49, in _install_exit
    self.wait()
  File "/usr/lib64/python3.6/site-packages/_emerge/AsynchronousTask.py", line 84, in wait
    self._wait_hook()
  File "/usr/lib64/python3.6/site-packages/_emerge/AsynchronousTask.py", line 195, in _wait_hook
    self._exit_listener_stack.pop()(self)
  File "/usr/lib64/python3.6/site-packages/_emerge/Scheduler.py", line 1267, in _merge_exit
    self._do_merge_exit(merge)
  File "/usr/lib64/python3.6/site-packages/_emerge/Scheduler.py", line 1302, in _do_merge_exit
    self._task_complete(pkg)
  File "/usr/lib64/python3.6/site-packages/_emerge/Scheduler.py", line 1375, in _task_complete
    blocker_db.discardBlocker(pkg)
  File "/usr/lib64/python3.6/site-packages/_emerge/BlockerDB.py", line 124, in discardBlocker
    for slot_match in self._fake_vartree.dbapi.match_pkgs(pkg.slot_atom):
  File "/usr/lib64/python3.6/site-packages/_emerge/PackageVirtualDbapi.py", line 71, in match_pkgs
    return [self._cpv_map[cpv] for cpv in self.match(atom)]
  File "/usr/lib64/python3.6/site-packages/_emerge/FakeVartree.py", line 115, in _match_wrapper
    self._aux_get_wrapper(cpv, [])
  File "/usr/lib64/python3.6/site-packages/_emerge/FakeVartree.py", line 129, in _aux_get_wrapper
    myrepo=pkg.repo)))
  File "/usr/lib64/python3.6/site-packages/portage/dbapi/porttree.py", line 588, in aux_get
    myrepo=myrepo, loop=loop))
  File "/usr/lib64/python3.6/site-packages/portage/util/_eventloop/asyncio_event_loop.py", line 104, in _run_until_complete
    return self._loop.run_until_complete(future)
  File "/usr/lib64/python3.6/asyncio/base_events.py", line 455, in run_until_complete
    self.run_forever()
  File "/usr/lib64/python3.6/asyncio/base_events.py", line 409, in run_forever
    raise RuntimeError('This event loop is already running')
RuntimeError: This event loop is already running

 * Messages for package dev-vcs/git-2.17.1:

 * These additional scripts need some dependencies:
 *   git-quiltimport  : dev-util/quilt
 *   git-instaweb     : || ( www-servers/lighttpd www-servers/apache www-servers/nginx )
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.6/emerge", line 53, in <module>
    retval = emerge_main()
  File "/usr/lib64/python3.6/site-packages/_emerge/main.py", line 1289, in emerge_main
    return run_action(emerge_config)
  File "/usr/lib64/python3.6/site-packages/_emerge/actions.py", line 3317, in run_action
    retval = action_build(emerge_config, spinner=spinner)
  File "/usr/lib64/python3.6/site-packages/_emerge/actions.py", line 541, in action_build
    retval = mergetask.merge()
  File "/usr/lib64/python3.6/site-packages/_emerge/Scheduler.py", line 1019, in merge
    rval = self._merge()
  File "/usr/lib64/python3.6/site-packages/_emerge/Scheduler.py", line 1413, in _merge
    self._main_loop()
  File "/usr/lib64/python3.6/site-packages/_emerge/Scheduler.py", line 1389, in _main_loop
    self._event_loop.run_until_complete(self._main_exit)
  File "/usr/lib64/python3.6/site-packages/portage/util/_eventloop/asyncio_event_loop.py", line 104, in _run_until_complete
    return self._loop.run_until_complete(future)
  File "/usr/lib64/python3.6/asyncio/base_events.py", line 466, in run_until_complete
    raise RuntimeError('Event loop stopped before Future completed.')
RuntimeError: Event loop stopped before Future completed.
Future exception was never retrieved
future: <Future finished exception=PortageKeyError('dev-vcs/git-2.17.0',)>
portage.exception.PortageKeyError: 'dev-vcs/git-2.17.0'

The packages appear to install correctly, but --keep-going does not work in this case, and installing one package at a time is really tedious :(
Comment 4 Zac Medico gentoo-dev 2018-05-31 04:55:56 UTC
(In reply to cyrillic from comment #3)

Thanks, I've opened bug 656942 for this.