Opened 11 years ago

Closed 11 years ago

Last modified 10 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: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


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 11 years ago by igloo

Milestone: 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 11 years ago by Eelis

Component: CompilerRuntime System
Resolution: duplicate
Status: newclosed

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 10 years ago by simonmar

Note: See TracTickets for help on using tickets.