Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 656830 - sys-apps/portage-2.3.40.1: Exception in callback AsynchronousTask.wait()
Summary: sys-apps/portage-2.3.40.1: Exception in callback AsynchronousTask.wait()
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-29 08:40 UTC by Fabian Groffen
Modified: 2019-06-18 14:01 UTC (History)
2 users (show)

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 Fabian Groffen gentoo-dev 2018-05-29 08:40:37 UTC
2.3.40.1 is a Prefix-only version to include the last commits for python2.  Below may be a python3 problem, not sure yet.

>>> Verifying ebuild manifests
>>> Running pre-merge checks for net-misc/openssh-7.7_p1-r3

>>> Emerging (1 of 18) app-misc/editor-wrapper-4::gentoo_prefix
 * Fetching files in the background.
 * To view fetch progress, run in another terminal:
 * tail -f /Volumes/Scratch/Gentoo/bootstrap32-20180528/var/log/emerge-fetch.log
Exception in callback AsynchronousTask.wait()
handle: <Handle AsynchronousTask.wait()>
Traceback (most recent call last):
  File "/Volumes/Scratch/Gentoo/bootstrap32-20180528/usr/lib/python3.5/asyncio/s
elector_events.py", line 264, in _add_reader
    key = self._selector.get_key(fd)
  File "/Volumes/Scratch/Gentoo/bootstrap32-20180528/usr/lib/python3.5/selectors
.py", line 191, in get_key
    raise KeyError("{!r} is not registered".format(fileobj)) from None
KeyError: '9 is not registered'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Volumes/Scratch/Gentoo/bootstrap32-20180528/usr/lib/python3.5/asyncio/events.py", line 127, in _run
    self._callback(*self._args)
  File "/Volumes/Scratch/Gentoo/bootstrap32-20180528/usr/lib/python3.5/site-packages/_emerge/AsynchronousTask.py", line 84, in wait
    self._wait_hook()
  File "/Volumes/Scratch/Gentoo/bootstrap32-20180528/usr/lib/python3.5/site-packages/_emerge/AsynchronousTask.py", line 195, in _wait_hook
    self._exit_listener_stack.pop()(self)
  File "/Volumes/Scratch/Gentoo/bootstrap32-20180528/usr/lib/python3.5/site-packages/_emerge/EbuildBuild.py", line 181, in _start_pre_clean
    self._start_task(pre_clean_phase, self._pre_clean_exit)
  File "/Volumes/Scratch/Gentoo/bootstrap32-20180528/usr/lib/python3.5/site-packages/_emerge/CompositeTask.py", line 111, in _start_task
    task.start()
  File "/Volumes/Scratch/Gentoo/bootstrap32-20180528/usr/lib/python3.5/site-packages/_emerge/AsynchronousTask.py", line 30, in start
    self._start()
  File "/Volumes/Scratch/Gentoo/bootstrap32-20180528/usr/lib/python3.5/site-packages/_emerge/EbuildPhase.py", line 137, in _start
    self._start_lock()
  File "/Volumes/Scratch/Gentoo/bootstrap32-20180528/usr/lib/python3.5/site-packages/_emerge/EbuildPhase.py", line 157, in _start_lock
    self._start_ebuild()
  File "/Volumes/Scratch/Gentoo/bootstrap32-20180528/usr/lib/python3.5/site-packages/_emerge/EbuildPhase.py", line 200, in _start_ebuild
    self._start_task(ebuild_process, self._ebuild_exit)
  File "/Volumes/Scratch/Gentoo/bootstrap32-20180528/usr/lib/python3.5/site-packages/_emerge/CompositeTask.py", line 111, in _start_task
    task.start()
  File "/Volumes/Scratch/Gentoo/bootstrap32-20180528/usr/lib/python3.5/site-packages/_emerge/AsynchronousTask.py", line 30, in start
    self._start()
  File "/Volumes/Scratch/Gentoo/bootstrap32-20180528/usr/lib/python3.5/site-packages/_emerge/AbstractEbuildProcess.py", line 167, in _start
    self._start_post_builddir_lock(start_ipc_daemon=start_ipc_daemon)
  File "/Volumes/Scratch/Gentoo/bootstrap32-20180528/usr/lib/python3.5/site-packages/_emerge/AbstractEbuildProcess.py", line 190, in _start_post_builddir_lock
    SpawnProcess._start(self)
  File "/Volumes/Scratch/Gentoo/bootstrap32-20180528/usr/lib/python3.5/site-packages/_emerge/SpawnProcess.py", line 145, in _start
    self._pipe_logger.start()
  File "/Volumes/Scratch/Gentoo/bootstrap32-20180528/usr/lib/python3.5/site-packages/_emerge/AsynchronousTask.py", line 30, in start
    self._start()
  File "/Volumes/Scratch/Gentoo/bootstrap32-20180528/usr/lib/python3.5/site-packages/portage/util/_async/PipeLogger.py", line 60, in _start
    self.scheduler.add_reader(fd, self._output_handler, fd)
  File "/Volumes/Scratch/Gentoo/bootstrap32-20180528/usr/lib/python3.5/asyncio/selector_events.py", line 337, in add_reader
    return self._add_reader(fd, callback, *args)
  File "/Volumes/Scratch/Gentoo/bootstrap32-20180528/usr/lib/python3.5/asyncio/selector_events.py", line 267, in _add_reader
    (handle, None))
  File "/Volumes/Scratch/Gentoo/bootstrap32-20180528/usr/lib/python3.5/selectors.py", line 541, in register
    self._kqueue.control([kev], 0, 0)
