Ticket #7528 (closed bug: duplicate)

Opened 5 months ago

Last modified 5 months ago

Non terminating thunk resolution blocks world, even in the case of forkOS

Reported by: timthelion Owned by:
Priority: normal Milestone:
Component: Runtime System Version: 7.4.2
Keywords: forkOS Concurrent thunk Cc: shumovichy@…
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Incorrect result at runtime Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

Please see:  http://comments.gmane.org/gmane.comp.lang.haskell.cafe/102479

{-# LANGUAGE ScopedTypeVariables? #-} import Control.Concurrent

main = do putStrLn "Hello" forkOS neverEnds putStrLn "Bye bye" --We never get here(or at least I don't).

neverEnds = do let (a::String) = a putStrLn a

Attachments

mvarlock1.lhs Download (209 bytes) - added by timthelion 5 months ago.
Properly formated version of post.

Change History

Changed 5 months ago by timthelion

Properly formated version of post.

Changed 5 months ago by cdupont

I reproduced the bug in 7.4.1 compiled with ghc -threaded. However, runnning "main" in ghci doesn't show the bug (it finishes correctly).

Changed 5 months ago by Yuras

  • cc shumovichy@… added
  • architecture changed from x86_64 (amd64) to Unknown/Multiple

Seems to be a duplicate of #367: you have a loop without allocations and the scheduler doesn't have chance to reschedule the thread.

I can reproduce it with the HEAD with "-O0". With "-O1" it works ok for me. It works with "-O0 -fno-omit-yields" too.

Changed 5 months ago by igloo

  • status changed from new to closed
  • difficulty set to Unknown
  • resolution set to duplicate

Agreed, duplicate of #367.

Note: See TracTickets for help on using tickets.