Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#1156 closed bug (duplicate)

usleep hangs indefinitely when using -threaded

Reported by: Eelis Owned by:
Priority: normal Milestone: 6.8.1
Component: Runtime System Version: 6.6
Keywords: usleep threaded unistd Cc:
Operating System: Linux Architecture: x86_64 (amd64)
Type of failure: Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

Consider the following two-line program.

  import System.Posix.Unistd
  main = usleep 1000000

When compiled without -threaded, the program nicely sleeps for one second, as expected. When compiled with -threaded, however, the program simply hangs.

Change History (3)

comment:1 Changed 7 years ago by igloo

  • Milestone set to 6.6.2

We're getting EINTR mid-sleep and throwErrnoIfMinus1Retry_ is ultimately causing us to sleep (for the full length) again.

comment:2 Changed 7 years ago by Eelis

  • Component changed from Compiler to Runtime System
  • Resolution set to duplicate
  • Status changed from new to closed

This problem is actually one of the listed symptoms of the problem described in ticket #850 (which I personally feel deserves a higher priority than "low", considering that it renders perfectly ordinary system functions utterly unusable in the threaded RTS).

comment:3 Changed 6 years ago by simonmar

  • Milestone changed from 6.6.2 to 6.8.1
Note: See TracTickets for help on using tickets.