Closed shachaf closed 4 years ago
Thanks for bringing both of these issues to our attention! I made another change to pull request https://github.com/microsoft/ALEX/pull/2. If you use the latest code there, your test program should work on your input.
Thanks for the update. That seems to fix the issue above, but I'm now getting SIGSEGV with this test file: https://slbkbs.org/tmp/alex-test-input-3.txt
Stack trace:
#0 0x000000000040aa3c in alex::Alex<unsigned long, unsigned long, alex::AlexCompare, std::allocator<std::pair<unsigned long, unsigned long> >, false>::expand_root (
this=0x7fffffffdaf0, expand_left=false) at ./ALEX/src/core/alex.h:1522
#1 0x00000000004084e9 in alex::Alex<unsigned long, unsigned long, alex::AlexCompare, std::allocator<std::pair<unsigned long, unsigned long> >, false>::insert (this=0x7fffffffdaf0,
key=@0x7fffffffda60: 18445859036059093609, payload=@0x7fffffffd938: 0) at ./ALEX/src/core/alex.h:1113
#2 0x000000000040346d in alex::AlexMap<unsigned long, unsigned long, alex::AlexCompare, std::allocator<std::pair<unsigned long, unsigned long> > >::operator[] (
this=0x7fffffffdaf0, key=@0x7fffffffda60: 18445859036059093609) at ./ALEX/src/core/alex_map.h:128
#3 0x0000000000401643 in main (argc=2, argv=0x7fffffffdcc8) at alex-test.cc:18
Thanks for the follow up! Could you try the latest code?
It doesn't seem to crash now, so this looks better. I've been running https://github.com/petersn/btreetests to test it, and now the test goes up to >15GB memory use and starts using swap before I kill it. That's probably a separate bug -- maybe it's worth you testing it directly.
Thanks for the reference! I ran ALEX on that testing framework and I'm also seeing unexpected behavior, so we will definitely follow up on this issue.
This is the original problem I ran into before #1, but it exists even after applying #2 (in its current state). It only happens when applying lookups. Test program:
The test file is at http://slbkbs.org/tmp/alex-test-input-lookups.txt