GHC issueshttps://gitlab.haskell.org/ghc/ghc/-/issues2019-07-07T18:43:53Zhttps://gitlab.haskell.org/ghc/ghc/-/issues/8702floor, ceiling, truncate and so on… on NaN fail2019-07-07T18:43:53Zphaazonfloor, ceiling, truncate and so on… on NaN failThose functions returns a total random value when given NaN. This is not an acceptable behavior I guess, and we might inquire on what to do.
For instance:
```
let nan = 0 / 0 in floor nan
```
result:
```
-2696539702293473861593957786...Those functions returns a total random value when given NaN. This is not an acceptable behavior I guess, and we might inquire on what to do.
For instance:
```
let nan = 0 / 0 in floor nan
```
result:
```
-269653970229347386159395778618353710042696546841345985910145121736599013708251444699062715983611304031680170819807090036488184653221624933739271145959211186566651840137298227914453329401869141179179624428127508653257226023513694322210869665811240855745025766026879447359920868907719574457253034494436336205824
```
Maybe an arithmetic exception would be a better behavior?
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 7.4.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | high |
| Resolution | Unresolved |
| Component | libraries/base |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"floor, ceiling, truncate and so on… on NaN fail","status":"New","operating_system":"","component":"libraries/base","related":[],"milestone":"⊥","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"7.4.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"Those functions returns a total random value when given NaN. This is not an acceptable behavior I guess, and we might inquire on what to do.\r\n\r\nFor instance:\r\n\r\n\r\n{{{\r\nlet nan = 0 / 0 in floor nan\r\n}}}\r\n\r\nresult:\r\n\r\n{{{\r\n-269653970229347386159395778618353710042696546841345985910145121736599013708251444699062715983611304031680170819807090036488184653221624933739271145959211186566651840137298227914453329401869141179179624428127508653257226023513694322210869665811240855745025766026879447359920868907719574457253034494436336205824\r\n}}}\r\n\r\nMaybe an arithmetic exception would be a better behavior?","type_of_failure":"OtherFailure","blocking":[]} -->⊥https://gitlab.haskell.org/ghc/ghc/-/issues/8695Arithmetic overflow from (minBound :: Int) `quot` (-1)2024-03-17T18:32:24ZrleslieArithmetic overflow from (minBound :: Int) `quot` (-1)According to the documentation for Data.Int, “All arithmetic is performed modulo 2!\^n, where n is the number of bits in the type.”
However, this promise is broken by the following exception:
```
Prelude> (minBound :: Int) `quot` (-1)
...According to the documentation for Data.Int, “All arithmetic is performed modulo 2!\^n, where n is the number of bits in the type.”
However, this promise is broken by the following exception:
```
Prelude> (minBound :: Int) `quot` (-1)
*** Exception: arithmetic overflow
```
(This also occurs with Int8, Int16, Int32, and Int64, and likewise for `div`.)
If all arithmetic is performed modulo 2!\^n, I would rather expect the above to evaluate to `minBound`, since after all `minBound * (-1) == minBound`. The fact that an exception is raised adds an unnecessary burden in pure code to ensure `quot` (or `div`) is never called with these specific arguments.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------------------ |
| Version | 7.6.3 |
| Type | Bug |
| TypeOfFailure | IncorrectResultAtRuntime |
| Priority | normal |
| Resolution | Unresolved |
| Component | libraries/haskell2010 |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Arithmetic overflow from (minBound :: Int) `quot` (-1)","status":"New","operating_system":"","component":"libraries/haskell2010","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"7.6.3","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"According to the documentation for Data.Int, “All arithmetic is performed modulo 2!^n, where n is the number of bits in the type.”\r\n\r\nHowever, this promise is broken by the following exception:\r\n\r\n{{{\r\nPrelude> (minBound :: Int) `quot` (-1)\r\n*** Exception: arithmetic overflow\r\n}}}\r\n\r\n(This also occurs with Int8, Int16, Int32, and Int64, and likewise for `div`.)\r\n\r\nIf all arithmetic is performed modulo 2!^n, I would rather expect the above to evaluate to `minBound`, since after all `minBound * (-1) == minBound`. The fact that an exception is raised adds an unnecessary burden in pure code to ensure `quot` (or `div`) is never called with these specific arguments.","type_of_failure":"IncorrectResultAtRuntime","blocking":[]} -->8.0.1https://gitlab.haskell.org/ghc/ghc/-/issues/8669Closed TypeFamilies regression2019-07-07T18:44:01ZMerijn VerstraatenClosed TypeFamilies regressionI first played around with closed typefamilies early 2013 and wrote up the following simple example
```
{-# LANGUAGE ConstraintKinds, DataKinds, PolyKinds, TypeFamilies, TypeOperators #-}
import GHC.Prim (Constraint)
type family Res...I first played around with closed typefamilies early 2013 and wrote up the following simple example
```
{-# LANGUAGE ConstraintKinds, DataKinds, PolyKinds, TypeFamilies, TypeOperators #-}
import GHC.Prim (Constraint)
type family Restrict (a :: k) (as :: [k]) :: Constraint
type instance where
Restrict a (a ': as) = (a ~ "Oops! Tried to apply a restricted type!")
Restrict x (a ': as) = Restrict x as
Restrict x '[] = ()
foo :: Restrict a '[(), Int] => a -> a
foo = id
```
This worked fine, functioning like `id` for types other than `()` and `Int` and returning a type error for `()` and `Int`.
After hearing comments that my example broke when the closed type families syntax changed I decided to update my version of 7.7 and change the code for that. The new code is:
```
{-# LANGUAGE ConstraintKinds, DataKinds, PolyKinds, TypeFamilies, TypeOperators #-}
import GHC.Prim (Constraint)
type family Restrict (a :: k) (as :: [k]) :: Constraint where
Restrict a (a ': as) = (a ~ "Oops! Tried to apply a restricted type!")
Restrict x (a ': as) = Restrict x as
Restrict x '[] = ()
foo :: Restrict a '[(), Int] => a -> a
foo = id
```
This code is accepted by the compiler just fine, but the `Constraint` gets thrown out. When querying ghci for the type of `foo` the following is returned:
```
λ :t foo
foo :: a -> a
λ :i foo
foo :: (Restrict a '[(), Int]) => a -> a
```
Additionally, in the recent 7.7 `foo ()` returns `()` rather than a type error. After some playing around this seems to be caused by the "(a \~ "Oops! Tried to apply a restricted type!")" equality constraint. It seems GHC decides that it doesn't like the fact that types with a polymorphic kind and `Symbol` kind are compared. Leading it to silently discard the `Constraint`.
This raises two issues:
> 1) This should probably produce an error, rather than silently discarding the `Constraint`
> 2) A better way to produce errors in type families is needed, personally I would love an "error" `Constraint` that takes a `String`/`Symbol` and never holds, producing it's argument `String` as type error (This would remove the need for the hacky unification with `Symbol` to get a somewhat relevant type error).
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 7.7 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | high |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Closed TypeFamilies regression","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"7.7","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"I first played around with closed typefamilies early 2013 and wrote up the following simple example\r\n\r\n{{{\r\n{-# LANGUAGE ConstraintKinds, DataKinds, PolyKinds, TypeFamilies, TypeOperators #-}\r\n \r\nimport GHC.Prim (Constraint)\r\n \r\ntype family Restrict (a :: k) (as :: [k]) :: Constraint\r\ntype instance where\r\n Restrict a (a ': as) = (a ~ \"Oops! Tried to apply a restricted type!\")\r\n Restrict x (a ': as) = Restrict x as\r\n Restrict x '[] = ()\r\n \r\nfoo :: Restrict a '[(), Int] => a -> a\r\nfoo = id\r\n}}}\r\n\r\nThis worked fine, functioning like `id` for types other than `()` and `Int` and returning a type error for `()` and `Int`.\r\n\r\nAfter hearing comments that my example broke when the closed type families syntax changed I decided to update my version of 7.7 and change the code for that. The new code is:\r\n\r\n{{{\r\n{-# LANGUAGE ConstraintKinds, DataKinds, PolyKinds, TypeFamilies, TypeOperators #-}\r\n \r\nimport GHC.Prim (Constraint)\r\n \r\ntype family Restrict (a :: k) (as :: [k]) :: Constraint where\r\n Restrict a (a ': as) = (a ~ \"Oops! Tried to apply a restricted type!\")\r\n Restrict x (a ': as) = Restrict x as\r\n Restrict x '[] = ()\r\n \r\nfoo :: Restrict a '[(), Int] => a -> a\r\nfoo = id\r\n}}}\r\n\r\nThis code is accepted by the compiler just fine, but the `Constraint` gets thrown out. When querying ghci for the type of `foo` the following is returned:\r\n\r\n{{{\r\nλ :t foo\r\nfoo :: a -> a\r\nλ :i foo\r\nfoo :: (Restrict a '[(), Int]) => a -> a\r\n}}}\r\n\r\nAdditionally, in the recent 7.7 `foo ()` returns `()` rather than a type error. After some playing around this seems to be caused by the \"(a ~ \"Oops! Tried to apply a restricted type!\")\" equality constraint. It seems GHC decides that it doesn't like the fact that types with a polymorphic kind and `Symbol` kind are compared. Leading it to silently discard the `Constraint`.\r\n\r\nThis raises two issues:\r\n 1) This should probably produce an error, rather than silently discarding the `Constraint`\r\n 2) A better way to produce errors in type families is needed, personally I would love an \"error\" `Constraint` that takes a `String`/`Symbol` and never holds, producing it's argument `String` as type error (This would remove the need for the hacky unification with `Symbol` to get a somewhat relevant type error).","type_of_failure":"OtherFailure","blocking":[]} -->https://gitlab.haskell.org/ghc/ghc/-/issues/8645Improper response from GHCI terminal after importing Gnuplot package2019-07-07T18:44:07ZpankajsejwalImproper response from GHCI terminal after importing Gnuplot packageI recently tried one simple example on plotting using Haskell wrapper for Gnuplot on ubuntu using this example:[http://www.linuxquestions.org/questions/blog/hydramax-533365/quick-and-dirty-plotting-with-haskell-gnuplot-35230/](http://www...I recently tried one simple example on plotting using Haskell wrapper for Gnuplot on ubuntu using this example:[http://www.linuxquestions.org/questions/blog/hydramax-533365/quick-and-dirty-plotting-with-haskell-gnuplot-35230/](http://www.linuxquestions.org/questions/blog/hydramax-533365/quick-and-dirty-plotting-with-haskell-gnuplot-35230/) . It works fine, but after I close the graph window and type anything in GHCI terminal, it doesn't show it being typed. On entering text and pressing return it executes it in a normal way.
I tried with unloading all modules but to no avail. Has someone else faced it earlier ?
GHC : 7.6.3 Linux : Ubuntu 12
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 7.6.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | x86 |
</details>
<!-- {"blocked_by":[],"summary":"Improper response from GHCI terminal after importing Gnuplot package","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"7.6.3","keywords":["ghci,","gnuplot"],"differentials":[],"test_case":"","architecture":"x86","cc":[""],"type":"Bug","description":"I recently tried one simple example on plotting using Haskell wrapper for Gnuplot on ubuntu using this example:[http://www.linuxquestions.org/questions/blog/hydramax-533365/quick-and-dirty-plotting-with-haskell-gnuplot-35230/] . It works fine, but after I close the graph window and type anything in GHCI terminal, it doesn't show it being typed. On entering text and pressing return it executes it in a normal way.\r\n\r\nI tried with unloading all modules but to no avail. Has someone else faced it earlier ?\r\n\r\nGHC : 7.6.3 Linux : Ubuntu 12\r\n","type_of_failure":"OtherFailure","blocking":[]} -->https://gitlab.haskell.org/ghc/ghc/-/issues/8539Data.Complex shouldn't use default implementation of (**)2019-07-07T18:44:36ZjjaredsimpsonData.Complex shouldn't use default implementation of (**)```
Prelude Data.Complex> 0**2
0.0
Prelude Data.Complex> 0**2 :: Complex Double
NaN :+ NaN
Prelude Data.Complex> exp $ 2 * log 0 :: Complex Double
NaN :+ NaN
Prelude Data.Complex> log 0 :: Complex Double
(-Infinity) :+ 0.0
Prelude Data.C...```
Prelude Data.Complex> 0**2
0.0
Prelude Data.Complex> 0**2 :: Complex Double
NaN :+ NaN
Prelude Data.Complex> exp $ 2 * log 0 :: Complex Double
NaN :+ NaN
Prelude Data.Complex> log 0 :: Complex Double
(-Infinity) :+ 0.0
Prelude Data.Complex> 2 * it :: Complex Double
(-Infinity) :+ NaN
Prelude Data.Complex> exp it :: Complex Double
NaN :+ NaN
```
So Complex uses the default implementation of (!\*\*). Then when 2\*(-inf :+ 0) is evaluated. We do (2 \* -inf - 0\*0) :+ (2\*0 + -inf\*0). Which because of -inf\*0 sets the imaginary part to NaN.
Then exp (-inf :+ NaN) = exp x cos y :+ exp x sin y which becomes 0 \* cos NaN :+ 0 \* sin NaN. So we end up with NaN :+ NaN.
Ross Paterson suggested:
I would say the default implementation of (!\*\*) is wrong: to match the
Float/Double instances it should be
> x !\*\* y = if x == 0 then 0 else exp (log x \* y)
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 7.6.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | low |
| Resolution | Unresolved |
| Component | Prelude |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Data.Complex shouldn't use default implementation of (**)","status":"New","operating_system":"","component":"Prelude","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"7.6.3","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"\r\n{{{\r\nPrelude Data.Complex> 0**2\r\n0.0\r\nPrelude Data.Complex> 0**2 :: Complex Double\r\nNaN :+ NaN\r\nPrelude Data.Complex> exp $ 2 * log 0 :: Complex Double\r\nNaN :+ NaN\r\nPrelude Data.Complex> log 0 :: Complex Double\r\n(-Infinity) :+ 0.0\r\nPrelude Data.Complex> 2 * it :: Complex Double\r\n(-Infinity) :+ NaN\r\nPrelude Data.Complex> exp it :: Complex Double\r\nNaN :+ NaN\r\n\r\n}}}\r\n\r\nSo Complex uses the default implementation of (!**). Then when 2*(-inf :+ 0) is evaluated. We do (2 * -inf - 0*0) :+ (2*0 + -inf*0). Which because of -inf*0 sets the imaginary part to NaN. \r\n\r\nThen exp (-inf :+ NaN) = exp x cos y :+ exp x sin y which becomes 0 * cos NaN :+ 0 * sin NaN. So we end up with NaN :+ NaN.\r\n\r\nRoss Paterson suggested:\r\n\r\nI would say the default implementation of (!**) is wrong: to match the\r\nFloat/Double instances it should be\r\n\r\n x !** y = if x == 0 then 0 else exp (log x * y)\r\n\r\n","type_of_failure":"OtherFailure","blocking":[]} -->8.0.1https://gitlab.haskell.org/ghc/ghc/-/issues/8532Hyperbolic arc cosine fails on (-1) :: Complex r.2019-07-07T18:44:38ZleftaroundaboutHyperbolic arc cosine fails on (-1) :: Complex r.When allowing for complex results, the hyperbolic arc cosine is continuously defined on all ℝ.
In the `(x < (-1))` real ray of the complex plane, `acosh` equals `\z -> i * pi + acosh(abs z)`, which works fine for almost all arguments. T...When allowing for complex results, the hyperbolic arc cosine is continuously defined on all ℝ.
In the `(x < (-1))` real ray of the complex plane, `acosh` equals `\z -> i * pi + acosh(abs z)`, which works fine for almost all arguments. Thus, `acosh (-1)` should equal `i * pi`; however due to the implementation as
```
acosh z = log (z + (z+1) * sqrt ((z-1)/(z+1)))
```
where the denominator in the root becomes zero at `z = -1`, this comes out as `NaN :+ NaN`.
Could be fixed trivially by adding a special case
```
acosh ((-1):+0) = 0:+pi
```
to the `instance (RealFloat a) => Floating (Complex a)` in `Data.Complex`.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | --------------------------- |
| Version | 7.6.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | low |
| Resolution | Unresolved |
| Component | libraries/base |
| Test case | acosh(-1) :: Complex Double |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Hyperbolic arc cosine fails on (-1) :: Complex r.","status":"New","operating_system":"","component":"libraries/base","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"7.6.3","keywords":[],"differentials":[],"test_case":"acosh(-1) :: Complex Double","architecture":"","cc":[""],"type":"Bug","description":"When allowing for complex results, the hyperbolic arc cosine is continuously defined on all ℝ.\r\n\r\nIn the {{{(x < (-1))}}} real ray of the complex plane, {{{acosh}}} equals {{{\\z -> i * pi + acosh(abs z)}}}, which works fine for almost all arguments. Thus, {{{acosh (-1)}}} should equal {{{i * pi}}}; however due to the implementation as\r\n{{{\r\nacosh z = log (z + (z+1) * sqrt ((z-1)/(z+1)))\r\n}}}\r\nwhere the denominator in the root becomes zero at {{{z = -1}}}, this comes out as {{{NaN :+ NaN}}}.\r\n\r\nCould be fixed trivially by adding a special case\r\n{{{\r\nacosh ((-1):+0) = 0:+pi\r\n}}}\r\nto the {{{instance (RealFloat a) => Floating (Complex a)}}} in {{{Data.Complex}}}.","type_of_failure":"OtherFailure","blocking":[]} -->8.4.1alekzcbalekzcbhttps://gitlab.haskell.org/ghc/ghc/-/issues/8529Sequent reading from socket/connection on Windows fails2019-07-07T18:44:39ZHeimdellSequent reading from socket/connection on Windows failsI wrote a simple TCP-client, which consumes and produces 8-byte packets.
When I run it on linux, it works perfectly, being part of the loop (write-read-write-read-...).
On windows it receives only first msg from the other side (write-r...I wrote a simple TCP-client, which consumes and produces 8-byte packets.
When I run it on linux, it works perfectly, being part of the loop (write-read-write-read-...).
On windows it receives only first msg from the other side (write-read-write-write-...). The packets are still going, although.
Before that, I used the sockets directly; changing to HandleStream didn't help.
The code is:
```
transmit :: Int -> HandleStream ByteString -> ByteString -> IO [Bytestring]
transmit delay sock packet = do
let input = timeout delay $ sock `readBlock` 8 <* putStrLn "\nData was read!"
sock `writeBlock` pack
strings <- whileJust input
return [str | Right str <- strings]
whileJust action = do
result <- action
case result of
Just a -> (:) <$> return a <*> whileJust action
Nothing -> return []
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | --------------------- |
| Version | 7.4.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | libraries/haskell2010 |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Sequent reading from socket/connection on Windows fails","status":"New","operating_system":"","component":"libraries/haskell2010","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"7.4.2","keywords":["failure","read","sockets,","windows,"],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"I wrote a simple TCP-client, which consumes and produces 8-byte packets.\r\n\r\nWhen I run it on linux, it works perfectly, being part of the loop (write-read-write-read-...).\r\n\r\nOn windows it receives only first msg from the other side (write-read-write-write-...). The packets are still going, although.\r\n\r\nBefore that, I used the sockets directly; changing to HandleStream didn't help.\r\n\r\nThe code is:\r\n\r\n{{{\r\ntransmit :: Int -> HandleStream ByteString -> ByteString -> IO [Bytestring]\r\ntransmit delay sock packet = do\r\n let input = timeout delay $ sock `readBlock` 8 <* putStrLn \"\\nData was read!\"\r\n\r\n sock `writeBlock` pack\r\n\r\n strings <- whileJust input\r\n\r\n return [str | Right str <- strings]\r\n\r\nwhileJust action = do\r\n result <- action\r\n\r\n case result of \r\n Just a -> (:) <$> return a <*> whileJust action\r\n Nothing -> return []\r\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->https://gitlab.haskell.org/ghc/ghc/-/issues/8482Permission denied when copying file to current directory with copyFile2019-07-07T18:44:52ZHenk-JanPermission denied when copying file to current directory with copyFileWhile the MS-DOS command
```
C:\tmp\b>copy c:\tmp\a\x
```
runs successfully, the Haskell equivalent
```
copyFile "c:\\tmp\\a\\x" ""
```
results in
```
copyFile.hs: .\.copyFile584.tmp: copyFile: does not exist (Het systeem kan het op...While the MS-DOS command
```
C:\tmp\b>copy c:\tmp\a\x
```
runs successfully, the Haskell equivalent
```
copyFile "c:\\tmp\\a\\x" ""
```
results in
```
copyFile.hs: .\.copyFile584.tmp: copyFile: does not exist (Het systeem kan het opgegeven pad niet vinden.)
```
The Dutch explanation says:
"The system can not find the specified path"
```
copyFile "c:\\tmp\\a\\x" "."
```
results in
```
copyFile.hs: .\.copyFile3960.tmp: copyFile: permission denied (Toegang geweigerd.)
```
The Dutch explanation says:
"Access denied"
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------------- |
| Version | 7.6.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | libraries/directory |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Permission denied when copying file to current directory with copyFile","status":"New","operating_system":"","component":"libraries/directory","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"7.6.3","keywords":["copyFile","denied","permission"],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"\r\nWhile the MS-DOS command \r\n\r\n{{{\r\nC:\\tmp\\b>copy c:\\tmp\\a\\x\r\n}}}\r\nruns successfully, the Haskell equivalent\r\n\r\n{{{\r\ncopyFile \"c:\\\\tmp\\\\a\\\\x\" \"\"\r\n}}}\r\nresults in \r\n\r\n{{{\r\ncopyFile.hs: .\\.copyFile584.tmp: copyFile: does not exist (Het systeem kan het opgegeven pad niet vinden.)\r\n}}}\r\nThe Dutch explanation says:\r\n\"The system can not find the specified path\"\r\n{{{\r\ncopyFile \"c:\\\\tmp\\\\a\\\\x\" \".\"\r\n}}}\r\nresults in \r\n\r\n{{{\r\ncopyFile.hs: .\\.copyFile3960.tmp: copyFile: permission denied (Toegang geweigerd.)\r\n}}}\r\nThe Dutch explanation says:\r\n\"Access denied\"\r\n\r\n","type_of_failure":"OtherFailure","blocking":[]} -->gintasgintashttps://gitlab.haskell.org/ghc/ghc/-/issues/8458T5435_dyn_asm fails on x86_64 Linux2023-02-14T11:22:19ZJan Stolarekjan.stolarek@ed.ac.ukT5435_dyn_asm fails on x86_64 LinuxI keep getting failure from `T5435_dyn_asm` test:
```
make WAY=normal TEST=T5435_dyn_asm
=====> T5435_dyn_asm(normal) 2622 of 3829 [0, 0, 0]
cd ./rts && $MAKE -s --no-print-directory T5435_dyn_asm </dev/null >T5435_dyn_asm.run.stdou...I keep getting failure from `T5435_dyn_asm` test:
```
make WAY=normal TEST=T5435_dyn_asm
=====> T5435_dyn_asm(normal) 2622 of 3829 [0, 0, 0]
cd ./rts && $MAKE -s --no-print-directory T5435_dyn_asm </dev/null >T5435_dyn_asm.run.stdout 2>T5435_dyn_asm.run.stderr
Actual stdout output differs from expected:
--- ./rts/T5435_dyn_asm.stdout 2013-10-16 09:49:22.236712001 +0200
+++ ./rts/T5435_dyn_asm.run.stdout 2013-10-18 19:26:11.076223002 +0200
@@ -1,5 +1,5 @@
-initArray1
-initArray2
ctors1
ctors2
+initArray1
+initArray2
success
*** unexpected failure for T5435_dyn_asm(normal)
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 7.7 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Runtime System |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | simonmar |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"T5435_dyn_asm fails on x86_64 Linux","status":"New","operating_system":"","component":"Runtime System","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"OwnedBy","contents":"simonmar"},"version":"7.7","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":["simonmar"],"type":"Bug","description":"I keep getting failure from `T5435_dyn_asm` test:\r\n\r\n{{{\r\nmake WAY=normal TEST=T5435_dyn_asm\r\n\r\n=====> T5435_dyn_asm(normal) 2622 of 3829 [0, 0, 0]\r\ncd ./rts && $MAKE -s --no-print-directory T5435_dyn_asm </dev/null >T5435_dyn_asm.run.stdout 2>T5435_dyn_asm.run.stderr\r\nActual stdout output differs from expected:\r\n--- ./rts/T5435_dyn_asm.stdout 2013-10-16 09:49:22.236712001 +0200\r\n+++ ./rts/T5435_dyn_asm.run.stdout 2013-10-18 19:26:11.076223002 +0200\r\n@@ -1,5 +1,5 @@\r\n-initArray1\r\n-initArray2\r\n ctors1\r\n ctors2\r\n+initArray1\r\n+initArray2\r\n success\r\n*** unexpected failure for T5435_dyn_asm(normal)\r\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->Edward Z. YangEdward Z. Yanghttps://gitlab.haskell.org/ghc/ghc/-/issues/8436Stack overflow when masked should still throw at interruptible operations or ...2019-07-07T18:45:04ZEdward Z. YangStack overflow when masked should still throw at interruptible operations or inner unmaskCurrently, to deal with #767, stack overflow exceptions are never emitted when exceptions are masked; e.g. if the thread unmasks and it is back under the stack limit, it will be as if the thread never stack-overflowed. However, it seems ...Currently, to deal with #767, stack overflow exceptions are never emitted when exceptions are masked; e.g. if the thread unmasks and it is back under the stack limit, it will be as if the thread never stack-overflowed. However, it seems that we can be a bit more proactive about throwing the exception, in a way similar to asynchronous exceptions, wherein we add the stack overflow to the blocked exceptions list and let it be thrown at an interruptible point or if the exceptions get unmasked.
Patch would be pretty simple, I'd like to check if people think this is a better idea.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 7.7 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | low |
| Resolution | Unresolved |
| Component | Runtime System |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | simonmar |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Stack overflow when masked should still throw at interruptible operations or inner unmask","status":"New","operating_system":"","component":"Runtime System","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"OwnedBy","contents":"simonmar"},"version":"7.7","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":["simonmar"],"type":"Bug","description":"Currently, to deal with #767, stack overflow exceptions are never emitted when exceptions are masked; e.g. if the thread unmasks and it is back under the stack limit, it will be as if the thread never stack-overflowed. However, it seems that we can be a bit more proactive about throwing the exception, in a way similar to asynchronous exceptions, wherein we add the stack overflow to the blocked exceptions list and let it be thrown at an interruptible point or if the exceptions get unmasked.\r\n\r\nPatch would be pretty simple, I'd like to check if people think this is a better idea.","type_of_failure":"OtherFailure","blocking":[]} -->Simon MarlowSimon Marlowhttps://gitlab.haskell.org/ghc/ghc/-/issues/8433forkProcess masks async exceptions inside the child process2019-07-07T18:45:05ZjoeyhforkProcess masks async exceptions inside the child processFrankly, I'm not sure if this is a bug, but the forkProcess documentation says nothing about it. This can lead to problems when writing a multi-threaded daemon that expects async exceptions to work as they usually would.
FWIW, I have lo...Frankly, I'm not sure if this is a bug, but the forkProcess documentation says nothing about it. This can lead to problems when writing a multi-threaded daemon that expects async exceptions to work as they usually would.
FWIW, I have looked at several of the libraries on hackage that handle daemonization, and none of them seem to deal with this by explicitly unmasking exceptions when running the daemon IO action.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 7.6.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | libraries/unix |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"forkProcess masks async exceptions inside the child process","status":"New","operating_system":"","component":"libraries/unix","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"7.6.3","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"Frankly, I'm not sure if this is a bug, but the forkProcess documentation says nothing about it. This can lead to problems when writing a multi-threaded daemon that expects async exceptions to work as they usually would.\r\n\r\nFWIW, I have looked at several of the libraries on hackage that handle daemonization, and none of them seem to deal with this by explicitly unmasking exceptions when running the daemon IO action.","type_of_failure":"OtherFailure","blocking":[]} -->7.8.1https://gitlab.haskell.org/ghc/ghc/-/issues/8362Filesystem related tests failed on solaris (SmartOS)2019-07-07T18:45:23ZlerouxFilesystem related tests failed on solaris (SmartOS)Getting filesystem (files/permissions) related test faiures on SmartOS (32bit).
```
$ uname -a
SunOS pkgx86 5.11 joyent_20130919T215407Z i86pc i386 i86pc Solaris
```
Unexpected failures: `TEST="openFile003 getPermissions001 processGrou...Getting filesystem (files/permissions) related test faiures on SmartOS (32bit).
```
$ uname -a
SunOS pkgx86 5.11 joyent_20130919T215407Z i86pc i386 i86pc Solaris
```
Unexpected failures: `TEST="openFile003 getPermissions001 processGroup002 user001 posix005"`
The testsuite output is attached.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ----------------- |
| Version | 7.6.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | high |
| Resolution | Unresolved |
| Component | libraries (other) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Filesystem related tests failed on solaris (SmartOS)","status":"New","operating_system":"","component":"libraries (other)","related":[],"milestone":"7.8.3","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"7.6.3","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"Getting filesystem (files/permissions) related test faiures on SmartOS (32bit).\r\n\r\n{{{\r\n$ uname -a\r\nSunOS pkgx86 5.11 joyent_20130919T215407Z i86pc i386 i86pc Solaris\r\n}}}\r\n\r\nUnexpected failures: `TEST=\"openFile003 getPermissions001 processGroup002 user001 posix005\"`\r\n\r\nThe testsuite output is attached.","type_of_failure":"OtherFailure","blocking":[]} -->8.0.1https://gitlab.haskell.org/ghc/ghc/-/issues/8343Interrupting readProcess doesn't work2019-07-07T18:45:27Ztakano-akioInterrupting readProcess doesn't workThe following program should terminate in 1 second, but it does not:
```
import System.Process
import System.Timeout
main = timeout 1000000 $ print =<< readProcess "sleep" ["2h"] ""
```
The problem is in the exception handler in `read...The following program should terminate in 1 second, but it does not:
```
import System.Process
import System.Timeout
main = timeout 1000000 $ print =<< readProcess "sleep" ["2h"] ""
```
The problem is in the exception handler in `readProcess`. When it receives an asynchronous exception, it tries to clean up by closing the pipes. However the attempt to close `outh` blocks because the reader thread (reading with `hGetContents`) is blocking on the handle.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 7.6.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | libraries/base |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Interrupting readProcess doesn't work","status":"New","operating_system":"","component":"libraries/base","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"7.6.3","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"The following program should terminate in 1 second, but it does not:\r\n\r\n{{{\r\nimport System.Process\r\nimport System.Timeout\r\n\r\nmain = timeout 1000000 $ print =<< readProcess \"sleep\" [\"2h\"] \"\"\r\n}}}\r\n\r\nThe problem is in the exception handler in {{{readProcess}}}. When it receives an asynchronous exception, it tries to clean up by closing the pipes. However the attempt to close {{{outh}}} blocks because the reader thread (reading with {{{hGetContents}}}) is blocking on the handle.","type_of_failure":"OtherFailure","blocking":[]} -->https://gitlab.haskell.org/ghc/ghc/-/issues/8295T4850 deadlocks when run with -Ds on Windows (also it's failing)2019-07-07T18:45:41ZEdward Z. YangT4850 deadlocks when run with -Ds on Windows (also it's failing)T4850 has been failing recently, reporting too \*few\* OS threads allocated. That's pretty odd. What is also odd (and much less good) is that T4850 is deadlocking when you run it with `-Ds`. Uh oh!
```
bash.exe-3.1$ ./T4850 +RTS -Ds
...T4850 has been failing recently, reporting too \*few\* OS threads allocated. That's pretty odd. What is also odd (and much less good) is that T4850 is deadlocking when you run it with `-Ds`. Uh oh!
```
bash.exe-3.1$ ./T4850 +RTS -Ds
7eb0: created capset 0 of type 2
7eb0: created capset 1 of type 3
7eb0: cap 0: initialised
7eb0: assigned cap 0 to capset 0
7eb0: assigned cap 0 to capset 1
7eb0: allocated 1 more capabilities
7eb0: new task (taskCount: 1)
7eb0: returning; I want capability 0
7eb0: resuming capability 0
7eb0: cap 0: created thread 1
7eb0: new bound thread (1)
7eb0: cap 0: schedule()
7eb0: cap 0: running thread 1 (ThreadRunGHC)
7eb0: cap 0: created thread 2
7eb0: cap 0: thread 1 stopped (finished)
7eb0: bound thread (1) finished
7eb0: starting new worker on capability 0
7eb0: new worker task (taskCount: 2)
7eb0: task exiting
7eb0: new task (taskCount: 2)
7eb0: returning; I want capability 0
7fc0: cap 0: schedule()
7fc0: giving up capability 0
7fc0: passing capability 0 to worker 0x7eb0
7eb0: resuming capability 0
7eb0: cap 0: created thread 3
7eb0: new bound thread (3)
7eb0: cap 0: schedule()
7eb0: giving up capability 0
7eb0: passing capability 0 to worker 0x7fc0
7fc0: woken up on capability 0
7fc0: resuming capability 0
7fc0: cap 0: running thread 2 (ThreadRunGHC)
7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)
7fc0: passing capability 0 to bound task 0x7eb0
7eb0: woken up on capability 0
7eb0: resuming capability 0
7eb0: cap 0: running thread 3 (ThreadRunGHC)
7eb0: cap 0: thread 3 stopped (suspended while making a foreign call)
7eb0: starting new worker on capability 0
7eb0: new worker task (taskCount: 3)
7eb0: returning; I want capability 0
7b50: cap 0: schedule()
7b50: giving up capability 0
7b50: passing capability 0 to bound task 0x7eb0
7eb0: resuming capability 0
7eb0: cap 0: running thread 3 (ThreadRunGHC)
7eb0: cap 0: created thread 4
7eb0: cap 0: thread 3 stopped (blocked on an MVar)
thread 3 @ 00e03bbc is blocked on an MVar @ 00e021e4 (TSO_DIRTY)
7eb0: giving up capability 0
7eb0: passing capability 0 to worker 0x7b50
7b50: woken up on capability 0
7b50: resuming capability 0
7b50: cap 0: running thread 4 (ThreadRunGHC)
7b50: cap 0: thread 4 stopped (suspended while making a foreign call)
7b50: starting new worker on capability 0
7b50: new worker task (taskCount: 4)
7b50: new task (taskCount: 4)
7b50: returning; I want capability 0
7de4: cap 0: schedule()
7de4: giving up capability 0
7de4: passing capability 0 to worker 0x7b50
7b50: resuming capability 0
7b50: cap 0: created thread 5
7b50: new bound thread (5)
7b50: cap 0: schedule()
7b50: cap 0: running thread 5 (ThreadRunGHC)
7b50: cap 0: thread 5 stopped (finished)
7b50: bound thread (5) finished
7b50: freeing capability 0
7b50: task exiting
7b50: returning; I want capability 0
7b50: resuming capability 0
7b50: cap 0: running thread 4 (ThreadRunGHC)
7b50: cap 0: waking up thread 3 on cap 0
7b50: cap 0: thread 4 stopped (finished)
7b50: giving up capability 0
7b50: passing capability 0 to bound task 0x7eb0
7eb0: woken up on capability 0
7eb0: resuming capability 0
7eb0: cap 0: running thread 3 (ThreadRunGHC)
7eb0: cap 0: thread 3 stopped (suspended while making a foreign call)
7eb0: freeing capability 0
7eb0: returning; I want capability 0
7eb0: resuming capability 0
7eb0: cap 0: running thread 3 (ThreadRunGHC)
7eb0: cap 0: thread 3 stopped (suspended while making a foreign call)
7eb0: freeing capability 0
4
7eb0: returning; I want capability 0
7eb0: resuming capability 0
7eb0: cap 0: running thread 3 (ThreadRunGHC)
7eb0: cap 0: created thread 6
7eb0: cap 0: thread 3 stopped (blocked on an MVar)
thread 3 @ 00e03bbc is blocked on an MVar @ 00e021e4 (TSO_DIRTY)
7eb0: giving up capability 0
7eb0: passing capability 0 to worker 0x7b50
7b50: woken up on capability 0
7b50: resuming capability 0
7b50: cap 0: running thread 6 (ThreadRunGHC)
7b50: cap 0: thread 6 stopped (suspended while making a foreign call)
7b50: freeing capability 0
7b50: new task (taskCount: 4)
7b50: returning; I want capability 0
7b50: resuming capability 0
7b50: cap 0: created thread 7
7b50: new bound thread (7)
7b50: cap 0: schedule()
7b50: cap 0: running thread 7 (ThreadRunGHC)
7b50: cap 0: thread 7 stopped (finished)
7b50: bound thread (7) finished
7b50: freeing capability 0
7b50: task exiting
7b50: returning; I want capability 0
7b50: resuming capability 0
7b50: cap 0: running thread 6 (ThreadRunGHC)
7b50: cap 0: waking up thread 3 on cap 0
7b50: cap 0: thread 6 stopped (finished)
7b50: giving up capability 0
7b50: passing capability 0 to bound task 0x7eb0
7eb0: woken up on capability 0
7eb0: resuming capability 0
7eb0: cap 0: running thread 3 (ThreadRunGHC)
7eb0: cap 0: thread 3 stopped (suspended while making a foreign call)
7eb0: freeing capability 0
7eb0: returning; I want capability 0
7eb0: resuming capability 0
7eb0: cap 0: running thread 3 (ThreadRunGHC)
7eb0: cap 0: thread 3 stopped (suspended while making a foreign call)
7eb0: freeing capability 0
4
7eb0: returning; I want capability 0
7eb0: resuming capability 0
7eb0: cap 0: running thread 3 (ThreadRunGHC)
7eb0: cap 0: thread 3 stopped (yielding)
7eb0: cap 0: running thread 3 (ThreadRunGHC)
7eb0: cap 0: thread 3 stopped (finished)
7eb0: bound thread (3) finished
7eb0: freeing capability 0
7eb0: task exiting
7eb0: new task (taskCount: 4)
7eb0: returning; I want capability 0
7eb0: resuming capability 0
7eb0: cap 0: created thread 8
7eb0: new bound thread (8)
7eb0: cap 0: schedule()
7eb0: cap 0: running thread 8 (ThreadRunGHC)
7eb0: cap 0: thread 8 stopped (finished)
7eb0: bound thread (8) finished
7eb0: freeing capability 0
7eb0: task exiting
7eb0: new task (taskCount: 4)
7fc0: returning; I want capability 0
7fc0: resuming capability 0
7fc0: cap 0: running thread 2 (ThreadRunGHC)
7eb0: returning; I want capability 0
7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)
7fc0: passing capability 0 to worker 0x7eb0
7fc0: returning; I want capability 0
7fc0: resuming capability 0
7fc0: cap 0: running thread 2 (ThreadRunGHC)
7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)
7fc0: passing capability 0 to worker 0x7eb0
7fc0: returning; I want capability 0
7fc0: resuming capability 0
7fc0: cap 0: running thread 2 (ThreadRunGHC)
7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)
7fc0: passing capability 0 to worker 0x7eb0
7fc0: returning; I want capability 0
7fc0: resuming capability 0
7fc0: cap 0: running thread 2 (ThreadRunGHC)
7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)
7fc0: passing capability 0 to worker 0x7eb0
7fc0: returning; I want capability 0
7fc0: resuming capability 0
7fc0: cap 0: running thread 2 (ThreadRunGHC)
7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)
7fc0: passing capability 0 to worker 0x7eb0
7fc0: returning; I want capability 0
7fc0: resuming capability 0
7fc0: cap 0: running thread 2 (ThreadRunGHC)
7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)
7fc0: passing capability 0 to worker 0x7eb0
7fc0: returning; I want capability 0
7fc0: resuming capability 0
7fc0: cap 0: running thread 2 (ThreadRunGHC)
7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)
7fc0: passing capability 0 to worker 0x7eb0
7fc0: returning; I want capability 0
7fc0: resuming capability 0
7fc0: cap 0: running thread 2 (ThreadRunGHC)
7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)
7fc0: passing capability 0 to worker 0x7eb0
7fc0: returning; I want capability 0
7fc0: resuming capability 0
7fc0: cap 0: running thread 2 (ThreadRunGHC)
7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)
7fc0: passing capability 0 to worker 0x7eb0
7fc0: returning; I want capability 0
7fc0: resuming capability 0
7fc0: cap 0: running thread 2 (ThreadRunGHC)
7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)
7fc0: passing capability 0 to worker 0x7eb0
7fc0: returning; I want capability 0
7fc0: resuming capability 0
7fc0: cap 0: running thread 2 (ThreadRunGHC)
7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)
7fc0: passing capability 0 to worker 0x7eb0
7fc0: returning; I want capability 0
7fc0: resuming capability 0
7fc0: cap 0: running thread 2 (ThreadRunGHC)
7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)
7fc0: passing capability 0 to worker 0x7eb0
7fc0: returning; I want capability 0
7fc0: resuming capability 0
7fc0: cap 0: running thread 2 (ThreadRunGHC)
7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)
7fc0: passing capability 0 to worker 0x7eb0
7fc0: returning; I want capability 0
7fc0: resuming capability 0
7fc0: cap 0: running thread 2 (ThreadRunGHC)
7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)
7fc0: passing capability 0 to worker 0x7eb0
7fc0: returning; I want capability 0
7fc0: resuming capability 0
7fc0: cap 0: running thread 2 (ThreadRunGHC)
7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)
7fc0: passing capability 0 to worker 0x7eb0
7fc0: returning; I want capability 0
7fc0: resuming capability 0
7fc0: cap 0: running thread 2 (ThreadRunGHC)
7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)
7fc0: passing capability 0 to worker 0x7eb0
7fc0: returning; I want capability 0
7fc0: resuming capability 0
7fc0: cap 0: running thread 2 (ThreadRunGHC)
7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)
7fc0: passing capability 0 to worker 0x7eb0
7fc0: returning; I want capability 0
7fc0: resuming capability 0
7fc0: cap 0: running thread 2 (ThreadRunGHC)
7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)
7fc0: passing capability 0 to worker 0x7eb0
7fc0: returning; I want capability 0
7fc0: resuming capability 0
7fc0: cap 0: running thread 2 (ThreadRunGHC)
7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)
7fc0: passing capability 0 to worker 0x7eb0
7fc0: returning; I want capability 0
7fc0: resuming capability 0
7fc0: cap 0: running thread 2 (ThreadRunGHC)
7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)
7fc0: passing capability 0 to worker 0x7eb0
7fc0: returning; I want capability 0
7fc0: resuming capability 0
7fc0: cap 0: running thread 2 (ThreadRunGHC)
7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)
7fc0: passing capability 0 to worker 0x7eb0
7fc0: returning; I want capability 0
7fc0: resuming capability 0
7fc0: cap 0: running thread 2 (ThreadRunGHC)
7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)
7fc0: passing capability 0 to worker 0x7eb0
7fc0: returning; I want capability 0
7fc0: resuming capability 0
7fc0: cap 0: running thread 2 (ThreadRunGHC)
7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)
7fc0: passing capability 0 to worker 0x7eb0
7fc0: returning; I want capability 0
7fc0: resuming capability 0
7fc0: cap 0: running thread 2 (ThreadRunGHC)
7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)
7fc0: passing capability 0 to worker 0x7eb0
7fc0: returning; I want capability 0
7fc0: resuming capability 0
7fc0: cap 0: running thread 2 (ThreadRunGHC)
7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)
7fc0: passing capability 0 to worker 0x7eb0
7fc0: returning; I want capability 0
7fc0: resuming capability 0
7fc0: cap 0: running thread 2 (ThreadRunGHC)
7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)
7fc0: passing capability 0 to worker 0x7eb0
7fc0: returning; I want capability 0
7fc0: resuming capability 0
7fc0: cap 0: running thread 2 (ThreadRunGHC)
7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)
7fc0: passing capability 0 to worker 0x7eb0
7fc0: returning; I want capability 0
7fc0: resuming capability 0
7fc0: cap 0: running thread 2 (ThreadRunGHC)
7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)
7fc0: passing capability 0 to worker 0x7eb0
7fc0: returning; I want capability 0
7fc0: resuming capability 0
7fc0: cap 0: running thread 2 (ThreadRunGHC)
7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)
7fc0: passing capability 0 to worker 0x7eb0
7fc0: returning; I want capability 0
7fc0: resuming capability 0
7fc0: cap 0: running thread 2 (ThreadRunGHC)
7fc0: cap 0: thread 2 stopped (yielding)
7fc0: SCHED_INTERRUPTING
7fc0: cap 0: requesting sequential GC
7fc0: grabbing all the capabilies (0/1)
all threads:
threads on capability 0:
thread 2 @ 00e037bc is not blocked (TSO_DIRTY)
other threads:
7fc0: deleting all threads
7fc0: cap 0: raising exception in thread 2.
7fc0: cap 0: starting GC
7fc0: cap 0: GC working
7fc0: cap 0: GC idle
7fc0: cap 0: GC done
7fc0: cap 0: GC idle
7fc0: cap 0: GC done
7fc0: cap 0: GC idle
7fc0: cap 0: GC done
7fc0: cap 0: all caps stopped for GC
7fc0: cap 0: finished GC
7fc0: SCHED_SHUTTING_DOWN
7fc0: giving up capability 0
7fc0: passing capability 0 to worker 0x7eb0
7eb0: resuming capability 0
7eb0: passing capability 0 to worker 0x7fc0
7eb0: shutting down capability 0, attempt 0
7fc0: woken up on capability 0
7eb0: runnable threads or workers still alive, yielding
7eb0: passing capability 0 to worker 0x7fc0
7eb0: shutting down capability 0, attempt 1
7eb0: not owner, yielding
7eb0: shutting down capability 0, attempt 2
7eb0: not owner, yielding
7eb0: shutting down capability 0, attempt 3
7eb0: not owner, yielding
7eb0: shutting down capability 0, attempt 4
7eb0: not owner, yielding
7eb0: shutting down capability 0, attempt 5
7eb0: not owner, yielding
7eb0: shutting down capability 0, attempt 6
7eb0: not owner, yielding
7eb0: shutting down capability 0, attempt 7
7eb0: not owner, yielding
7eb0: shutting down capability 0, attempt 8
7eb0: not owner, yielding
7eb0: shutting down capability 0, attempt 9
7eb0: not owner, yielding
7eb0: shutting down capability 0, attempt 10
7eb0: not owner, yielding
7eb0: shutting down capability 0, attempt 11
7eb0: not owner, yielding
7eb0: shutting down capability 0, attempt 12
7eb0: not owner, yielding
7eb0: shutting down capability 0, attempt 13
7eb0: not owner, yielding
7eb0: shutting down capability 0, attempt 14
7eb0: not owner, yielding
7eb0: shutting down capability 0, attempt 15
7eb0: not owner, yielding
7eb0: shutting down capability 0, attempt 16
7eb0: not owner, yielding
7eb0: shutting down capability 0, attempt 17
7eb0: not owner, yielding
7eb0: shutting down capability 0, attempt 18
7eb0: not owner, yielding
...
```
ad infinitum.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 7.7 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Runtime System |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"T4850 deadlocks when run with -Ds on Windows (also it's failing)","status":"New","operating_system":"","component":"Runtime System","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"7.7","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"T4850 has been failing recently, reporting too *few* OS threads allocated. That's pretty odd. What is also odd (and much less good) is that T4850 is deadlocking when you run it with `-Ds`. Uh oh!\r\n\r\n{{{\r\nbash.exe-3.1$ ./T4850 +RTS -Ds\r\n 7eb0: created capset 0 of type 2\r\n 7eb0: created capset 1 of type 3\r\n 7eb0: cap 0: initialised\r\n 7eb0: assigned cap 0 to capset 0\r\n 7eb0: assigned cap 0 to capset 1\r\n 7eb0: allocated 1 more capabilities\r\n 7eb0: new task (taskCount: 1)\r\n 7eb0: returning; I want capability 0\r\n 7eb0: resuming capability 0\r\n 7eb0: cap 0: created thread 1\r\n 7eb0: new bound thread (1)\r\n 7eb0: cap 0: schedule()\r\n 7eb0: cap 0: running thread 1 (ThreadRunGHC)\r\n 7eb0: cap 0: created thread 2\r\n 7eb0: cap 0: thread 1 stopped (finished)\r\n 7eb0: bound thread (1) finished\r\n 7eb0: starting new worker on capability 0\r\n 7eb0: new worker task (taskCount: 2)\r\n 7eb0: task exiting\r\n 7eb0: new task (taskCount: 2)\r\n 7eb0: returning; I want capability 0\r\n 7fc0: cap 0: schedule()\r\n 7fc0: giving up capability 0\r\n 7fc0: passing capability 0 to worker 0x7eb0\r\n 7eb0: resuming capability 0\r\n 7eb0: cap 0: created thread 3\r\n 7eb0: new bound thread (3)\r\n 7eb0: cap 0: schedule()\r\n 7eb0: giving up capability 0\r\n 7eb0: passing capability 0 to worker 0x7fc0\r\n 7fc0: woken up on capability 0\r\n 7fc0: resuming capability 0\r\n 7fc0: cap 0: running thread 2 (ThreadRunGHC)\r\n 7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)\r\n 7fc0: passing capability 0 to bound task 0x7eb0\r\n 7eb0: woken up on capability 0\r\n 7eb0: resuming capability 0\r\n 7eb0: cap 0: running thread 3 (ThreadRunGHC)\r\n 7eb0: cap 0: thread 3 stopped (suspended while making a foreign call)\r\n 7eb0: starting new worker on capability 0\r\n 7eb0: new worker task (taskCount: 3)\r\n 7eb0: returning; I want capability 0\r\n 7b50: cap 0: schedule()\r\n 7b50: giving up capability 0\r\n 7b50: passing capability 0 to bound task 0x7eb0\r\n 7eb0: resuming capability 0\r\n 7eb0: cap 0: running thread 3 (ThreadRunGHC)\r\n 7eb0: cap 0: created thread 4\r\n 7eb0: cap 0: thread 3 stopped (blocked on an MVar)\r\n thread 3 @ 00e03bbc is blocked on an MVar @ 00e021e4 (TSO_DIRTY)\r\n 7eb0: giving up capability 0\r\n 7eb0: passing capability 0 to worker 0x7b50\r\n 7b50: woken up on capability 0\r\n 7b50: resuming capability 0\r\n 7b50: cap 0: running thread 4 (ThreadRunGHC)\r\n 7b50: cap 0: thread 4 stopped (suspended while making a foreign call)\r\n 7b50: starting new worker on capability 0\r\n 7b50: new worker task (taskCount: 4)\r\n 7b50: new task (taskCount: 4)\r\n 7b50: returning; I want capability 0\r\n 7de4: cap 0: schedule()\r\n 7de4: giving up capability 0\r\n 7de4: passing capability 0 to worker 0x7b50\r\n 7b50: resuming capability 0\r\n 7b50: cap 0: created thread 5\r\n 7b50: new bound thread (5)\r\n 7b50: cap 0: schedule()\r\n 7b50: cap 0: running thread 5 (ThreadRunGHC)\r\n 7b50: cap 0: thread 5 stopped (finished)\r\n 7b50: bound thread (5) finished\r\n 7b50: freeing capability 0\r\n 7b50: task exiting\r\n 7b50: returning; I want capability 0\r\n 7b50: resuming capability 0\r\n 7b50: cap 0: running thread 4 (ThreadRunGHC)\r\n 7b50: cap 0: waking up thread 3 on cap 0\r\n 7b50: cap 0: thread 4 stopped (finished)\r\n 7b50: giving up capability 0\r\n 7b50: passing capability 0 to bound task 0x7eb0\r\n 7eb0: woken up on capability 0\r\n 7eb0: resuming capability 0\r\n 7eb0: cap 0: running thread 3 (ThreadRunGHC)\r\n 7eb0: cap 0: thread 3 stopped (suspended while making a foreign call)\r\n 7eb0: freeing capability 0\r\n 7eb0: returning; I want capability 0\r\n 7eb0: resuming capability 0\r\n 7eb0: cap 0: running thread 3 (ThreadRunGHC)\r\n 7eb0: cap 0: thread 3 stopped (suspended while making a foreign call)\r\n 7eb0: freeing capability 0\r\n4\r\n 7eb0: returning; I want capability 0\r\n 7eb0: resuming capability 0\r\n 7eb0: cap 0: running thread 3 (ThreadRunGHC)\r\n 7eb0: cap 0: created thread 6\r\n 7eb0: cap 0: thread 3 stopped (blocked on an MVar)\r\n thread 3 @ 00e03bbc is blocked on an MVar @ 00e021e4 (TSO_DIRTY)\r\n 7eb0: giving up capability 0\r\n 7eb0: passing capability 0 to worker 0x7b50\r\n 7b50: woken up on capability 0\r\n 7b50: resuming capability 0\r\n 7b50: cap 0: running thread 6 (ThreadRunGHC)\r\n 7b50: cap 0: thread 6 stopped (suspended while making a foreign call)\r\n 7b50: freeing capability 0\r\n 7b50: new task (taskCount: 4)\r\n 7b50: returning; I want capability 0\r\n 7b50: resuming capability 0\r\n 7b50: cap 0: created thread 7\r\n 7b50: new bound thread (7)\r\n 7b50: cap 0: schedule()\r\n 7b50: cap 0: running thread 7 (ThreadRunGHC)\r\n 7b50: cap 0: thread 7 stopped (finished)\r\n 7b50: bound thread (7) finished\r\n 7b50: freeing capability 0\r\n 7b50: task exiting\r\n 7b50: returning; I want capability 0\r\n 7b50: resuming capability 0\r\n 7b50: cap 0: running thread 6 (ThreadRunGHC)\r\n 7b50: cap 0: waking up thread 3 on cap 0\r\n 7b50: cap 0: thread 6 stopped (finished)\r\n 7b50: giving up capability 0\r\n 7b50: passing capability 0 to bound task 0x7eb0\r\n 7eb0: woken up on capability 0\r\n 7eb0: resuming capability 0\r\n 7eb0: cap 0: running thread 3 (ThreadRunGHC)\r\n 7eb0: cap 0: thread 3 stopped (suspended while making a foreign call)\r\n 7eb0: freeing capability 0\r\n 7eb0: returning; I want capability 0\r\n 7eb0: resuming capability 0\r\n 7eb0: cap 0: running thread 3 (ThreadRunGHC)\r\n 7eb0: cap 0: thread 3 stopped (suspended while making a foreign call)\r\n 7eb0: freeing capability 0\r\n4\r\n 7eb0: returning; I want capability 0\r\n 7eb0: resuming capability 0\r\n 7eb0: cap 0: running thread 3 (ThreadRunGHC)\r\n 7eb0: cap 0: thread 3 stopped (yielding)\r\n 7eb0: cap 0: running thread 3 (ThreadRunGHC)\r\n 7eb0: cap 0: thread 3 stopped (finished)\r\n 7eb0: bound thread (3) finished\r\n 7eb0: freeing capability 0\r\n 7eb0: task exiting\r\n 7eb0: new task (taskCount: 4)\r\n 7eb0: returning; I want capability 0\r\n 7eb0: resuming capability 0\r\n 7eb0: cap 0: created thread 8\r\n 7eb0: new bound thread (8)\r\n 7eb0: cap 0: schedule()\r\n 7eb0: cap 0: running thread 8 (ThreadRunGHC)\r\n 7eb0: cap 0: thread 8 stopped (finished)\r\n 7eb0: bound thread (8) finished\r\n 7eb0: freeing capability 0\r\n 7eb0: task exiting\r\n 7eb0: new task (taskCount: 4)\r\n 7fc0: returning; I want capability 0\r\n 7fc0: resuming capability 0\r\n 7fc0: cap 0: running thread 2 (ThreadRunGHC)\r\n 7eb0: returning; I want capability 0\r\n 7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)\r\n 7fc0: passing capability 0 to worker 0x7eb0\r\n 7fc0: returning; I want capability 0\r\n 7fc0: resuming capability 0\r\n 7fc0: cap 0: running thread 2 (ThreadRunGHC)\r\n 7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)\r\n 7fc0: passing capability 0 to worker 0x7eb0\r\n 7fc0: returning; I want capability 0\r\n 7fc0: resuming capability 0\r\n 7fc0: cap 0: running thread 2 (ThreadRunGHC)\r\n 7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)\r\n 7fc0: passing capability 0 to worker 0x7eb0\r\n 7fc0: returning; I want capability 0\r\n 7fc0: resuming capability 0\r\n 7fc0: cap 0: running thread 2 (ThreadRunGHC)\r\n 7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)\r\n 7fc0: passing capability 0 to worker 0x7eb0\r\n 7fc0: returning; I want capability 0\r\n 7fc0: resuming capability 0\r\n 7fc0: cap 0: running thread 2 (ThreadRunGHC)\r\n 7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)\r\n 7fc0: passing capability 0 to worker 0x7eb0\r\n 7fc0: returning; I want capability 0\r\n 7fc0: resuming capability 0\r\n 7fc0: cap 0: running thread 2 (ThreadRunGHC)\r\n 7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)\r\n 7fc0: passing capability 0 to worker 0x7eb0\r\n 7fc0: returning; I want capability 0\r\n 7fc0: resuming capability 0\r\n 7fc0: cap 0: running thread 2 (ThreadRunGHC)\r\n 7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)\r\n 7fc0: passing capability 0 to worker 0x7eb0\r\n 7fc0: returning; I want capability 0\r\n 7fc0: resuming capability 0\r\n 7fc0: cap 0: running thread 2 (ThreadRunGHC)\r\n 7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)\r\n 7fc0: passing capability 0 to worker 0x7eb0\r\n 7fc0: returning; I want capability 0\r\n 7fc0: resuming capability 0\r\n 7fc0: cap 0: running thread 2 (ThreadRunGHC)\r\n 7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)\r\n 7fc0: passing capability 0 to worker 0x7eb0\r\n 7fc0: returning; I want capability 0\r\n 7fc0: resuming capability 0\r\n 7fc0: cap 0: running thread 2 (ThreadRunGHC)\r\n 7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)\r\n 7fc0: passing capability 0 to worker 0x7eb0\r\n 7fc0: returning; I want capability 0\r\n 7fc0: resuming capability 0\r\n 7fc0: cap 0: running thread 2 (ThreadRunGHC)\r\n 7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)\r\n 7fc0: passing capability 0 to worker 0x7eb0\r\n 7fc0: returning; I want capability 0\r\n 7fc0: resuming capability 0\r\n 7fc0: cap 0: running thread 2 (ThreadRunGHC)\r\n 7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)\r\n 7fc0: passing capability 0 to worker 0x7eb0\r\n 7fc0: returning; I want capability 0\r\n 7fc0: resuming capability 0\r\n 7fc0: cap 0: running thread 2 (ThreadRunGHC)\r\n 7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)\r\n 7fc0: passing capability 0 to worker 0x7eb0\r\n 7fc0: returning; I want capability 0\r\n 7fc0: resuming capability 0\r\n 7fc0: cap 0: running thread 2 (ThreadRunGHC)\r\n 7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)\r\n 7fc0: passing capability 0 to worker 0x7eb0\r\n 7fc0: returning; I want capability 0\r\n 7fc0: resuming capability 0\r\n 7fc0: cap 0: running thread 2 (ThreadRunGHC)\r\n 7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)\r\n 7fc0: passing capability 0 to worker 0x7eb0\r\n 7fc0: returning; I want capability 0\r\n 7fc0: resuming capability 0\r\n 7fc0: cap 0: running thread 2 (ThreadRunGHC)\r\n 7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)\r\n 7fc0: passing capability 0 to worker 0x7eb0\r\n 7fc0: returning; I want capability 0\r\n 7fc0: resuming capability 0\r\n 7fc0: cap 0: running thread 2 (ThreadRunGHC)\r\n 7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)\r\n 7fc0: passing capability 0 to worker 0x7eb0\r\n 7fc0: returning; I want capability 0\r\n 7fc0: resuming capability 0\r\n 7fc0: cap 0: running thread 2 (ThreadRunGHC)\r\n 7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)\r\n 7fc0: passing capability 0 to worker 0x7eb0\r\n 7fc0: returning; I want capability 0\r\n 7fc0: resuming capability 0\r\n 7fc0: cap 0: running thread 2 (ThreadRunGHC)\r\n 7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)\r\n 7fc0: passing capability 0 to worker 0x7eb0\r\n 7fc0: returning; I want capability 0\r\n 7fc0: resuming capability 0\r\n 7fc0: cap 0: running thread 2 (ThreadRunGHC)\r\n 7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)\r\n 7fc0: passing capability 0 to worker 0x7eb0\r\n 7fc0: returning; I want capability 0\r\n 7fc0: resuming capability 0\r\n 7fc0: cap 0: running thread 2 (ThreadRunGHC)\r\n 7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)\r\n 7fc0: passing capability 0 to worker 0x7eb0\r\n 7fc0: returning; I want capability 0\r\n 7fc0: resuming capability 0\r\n 7fc0: cap 0: running thread 2 (ThreadRunGHC)\r\n 7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)\r\n 7fc0: passing capability 0 to worker 0x7eb0\r\n 7fc0: returning; I want capability 0\r\n 7fc0: resuming capability 0\r\n 7fc0: cap 0: running thread 2 (ThreadRunGHC)\r\n 7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)\r\n 7fc0: passing capability 0 to worker 0x7eb0\r\n 7fc0: returning; I want capability 0\r\n 7fc0: resuming capability 0\r\n 7fc0: cap 0: running thread 2 (ThreadRunGHC)\r\n 7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)\r\n 7fc0: passing capability 0 to worker 0x7eb0\r\n 7fc0: returning; I want capability 0\r\n 7fc0: resuming capability 0\r\n 7fc0: cap 0: running thread 2 (ThreadRunGHC)\r\n 7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)\r\n 7fc0: passing capability 0 to worker 0x7eb0\r\n 7fc0: returning; I want capability 0\r\n 7fc0: resuming capability 0\r\n 7fc0: cap 0: running thread 2 (ThreadRunGHC)\r\n 7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)\r\n 7fc0: passing capability 0 to worker 0x7eb0\r\n 7fc0: returning; I want capability 0\r\n 7fc0: resuming capability 0\r\n 7fc0: cap 0: running thread 2 (ThreadRunGHC)\r\n 7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)\r\n 7fc0: passing capability 0 to worker 0x7eb0\r\n 7fc0: returning; I want capability 0\r\n 7fc0: resuming capability 0\r\n 7fc0: cap 0: running thread 2 (ThreadRunGHC)\r\n 7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)\r\n 7fc0: passing capability 0 to worker 0x7eb0\r\n 7fc0: returning; I want capability 0\r\n 7fc0: resuming capability 0\r\n 7fc0: cap 0: running thread 2 (ThreadRunGHC)\r\n 7fc0: cap 0: thread 2 stopped (suspended while making a foreign call)\r\n 7fc0: passing capability 0 to worker 0x7eb0\r\n 7fc0: returning; I want capability 0\r\n 7fc0: resuming capability 0\r\n 7fc0: cap 0: running thread 2 (ThreadRunGHC)\r\n 7fc0: cap 0: thread 2 stopped (yielding)\r\n 7fc0: SCHED_INTERRUPTING\r\n 7fc0: cap 0: requesting sequential GC\r\n 7fc0: grabbing all the capabilies (0/1)\r\nall threads:\r\nthreads on capability 0:\r\n thread 2 @ 00e037bc is not blocked (TSO_DIRTY)\r\nother threads:\r\n 7fc0: deleting all threads\r\n 7fc0: cap 0: raising exception in thread 2.\r\n 7fc0: cap 0: starting GC\r\n 7fc0: cap 0: GC working\r\n 7fc0: cap 0: GC idle\r\n 7fc0: cap 0: GC done\r\n 7fc0: cap 0: GC idle\r\n 7fc0: cap 0: GC done\r\n 7fc0: cap 0: GC idle\r\n 7fc0: cap 0: GC done\r\n 7fc0: cap 0: all caps stopped for GC\r\n 7fc0: cap 0: finished GC\r\n 7fc0: SCHED_SHUTTING_DOWN\r\n 7fc0: giving up capability 0\r\n 7fc0: passing capability 0 to worker 0x7eb0\r\n 7eb0: resuming capability 0\r\n 7eb0: passing capability 0 to worker 0x7fc0\r\n 7eb0: shutting down capability 0, attempt 0\r\n 7fc0: woken up on capability 0\r\n 7eb0: runnable threads or workers still alive, yielding\r\n 7eb0: passing capability 0 to worker 0x7fc0\r\n 7eb0: shutting down capability 0, attempt 1\r\n 7eb0: not owner, yielding\r\n 7eb0: shutting down capability 0, attempt 2\r\n 7eb0: not owner, yielding\r\n 7eb0: shutting down capability 0, attempt 3\r\n 7eb0: not owner, yielding\r\n 7eb0: shutting down capability 0, attempt 4\r\n 7eb0: not owner, yielding\r\n 7eb0: shutting down capability 0, attempt 5\r\n 7eb0: not owner, yielding\r\n 7eb0: shutting down capability 0, attempt 6\r\n 7eb0: not owner, yielding\r\n 7eb0: shutting down capability 0, attempt 7\r\n 7eb0: not owner, yielding\r\n 7eb0: shutting down capability 0, attempt 8\r\n 7eb0: not owner, yielding\r\n 7eb0: shutting down capability 0, attempt 9\r\n 7eb0: not owner, yielding\r\n 7eb0: shutting down capability 0, attempt 10\r\n 7eb0: not owner, yielding\r\n 7eb0: shutting down capability 0, attempt 11\r\n 7eb0: not owner, yielding\r\n 7eb0: shutting down capability 0, attempt 12\r\n 7eb0: not owner, yielding\r\n 7eb0: shutting down capability 0, attempt 13\r\n 7eb0: not owner, yielding\r\n 7eb0: shutting down capability 0, attempt 14\r\n 7eb0: not owner, yielding\r\n 7eb0: shutting down capability 0, attempt 15\r\n 7eb0: not owner, yielding\r\n 7eb0: shutting down capability 0, attempt 16\r\n 7eb0: not owner, yielding\r\n 7eb0: shutting down capability 0, attempt 17\r\n 7eb0: not owner, yielding\r\n 7eb0: shutting down capability 0, attempt 18\r\n 7eb0: not owner, yielding\r\n...\r\n}}}\r\n\r\nad infinitum.","type_of_failure":"OtherFailure","blocking":[]} -->https://gitlab.haskell.org/ghc/ghc/-/issues/8293user001 spuriously fails if getGroupEntryForID correctly fails2019-07-07T18:45:41ZEdward Z. Yanguser001 spuriously fails if getGroupEntryForID correctly failsIn some cases, a user's current group ID can be a number for a non-existent group. While this usually indicates the system is misconfigured in some way, it can also occur inside chroots or other environments where the information in /etc...In some cases, a user's current group ID can be a number for a non-existent group. While this usually indicates the system is misconfigured in some way, it can also occur inside chroots or other environments where the information in /etc/groups is not to be considered reliable. Unfortunately, the user001 has no way of telling that the failure is proper, and fails the test anyway. We ought to do something more robust.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 7.7 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | lowest |
| Resolution | Unresolved |
| Component | libraries/unix |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"user001 spuriously fails if getGroupEntryForID correctly fails","status":"New","operating_system":"","component":"libraries/unix","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"7.7","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"In some cases, a user's current group ID can be a number for a non-existent group. While this usually indicates the system is misconfigured in some way, it can also occur inside chroots or other environments where the information in /etc/groups is not to be considered reliable. Unfortunately, the user001 has no way of telling that the failure is proper, and fails the test anyway. We ought to do something more robust.","type_of_failure":"OtherFailure","blocking":[]} -->Edward KmettEdward Kmetthttps://gitlab.haskell.org/ghc/ghc/-/issues/8291unloadObj doesn't work, unloaded_objects list keeps growing in size2019-07-07T18:45:42ZEdward Z. YangunloadObj doesn't work, unloaded_objects list keeps growing in sizeShows up as the linker_unload test going very slowly and triggering the timeout on my box. Verified by looking at the unloaded_objects list, which contains multiple copies of Test.o. I haven't investigated any further.
<details><summary...Shows up as the linker_unload test going very slowly and triggering the timeout on my box. Verified by looking at the unloaded_objects list, which contains multiple copies of Test.o. I haven't investigated any further.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 7.7 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Runtime System |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | MacOS X |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"unloadObj doesn't work on Mac OS X","status":"New","operating_system":"MacOS X","component":"Runtime System","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"OwnedBy","contents":"simonmar"},"version":"7.7","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"Shows up as the linker_unload test going very slowly and triggering the timeout on my box. Verified by looking at the unloaded_objects list, which contains multiple copies of Test.o. I haven't investigated any further.","type_of_failure":"OtherFailure","blocking":[]} -->7.8.1Simon MarlowSimon Marlowhttps://gitlab.haskell.org/ghc/ghc/-/issues/8285unexpected behavior with encodeFloat on large inputs2019-07-07T18:45:43ZCarter Schonwaldunexpected behavior with encodeFloat on large inputs```
> encodeFloat 1 1023
8.98846567431158e307 -- ok
> encodeFloat 1 1024
Infinity -- ok
> encodeFloat 1 (2^31 - 1)
Infinity -- ok
> encodeFloat 1 (2^31)
0.0 -- not ok
``````
> encodeFloat 1 1023
8.98846567431158e307 -- ok
> encodeFloat 1 1024
Infinity -- ok
> encodeFloat 1 (2^31 - 1)
Infinity -- ok
> encodeFloat 1 (2^31)
0.0 -- not ok
```8.0.1https://gitlab.haskell.org/ghc/ghc/-/issues/8249Allocation counts should include PAPs2019-07-07T18:45:53ZEdward Z. YangAllocation counts should include PAPsI was looking through the profiling code and I noticed we don't charge the heap allocation for PAPs on slow-calls to the relevant cost center (relevant code is rts/AutoApply.h, the BUILD_PAP macro). This is probably not right, but I woul...I was looking through the profiling code and I noticed we don't charge the heap allocation for PAPs on slow-calls to the relevant cost center (relevant code is rts/AutoApply.h, the BUILD_PAP macro). This is probably not right, but I would like someone to agree with me.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 7.7 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Runtime System |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Allocation counts should include PAPs","status":"New","operating_system":"","component":"Runtime System","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"7.7","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"I was looking through the profiling code and I noticed we don't charge the heap allocation for PAPs on slow-calls to the relevant cost center (relevant code is rts/AutoApply.h, the BUILD_PAP macro). This is probably not right, but I would like someone to agree with me.","type_of_failure":"OtherFailure","blocking":[]} -->https://gitlab.haskell.org/ghc/ghc/-/issues/8242Infinite loop with addCFinalizerToWeak2019-07-07T18:45:54Ztakano-akioInfinite loop with addCFinalizerToWeak(moved from #8236 )
When I compile the attached program with `-threaded -O2` and run it, it does not terminate.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ---------...(moved from #8236 )
When I compile the attached program with `-threaded -O2` and run it, it does not terminate.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 7.6.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Runtime System |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Infinite loop with addCFinalizerToWeak","status":"New","operating_system":"","component":"Runtime System","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"7.6.3","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"(moved from #8236 )\r\n\r\nWhen I compile the attached program with {{{-threaded -O2}}} and run it, it does not terminate.","type_of_failure":"OtherFailure","blocking":[]} -->https://gitlab.haskell.org/ghc/ghc/-/issues/8222CTYPE pragma on newtype is ignored2019-07-07T18:45:59Ztakano-akioCTYPE pragma on newtype is ignoredUser's guide includes an example where a CTYPE pragma is used for a newtype.
```
newtype {-# CTYPE "useconds_t" #-} T = ...
```
However, in the following program, the CTYPE pragma seems to be ignored:
```
{-# LANGUAGE CApiF...User's guide includes an example where a CTYPE pragma is used for a newtype.
```
newtype {-# CTYPE "useconds_t" #-} T = ...
```
However, in the following program, the CTYPE pragma seems to be ignored:
```
{-# LANGUAGE CApiFFI #-}
import Foreign.Ptr
foreign import capi unsafe "sys/socket.h CMSG_DATA"
c_CMSG_DATA :: Ptr Cmsg -> Ptr a
newtype {-# CTYPE "sys/socket.h" "struct cmsghdr" #-} Cmsg = Cmsg ()
main = return ()
```
Save this as `capi.hs`, then compile it like:
```
ghc capi.hs -fforce-recomp -keep-tmp-files -tmpdir .
```
Then GHC creates a C file:
```
#define IN_STG_CODE 0
#include "Rts.h"
#include "Stg.h"
#ifdef __cplusplus
extern "C" {
#endif
#include <sys/socket.h>
void* ghczuwrapperZC0ZCmainZCMainZCCMSGzuDATA(void* a1) {return CMSG_DATA(a1);}
#ifdef __cplusplus
}
#endif
```
The argument type of the wrapper function is `void *`, but it should be `struct cmsghdr *`.
If I replace `newtype` with `data` in capi.hs, the wrapper function gets the correct type.
I can see this problem in HEAD and in 7.6.3.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 7.6.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"CTYPE pragma on newtype is ignored","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"7.6.3","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"User's guide includes an example where a CTYPE pragma is used for a newtype.\r\n\r\n{{{\r\nnewtype {-# CTYPE \"useconds_t\" #-} T = ...\r\n}}}\r\n\r\nHowever, in the following program, the CTYPE pragma seems to be ignored:\r\n\r\n{{{\r\n{-# LANGUAGE CApiFFI #-}\r\nimport Foreign.Ptr\r\n\r\nforeign import capi unsafe \"sys/socket.h CMSG_DATA\"\r\n c_CMSG_DATA :: Ptr Cmsg -> Ptr a\r\nnewtype {-# CTYPE \"sys/socket.h\" \"struct cmsghdr\" #-} Cmsg = Cmsg ()\r\n\r\nmain = return ()\r\n}}}\r\n\r\nSave this as {{{capi.hs}}}, then compile it like:\r\n\r\n{{{\r\nghc capi.hs -fforce-recomp -keep-tmp-files -tmpdir .\r\n}}}\r\n\r\nThen GHC creates a C file:\r\n\r\n{{{\r\n#define IN_STG_CODE 0\r\n#include \"Rts.h\"\r\n#include \"Stg.h\"\r\n#ifdef __cplusplus\r\nextern \"C\" {\r\n#endif\r\n#include <sys/socket.h>\r\nvoid* ghczuwrapperZC0ZCmainZCMainZCCMSGzuDATA(void* a1) {return CMSG_DATA(a1);}\r\n#ifdef __cplusplus\r\n}\r\n#endif\r\n}}}\r\n\r\nThe argument type of the wrapper function is {{{void *}}}, but it should be {{{struct cmsghdr *}}}.\r\n\r\nIf I replace {{{newtype}}} with {{{data}}} in capi.hs, the wrapper function gets the correct type.\r\n\r\nI can see this problem in HEAD and in 7.6.3.","type_of_failure":"OtherFailure","blocking":[]} -->