[GHC] #9333: Thread status decoded wrong in base library
#9333: Thread status decoded wrong in base library -------------------------------------+------------------------------------- Reporter: jberthold | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: libraries/base | Version: 7.8.3 Keywords: | Differential Revisions: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect result | Unknown/Multiple at runtime | Difficulty: Easy (less Test Case: | than 1 hour) Blocking: | Blocked By: | Related Tickets: -------------------------------------+------------------------------------- Kyle Van Berendonck <kvanberendonck@gmail.com> in [http://www.haskell.org/pipermail/ghc-devs/2014-July/005677.html a message on ghc-devs] pointed to [https://github.com/ghc/ghc/blob/master/libraries/base/GHC/Conc/Sync.lhs#L483 base/GHC/Conc/Sync.lhs] decoding thread block reasons from constants defined in includes/rts/Constants.h to a Haskell type. The constants were modified in GHC-7.8.2, which created problems with eventlogs (ticket #9003), so the constants were reverted, but base was not adapted to the respective fix. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9333> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#9333: Thread status decoded wrong in base library -------------------------------------+------------------------------------- Reporter: jberthold | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: | Version: 7.8.3 libraries/base | Keywords: Resolution: | Operating System: Unknown/Multiple Differential Revisions: | Type of failure: Incorrect result Architecture: | at runtime Unknown/Multiple | Test Case: Difficulty: Easy (less | Blocking: than 1 hour) | Blocked By: | Related Tickets: | -------------------------------------+------------------------------------- Changes (by jberthold): * cc: jberthold (added) -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9333#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#9333: Thread status decoded wrong in base library -------------------------------------+------------------------------------- Reporter: jberthold | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: | Version: 7.8.3 libraries/base | Keywords: Resolution: | Operating System: Unknown/Multiple Differential Revisions: | Type of failure: Incorrect result Architecture: | at runtime Unknown/Multiple | Test Case: Difficulty: Easy (less | Blocking: than 1 hour) | Blocked By: | Related Tickets: | -------------------------------------+------------------------------------- Comment (by carter): the 7.8 version is here https://github.com/ghc/packages- base/blob/ghc-7.8/GHC/Conc/Sync.lhs#L484-L495 (looks like it was last touched fall 2013 ) -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9333#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#9333: Thread status decoded wrong in base library -------------------------------------+------------------------------------- Reporter: jberthold | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: | Version: 7.8.3 libraries/base | Keywords: Resolution: | Operating System: Unknown/Multiple Differential Revisions: | Type of failure: Incorrect result Architecture: | at runtime Unknown/Multiple | Test Case: Difficulty: Easy (less | Blocking: than 1 hour) | Blocked By: | Related Tickets: | -------------------------------------+------------------------------------- Comment (by jberthold): @Carter: Yes, fall 2013 was when the block reason codes were extended. This bug is related to #9003 (modified block reason codes), the respective fix should have changed base back to what it was before (and adding I have put together a fix and a small test for this. Taking this as an opportunity to set up the phabricator environment, I will submit the fix there for HEAD. The respective fix for ghc-7.8.3 will be in libraries/base, a patch for base is attached (and the test case Haskell). -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9333#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#9333: Thread status decoded wrong in base library -------------------------------------+------------------------------------- Reporter: jberthold | Owner: jberthold Type: bug | Status: new Priority: normal | Milestone: Component: | Version: 7.8.3 libraries/base | Keywords: Resolution: | Operating System: Unknown/Multiple Differential Revisions: D83 | Type of failure: Incorrect result Architecture: | at runtime Unknown/Multiple | Test Case: Difficulty: Easy (less | Blocking: than 1 hour) | Blocked By: | Related Tickets: | -------------------------------------+------------------------------------- Changes (by jberthold): * owner: => jberthold * differential: => D83 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9333#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#9333: Thread status decoded wrong in base library -------------------------------------+------------------------------------- Reporter: jberthold | Owner: jberthold Type: bug | Status: patch Priority: normal | Milestone: Component: | Version: 7.8.3 libraries/base | Keywords: Resolution: | Operating System: Unknown/Multiple Differential Revisions: Phab:D83 | Type of failure: Incorrect result Architecture: | at runtime Unknown/Multiple | Test Case: Difficulty: Easy (less | Blocking: than 1 hour) | Blocked By: | Related Tickets: | -------------------------------------+------------------------------------- Changes (by jberthold): * status: new => patch * differential: D83 => Phab:D83 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9333#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#9333: Thread status decoded wrong in base library -------------------------------------+------------------------------------- Reporter: jberthold | Owner: jberthold Type: bug | Status: patch Priority: normal | Milestone: Component: | Version: 7.8.3 libraries/base | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Easy (less than 1 Unknown/Multiple | hour) Type of failure: Incorrect | Blocked By: result at runtime | Related Tickets: Test Case: | Blocking: | Differential Revisions: Phab:D83 | -------------------------------------+------------------------------------- Comment (by Austin Seipp <austin@…>): In [changeset:"4ee8c27302e6bb3892e7c47a7111b0683d032c07/ghc"]: {{{ #!CommitTicketReference repository="ghc" revision="4ee8c27302e6bb3892e7c47a7111b0683d032c07" use GHC-7.8.3's values for thread block reason (fixes #9333) Summary: For now, BlockedOnMVar and BlockedOnMVarRead are not distinguished. Making the distinction would mean to change an exported datatype (API change). Code for this change is included but commented out. The patch adds a test for the threadstatus, which retrieves status BlockedOnMVar for two threads blocked on writing and reading an MVar. Test Plan: ran validate, including the new test Reviewers: simonmar, austin, ezyang Reviewed By: austin, ezyang Subscribers: phaskell, simonmar, relrod, carter Differential Revision: https://phabricator.haskell.org/D83 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9333#comment:6> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#9333: Thread status decoded wrong in base library -------------------------------------+------------------------------------- Reporter: jberthold | Owner: jberthold Type: bug | Status: closed Priority: normal | Milestone: 7.10.1 Component: | Version: 7.8.3 libraries/base | Keywords: Resolution: fixed | Architecture: Unknown/Multiple Operating System: | Difficulty: Easy (less than 1 Unknown/Multiple | hour) Type of failure: Incorrect | Blocked By: result at runtime | Related Tickets: Test Case: | Blocking: | Differential Revisions: Phab:D83 | -------------------------------------+------------------------------------- Changes (by thoughtpolice): * status: patch => closed * resolution: => fixed * milestone: => 7.10.1 Comment: Merged, thanks! -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9333#comment:7> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC