Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 657436 - sys-apps/portage-2.3.40: Ctrl-C triggers unhandled CancelledError
Summary: sys-apps/portage-2.3.40: Ctrl-C triggers unhandled CancelledError
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: REGRESSION
Depends on:
Blocks: 651804
  Show dependency tree
 
Reported: 2018-06-06 00:25 UTC by Zac Medico
Modified: 2018-06-06 16:33 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 Zac Medico gentoo-dev 2018-06-06 00:25:06 UTC
> >>> Emerging (14 of 543) sys-apps/findutils-4.6.0-r1::gentoo
> >>> Jobs: 0 of 543 complete, 9 running              Load avg: 8.76, 6.02, 3.15^C
> Exiting on signal 2
> !!! EbuildIpcDaemon failed to send reply: [Errno 6] No such device or address: b'/var/tmp/portage/app-shells/gentoo-bashcomp-20180302/.ipc_out'
> !!! EbuildIpcDaemon failed to send reply: [Errno 6] No such device or address: b'/var/tmp/portage/app-misc/editor-wrapper-4/.ipc_out'
> !!! EbuildIpcDaemon failed to send reply: [Errno 6] No such device or address: b'/var/tmp/portage/app-misc/c_rehash-1.7-r1/.ipc_out'
> !!! EbuildIpcDaemon failed to send reply: [Errno 6] No such device or address: b'/var/tmp/portage/app-misc/mime-types-9/.ipc_out'
> !!! EbuildIpcDaemon failed to send reply: [Errno 6] No such device or address: b'/var/tmp/portage/sys-devel/make-4.2.1/.ipc_out'
> Exception in callback AsynchronousTask.wait()
> handle: <Handle AsynchronousTask.wait()>
> Traceback (most recent call last):
>   File "/usr/lib64/python3.4/asyncio/events.py", line 125, in _run
>     self._callback(*self._args)
>   File "/usr/lib64/python3.4/site-packages/_emerge/AsynchronousTask.py", line 84, in wait
>     self._wait_hook()
>   File "/usr/lib64/python3.4/site-packages/_emerge/AsynchronousTask.py", line 195, in _wait_hook
>     self._exit_listener_stack.pop()(self)
>   File "/usr/lib64/python3.4/site-packages/_emerge/EbuildBuild.py", line 227, in _start_fetch
>     already_fetched = already_fetched_task.future.result()
>   File "/usr/lib64/python3.4/asyncio/futures.py", line 266, in result
>     raise CancelledError
> concurrent.futures._base.CancelledError
> Exception in callback AsynchronousTask.wait()
> handle: <Handle AsynchronousTask.wait()>
> Traceback (most recent call last):
>   File "/usr/lib64/python3.4/asyncio/events.py", line 125, in _run
>     self._callback(*self._args)
>   File "/usr/lib64/python3.4/site-packages/_emerge/AsynchronousTask.py", line 84, in wait
>     self._wait_hook()
>   File "/usr/lib64/python3.4/site-packages/_emerge/AsynchronousTask.py", line 195, in _wait_hook
>     self._exit_listener_stack.pop()(self)
>   File "/usr/lib64/python3.4/site-packages/_emerge/EbuildFetcher.py", line 51, in _start_fetch
>     uri_map = uri_map_task.future.result()
>   File "/usr/lib64/python3.4/asyncio/futures.py", line 266, in result
>     raise CancelledError
> concurrent.futures._base.CancelledError
> !!! EbuildIpcDaemon failed to send reply: [Errno 6] No such device or address: b'/var/tmp/portage/sys-apps/debianutils-4.8.3/.ipc_out'
> !!! EbuildIpcDaemon failed to send reply: [Errno 6] No such device or address: b'/var/tmp/portage/net-libs/libmnl-1.0.4/.ipc_out'
> !!! EbuildIpcDaemon failed to send reply: [Errno 6] No such device or address: b'/var/tmp/portage/app-misc/editor-wrapper-4/.ipc_out'
>
Comment 1 Larry the Git Cow gentoo-dev 2018-06-06 02:22:39 UTC
The bug has been referenced in the following commit(s):

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

commit 937d0156aa060bdba9095313dedbb62e0a993aea
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2018-06-06 01:52:59 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2018-06-06 02:09:55 +0000

    CompositeTask: handle SIGINT/TERM cancelled futures (bug 657436)
    
    In order to avoid raising an unwanted CancelledError, make
    CompositeTask check for cancelled futures before attempting
    to call future.result(). The intention is only to handle
    failures triggered by SIGINT/TERM, since other types of
    expected failures should always be handled by catching the
    exception raised from future.result().
    
    Bug: https://bugs.gentoo.org/657436

 pym/_emerge/Binpkg.py                     | 10 +++++++++-
 pym/_emerge/BinpkgFetcher.py              |  8 ++++++++
 pym/_emerge/CompositeTask.py              |  1 +
 pym/_emerge/EbuildBuild.py                | 16 ++++++++++++++++
 pym/_emerge/EbuildFetcher.py              | 12 ++++++++++++
 pym/_emerge/EbuildPhase.py                |  4 ++++
 pym/_emerge/PackageUninstall.py           |  8 ++++++++
 pym/portage/_emirrordist/FetchIterator.py | 10 ++++++++++
 8 files changed, 68 insertions(+), 1 deletion(-)
