Ticket #6019 (closed bug: fixed)

Opened 13 months ago

Last modified 7 months ago

'threadDelay maxBound' results in 'internal error: select failed'

Reported by: shahn Owned by: simonmar
Priority: normal Milestone: 7.6.2
Component: Runtime System Version: 7.4.1
Keywords: Cc:
Operating System: Linux Architecture: x86_64 (amd64)
Type of failure: Runtime crash Difficulty: Unknown
Test Case: rts/7087 Blocked By:
Blocking: Related Tickets:

Description

When compiling and running this program:

import Control.Concurrent

main = threadDelay maxBound

, I get a crash and the following error message:

select: Invalid argument
threadDelayMaxBound: internal error: select failed
    (GHC version 7.4.1 for x86_64_unknown_linux)
    Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

. This doesn't happen in ghci. I compiled with 'ghc FILE.hs'.

Change History

Changed 13 months ago by pcapriotti

  • status changed from new to closed
  • difficulty set to Unknown
  • resolution set to fixed
  • milestone set to 7.6.1

Thanks for the report. Cannot reproduce on the HEAD. I presume it's fixed by the recent threadDelay changes in the non-threaded RTS (9d26519c20194abc3832578a55fbe31327519eeb).

Changed 10 months ago by simonmar

  • status changed from closed to new
  • resolution fixed deleted

No, it started working as a side-effect of

commit 5ba7db93fb634ff8094f42780a14972322446a94

Author: Paolo Capriotti <p.capriotti@gmail.com>
Date:   Tue Mar 20 11:57:28 2012 +0000

    Use monotonic clock in Select.c (#5865)

but the bug still exists. I have a fix on the way...

Changed 10 months ago by simonmar

  • owner set to simonmar

Changed 10 months ago by simonmar

  • status changed from new to closed
  • testcase set to rts/7087
  • resolution set to fixed

Fixed:

commit 598ee1ad1b8de089a2ed207543761d617a90db52

Author: Simon Marlow <marlowsd@gmail.com>
Date:   Tue Jul 31 09:06:43 2012 +0100

    Fix #7087 (integer overflow in getDelayTarget())

 includes/Rts.h     |    2 ++
 rts/posix/Select.c |   15 ++++++++++++---
 2 files changed, 14 insertions(+), 3 deletions(-)

Changed 7 months ago by simonmar

  • status changed from closed to merge
  • milestone changed from 7.6.1 to 7.6.2

We should have merged this one; see #7325

Changed 7 months ago by pcapriotti

  • status changed from merge to closed

Merged as 306ab5509fceb5ccaf62222f94fe18b92ae6b476.

Note: See TracTickets for help on using tickets.