if i hit CTRL+Z at the right time, i can sometimes break portage. this shows up more often on slow systems as the critical section lasts longer. example: File "/usr/lib/portage/pym/portage/util/_async/ForkProcess.py", line 45, in _spawn rval = self._run() File "/usr/lib/portage/pym/_emerge/EbuildFetcher.py", line 172, in _run allow_missing_digests=allow_missing): File "/usr/lib/portage/pym/portage/package/ebuild/fetch.py", line 993, in fetch myret = _spawn_fetch(mysettings, myfetch) File "/usr/lib/portage/pym/portage/package/ebuild/fetch.py", line 97, in _spawn_fetch rval = spawn_func(args, env=settings.environ(), **kwargs) File "/usr/lib/portage/pym/portage/process.py", line 362, in spawn retval = os.waitpid(pid, 0)[1] File "/usr/lib/portage/pym/portage/__init__.py", line 259, in __call__ rval = self._func(*wrapped_args, **wrapped_kwargs) (looks like i chopped the log last time, but iirc, it was EINTR)
we're hitting this in CrOS too now, but i think we'll have a fix we can post to the list soonish. looks like we're missing signal.siginterrupt handling with the SIGCONT handler.
Since portage 2.2.15, we have a waitpid wrapper that handles this (see bug 525552): https://github.com/gentoo/portage/commit/7c70eea2f607baffcbb9d465c03578d69b09decf *** This bug has been marked as a duplicate of bug 525552 ***