Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined, called at src/Data/HashTable/ST/Cuckoo.hs:406:31 #67

Open
jwaldmann opened this issue Sep 11, 2020 · 2 comments
Open

undefined, called at src/Data/HashTable/ST/Cuckoo.hs:406:31 #67

jwaldmann opened this issue Sep 11, 2020 · 2 comments

Comments

@jwaldmann
Copy link

Hi, I am seeing this error

...  Prelude.undefined                                                                                      
CallStack (from HasCallStack):                             
  error, called at libraries/base/GHC/Err.hs:79:14 in base:GHC.Err
  undefined, called at src/Data/HashTable/ST/Cuckoo.hs:406:31 in hashtables-1.2.4.1-6MJy5UcaJATEc9hXD9mdTw:Data.HashTa
ble.ST.Cuckoo  

on x86_64, with +RTS -A400m -M100g. I am only using insert and lookup. The code runs in the ST monad. The error is happening when re-sizing?

is it worth investigating? I cannot easily release the code as-is. I could debug on my machine (how?), or try to extract a reproducer.

@gregorycollins
Copy link
Owner

It's not a good sign -- this means that the hashcodes array and keys/values arrays have gotten out of sync, and we've dereferenced a key containing undefined that we expected to hold a user-provided value.

If you add the debug flag to the hashtables build it will spew diagnostic output to stderr, which you could capture -- it would help in narrowing down the precise sequence of events that leads to the problem.

Also: does the issue happen with the version of hashtables prior to the addition of modify to the typeclasses? A lot of things were mutated there and I think many of them are buggy

@jwaldmann
Copy link
Author

the addition of modify to the typeclasses

when was that? (what versions should I use for testing)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants