[GHC] #8495: Infinite loop when using Data.HashTable.newHint and Data.HashTable.update

#8495: Infinite loop when using Data.HashTable.newHint and Data.HashTable.update ------------------------------------+------------------------------------- Reporter: erszcz | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: libraries/base | Version: 7.4.2 Keywords: | Operating System: Unknown/Multiple Architecture: Unknown/Multiple | Type of failure: None/Unknown Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | ------------------------------------+------------------------------------- When using Data.!HashTable.newHint and Data.!HashTable.update to read a big (~1.5mln words) file into a !HashTable the program seems to fall into an infinite loop. "Seems to" since I couldn't wait long enough for it to finish computation. At least the execution time is way bigger than expected (orders of magnitude, like hours vs. expected seconds). Data.!HashTable.new doesn't cause the same issue. Attached to the report is an example program reproducing the bug along with a data file the issue occurs with. The bug was discussed on haskell-beginners mailing list quite a while ago, though I've summarized the findings in this bug report. See: - http://article.gmane.org/gmane.comp.lang.haskell.beginners/9811 - http://article.gmane.org/gmane.comp.lang.haskell.beginners/9828 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8495 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8495: Infinite loop when using Data.HashTable.newHint and Data.HashTable.update -------------------------------------+------------------------------------ Reporter: erszcz | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: libraries/base | Version: 7.4.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by erszcz): The file size limit is too small to attach the original data file causing the problem. It's available here: https://dl.dropboxusercontent.com/u/1169871/formy.utf8.xz -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8495#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8495: Infinite loop when using Data.HashTable.newHint and Data.HashTable.update -------------------------------------+------------------------------------ Reporter: erszcz | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: libraries/base | Version: 7.4.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by simonpj): I see that the online documentation for `Data.HashTable` says "Deprecated: `Data.HashTable` will be removed in GHC 7.8. Please use an alternative, e.g. the `hashtables` package, instead." So it might be worth checking out that package? Simon -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8495#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8495: Infinite loop when using Data.HashTable.newHint and Data.HashTable.update -------------------------------------+------------------------------------ Reporter: erszcz | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: libraries/base | Version: 7.4.2 Resolution: wontfix | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Changes (by erszcz): * status: new => closed * resolution: => wontfix Comment: Definitely. I haven't noticed the deprecation notice and it probably wasn't there yet when I initially discovered the bug about a year ago. I guess the ticket might be closed then. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8495#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC