Summary: | sys-apps/portage-2.2.0_alpha4: traceback when hitting ctrl-c during fetch | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Davide Pesavento (RETIRED) <pesa> |
Component: | Core | Assignee: | Portage team <dev-portage> |
Status: | RESOLVED FIXED | ||
Severity: | minor | CC: | esigra |
Priority: | High | Keywords: | InVCS, REGRESSION |
Version: | 2.2 | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 346909 |
Description
Davide Pesavento (RETIRED)
2010-11-13 13:32:45 UTC
It seems that the traceback is occurring in the forked subprocess of the EbuildFetcher class. Normally, it calls os._exit(), and thereby bypasses the _main_loop_cleanup() code which is in a finally block. However, when it receives SIGTERM from the controlling terminal, the finally block gets triggered. In this case, the file descriptor is closed since EbuildFetcher closes all unneeded file descriptors after it forks the subprocess. These commits should fix it: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=475b2c19abf9911c7d104ac9b40e366fccafd7a3 http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=f456171f1fee81734b5e214488c8b86bec842d1a This is in 2.2.0_alpha5, but this bug is also in 2.1.9.24, so I'll leave this bug open until it's in an unmasked release. This is fixed in 2.1.9.25. The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=419cce79f9082308c848df0a98f367de4d1c50a3 commit 419cce79f9082308c848df0a98f367de4d1c50a3 Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2024-02-11 21:58:10 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2024-02-12 07:56:10 +0000 process._exec: Use _start_fork for os.fork() error handling Use _start_fork for os.fork() error handling, ensuring that if exec fails then the child process will display a traceback before it exits via os._exit to suppress any finally blocks from parent's call stack (bug 345289). Bug: https://bugs.gentoo.org/345289 Bug: https://bugs.gentoo.org/916566 Bug: https://bugs.gentoo.org/924313 Signed-off-by: Zac Medico <zmedico@gentoo.org> lib/portage/process.py | 259 ++++++++++++++++++++++++++++--------------------- 1 file changed, 151 insertions(+), 108 deletions(-) |