Ticket #467 (closed defect: fixed)
ctrl+c hangs paludis
| Reported by: | peper | Owned by: | ciaranm |
|---|---|---|---|
| Priority: | MinorRelease | Milestone: | |
| Component: | core/paludis | Version: | 0.26.0_alpha5 |
| Keywords: | Cc: | tais.hansen@… | |
| Blocked By: | Blocking: | 445 | |
| Distribution: |
Description
Attachments
Change History
comment:2 Changed 5 years ago by ferdy
Also, a first look at the code shows that there is a VERY small window where signal_handler would try to Lock the same lock (tasks_mutex) that the main paludis thread has already locked. Thus leading to a deadlock.
Now, once you see it hung, attach gdb to it and post backtraces of every thread.
- ferdy
comment:3 Changed 5 years ago by ciaranm
I think it's the new run_command handler that's screwing things up... We did have a very small window, in that I stopped noticing it ever locking up, up until a few days ago.
comment:4 Changed 5 years ago by ciaranm
This consistently hangs for me:
nice sudo paludis -i1 hilite & sleep 3 ; sudo killall paludis ; fg
Can't figure out what it is. It's related to the new run_command handler, but not the way I thought. This doesn't help:
diff --git a/paludis/util/system.cc b/paludis/util/system.cc
index 00befb2..cf17b0f 100644
--- a/paludis/util/system.cc
+++ b/paludis/util/system.cc
@@ -529,6 +529,14 @@ paludis::run_command(const Command & cmd)
throw RunCommandError("select failed: " + stringify(strerror(errno)));
else if (0 == retval)
{
+ int status(-1);
+ if (0 != waitpid(child, &status, WNOHANG))
+ {
+ Log::get_instance()->message(ll_warning, lc_no_context) << "Child process " << child <<
+ " appears to have exited abnormally with exit status " << status;
+ return (WIFSIGNALED(status) ? WTERMSIG(status) + 128 : WEXITSTATUS(status));
+
+ }
Log::get_instance()->message(ll_debug, lc_context) << "Waiting for child " << child << " to finish";
continue;
}
comment:5 Changed 5 years ago by ciaranm
- Status changed from new to closed
- Resolution set to fixed
r4294. Unix sucks.
comment:6 Changed 5 years ago by Mellen
- Cc tais.hansen@… added
- Status changed from closed to reopened
- Resolution fixed deleted
I've attached a backtrace of paludis-0.26.0_alpha9 hanging on ctrl-c while calculating dependencies on "sudo paludis --install --pretend --compact everything".
Changed 5 years ago by Mellen
-
attachment
gdb-paludis.log
added
Updated backtrace as ciaranm requested on irc.

Provide more info. Does it hang ALWAYS? Or do you have to press ctrl+c twice to make it hang?