Comment 2 Larry the Git Cow gentoo-dev 2018-06-06 03:22:53 UTC
The bug has been referenced in the following commit(s):

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

commit 9e07f3a45c1b321edd07530b278498cb09f8983c
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2018-06-06 03:14:41 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2018-06-06 03:21:38 +0000

    _unlock_builddir_exit: fix cancel/returncode interaction
    
    When the _unlock_builddir_exit returncode parameter has not been
    specified, do not attempt to cancel the current task, since the
    task has already completed. This mirrors logic added to the
    Binpkg _unlock_builddir_exit method in the previous commit.
    
    Fixes: 937d0156aa06 ("CompositeTask: handle SIGINT/TERM cancelled futures (bug 657436)")
    Bug: https://bugs.gentoo.org/657436

 pym/_emerge/AbstractEbuildProcess.py | 8 ++++++--
 pym/_emerge/EbuildBuild.py           | 4 ++--
 pym/_emerge/PackageUninstall.py      | 4 ++--
 3 files changed, 10 insertions(+), 6 deletions(-)
Comment 3 Larry the Git Cow gentoo-dev 2018-06-06 04:32:57 UTC
The bug has been referenced in the following commit(s):

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

commit 1fc628eead43fa5da4b142479aa004ded8acceab
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2018-06-06 04:26:40 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2018-06-06 04:26:40 +0000

    AbstractEbuildProcess: handle SIGINT during dir lock (bug 657436)
    
    When the build dir lock is interrupted by SIGINT/TERM, avoid raising
    an unwanted CancelledError.
    
    Bug: https://bugs.gentoo.org/657436

 pym/_emerge/AbstractEbuildProcess.py | 7 +++++++
 1 file changed, 7 insertions(+)
Comment 4 Larry the Git Cow gentoo-dev 2018-06-06 05:19:40 UTC
The bug has been closed via the following commit(s):

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

commit 252ca4b3c1000a23f3c32b01725b5b3c7da5e7d4
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2018-06-06 03:53:30 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2018-06-06 05:19:33 +0000

    sys-apps/portage: fix Ctrl-C CancelledError regression (bug 657436)
    
    Fix an annoying regression involving a CancelledError exception raised
    during Ctrl-C interrupt handling. Also include the small patch for
    bug 657420. Remove the sed call that applied commit d07a47ff3c06 for
    bug 656942, and apply the fix using a patch instead.
    
    See: https://gitweb.gentoo.org/proj/portage.git/commit/?id=937d0156aa060bdba9095313dedbb62e0a993aea
    See: https://gitweb.gentoo.org/proj/portage.git/commit/?id=9e07f3a45c1b321edd07530b278498cb09f8983c
    See: https://gitweb.gentoo.org/proj/portage.git/commit/?id=1fc628eead43fa5da4b142479aa004ded8acceab
    Closes: https://bugs.gentoo.org/657436
    See: https://gitweb.gentoo.org/proj/portage.git/commit/?id=e8067a8e6fbdaccca5915e66c77518e82b090401
    Closes: https://bugs.gentoo.org/657420
    Package-Manager: Portage-2.3.40, Repoman-2.3.9

 sys-apps/portage/Manifest              |  3 ++-
 sys-apps/portage/portage-2.3.40.ebuild | 10 ++++------
 2 files changed, 6 insertions(+), 7 deletions(-)
Comment 5 Larry the Git Cow gentoo-dev 2018-06-06 16:33:23 UTC
The bug has been closed via the following commit(s):

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

commit cfe44e894ae844ab8768dfd5584506750d0be297
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2018-06-06 16:26:12 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2018-06-06 16:27:21 +0000

    sys-apps/portage: 2.3.40-r1 revbump for regression fixes
    
    Fixes: https://bugs.gentoo.org/656610
    Fixes: https://bugs.gentoo.org/656750
    Fixes: https://bugs.gentoo.org/656942
    Fixes: https://bugs.gentoo.org/657360
    Fixes: https://bugs.gentoo.org/657420
    Fixes: https://bugs.gentoo.org/657436
    Package-Manager: Portage-2.3.40, Repoman-2.3.9

 sys-apps/portage/{portage-2.3.40.ebuild => portage-2.3.40-r1.ebuild} | 0
 1 file changed, 0 insertions(+), 0 deletions(-)