You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The bug is found in DemoTransport.hs, which will hang when trying to "killThread"
(Pipes backend only, demo3 and demo4). Yet this hang happens ONLY under GHC
7.0.4 and 7.2.1. Under GHC 6.12.3 and GHC 7.4.1 it works fine!
At first I thought this may be an issue with non-allocating threads not
being preempted by the runtime system (and therefore not servicing the
ThreadKilled asynchronous exception). But it's hard to explain that
pattern of outcomes on different GHC versions.
You can use the following bash script inside the examples directory to build all four versions of this and compare them for yourself.
#!/bin/bash
set -e
function go() {
VER=$1
make clean
GHC=ghc-$1 make DemoTransport.exe
mv -f DemoTransport.exe DemoTransport_$VER.exe
}
go 6.12.3
go 7.0.4
go 7.2.1
go 7.4.1
Might have been a bug in the asynchronous-exception handling code in the RTS. e.g. this commit might be the fix:
commit fa71e6c795489ec267e0d048395c2c52bea6a164
Author: Simon Marlow marlowsd@gmail.com
Date: Wed Aug 31 22:45:01 2011 +0100
Fix #4988: we were wrongly running exception handlers in the
maskUninterruptible state instead of ordinary mask, due to a
misinterpretation of the way the TSO_INTERRUPTIBLE flag works.
Remarkably this must have been broken for quite some time. Indeed we
even had a test that demonstrated the wrong behaviour (conc015a) but
presumably I didn't look hard enough at the output to notice that it
was wrong.
The bug is found in DemoTransport.hs, which will hang when trying to "killThread"
(Pipes backend only, demo3 and demo4). Yet this hang happens ONLY under GHC
7.0.4 and 7.2.1. Under GHC 6.12.3 and GHC 7.4.1 it works fine!
At first I thought this may be an issue with non-allocating threads not
being preempted by the runtime system (and therefore not servicing the
ThreadKilled asynchronous exception). But it's hard to explain that
pattern of outcomes on different GHC versions.
See commit: 48e257a
The text was updated successfully, but these errors were encountered: