Ticket #1156 (closed bug: duplicate)

Opened 6 years ago

Last modified 6 years ago

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

Changed 6 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.

Changed 6 years ago by Eelis

  • status changed from new to closed
  • resolution set to duplicate
  • component changed from Compiler to Runtime System

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).

Changed 6 years ago by simonmar

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