OSError: [Errno 45] Operation not supported
Comment 1 Zac Medico gentoo-dev 2018-05-29 08:53:28 UTC
In the worst case, you can patch pym/portage/util/_eventloop/global_event_loop.py to set _asyncio_enabled = False.
Comment 2 Fabian Groffen gentoo-dev 2018-05-29 08:55:45 UTC
Thanks, this is a minorty platform, so perhaps that's a suitable workaround
Comment 3 Larry the Git Cow gentoo-dev 2018-05-29 09:04:45 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=6a9cbaaff7678000846dd253f49c0d87c09bfb66

commit 6a9cbaaff7678000846dd253f49c0d87c09bfb66
Author:     Fabian Groffen <grobian@gentoo.org>
AuthorDate: 2018-05-29 09:04:31 +0000
Commit:     Fabian Groffen <grobian@gentoo.org>
CommitDate: 2018-05-29 09:04:31 +0000

    sys-apps/portage: disable asyncio for ppc-macos, bug #656830
    
    Bug: https://bugs.gentoo.org/656830
    Package-Manager: Portage-2.3.40.1-prefix, Repoman-2.3.9

 sys-apps/portage/portage-2.3.40.1.ebuild | 7 +++++++
 1 file changed, 7 insertions(+)
Comment 4 Alex Barker 2018-07-07 19:20:42 UTC
I have run into a very similar bug with 2.3.41 using ~amd64 and nothing special.

>>> Jobs: 541 of 1035 complete, 8 running           Load avg: 6.16, 6.35, 4.75Exception in callback AsynchronousTask.wait()
handle: <Handle AsynchronousTask.wait()>
Traceback (most recent call last):
  File "/usr/lib64/python3.5/asyncio/events.py", line 127, in _run
    self._callback(*self._args)
  File "/usr/lib64/python3.5/site-packages/_emerge/AsynchronousTask.py", line 84, in wait
    self._wait_hook()
  File "/usr/lib64/python3.5/site-packages/_emerge/AsynchronousTask.py", line 195, in _wait_hook
    self._exit_listener_stack.pop()(self)
  File "/usr/lib64/python3.5/site-packages/_emerge/EbuildBuild.py", line 68, in _start_with_metadata
    settings.configdict["pkg"]["SRC_URI"], = aux_get_task.future.result()
  File "/usr/lib64/python3.5/asyncio/futures.py", line 294, in result
    raise self._exception
portage.exception.PortageKeyError: 'dev-libs/libuv-1.21.0'
Comment 5 Zac Medico gentoo-dev 2018-07-08 01:22:31 UTC
(In reply to Alex Barker from comment #4)
>   File "/usr/lib64/python3.5/site-packages/_emerge/EbuildBuild.py", line 68,
> in _start_with_metadata
>     settings.configdict["pkg"]["SRC_URI"], = aux_get_task.future.result()
>   File "/usr/lib64/python3.5/asyncio/futures.py", line 294, in result
>     raise self._exception
> portage.exception.PortageKeyError: 'dev-libs/libuv-1.21.0'

That looks like bug 639374, it means that the repository was modified while emerge was running.
Comment 6 Alex Barker 2018-07-08 02:38:36 UTC
(In reply to Zac Medico from comment #5)
> (In reply to Alex Barker from comment #4)
> >   File "/usr/lib64/python3.5/site-packages/_emerge/EbuildBuild.py", line 68,
> > in _start_with_metadata
> >     settings.configdict["pkg"]["SRC_URI"], = aux_get_task.future.result()
> >   File "/usr/lib64/python3.5/asyncio/futures.py", line 294, in result
> >     raise self._exception
> > portage.exception.PortageKeyError: 'dev-libs/libuv-1.21.0'
> 
> That looks like bug 639374, it means that the repository was modified while
> emerge was running.

Very possible, thanks for pointing me in the right direction.
Comment 7 Larry the Git Cow gentoo-dev 2019-06-18 14:01:44 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=cf19939ea48b66d7d2e90c69c75e5673de13efe7

commit cf19939ea48b66d7d2e90c69c75e5673de13efe7
Author:     Fabian Groffen <grobian@gentoo.org>
AuthorDate: 2019-06-18 13:57:49 +0000
Commit:     Fabian Groffen <grobian@gentoo.org>
CommitDate: 2019-06-18 14:01:26 +0000

    dev-lang/python: fix asyncio/selectors on Darwin9
    
    Closes: https://bugs.gentoo.org/656830
    Package-Manager: Portage-2.3.67-prefix, Repoman-2.3.14
    Signed-off-by: Fabian Groffen <grobian@gentoo.org>

 dev-lang/python/python-3.6.8.ebuild | 8 ++++++++
 dev-lang/python/python-3.7.2.ebuild | 8 ++++++++
 2 files changed, 16 insertions(+)

Additionally, it has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=b64077d9e52a7cdd8fa2c28d6eb54d3e7db54183

commit b64077d9e52a7cdd8fa2c28d6eb54d3e7db54183
Author:     Fabian Groffen <grobian@gentoo.org>
AuthorDate: 2019-06-18 13:59:07 +0000
Commit:     Fabian Groffen <grobian@gentoo.org>
CommitDate: 2019-06-18 14:01:32 +0000

    sys-apps/portage: drop asyncio kludge for Darwin9, python was fixed
    
    Bug: https://bugs.gentoo.org/656830
    Package-Manager: Portage-2.3.67-prefix, Repoman-2.3.14
    Signed-off-by: Fabian Groffen <grobian@gentoo.org>

 sys-apps/portage/portage-2.3.67.ebuild | 7 -------
 1 file changed, 7 deletions(-)