-
Notifications
You must be signed in to change notification settings - Fork 21
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
abort: packed_vector.hpp:465: void dyn::packed_vector::remove(uint64_t): Assertion `(size_ / int_per_word_ == words.size() #24
Comments
First invocation:
and in gdb:
This is very nicely reproducible. |
I wonder if the recent merge of stuff from my repo caused a regression.
…On Sat, Jul 18, 2020 at 7:29 PM Steffen Möller ***@***.***> wrote:
First invocation:
$ ./obj-x86_64-linux-gnu/wm_string
SPEED
access:252ms
rank:331ms
wm_string: /home/moeller/git/med-team/dynamic/xxsds-dynamic-1.0~alpha.1/include/dynamic/internal/wm_string.hpp:200: ulint dyn::wm_string<dynamic_bitvector_t>::select(ulint, ulint) const [with dynamic_bitvector_t = dyn::succinct_bitvector<dyn::spsi<dyn::packed_bit_vector, 256, 16> >; ulint = long unsigned int]: Assertion `rank > 0' failed.
Aborted (core dumped)
and in gdb:
Core was generated by `./obj-x86_64-linux-gnu/wm_string'.
Program terminated with signal SIGABRT, Aborted.
#0 __GI_raise ***@***.***=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 __GI_raise ***@***.***=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1 0x00007f08b36ef55b in __GI_abort () at abort.c:79
#2 0x00007f08b36ef42f in __assert_fail_base (fmt=0x7f08b3855b48 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x56266529ce16 "rank > 0",
file=0x56266529bb40 "/home/moeller/git/med-team/dynamic/xxsds-dynamic-1.0~alpha.1/include/dynamic/internal/wm_string.hpp", line=200, function=<optimized out>) at assert.c:92
#3 0x00007f08b36fe092 in __GI___assert_fail (assertion=0x56266529ce16 "rank > 0", file=0x56266529bb40 "/home/moeller/git/med-team/dynamic/xxsds-dynamic-1.0~alpha.1/include/dynamic/internal/wm_string.hpp", line=200,
function=0x56266529c628 "ulint dyn::wm_string<dynamic_bitvector_t>::select(ulint, ulint) const [with dynamic_bitvector_t = dyn::succinct_bitvector<dyn::spsi<dyn::packed_bit_vector, 256, 16> >; ulint = long unsigned int]")
at assert.c:101
#4 0x0000562665294d2f in dyn::wm_string<dyn::succinct_bitvector<dyn::spsi<dyn::packed_bit_vector, 256u, 16u> > >::select (this=<optimized out>, rank=0, c=<optimized out>) at /usr/include/c++/9/bits/stl_vector.h:1058
#5 0x000056266528c474 in speed_select (num=100000, num_of_alphabet=<optimized out>) at ./wm_string.cpp:74
#6 0x0000562665290ada in speed_test (num=100000, num_of_alphabet=10000000) at /usr/include/c++/9/bits/char_traits.h:335
#7 0x000056266528aa2e in main () at ./wm_string.cpp:394
This is very nicely reproducible.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#24 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABDQEMRB4UO6XYOJ4AIWDDR4HLW5ANCNFSM4PAEUNXA>
.
|
Actually, it was from vgteam, correct?
On Sat, Jul 18, 2020 at 7:47 PM Erik Garrison <[email protected]>
wrote:
… I wonder if the recent merge of stuff from my repo caused a regression.
On Sat, Jul 18, 2020 at 7:29 PM Steffen Möller ***@***.***>
wrote:
> First invocation:
>
> $ ./obj-x86_64-linux-gnu/wm_string
> SPEED
> access:252ms
> rank:331ms
> wm_string: /home/moeller/git/med-team/dynamic/xxsds-dynamic-1.0~alpha.1/include/dynamic/internal/wm_string.hpp:200: ulint dyn::wm_string<dynamic_bitvector_t>::select(ulint, ulint) const [with dynamic_bitvector_t = dyn::succinct_bitvector<dyn::spsi<dyn::packed_bit_vector, 256, 16> >; ulint = long unsigned int]: Assertion `rank > 0' failed.
> Aborted (core dumped)
>
> and in gdb:
>
> Core was generated by `./obj-x86_64-linux-gnu/wm_string'.
> Program terminated with signal SIGABRT, Aborted.
> #0 __GI_raise ***@***.***=6) at ../sysdeps/unix/sysv/linux/raise.c:50
> 50 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
> (gdb) bt
> #0 __GI_raise ***@***.***=6) at ../sysdeps/unix/sysv/linux/raise.c:50
> #1 0x00007f08b36ef55b in __GI_abort () at abort.c:79
> #2 0x00007f08b36ef42f in __assert_fail_base (fmt=0x7f08b3855b48 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x56266529ce16 "rank > 0",
> file=0x56266529bb40 "/home/moeller/git/med-team/dynamic/xxsds-dynamic-1.0~alpha.1/include/dynamic/internal/wm_string.hpp", line=200, function=<optimized out>) at assert.c:92
> #3 0x00007f08b36fe092 in __GI___assert_fail (assertion=0x56266529ce16 "rank > 0", file=0x56266529bb40 "/home/moeller/git/med-team/dynamic/xxsds-dynamic-1.0~alpha.1/include/dynamic/internal/wm_string.hpp", line=200,
> function=0x56266529c628 "ulint dyn::wm_string<dynamic_bitvector_t>::select(ulint, ulint) const [with dynamic_bitvector_t = dyn::succinct_bitvector<dyn::spsi<dyn::packed_bit_vector, 256, 16> >; ulint = long unsigned int]")
> at assert.c:101
> #4 0x0000562665294d2f in dyn::wm_string<dyn::succinct_bitvector<dyn::spsi<dyn::packed_bit_vector, 256u, 16u> > >::select (this=<optimized out>, rank=0, c=<optimized out>) at /usr/include/c++/9/bits/stl_vector.h:1058
> #5 0x000056266528c474 in speed_select (num=100000, num_of_alphabet=<optimized out>) at ./wm_string.cpp:74
> #6 0x0000562665290ada in speed_test (num=100000, num_of_alphabet=10000000) at /usr/include/c++/9/bits/char_traits.h:335
> #7 0x000056266528aa2e in main () at ./wm_string.cpp:394
>
> This is very nicely reproducible.
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <#24 (comment)>, or
> unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AABDQEMRB4UO6XYOJ4AIWDDR4HLW5ANCNFSM4PAEUNXA>
> .
>
|
That is what I presume since I requested a pull from vgteam/DYNAMIC. |
I thought I had solved this bug but apparently it's alive and well. I'll look into it next week. |
Hi, I solved the first part of the issue: Assertion `(size_ / int_per_word_ == words.size() || !(words[size_ / int_per_word_] >> ((size_ % int_per_word_) * width_))) && "uninitialized non-zero values in the end of the vector"' failed. Actually, the code was correct and only the assert had a bug : -) @ekg : the second issue happens in wm_string.cpp. The failed assert happens because the code calls select(rank, c) at wm_string.hpp:200 with rank == 0. Could it be simply a bug of the checker wm_string.cpp? select is not supposed to be called with rank == 0. |
That does look like a bug in the check in wm_string. I'll take a look.
…On Wed, Jul 22, 2020 at 12:44 PM Nicola Prezza ***@***.***> wrote:
Hi, I solved the first part of the issue:
Assertion `(size_ / int_per_word_ == words.size() || !(words[size_ /
int_per_word_] >> ((size_ % int_per_word_) * width_))) && "uninitialized
non-zero values in the end of the vector"' failed.
Actually, the code was correct and only the assert had a bug : -)
@ekg <https://github.com/ekg> : the second issue happens in
wm_string.cpp. The failed assert happens because the code calls
select(rank, c) at wm_string.hpp:200 with rank == 0. Could it be simply a
bug of the checker wm_string.cpp? select is not supposed to be called with
rank == 0.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#24 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABDQEJZJAEW4QBBYLQRSZLR427KNANCNFSM4PAEUNXA>
.
|
There these automated build tests spreading throughout github that are executed for every commit. Is this something that should be introduced to DYNAMIC, too? |
Yes, it should be done here too.
…On Wed, Jul 22, 2020, 13:09 Steffen Möller ***@***.***> wrote:
There these automated build tests spreading throughout github that are
executed for every commit. Is this something that should be introduced to
DYNAMIC, too?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#24 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABDQEOXOKEIIXHGAX7L23LR43CGNANCNFSM4PAEUNXA>
.
|
All dependencies of DYNAMIC are in Debian/Ubuntu already - I guess this would be rather straight-forward to implement. Ping me if you need help. |
@nicolaprezza I'm not able to reproduce the problem with wm_string. It's at least not happened in the 20-30 runs that I've done (running it in a loop and watching...) |
Latest checkout:
Maybe because of other compiler settings?
The benchmark seems stable now. Would you have other ideas what I should test over here?
I can get a VM online somewhere for a common playground to investigate the wm_string issue. |
I can reproduce it. Have you enabled asserts? with cmake, it's simply cmake .. -DCMAKE_BUILD_TYPE=Debug |
Thanks :) That's my mistake. I can reproduce it by enabling the assert! |
It does look like a possible problem with the input. There is a quirky PRNG being used. I might switch to modern c++ random distributions. |
Thanks @ekg! now it works. |
Hello,
ran into
And peeking a boo in gdb:
but found it to reproduce only every 2nd to 5th invocation. Spotted with version 1.0-alpha.1.
Anything you want me to do about it?
Cheers,
Steffen
The text was updated successfully, but these errors were encountered: