Simon Marlow wrote:
> >import Control.Concurrent
> >import Control.Exception
> >import Control.Monad
> >import System.IO.Unsafe
> >
> >main :: IO ()
> >main = do
> > -- evaluate lock -- adding this line fixes the problem
> >
> > fin1<- newEmptyMVar
> > fin2<- newEmptyMVar
> >
> > fo
On 12/10/2011 12:24, Bertram Felgenhauer wrote:
Jean-Marie Gaillourdet wrote:
This is my previous program with your workaround, it is also attached as
TypeRepEqLock.hs
[snip]
Compile and execute:
$ ghc-7.0.3 -threaded -rtsopts TypeRepEqLock.hs
$ while true ; do ./TypeRepEqLock +RTS -N ; do
Hi Bertram,
On 12.10.2011, at 13:24, Bertram Felgenhauer wrote:
> This has nothing to do with Data.Typeable though - it appears to be some
> interaction between unsaferPerformIO and MVars that I do not understand.
> The following program occasionally terminates with "thread blocked
> indefinitely
Hi Simon,
On 12.10.2011, at 10:34, Simon Peyton-Jones wrote:
> Did you try 7.2? As I mentioned, the issue should have gone away entirely
> because there is no shared cache any more
Yes, I did test it with GHC 7.2. And yes, with GHC 7.2 typeOf is fine. I
continued to look into that issue bec
Jean-Marie Gaillourdet wrote:
> This is my previous program with your workaround, it is also attached as
> TypeRepEqLock.hs
>
[snip]
> Compile and execute:
>
> $ ghc-7.0.3 -threaded -rtsopts TypeRepEqLock.hs
>
> $ while true ; do ./TypeRepEqLock +RTS -N ; done
> Ok
> Ok
> Ok
> Ok
> Ok
> Ok
> Ok
: wagne...@seas.upenn.edu; Daniel Fischer
Cc: glasgow-haskell-users@haskell.org
Subject: Re: Is this a concurrency bug in base?
Hi,
I've continued my search for a proper workaround. Again, I did find some
unexpected results. See below.
On 09.10.2011, at 17:56, wagne...@seas.upenn.edu
Hi,
I've continued my search for a proper workaround. Again, I did find some
unexpected results. See below.
On 09.10.2011, at 17:56, wagne...@seas.upenn.edu wrote:
> Quoting Jean-Marie Gaillourdet :
>
>> That sounds plausible. Do you see any workaround? Perhaps repeatedly
>> evaluating typeO
On 10/10/2011 09:04, Simon Peyton-Jones wrote:
Thank you for the detailed investigation. I have not followed all the
details of this thread, but I *think* that it may (happily) represent a
bug in generating TypeReps that is already fixed.
·We used to have a global cache from which we generated u
Thank you for the detailed investigation. I have not followed all the details
of this thread, but I think that it may (happily) represent a bug in generating
TypeReps that is already fixed.
· We used to have a global cache from which we generated unique Int
keys corresponding to type
On Sun, Oct 09, 2011 at 03:30:20PM +0200, Jean-Marie Gaillourdet wrote:
Hi Daniel,
On 09.10.2011, at 14:45, Daniel Fischer wrote:
On Sunday 09 October 2011, 13:52:47, Jean-Marie Gaillourdet wrote:
This seems to be a Heisenbug as it is extremely fragile, when adding a
"| grep 1" to the while l
On 09.10.2011, at 18:13, Daniel Fischer wrote:
> On Sunday 09 October 2011, 17:51:06, Jean-Marie Gaillourdet wrote:
>>> That sounds plausible. Do you see any workaround? Perhaps repeatedly
>>> evaluating typeOf?
>>
>> typeOf' seems to be a working workaround:
>>
>> typeOf' val
>>| t1 == t2
On Sunday 09 October 2011, 17:51:06, Jean-Marie Gaillourdet wrote:
> > That sounds plausible. Do you see any workaround? Perhaps repeatedly
> > evaluating typeOf?
>
> typeOf' seems to be a working workaround:
>
> typeOf' val
> | t1 == t2 = t1
> | otherwise = typeOf' val
> where
> t
On 09.10.2011, at 17:56, wagne...@seas.upenn.edu wrote:
> Quoting Jean-Marie Gaillourdet :
>
>> That sounds plausible. Do you see any workaround? Perhaps repeatedly
>> evaluating typeOf?
>
> If there's a concurrency bug, surely the workaround is to protect calls to
> the non-thread-safe funct
Quoting Jean-Marie Gaillourdet :
That sounds plausible. Do you see any workaround? Perhaps repeatedly
evaluating typeOf?
If there's a concurrency bug, surely the workaround is to protect
calls to the non-thread-safe function with a lock.
typeOfWorkaround lock v = do
() <- take
Hi,
On 09.10.2011, at 17:37, Jean-Marie Gaillourdet wrote:
> Hi,
>
> On 09.10.2011, at 17:27, Daniel Fischer wrote:
>
>> That's what I expect.
>> I think what happens is:
>>
>> -- from Data.Typeable
>>
>> cache = unsafePerformIO $ ...
>>
>>
>> mkTyConKey :: String -> Key
>> mkTyConKey str
Hi,
On 09.10.2011, at 17:27, Daniel Fischer wrote:
> Jean-Marie Gaillourdet:
>> the Eq instance of TypeRep shows the same non-deterministic behavior:
>
> Of course, equality on TypeReps is implemented by comparison of the Keys.
>
> On Sunday 09 October 2011, 16:40:13, Jean-Marie Gaillourdet wro
Jean-Marie Gaillourdet:
> the Eq instance of TypeRep shows the same non-deterministic behavior:
Of course, equality on TypeReps is implemented by comparison of the Keys.
On Sunday 09 October 2011, 16:40:13, Jean-Marie Gaillourdet wrote:
> Hi Daniel,
> I've been chasing the source of the non-dete
On 09.10.2011, at 16:40, Jean-Marie Gaillourdet wrote:
> I will report a bug.
http://hackage.haskell.org/trac/ghc/attachment/ticket/5540/
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/
Hi Daniel,
On 09.10.2011, at 16:24, Daniel Fischer wrote:
> On Sunday 09 October 2011, 15:30:20, Jean-Marie Gaillourdet wrote:
>> Hi Daniel,
>>
>> On 09.10.2011, at 14:45, Daniel Fischer wrote:
>>> On Sunday 09 October 2011, 13:52:47, Jean-Marie Gaillourdet wrote:
This seems to be a Heise
Hi,
the Eq instance of TypeRep shows the same non-deterministic behavior:
import Control.Concurrent
import Control.Exception
import Control.Monad
import Data.Typeable
main :: IO ()
main =
do { fin1 <- newEmptyMVar
; fin2 <- newEmptyMVar
; forkIO $ return (typeOf ()) >>= evaluate >>= pu
On Sunday 09 October 2011, 15:30:20, Jean-Marie Gaillourdet wrote:
> Hi Daniel,
>
> On 09.10.2011, at 14:45, Daniel Fischer wrote:
> > On Sunday 09 October 2011, 13:52:47, Jean-Marie Gaillourdet wrote:
> >> This seems to be a Heisenbug as it is extremely fragile, when adding
> >> a "| grep 1" to t
Hi Daniel,
On 09.10.2011, at 14:45, Daniel Fischer wrote:
> On Sunday 09 October 2011, 13:52:47, Jean-Marie Gaillourdet wrote:
>> This seems to be a Heisenbug as it is extremely fragile, when adding a
>> "| grep 1" to the while loop it seems to disappears. At least on my
>> computers.
>
> Still
On Sunday 09 October 2011, 13:52:47, Jean-Marie Gaillourdet wrote:
> This seems to be a Heisenbug as it is extremely fragile, when adding a
> "| grep 1" to the while loop it seems to disappears. At least on my
> computers.
Still produces 1s here with a grep.
>
> All this was done on several Mac
23 matches
Mail list logo