GHC issueshttps://gitlab.haskell.org/ghc/ghc/-/issues2019-07-07T19:15:08Zhttps://gitlab.haskell.org/ghc/ghc/-/issues/1130GHC reports : <interactive>: internal error: removeFromQueues2019-07-07T19:15:08Zmichal <Dot> doborogost (@) gmailGHC reports : <interactive>: internal error: removeFromQueuesGHCi reports an unusual error that it asks to "please report". Note that we run the same, purely functional code twice and get two different results. The first time in runs correctly the second time GHCi panics.
Session included below, ...GHCi reports an unusual error that it asks to "please report". Note that we run the same, purely functional code twice and get two different results. The first time in runs correctly the second time GHCi panics.
Session included below, please contact if more information is required:
```
*Parser> Parser.parse $ Scanner.adaScanner $ Normalizer.normalizer "declare i : Integer; begin null; end;"
Loading package haskell98 ... linking ... done.
Right (Block { ... })
*Parser> Parser.parse $ Scanner.adaScanner $ Normalizer.normalizer "declare i : Integer; begin null; end;"
<interactive>: internal error: removeFromQueues
(GHC version 6.6 for i386_unknown_mingw32)
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
```6.6.1Simon MarlowSimon Marlowhttps://gitlab.haskell.org/ghc/ghc/-/issues/1115GHC concurrency runtime "breaks" every 497 (and a bit) days2019-07-07T19:15:12ZNeil DaviesGHC concurrency runtime "breaks" every 497 (and a bit) daysThe GHC concurrency model does all of its time calculations for delays in "ticks"
- a tick being fixed at 1/50th of a second. It performs all of these
calculations in terms the number of these ticks since the Unix epoch
(Jan 1970). Which...The GHC concurrency model does all of its time calculations for delays in "ticks"
- a tick being fixed at 1/50th of a second. It performs all of these
calculations in terms the number of these ticks since the Unix epoch
(Jan 1970). Which is stored as an Int - unfortunately this (typically) 2\^31 bits
overflows every 497 (and a bit) days.
When it does overflow any threads on the timer queue will either a)
run immediately or b) not be run for another 497 days - depending on
which way the sign changes. Also any timer calculation that spans the
wrapround (sometime in the preceeding 35 or so minutes) will not be dealt with correctly.
Although this doesn't happen often (the last one was around Sat Sep 30
18:32:51 UTC 2006 and the next one will not be until Sat Feb 9
21:00:44 UTC 2008) it nees to be resolved.
Take a look at the definition of getTicksofDay (in
base/include/HsBase.h (non-windows) / base/cbits/Win32Utils.c) and
getDelay (in base/GHC/Conc.lhs) to understand the details of the
issue.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 6.6 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Runtime System |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | Unknown |
| Architecture | Unknown |
</details>
<!-- {"blocked_by":[],"summary":"GHC concurrency runtime \"breaks\" every 497 (and a bit) days","status":"New","operating_system":"Unknown","component":"Runtime System","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.6","keywords":[],"differentials":[],"test_case":"","architecture":"Unknown","cc":[""],"type":"Bug","description":"The GHC concurrency model does all of its time calculations for delays in \"ticks\"\r\n- a tick being fixed at 1/50th of a second. It performs all of these\r\ncalculations in terms the number of these ticks since the Unix epoch\r\n(Jan 1970). Which is stored as an Int - unfortunately this (typically) 2^31 bits\r\noverflows every 497 (and a bit) days.\r\n\r\nWhen it does overflow any threads on the timer queue will either a)\r\nrun immediately or b) not be run for another 497 days - depending on\r\nwhich way the sign changes. Also any timer calculation that spans the\r\nwrapround (sometime in the preceeding 35 or so minutes) will not be dealt with correctly.\r\n\r\nAlthough this doesn't happen often (the last one was around Sat Sep 30\r\n18:32:51 UTC 2006 and the next one will not be until Sat Feb 9\r\n21:00:44 UTC 2008) it nees to be resolved.\r\n\r\nTake a look at the definition of getTicksofDay (in\r\nbase/include/HsBase.h (non-windows) / base/cbits/Win32Utils.c) and\r\ngetDelay (in base/GHC/Conc.lhs) to understand the details of the\r\nissue.","type_of_failure":"OtherFailure","blocking":[]} -->6.6.1Ian Lynagh <igloo@earth.li>Ian Lynagh <igloo@earth.li>https://gitlab.haskell.org/ghc/ghc/-/issues/1067assertion failure in Schedule.c2019-07-07T19:15:25Zms43assertion failure in Schedule.cthe following program triggers an assertion failure.
this is with ghc 6.6 (built on debian 3.1 from the debian unstable
source package) on both x86 and powerpc.
```
import Control.Concurrent
import Control.Exception
main = do
m...the following program triggers an assertion failure.
this is with ghc 6.6 (built on debian 3.1 from the debian unstable
source package) on both x86 and powerpc.
```
import Control.Concurrent
import Control.Exception
main = do
master <- myThreadId
handle (const main) $ do
sequence $ replicate 10 $
forkIO $ do
putStrLn $ replicate 400000 'X'
throwTo master NonTermination
putStrLn $ replicate 4000000 'X'
threadDelay 1000000
```
```
[0] ms@isis:/tmp/chr > uname -a
Linux isis 2.6.15-1-powerpc #2 Mon Mar 6 12:39:17 CET 2006 ppc GNU/Linux
[0] ms@isis:/tmp/chr > gcc -v
Reading specs from /usr/lib/gcc-lib/powerpc-linux/3.3.5/specs
Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --enable-__cxa_atexit --with-system-zlib --enable-nls --without-included-gettext --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc --disable-multilib powerpc-linux
Thread model: posix
gcc version 3.3.5 (Debian 1:3.3.5-13)
[0] ms@isis:/tmp/chr > ghc --make -debug -v Assert.hs
Glasgow Haskell Compiler, Version 6.6, for Haskell 98, compiled by GHC version 6.2.2
Using package config file: /usr/lib/ghc-6.6/package.conf
wired-in package base mapped to base-2.0
wired-in package rts mapped to rts-1.0
wired-in package haskell98 mapped to haskell98-1.0
wired-in package template-haskell mapped to template-haskell-2.0
Hsc static flags: -funregisterised -static
*** Chasing dependencies:
Chasing modules from: Assert.hs
Stable obj: []
Stable BCO: []
compile: input file Assert.hs
Created temporary directory: /tmp/ghc2366_0
*** Checking old interface for main:Main:
[1 of 1] Compiling Main ( Assert.hs, Assert.o )
*** Parser:
*** Renamer/typechecker:
*** Desugar:
Result size = 94
*** Simplify:
Result size = 111
Result size = 102
*** Tidy Core:
Result size = 102
*** CorePrep:
Result size = 146
*** Stg2Stg:
*** CodeGen:
*** CodeOutput:
*** C Compiler:
gcc -x c /tmp/ghc2366_0/ghc2366_0.hc -o /tmp/ghc2366_0/ghc2366_0.s -fno-strict-aliasing -v -S -Wimplicit -O -D__GLASGOW_HASKELL__=606 -DNO_REGS -DUSE_MINIINTERPRETER -I . -I /usr/lib/ghc-6.6/include
Reading specs from /usr/lib/gcc-lib/powerpc-linux/3.3.5/specs
Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --enable-__cxa_atexit --with-system-zlib --enable-nls --without-included-gettext --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc --disable-multilib powerpc-linux
Thread model: posix
gcc version 3.3.5 (Debian 1:3.3.5-13)
/usr/lib/gcc-lib/powerpc-linux/3.3.5/cc1 -quiet -v -I . -I /usr/lib/ghc-6.6/include -D__GNUC__=3 -D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=5 -D__unix__ -D__gnu_linux__ -D__linux__ -Dunix -D__unix -Dlinux -D__linux -Asystem=unix -Asystem=posix -D__GLASGOW_HASKELL__=606 -DNO_REGS -DUSE_MINIINTERPRETER /tmp/ghc2366_0/ghc2366_0.hc -quiet -dumpbase ghc2366_0.hc -auxbase-strip /tmp/ghc2366_0/ghc2366_0.s -O -Wimplicit -version -fno-strict-aliasing-o /tmp/ghc2366_0/ghc2366_0.s
GNU C version 3.3.5 (Debian 1:3.3.5-13) (powerpc-linux)
compiled by GNU C version 3.3.5 (Debian 1:3.3.5-13).
GGC heuristics: --param ggc-min-expand=72 --param ggc-min-heapsize=80502
ignoring nonexistent directory "/usr/powerpc-linux/include"
#include "..." search starts here:
#include <...> search starts here:
.
/usr/lib/ghc-6.6/include
/usr/local/include
/usr/lib/gcc-lib/powerpc-linux/3.3.5/include
/usr/include
End of search list.
*** Assembler:
gcc -I. -c /tmp/ghc2366_0/ghc2366_0.s -o Assert.o
*** Deleting temp files:
Deleting: /tmp/ghc2366_0/ghc2366_0.s /tmp/ghc2366_0/ghc2366_0.hc
Upsweep completely successful.
*** Deleting temp files:
Deleting:
link: linkables are ...
LinkableM (Thu Dec 21 16:53:18 CET 2006) main:Main
[DotO Assert.o]
Linking Assert ...
*** Linker:
gcc -v -o Assert Assert.o -L/usr/lib/ghc-6.6 -lHSbase -lHSbase_cbits -lHSrts_debug -lm -lgmp -ldl -lrt -u base_GHCziBase_Izh_static_info -u base_GHCziBase_Czh_static_info -u base_GHCziFloat_Fzh_static_info -u base_GHCziFloat_Dzh_static_info -u base_GHCziPtr_Ptr_static_info -u base_GHCziWord_Wzh_static_info -u base_GHCziInt_I8zh_static_info -u base_GHCziInt_I16zh_static_info -u base_GHCziInt_I32zh_static_info -u base_GHCziInt_I64zh_static_info -u base_GHCziWord_W8zh_static_info -u base_GHCziWord_W16zh_static_info -u base_GHCziWord_W32zh_static_info -u base_GHCziWord_W64zh_static_info -u base_GHCziStable_StablePtr_static_info -u base_GHCziBase_Izh_con_info -u base_GHCziBase_Czh_con_info -u base_GHCziFloat_Fzh_con_info -u base_GHCziFloat_Dzh_con_info -u base_GHCziPtr_Ptr_con_info -u base_GHCziPtr_FunPtr_con_info -u base_GHCziStable_StablePtr_con_info -u base_GHCziBase_False_closure -u base_GHCziBase_True_closure -u base_GHCziPack_unpackCString_closure -u base_GHCziIOBase_stackOverflow_closure -u base_GHCziIOBase_heapOverflow_closure -u base_GHCziIOBase_NonTermination_closure -u base_GHCziIOBase_BlockedOnDeadMVar_closure -u base_GHCziIOBase_BlockedIndefinitely_closure -u base_GHCziIOBase_Deadlock_closure -u base_GHCziIOBase_NestedAtomically_closure -u base_GHCziWeak_runFinalizzerBatch_closure -u base_GHCziConc_ensureIOManagerIsRunning_closure -lbfd -liberty
Reading specs from /usr/lib/gcc-lib/powerpc-linux/3.3.5/specs
Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --enable-__cxa_atexit --with-system-zlib --enable-nls --without-included-gettext --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc --disable-multilib powerpc-linux
Thread model: posix
gcc version 3.3.5 (Debian 1:3.3.5-13)
/usr/lib/gcc-lib/powerpc-linux/3.3.5/collect2 --eh-frame-hdr -V -Qy -m elf32ppclinux -dynamic-linker /lib/ld.so.1 -o Assert -u base_GHCziBase_Izh_static_info -u base_GHCziBase_Czh_static_info -u base_GHCziFloat_Fzh_static_info -u base_GHCziFloat_Dzh_static_info -u base_GHCziPtr_Ptr_static_info -u base_GHCziWord_Wzh_static_info -u base_GHCziInt_I8zh_static_info -u base_GHCziInt_I16zh_static_info -u base_GHCziInt_I32zh_static_info -u base_GHCziInt_I64zh_static_info -u base_GHCziWord_W8zh_static_info -u base_GHCziWord_W16zh_static_info -u base_GHCziWord_W32zh_static_info -u base_GHCziWord_W64zh_static_info -u base_GHCziStable_StablePtr_static_info -u base_GHCziBase_Izh_con_info -u base_GHCziBase_Czh_con_info -u base_GHCziFloat_Fzh_con_info -u base_GHCziFloat_Dzh_con_info -u base_GHCziPtr_Ptr_con_info -u base_GHCziPtr_FunPtr_con_info -u base_GHCziStable_StablePtr_con_info -u base_GHCziBase_False_closure -u base_GHCziBase_True_closure -u base_GHCziPack_unpackCString_closure -u base_GHCziIOBase_stackOverflow_closure -u base_GHCziIOBase_heapOverflow_closure-u base_GHCziIOBase_NonTermination_closure -u base_GHCziIOBase_BlockedOnDeadMVar_closure-u base_GHCziIOBase_BlockedIndefinitely_closure -u base_GHCziIOBase_Deadlock_closure -u base_GHCziIOBase_NestedAtomically_closure -u base_GHCziWeak_runFinalizzerBatch_closure -ubase_GHCziConc_ensureIOManagerIsRunning_closure /usr/lib/gcc-lib/powerpc-linux/3.3.5/../../../crt1.o /usr/lib/gcc-lib/powerpc-linux/3.3.5/../../../crti.o /usr/lib/gcc-lib/powerpc-linux/3.3.5/crtbegin.o -L/usr/lib/ghc-6.6 -L/usr/lib/gcc-lib/powerpc-linux/3.3.5 -L/usr/lib/gcc-lib/powerpc-linux/3.3.5/../../.. Assert.o -lHSbase -lHSbase_cbits -lHSrts_debug -lm -lgmp -ldl -lrt -lbfd -liberty -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc-lib/powerpc-linux/3.3.5/crtsavres.o /usr/lib/gcc-lib/powerpc-linux/3.3.5/crtend.o /usr/lib/gcc-lib/powerpc-linux/3.3.5/../../../crtn.o
GNU ld version 2.15
Supported emulations:
elf32ppclinux
elf32ppc
elf32ppcsim
elf64ppc
link: done
*** Deleting temp files:
Deleting:
*** Deleting temp dirs:
Deleting: /tmp/ghc2366_0
[0] ms@isis:/tmp/chr > gdb ./Assert
GNU gdb 6.3-debian
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "powerpc-linux"...Using host libthread_db library "/lib/tls/libthread_db.so.1".
(gdb) run > /dev/null
Starting program: /tmp/chr/Assert > /dev/null
[Thread debugging using libthread_db enabled]
[New Thread 805412480 (LWP 2375)]
Assert: internal error: ASSERTION FAILED: file Schedule.c, line 1774
(GHC version 6.6 for powerpc_unknown_linux)
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
Program received signal SIGABRT, Aborted.
[Switching to Thread 805412480 (LWP 2375)]
0x0fccf590 in raise () from /lib/tls/libc.so.6
(gdb) q
The program is running. Exit anyway? (y or n) n
Not confirmed.
(gdb) bt
#0 0x0fccf590 in raise () from /lib/tls/libc.so.6
#1 0x0fcd0f8c in abort () from /lib/tls/libc.so.6
#2 0x102859a0 in rtsFatalInternalErrorFn ()
#3 0x10285638 in barf ()
#4 0x1028568c in _assertFail ()
#5 0x10287178 in scheduleHandleThreadBlocked ()
#6 0x10286a1c in schedule ()
#7 0x10287b24 in scheduleWaitThread ()
#8 0x10284428 in rts_evalLazyIO ()
#9 0x10283a70 in main ()
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 6.6 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Runtime System |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | Multiple |
</details>
<!-- {"blocked_by":[],"summary":"assertion failure in Schedule.c","status":"New","operating_system":"","component":"Runtime System","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.6","keywords":[],"differentials":[],"test_case":"","architecture":"Multiple","cc":[""],"type":"Bug","description":"the following program triggers an assertion failure.\r\nthis is with ghc 6.6 (built on debian 3.1 from the debian unstable\r\nsource package) on both x86 and powerpc.\r\n\r\n{{{\r\nimport Control.Concurrent\r\nimport Control.Exception\r\n\r\nmain = do\r\n master <- myThreadId\r\n handle (const main) $ do\r\n sequence $ replicate 10 $\r\n forkIO $ do\r\n putStrLn $ replicate 400000 'X'\r\n throwTo master NonTermination\r\n putStrLn $ replicate 4000000 'X'\r\n threadDelay 1000000\r\n}}}\r\n\r\n{{{\r\n[0] ms@isis:/tmp/chr > uname -a\r\nLinux isis 2.6.15-1-powerpc #2 Mon Mar 6 12:39:17 CET 2006 ppc GNU/Linux\r\n[0] ms@isis:/tmp/chr > gcc -v\r\nReading specs from /usr/lib/gcc-lib/powerpc-linux/3.3.5/specs\r\nConfigured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --enable-__cxa_atexit --with-system-zlib --enable-nls --without-included-gettext --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc --disable-multilib powerpc-linux\r\nThread model: posix\r\ngcc version 3.3.5 (Debian 1:3.3.5-13)\r\n[0] ms@isis:/tmp/chr > ghc --make -debug -v Assert.hs\r\nGlasgow Haskell Compiler, Version 6.6, for Haskell 98, compiled by GHC version 6.2.2\r\nUsing package config file: /usr/lib/ghc-6.6/package.conf\r\nwired-in package base mapped to base-2.0\r\nwired-in package rts mapped to rts-1.0\r\nwired-in package haskell98 mapped to haskell98-1.0\r\nwired-in package template-haskell mapped to template-haskell-2.0\r\nHsc static flags: -funregisterised -static\r\n*** Chasing dependencies:\r\nChasing modules from: Assert.hs\r\nStable obj: []\r\nStable BCO: []\r\ncompile: input file Assert.hs\r\nCreated temporary directory: /tmp/ghc2366_0\r\n*** Checking old interface for main:Main:\r\n[1 of 1] Compiling Main ( Assert.hs, Assert.o )\r\n*** Parser:\r\n*** Renamer/typechecker:\r\n*** Desugar:\r\n Result size = 94\r\n*** Simplify:\r\n Result size = 111\r\n Result size = 102\r\n*** Tidy Core:\r\n Result size = 102\r\n*** CorePrep:\r\n Result size = 146\r\n*** Stg2Stg:\r\n*** CodeGen:\r\n*** CodeOutput:\r\n*** C Compiler:\r\ngcc -x c /tmp/ghc2366_0/ghc2366_0.hc -o /tmp/ghc2366_0/ghc2366_0.s -fno-strict-aliasing -v -S -Wimplicit -O -D__GLASGOW_HASKELL__=606 -DNO_REGS -DUSE_MINIINTERPRETER -I . -I /usr/lib/ghc-6.6/include\r\nReading specs from /usr/lib/gcc-lib/powerpc-linux/3.3.5/specs\r\nConfigured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --enable-__cxa_atexit --with-system-zlib --enable-nls --without-included-gettext --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc --disable-multilib powerpc-linux\r\nThread model: posix\r\ngcc version 3.3.5 (Debian 1:3.3.5-13)\r\n /usr/lib/gcc-lib/powerpc-linux/3.3.5/cc1 -quiet -v -I . -I /usr/lib/ghc-6.6/include -D__GNUC__=3 -D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=5 -D__unix__ -D__gnu_linux__ -D__linux__ -Dunix -D__unix -Dlinux -D__linux -Asystem=unix -Asystem=posix -D__GLASGOW_HASKELL__=606 -DNO_REGS -DUSE_MINIINTERPRETER /tmp/ghc2366_0/ghc2366_0.hc -quiet -dumpbase ghc2366_0.hc -auxbase-strip /tmp/ghc2366_0/ghc2366_0.s -O -Wimplicit -version -fno-strict-aliasing-o /tmp/ghc2366_0/ghc2366_0.s\r\nGNU C version 3.3.5 (Debian 1:3.3.5-13) (powerpc-linux)\r\n compiled by GNU C version 3.3.5 (Debian 1:3.3.5-13).\r\nGGC heuristics: --param ggc-min-expand=72 --param ggc-min-heapsize=80502\r\nignoring nonexistent directory \"/usr/powerpc-linux/include\"\r\n#include \"...\" search starts here:\r\n#include <...> search starts here:\r\n .\r\n /usr/lib/ghc-6.6/include\r\n /usr/local/include\r\n /usr/lib/gcc-lib/powerpc-linux/3.3.5/include\r\n /usr/include\r\nEnd of search list.\r\n*** Assembler:\r\ngcc -I. -c /tmp/ghc2366_0/ghc2366_0.s -o Assert.o\r\n*** Deleting temp files:\r\nDeleting: /tmp/ghc2366_0/ghc2366_0.s /tmp/ghc2366_0/ghc2366_0.hc\r\nUpsweep completely successful.\r\n*** Deleting temp files:\r\nDeleting:\r\nlink: linkables are ...\r\nLinkableM (Thu Dec 21 16:53:18 CET 2006) main:Main\r\n [DotO Assert.o]\r\nLinking Assert ...\r\n*** Linker:\r\ngcc -v -o Assert Assert.o -L/usr/lib/ghc-6.6 -lHSbase -lHSbase_cbits -lHSrts_debug -lm -lgmp -ldl -lrt -u base_GHCziBase_Izh_static_info -u base_GHCziBase_Czh_static_info -u base_GHCziFloat_Fzh_static_info -u base_GHCziFloat_Dzh_static_info -u base_GHCziPtr_Ptr_static_info -u base_GHCziWord_Wzh_static_info -u base_GHCziInt_I8zh_static_info -u base_GHCziInt_I16zh_static_info -u base_GHCziInt_I32zh_static_info -u base_GHCziInt_I64zh_static_info -u base_GHCziWord_W8zh_static_info -u base_GHCziWord_W16zh_static_info -u base_GHCziWord_W32zh_static_info -u base_GHCziWord_W64zh_static_info -u base_GHCziStable_StablePtr_static_info -u base_GHCziBase_Izh_con_info -u base_GHCziBase_Czh_con_info -u base_GHCziFloat_Fzh_con_info -u base_GHCziFloat_Dzh_con_info -u base_GHCziPtr_Ptr_con_info -u base_GHCziPtr_FunPtr_con_info -u base_GHCziStable_StablePtr_con_info -u base_GHCziBase_False_closure -u base_GHCziBase_True_closure -u base_GHCziPack_unpackCString_closure -u base_GHCziIOBase_stackOverflow_closure -u base_GHCziIOBase_heapOverflow_closure -u base_GHCziIOBase_NonTermination_closure -u base_GHCziIOBase_BlockedOnDeadMVar_closure -u base_GHCziIOBase_BlockedIndefinitely_closure -u base_GHCziIOBase_Deadlock_closure -u base_GHCziIOBase_NestedAtomically_closure -u base_GHCziWeak_runFinalizzerBatch_closure -u base_GHCziConc_ensureIOManagerIsRunning_closure -lbfd -liberty\r\nReading specs from /usr/lib/gcc-lib/powerpc-linux/3.3.5/specs\r\nConfigured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --enable-__cxa_atexit --with-system-zlib --enable-nls --without-included-gettext --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc --disable-multilib powerpc-linux\r\nThread model: posix\r\ngcc version 3.3.5 (Debian 1:3.3.5-13)\r\n /usr/lib/gcc-lib/powerpc-linux/3.3.5/collect2 --eh-frame-hdr -V -Qy -m elf32ppclinux -dynamic-linker /lib/ld.so.1 -o Assert -u base_GHCziBase_Izh_static_info -u base_GHCziBase_Czh_static_info -u base_GHCziFloat_Fzh_static_info -u base_GHCziFloat_Dzh_static_info -u base_GHCziPtr_Ptr_static_info -u base_GHCziWord_Wzh_static_info -u base_GHCziInt_I8zh_static_info -u base_GHCziInt_I16zh_static_info -u base_GHCziInt_I32zh_static_info -u base_GHCziInt_I64zh_static_info -u base_GHCziWord_W8zh_static_info -u base_GHCziWord_W16zh_static_info -u base_GHCziWord_W32zh_static_info -u base_GHCziWord_W64zh_static_info -u base_GHCziStable_StablePtr_static_info -u base_GHCziBase_Izh_con_info -u base_GHCziBase_Czh_con_info -u base_GHCziFloat_Fzh_con_info -u base_GHCziFloat_Dzh_con_info -u base_GHCziPtr_Ptr_con_info -u base_GHCziPtr_FunPtr_con_info -u base_GHCziStable_StablePtr_con_info -u base_GHCziBase_False_closure -u base_GHCziBase_True_closure -u base_GHCziPack_unpackCString_closure -u base_GHCziIOBase_stackOverflow_closure -u base_GHCziIOBase_heapOverflow_closure-u base_GHCziIOBase_NonTermination_closure -u base_GHCziIOBase_BlockedOnDeadMVar_closure-u base_GHCziIOBase_BlockedIndefinitely_closure -u base_GHCziIOBase_Deadlock_closure -u base_GHCziIOBase_NestedAtomically_closure -u base_GHCziWeak_runFinalizzerBatch_closure -ubase_GHCziConc_ensureIOManagerIsRunning_closure /usr/lib/gcc-lib/powerpc-linux/3.3.5/../../../crt1.o /usr/lib/gcc-lib/powerpc-linux/3.3.5/../../../crti.o /usr/lib/gcc-lib/powerpc-linux/3.3.5/crtbegin.o -L/usr/lib/ghc-6.6 -L/usr/lib/gcc-lib/powerpc-linux/3.3.5 -L/usr/lib/gcc-lib/powerpc-linux/3.3.5/../../.. Assert.o -lHSbase -lHSbase_cbits -lHSrts_debug -lm -lgmp -ldl -lrt -lbfd -liberty -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc-lib/powerpc-linux/3.3.5/crtsavres.o /usr/lib/gcc-lib/powerpc-linux/3.3.5/crtend.o /usr/lib/gcc-lib/powerpc-linux/3.3.5/../../../crtn.o\r\nGNU ld version 2.15\r\n Supported emulations:\r\n elf32ppclinux\r\n elf32ppc\r\n elf32ppcsim\r\n elf64ppc\r\nlink: done\r\n*** Deleting temp files:\r\nDeleting:\r\n*** Deleting temp dirs:\r\nDeleting: /tmp/ghc2366_0\r\n[0] ms@isis:/tmp/chr > gdb ./Assert\r\nGNU gdb 6.3-debian\r\nCopyright 2004 Free Software Foundation, Inc.\r\nGDB is free software, covered by the GNU General Public License, and you are\r\nwelcome to change it and/or distribute copies of it under certain conditions.\r\nType \"show copying\" to see the conditions.\r\nThere is absolutely no warranty for GDB. Type \"show warranty\" for details.\r\nThis GDB was configured as \"powerpc-linux\"...Using host libthread_db library \"/lib/tls/libthread_db.so.1\".\r\n\r\n(gdb) run > /dev/null\r\nStarting program: /tmp/chr/Assert > /dev/null\r\n[Thread debugging using libthread_db enabled]\r\n[New Thread 805412480 (LWP 2375)]\r\nAssert: internal error: ASSERTION FAILED: file Schedule.c, line 1774\r\n\r\n (GHC version 6.6 for powerpc_unknown_linux)\r\n Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug\r\n\r\nProgram received signal SIGABRT, Aborted.\r\n[Switching to Thread 805412480 (LWP 2375)]\r\n0x0fccf590 in raise () from /lib/tls/libc.so.6\r\n(gdb) q\r\nThe program is running. Exit anyway? (y or n) n\r\nNot confirmed.\r\n(gdb) bt\r\n#0 0x0fccf590 in raise () from /lib/tls/libc.so.6\r\n#1 0x0fcd0f8c in abort () from /lib/tls/libc.so.6\r\n#2 0x102859a0 in rtsFatalInternalErrorFn ()\r\n#3 0x10285638 in barf ()\r\n#4 0x1028568c in _assertFail ()\r\n#5 0x10287178 in scheduleHandleThreadBlocked ()\r\n#6 0x10286a1c in schedule ()\r\n#7 0x10287b24 in scheduleWaitThread ()\r\n#8 0x10284428 in rts_evalLazyIO ()\r\n#9 0x10283a70 in main ()\r\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->6.6.1Simon MarlowSimon Marlowhttps://gitlab.haskell.org/ghc/ghc/-/issues/1047Increase gurantees of semantics of block/unblock/throwTo2019-07-07T19:15:31ZChrisKuklewiczIncrease gurantees of semantics of block/unblock/throwToEnsure threads that stopped on a throwTo because the target thread was in a 'block' state succeed at the next 'block'-\>'unblock' transition. Currently these stopped threads may never succeed making throwTo a possibly permanent hang.
Th...Ensure threads that stopped on a throwTo because the target thread was in a 'block' state succeed at the next 'block'-\>'unblock' transition. Currently these stopped threads may never succeed making throwTo a possibly permanent hang.
The original paper, section 7.2, required the desired behavior.
More elaboration at http://haskell.org/haskellwiki/GHC/Concurrency/Flaws
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 6.6 |
| Type | Task |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Runtime System |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | Multiple |
| Architecture | Multiple |
</details>
<!-- {"blocked_by":[],"summary":"Increase gurantees of semantics of block/unblock/throwTo","status":"New","operating_system":"Multiple","component":"Runtime System","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.6","keywords":["concurrency"],"differentials":[],"test_case":"","architecture":"Multiple","cc":[""],"type":"Task","description":"Ensure threads that stopped on a throwTo because the target thread was in a 'block' state succeed at the next 'block'->'unblock' transition. Currently these stopped threads may never succeed making throwTo a possibly permanent hang.\r\n\r\nThe original paper, section 7.2, required the desired behavior.\r\n\r\nMore elaboration at http://haskell.org/haskellwiki/GHC/Concurrency/Flaws","type_of_failure":"OtherFailure","blocking":[]} -->6.6.1Ian Lynagh <igloo@earth.li>Ian Lynagh <igloo@earth.li>https://gitlab.haskell.org/ghc/ghc/-/issues/993threaded RTS under pc-solaris does not work2019-07-07T19:15:58ZChristian Maederthreaded RTS under pc-solaris does not workthe stage2 compiler produces "Illegal Instruction" as soon as libHSrts_thr.a is linked in
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version ...the stage2 compiler produces "Illegal Instruction" as soon as libHSrts_thr.a is linked in
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 6.6 |
| 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":"threaded RTS under pc-solaris does not work","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.6","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"the stage2 compiler produces \"Illegal Instruction\" as soon as libHSrts_thr.a is linked in","type_of_failure":"OtherFailure","blocking":[]} -->6.6.1https://gitlab.haskell.org/ghc/ghc/-/issues/954internal error: scavenge_mark_stack: unimplemented/strange closure type 28 @ ...2019-07-07T19:16:08Zguestinternal error: scavenge_mark_stack: unimplemented/strange closure type 28 @ 0xaffe7500Program work correctly if it was compiled by GHC 6.4.1.
If program was compiled by GHC 6.6, some time it print this error.
```
ghc -v:
Glasgow Haskell Compiler, Version 6.6, for Haskell 98, compiled by GHC version 6.6
Using package conf...Program work correctly if it was compiled by GHC 6.4.1.
If program was compiled by GHC 6.6, some time it print this error.
```
ghc -v:
Glasgow Haskell Compiler, Version 6.6, for Haskell 98, compiled by GHC version 6.6
Using package config file: /usr/lib/ghc-6.6/package.conf
wired-in package base mapped to base-2.0
wired-in package rts mapped to rts-1.0
wired-in package haskell98 mapped to haskell98-1.0
wired-in package template-haskell mapped to template-haskell-2.0
Hsc static flags: -static
gcc -v:
Configured with: ./configure --prefix=/usr --enable-languages=c,c++,objc,java,treelang,f77 : (reconfigured) ./configure --prefix=/usr --enable-languages=c,c++,objc,java,treelang : (reconfigured) ./configure --prefix=/usr --enable-languages=c,ada,c++,fortran,java,objc,obj-c++,treelang : (reconfigured) ./configure --prefix=/usr --enable-languages=c,ada,c++,fortran,java,objc,treelang : (reconfigured) ./configure --prefix=/usr --enable-languages=c,ada,c++,f77,java,objc,treelang
Thread model: posix
gcc version 3.4.6
```6.6.1https://gitlab.haskell.org/ghc/ghc/-/issues/942Windows programs throw uncaught Invalid HANDLE exception on exit2019-07-07T19:16:12Zbrianh@metamilk.comWindows programs throw uncaught Invalid HANDLE exception on exitIf I compile the following program
```
module Main where
main = return ()
```
on Windows XP with the command line
```
ghc --make Main.hs
```
and then run the program inside Microsoft Visual Studio 2003 (by right clicking main.exe an...If I compile the following program
```
module Main where
main = return ()
```
on Windows XP with the command line
```
ghc --make Main.hs
```
and then run the program inside Microsoft Visual Studio 2003 (by right clicking main.exe and selecting Debug -\> MS VS 2003 from the context menu) I get the following output in the Visual Studio output pane (full path to main.exe elided for clarity):
```
'main.exe': Loaded 'C:\...\main.exe', No symbols loaded.
'main.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', No symbols loaded.
'main.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', No symbols loaded.
'main.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll', No symbols loaded.
'main.exe': Loaded 'C:\WINDOWS\system32\user32.dll', No symbols loaded.
'main.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll', No symbols loaded.
'main.exe': Loaded 'C:\WINDOWS\system32\wsock32.dll', No symbols loaded.
'main.exe': Loaded 'C:\WINDOWS\system32\ws2_32.dll', No symbols loaded.
'main.exe': Loaded 'C:\WINDOWS\system32\ws2help.dll', No symbols loaded.
'main.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll', No symbols loaded.
'main.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll', No symbols loaded.
The thread 'Win32 Thread' (0x630) has exited with code 0 (0x0).
First-chance exception at 0x7c90eb74 in main.exe: 0xC0000008: An invalid HANDLE was specified.
Unhandled exception at 0x7c90eb74 in main.exe: 0xC0000008: An invalid HANDLE was specified.
The program '[1540] main.exe: Native' has exited with code 0 (0x0).
```
If the program is run outside Visual Studio no problems are visible (ie the program exits silently as expected) but presumably the same behaviour is happening internally.
My first guess is that perhaps the RTS exit code is trying to use a handle to the thread that has already exited, but this is only a wild guess.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 6.6 |
| 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":"Windows programs throw uncaught Invalid HANDLE exception on exit","status":"New","operating_system":"","component":"Runtime System","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.6","keywords":["HANDLE","exception","exit","uncaught"],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"If I compile the following program\r\n{{{\r\nmodule Main where\r\n\r\nmain = return ()\r\n}}}\r\non Windows XP with the command line\r\n{{{\r\nghc --make Main.hs\r\n}}}\r\nand then run the program inside Microsoft Visual Studio 2003 (by right clicking main.exe and selecting Debug -> MS VS 2003 from the context menu) I get the following output in the Visual Studio output pane (full path to main.exe elided for clarity):\r\n{{{\r\n'main.exe': Loaded 'C:\\...\\main.exe', No symbols loaded.\r\n'main.exe': Loaded 'C:\\WINDOWS\\system32\\ntdll.dll', No symbols loaded.\r\n'main.exe': Loaded 'C:\\WINDOWS\\system32\\kernel32.dll', No symbols loaded.\r\n'main.exe': Loaded 'C:\\WINDOWS\\system32\\msvcrt.dll', No symbols loaded.\r\n'main.exe': Loaded 'C:\\WINDOWS\\system32\\user32.dll', No symbols loaded.\r\n'main.exe': Loaded 'C:\\WINDOWS\\system32\\gdi32.dll', No symbols loaded.\r\n'main.exe': Loaded 'C:\\WINDOWS\\system32\\wsock32.dll', No symbols loaded.\r\n'main.exe': Loaded 'C:\\WINDOWS\\system32\\ws2_32.dll', No symbols loaded.\r\n'main.exe': Loaded 'C:\\WINDOWS\\system32\\ws2help.dll', No symbols loaded.\r\n'main.exe': Loaded 'C:\\WINDOWS\\system32\\advapi32.dll', No symbols loaded.\r\n'main.exe': Loaded 'C:\\WINDOWS\\system32\\rpcrt4.dll', No symbols loaded.\r\nThe thread 'Win32 Thread' (0x630) has exited with code 0 (0x0).\r\nFirst-chance exception at 0x7c90eb74 in main.exe: 0xC0000008: An invalid HANDLE was specified.\r\nUnhandled exception at 0x7c90eb74 in main.exe: 0xC0000008: An invalid HANDLE was specified.\r\nThe program '[1540] main.exe: Native' has exited with code 0 (0x0).\r\n}}}\r\nIf the program is run outside Visual Studio no problems are visible (ie the program exits silently as expected) but presumably the same behaviour is happening internally.\r\nMy first guess is that perhaps the RTS exit code is trying to use a handle to the thread that has already exited, but this is only a wild guess.","type_of_failure":"OtherFailure","blocking":[]} -->6.6.1Ian Lynagh <igloo@earth.li>Ian Lynagh <igloo@earth.li>https://gitlab.haskell.org/ghc/ghc/-/issues/896GetLastError/SetLastError in Windows2019-07-07T19:16:24ZeivuokkoGetLastError/SetLastError in WindowsRTS might call Windows API calls transparently to user, which can lead to wierd GetLastError-results, even with bound threads. !GetLastError/!SetLastError needs similar workaround as errno has.RTS might call Windows API calls transparently to user, which can lead to wierd GetLastError-results, even with bound threads. !GetLastError/!SetLastError needs similar workaround as errno has.6.6.1Ian Lynagh <igloo@earth.li>Ian Lynagh <igloo@earth.li>https://gitlab.haskell.org/ghc/ghc/-/issues/850threaded RTS uses SIGALRM2019-07-07T19:16:38ZSimon Marlowthreaded RTS uses SIGALRMThe threaded RTS uses SIGALRM for its timer signal, this is a bit naughty and could interfere with use of SIGALRM by the application. Also it can cause EINTR of system calls, which the application might not be prepared to handle. Some sy...The threaded RTS uses SIGALRM for its timer signal, this is a bit naughty and could interfere with use of SIGALRM by the application. Also it can cause EINTR of system calls, which the application might not be prepared to handle. Some system calls can't be reliably restarted (eg. usleep()).
The single threaded RTS uses SIGVTALRM, but we can't use this in the multithreaded RTS because it ticks in CPU time, and our threads might be idle. Ideally we should be using the timer_\*() family of functions, if supported.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 6.4.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Runtime System |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | Unknown |
| Architecture | Unknown |
</details>
<!-- {"blocked_by":[],"summary":"threaded RTS uses SIGALRM","status":"New","operating_system":"Unknown","component":"Runtime System","related":[],"milestone":"6.6.1","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.4.2","keywords":[],"differentials":[],"test_case":"","architecture":"Unknown","cc":[""],"type":"Bug","description":"The threaded RTS uses SIGALRM for its timer signal, this is a bit naughty and could interfere with use of SIGALRM by the application. Also it can cause EINTR of system calls, which the application might not be prepared to handle. Some system calls can't be reliably restarted (eg. usleep()).\r\n\r\nThe single threaded RTS uses SIGVTALRM, but we can't use this in the multithreaded RTS because it ticks in CPU time, and our threads might be idle. Ideally we should be using the timer_*() family of functions, if supported.","type_of_failure":"OtherFailure","blocking":[]} -->6.6.1Simon MarlowSimon Marlowhttps://gitlab.haskell.org/ghc/ghc/-/issues/743-M limit exceeded by a factor of 22019-07-07T19:17:10ZSimon Marlow-M limit exceeded by a factor of 2See
[http://www.haskell.org//pipermail/glasgow-haskell-users/2006-April/009977.html](http://www.haskell.org//pipermail/glasgow-haskell-users/2006-April/009977.html)
<details><summary>Trac metadata</summary>
| Trac field | ...See
[http://www.haskell.org//pipermail/glasgow-haskell-users/2006-April/009977.html](http://www.haskell.org//pipermail/glasgow-haskell-users/2006-April/009977.html)
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ----------------------- |
| Version | 6.4.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Runtime System |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | ketil+haskell@ii.uib.no |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"-M limit exceeded by a factor of 2","status":"New","operating_system":"","component":"Runtime System","related":[],"milestone":"6.6","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.4.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":["ketil+haskell@ii.uib.no"],"type":"Bug","description":"See\r\n\r\n[http://www.haskell.org//pipermail/glasgow-haskell-users/2006-April/009977.html]","type_of_failure":"OtherFailure","blocking":[]} -->6.6.1Simon MarlowSimon Marlow