[
https://issues.apache.org/jira/browse/DISPATCH-478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15431408#comment-15431408
]
ASF subversion and git services commented on DISPATCH-478:
----------------------------------------------------------
Commit ae1223b2a16b592750fd36aae4b645097e14c390 in qpid-dispatch's branch
refs/heads/master from [~lulf]
[ https://git-wip-us.apache.org/repos/asf?p=qpid-dispatch.git;h=ae1223b ]
DISPATCH-478 Ensure that only 1 signal handler runs at a time
> Dispatch hung in shutdown due to multiple concurrent signal handlers
> --------------------------------------------------------------------
>
> Key: DISPATCH-478
> URL: https://issues.apache.org/jira/browse/DISPATCH-478
> Project: Qpid Dispatch
> Issue Type: Bug
> Reporter: Ulf Lilleengen
> Priority: Minor
>
> When I ran qdrouterd with perf and pressed Ctrl+C, perf would send SIGTERM as
> well as SIGINT right after each other to the router.
> Scenario:
> The first thread would pick up and handle the first signal in
> handle_signals_LH(). However, within the function, it unlocks the
> qd_server->lock before calling the registered handler.
> When it unlocks this lock, some other thread will pick up the second signal
> and jump into the qd_server_pause() code, where it will wait indefinitely for
> threads to pause (I saw this in GDB, where 1 thread was 'missing', and all
> others marked as canceled). The original handler will have canceled the
> thread trying to pause all others, but it is not able to jump out.
> Patch: https://github.com/apache/qpid-dispatch/pull/95
> This patch ensures that only 1 signal handler can run at a time, which fixes
> the issue for me. Note that it will still potentially mask signals while
> handling a signal, but the current set of signals (SIGHUP, SIGQUIT, SIGINT,
> SIGTERM) either shutdown the router or do nothing.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]