Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 658126 - sys-apps/portage: AbstractEbuildProcess calls _unexpected_exit when child is killed by SIGINT
Summary: sys-apps/portage: AbstractEbuildProcess calls _unexpected_exit when child is ...
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Ebuild Support (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-14 19:10 UTC by Zac Medico
Modified: 2018-06-29 09:02 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-14 19:10:16 UTC
When the child process has been killed by SIGINT, AbstractEbuildProcess can detect this and avoid reporting an unexpected exit in this case.
Comment 1 Zac Medico gentoo-dev 2018-06-14 19:33:44 UTC
Actually the code already checks if the child was killed by a signal here:

> 	if self.returncode < 0:
> 		if not self.cancelled:
> 			self._killed_by_signal(-self.returncode)

So, maybe sandbox it hiding the signal, since relevant output looks like this:

> ^Csandbox:stop  caught signal 2 in pid 16582
>  * The ebuild phase 'prepare' has exited unexpectedly. This type of
>  * behavior is known to be triggered by things such as failed variable
>  * assignments (bug #190128) or bad substitution errors (bug #200313).
>  * Normally, before exiting, bash should have displayed an error message
>  * above. If bash did not produce an error message above, it's possible
>  * that the ebuild has called `exit` when it should have called `die`
>  * instead. This behavior may also be triggered by a corrupt bash binary or
>  * a hardware problem such as memory or cpu malfunction. If the problem is
>  * not reproducible or it appears to occur randomly, then it is likely to
>  * be triggered by a hardware problem. If you suspect a hardware problem
>  * then you should try some basic hardware diagnostics such as memtest.
>  * Please do not report this as a bug unless it is consistently
>  * reproducible and you are sure that your bash binary and hardware are
>  * functioning properly.
Comment 2 Zac Medico gentoo-dev 2018-06-29 09:02:45 UTC
The signal is intended to pass through sandbox, since this commit:

https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=c119fe8e393540224c803ab5036ddb80b800716c