
#9239: Program loops in syscall retries cancelled by rt_sigreturn signal
--------------------------+------------------------------------------------
Reporter: k-bx | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: | Version: 7.8.2
Compiler | Operating System: Unknown/Multiple
Keywords: | Type of failure: Incorrect result at runtime
Architecture: | Test Case:
Unknown/Multiple | Blocking:
Difficulty: |
Unknown |
Blocked By: |
Related Tickets: |
--------------------------+------------------------------------------------
Sorry if this bug is not related to ghc, but it seems to me that it might
be.
Originally I reported it against hedis package, you can find description
in it's bug tracker https://github.com/informatikr/hedis/issues/15
Short recap: one specific operation against redis database
(zrangebyscoreLimit against big ZSET), program behaves differently. For
me, most of the time it would hang, sometimes it succeeds, sometimes
outputs "ConnectionLost" twice and dies. My environments are: Ubuntu
12.04/14.04, redis versions tested are 2.2 through 2.8 (latest in each
even branch).
Under GHC 7.6 and profiling enabled, strace would end up showing an
infinite loop of these operations:
{{{
--- SIGVTALRM {si_signo=SIGVTALRM, si_code=SI_TIMER, si_pid=0, si_uid=0,
si_value=0} ---
rt_sigreturn() = -1 EINTR (Interrupted system call)
select(4, [3], [], NULL, NULL) = ? ERESTARTNOHAND (To be restarted if no
handler)
}}}
Under 7.8.2 profiling enabled, it would also loop, but in few seconds it
would hang, produring these last lines of output (plus result of Ctrl+C):
{{{
select(4, [3], [], NULL, NULL) = ? ERESTARTNOHAND (To be
restarted if no handler)
--- SIGVTALRM {si_signo=SIGVTALRM, si_code=SI_TIMER, si_pid=0, si_uid=0,
si_value=0} ---
timer_settime(0, 0, {it_interval={0, 0}, it_value={0, 0}}, NULL) = 0
rt_sigreturn() = -1 EINTR (Interrupted system
call)
select(4, [3], [], NULL, NULL^CProcess 16483 detached