Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 390257 - Race condition in emerge when aborting
Summary: Race condition in emerge when aborting
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-12 13:52 UTC by Richard
Modified: 2011-11-12 15:57 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 Richard 2011-11-12 13:52:04 UTC
There appears to be a race condition in emerge --depclean where if you press Ctrl+C very early, it will not exit and all attempts to kill the process via Ctrl+C or even "killall emerge" will be ignored:

# emerge --depclean
^C

Exiting on signal 2
Exception SystemExit: 130 in <function remove at 0x7f4f01c1cf50> ignored
^[[A ^C
 * Depclean may break link level dependencies. Thus, it is
 * recommended to use a tool such as `revdep-rebuild` (from
 * app-portage/gentoolkit) in order to detect such breakage.
 * 
 * Always study the list of packages to be cleaned for any obvious
 * mistakes. Packages that are part of the world set will always
 * be kept.  They can be manually added to this set with
 * `emerge --noreplace <atom>`.  Packages that are listed in
 * package.provided (see portage(5)) will be removed by
 * depclean, even if they are part of the world set.
 * 
 * As a safety measure, depclean will not remove any packages
 * unless *all* required dependencies have been resolved.  As a
 * consequence, it is often necessary to run `emerge --update
 * --newuse --deep @world` prior to depclean.

Calculating dependencies   - \ - /^C -^C -^C |^C \^C /^C /^C - \ / - /^[ - /^C \ |^C /^C^C^C^C^C^C | /                                                                                                                                                                        \ - \ | | -... done!
>>> Calculating removal order...

I found this when I realized that I had forgotten to append "--ask" as I pressed the enter key.
Comment 1 Michael Weber (RETIRED) gentoo-dev 2011-11-12 14:16:33 UTC
unreleated general hint: use Ctrl-Z (SIGSTOP) esp. in script situations.
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2011-11-12 15:27:34 UTC
This doesn't just happen with depclean.
Comment 3 Zac Medico gentoo-dev 2011-11-12 15:57:31 UTC
I've seen that before. It seems like the python runtime is suppressing our SystemExit exception somewhere, because we don't have any code in portage that suppresses SystemExit.