[GHC] #15158: T8089 failing with ghci, threaded1, threaded2, profthreaded
#15158: T8089 failing with ghci, threaded1, threaded2, profthreaded -------------------------------------+------------------------------------- Reporter: alpmestan | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: | Version: 8.5 libraries/base | Keywords: | Operating System: Linux Architecture: x86_64 | Type of failure: Incorrect result (amd64) | at runtime Test Case: T8089 | Blocked By: Blocking: | Related Tickets: #8089 Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- {{{ =====> T8089(ghci) 17 of 17 [2, 16, 0] cd "/run/user/1001/ghctest-m_wu2f4i/test spaces/../../libraries/base/tests/T8089.run" && "/home/alp/WT/ghc-slow- validate/bindisttest/install dir/bin/ghc" T8089.hs -dcore-lint -dcmm- lint -no-user-package-db -rtsopts -fno-warn-missed-specialisations -fshow- warning-groups -fdiagnostics-color=never -fno-diagnostics-show-caret -dno- debug-output --interactive -v0 -ignore-dot-ghci -fno-ghci-history +RTS -I0.1 -RTS < T8089.genscript Wrong exit code for T8089(ghci) (expected 99 , actual 0 ) *** unexpected failure for T8089(ghci) =====> T8089(threaded1) 17 of 17 [2, 17, 0] cd "/run/user/1001/ghctest-m_wu2f4i/test spaces/../../libraries/base/tests/T8089.run" && "/home/alp/WT/ghc-slow- validate/bindisttest/install dir/bin/ghc" -o T8089 T8089.hs -dcore-lint -dcmm-lint -no-user-package-db -rtsopts -fno-warn-missed-specialisations -fshow-warning-groups -fdiagnostics-color=never -fno-diagnostics-show- caret -dno-debug-output -threaded -debug cd "/run/user/1001/ghctest-m_wu2f4i/test spaces/../../libraries/base/tests/T8089.run" && ./T8089 Wrong exit code for T8089(threaded1)(expected 99 , actual 0 ) *** unexpected failure for T8089(threaded1) =====> T8089(threaded2) 17 of 17 [2, 18, 0] cd "/run/user/1001/ghctest-m_wu2f4i/test spaces/../../libraries/base/tests/T8089.run" && "/home/alp/WT/ghc-slow- validate/bindisttest/install dir/bin/ghc" -o T8089 T8089.hs -dcore-lint -dcmm-lint -no-user-package-db -rtsopts -fno-warn-missed-specialisations -fshow-warning-groups -fdiagnostics-color=never -fno-diagnostics-show- caret -dno-debug-output -O -threaded -eventlog cd "/run/user/1001/ghctest-m_wu2f4i/test spaces/../../libraries/base/tests/T8089.run" && ./T8089 +RTS -N2 -ls -RTS Wrong exit code for T8089(threaded2)(expected 99 , actual 0 ) *** unexpected failure for T8089(threaded2) =====> T8089(profthreaded) 17 of 17 [2, 19, 0] cd "/run/user/1001/ghctest-m_wu2f4i/test spaces/../../libraries/base/tests/T8089.run" && "/home/alp/WT/ghc-slow- validate/bindisttest/install dir/bin/ghc" -o T8089 T8089.hs -dcore-lint -dcmm-lint -no-user-package-db -rtsopts -fno-warn-missed-specialisations -fshow-warning-groups -fdiagnostics-color=never -fno-diagnostics-show- caret -dno-debug-output -O -prof -static -fprof-auto -threaded cd "/run/user/1001/ghctest-m_wu2f4i/test spaces/../../libraries/base/tests/T8089.run" && ./T8089 +RTS -p -RTS Wrong exit code for T8089(profthreaded)(expected 99 , actual 0 ) *** unexpected failure for T8089(profthreaded) }}} I'm going to write a patch to expect the test to be broken in these ways, but it seems really wrong that the exit code we get is not the same accross all ways. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15158> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#15158: T8089 failing with ghci, threaded1, threaded2, profthreaded -------------------------------------+------------------------------------- Reporter: alpmestan | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: libraries/base | Version: 8.5 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 Type of failure: Incorrect result | (amd64) at runtime | Test Case: T8089 Blocked By: | Blocking: Related Tickets: #8089, #7325, | Differential Rev(s): #15064 | Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * related: #8089 => #8089, #7325, #15064 Comment: #7325 and #15064 are also relevant. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15158#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#15158: T8089 failing with ghci, threaded1, threaded2, profthreaded -------------------------------------+------------------------------------- Reporter: alpmestan | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: libraries/base | Version: 8.5 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 Type of failure: Incorrect result | (amd64) at runtime | Test Case: T8089 Blocked By: | Blocking: Related Tickets: #8089, #7325, | Differential Rev(s): #15064 | Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): It looks to me like there is a bug in the event manager. Specifically, it apparently makes no attempt to handle overflow when computing expiration times. Namely, `GHC.Event.TimerManager.registerTimeout` has: {{{#!hs now <- getMonotonicTimeNSec let expTime = fromIntegral us * 1000 + now }}} Even worse, we currently throw away the delay requested by the user, meaning it is no longer possible to account for overflow after registration. This can be fixed, but will require a bit more allocation in timeout registration. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15158#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#15158: T8089 failing with ghci, threaded1, threaded2, profthreaded -------------------------------------+------------------------------------- Reporter: alpmestan | Owner: (none) Type: bug | Status: patch Priority: normal | Milestone: 8.6.1 Component: libraries/base | Version: 8.5 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 Type of failure: Incorrect result | (amd64) at runtime | Test Case: T8089 Blocked By: | Blocking: Related Tickets: #8089, #7325, | Differential Rev(s): Phab:D4700 #15064 | Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: new => patch * differential: => Phab:D4700 * milestone: => 8.6.1 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15158#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#15158: T8089 failing with ghci, threaded1, threaded2, profthreaded -------------------------------------+------------------------------------- Reporter: alpmestan | Owner: (none) Type: bug | Status: patch Priority: normal | Milestone: 8.6.1 Component: libraries/base | Version: 8.5 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 Type of failure: Incorrect result | (amd64) at runtime | Test Case: T8089 Blocked By: | Blocking: Related Tickets: #8089, #7325, | Differential Rev(s): Phab:D4700 #15064 | Wiki Page: | -------------------------------------+------------------------------------- Comment (by Ben Gamari <ben@…>): In [changeset:"21a9fb5ff3714addf28dbe270af5d10640d89ad9/ghc" 21a9fb5/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="21a9fb5ff3714addf28dbe270af5d10640d89ad9" base/TimerManager: Clamp timer expiration time to maxBound Previously we would allow the expiration time to overflow, which in practice meant that `threadDelay maxBound` we return far earlier than circa 2500 CE. For now we fix this by simply clamping to maxBound. Fixes #15158. Test Plan: Validate, run T8089 Reviewers: simonmar, hvr Reviewed By: simonmar Subscribers: rwbarton, thomie, carter GHC Trac Issues: #15158 Differential Revision: https://phabricator.haskell.org/D4719 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15158#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#15158: T8089 failing with ghci, threaded1, threaded2, profthreaded -------------------------------------+------------------------------------- Reporter: alpmestan | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: 8.6.1 Component: libraries/base | Version: 8.5 Resolution: fixed | Keywords: Operating System: Linux | Architecture: x86_64 Type of failure: Incorrect result | (amd64) at runtime | Test Case: T8089 Blocked By: | Blocking: Related Tickets: #8089, #7325, | Differential Rev(s): Phab:D4700 #15064 | Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: patch => closed * resolution: => fixed -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15158#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#15158: T8089 failing with ghci, threaded1, threaded2, profthreaded -------------------------------------+------------------------------------- Reporter: alpmestan | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: 8.6.1 Component: libraries/base | Version: 8.5 Resolution: fixed | Keywords: Operating System: Linux | Architecture: x86_64 Type of failure: Incorrect result | (amd64) at runtime | Test Case: T8089 Blocked By: | Blocking: Related Tickets: #8089, #7325, | Differential Rev(s): Phab:D4700 #15064 | Wiki Page: | -------------------------------------+------------------------------------- Comment (by YitzGale): When will the fix be released? This bug will likely cause some fairly widespread failures. https://www.reddit.com/r/haskell/comments/97zmpa/psa_forever_threaddelay_max... -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15158#comment:6> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#15158: T8089 failing with ghci, threaded1, threaded2, profthreaded -------------------------------------+------------------------------------- Reporter: alpmestan | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: 8.6.1 Component: libraries/base | Version: 8.5 Resolution: fixed | Keywords: Operating System: Linux | Architecture: x86_64 Type of failure: Incorrect result | (amd64) at runtime | Test Case: T8089 Blocked By: | Blocking: Related Tickets: #8089, #7325, | Differential Rev(s): Phab:D4700 #15064 | Wiki Page: | -------------------------------------+------------------------------------- Comment (by YitzGale): Another question - this code seems to be mixing up milliseconds and microseconds. What am I missing? -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15158#comment:7> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#15158: T8089 failing with ghci, threaded1, threaded2, profthreaded -------------------------------------+------------------------------------- Reporter: alpmestan | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: 8.6.1 Component: libraries/base | Version: 8.5 Resolution: fixed | Keywords: Operating System: Linux | Architecture: x86_64 Type of failure: Incorrect result | (amd64) at runtime | Test Case: T8089 Blocked By: | Blocking: Related Tickets: #8089, #7325, | Differential Rev(s): Phab:D4700 #15064 | Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): Indeed this will be fixed in 8.6.1. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15158#comment:8> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC