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

BondList serialization hits bug in boost 1.65.1 #3807

Closed
KaiSzuttor opened this issue Jul 22, 2020 · 4 comments · Fixed by #3994
Closed

BondList serialization hits bug in boost 1.65.1 #3807

KaiSzuttor opened this issue Jul 22, 2020 · 4 comments · Fixed by #3994
Labels

Comments

@KaiSzuttor
Copy link
Member

Program received signal SIGSEGV, Segmentation fault.
#0  0x00001555535cb9df in boost::serialization::typeid_system::extended_type_info_typeid_0::type_unregister() () from /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1
#1  0x00000000004226e0 in boost::serialization::extended_type_info_typeid<BondList>::~extended_type_info_typeid (this=0x638610 <boost::serialization::singleton<boost::serialization::extended_type_info_typeid<BondList> >::get_instance()::t>)
    at /usr/include/boost/serialization/extended_type_info_typeid.hpp:96
#2  0x0000000000422165 in boost::serialization::singleton<boost::serialization::extended_type_info_typeid<BondList> >::get_instance()::singleton_wrapper::~singleton_wrapper() (
    this=0x638610 <boost::serialization::singleton<boost::serialization::extended_type_info_typeid<BondList> >::get_instance()::t>) at /usr/include/boost/serialization/singleton.hpp:117
#3  0x00001555516f10f1 in __run_exit_handlers (status=0, listp=0x155551a99718 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true) at exit.c:108
#4  0x00001555516f11ea in __GI_exit (status=<optimized out>) at exit.c:139
#5  0x00001555516cfb9e in __libc_start_main (main=0x40c1b0 <main(int, char**)>, argc=1, argv=0x7fffffffd528, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffd518) at ../csu/libc-start.c:344
#6  0x000000000040c04a in _start ()

Steps to reproduce:

  • Build BondList_test with boost 1.65.1 and execute the testcase, the serialization test is responsible for hitting the bug.

probably related to boostorg/serialization#79

@fweik
Copy link
Contributor

fweik commented Jul 22, 2020

Is this a regression introduced by a minor update, or why does this show up only now?

@jngrad
Copy link
Member

jngrad commented Jul 22, 2020

I also had issues recently with boost 1.65.1 on my workstation, specifically boost::test (93ac695), although without segfault. The last patch was 0ubuntu5 in 2018.

@jngrad
Copy link
Member

jngrad commented Aug 25, 2020

I compiled BondList_test with Clang 9.0.0 and ASAN and got the following report:

68/80 Test #76: BondList_test ....................***Failed    0.22 sec
Running 8 test cases...

*** No errors detected
=================================================================
==2386854==ERROR: AddressSanitizer: attempting double-free on 0x6040000003d0 in thread T0:
    #0 0x4d7a6d in operator delete(void*) (/ssd/jgrad/espresso-fork-PR/build-seraue-clang/src/core/unit_tests/BondList_test+0x4d7a6d)
    #1 0x14c5412cdacf in boost::serialization::typeid_system::extended_type_info_typeid_0::type_unregister() (/usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1+0x1cacf)
    #2 0x50be5f in boost::serialization::extended_type_info_typeid<BondList>::~extended_type_info_typeid() /usr/include/boost/serialization/extended_type_info_typeid.hpp:96:9
    #3 0x14c53f1eb0f0 in __run_exit_handlers /build/glibc-2ORdQG/glibc-2.27/stdlib/exit.c:108
    #4 0x14c53f1eb1e9 in exit /build/glibc-2ORdQG/glibc-2.27/stdlib/exit.c:139
    #5 0x14c53f1c9b9d in __libc_start_main /build/glibc-2ORdQG/glibc-2.27/csu/../csu/libc-start.c:344
    #6 0x42fbc9 in _start (/ssd/jgrad/espresso-fork-PR/build-seraue-clang/src/core/unit_tests/BondList_test+0x42fbc9)

0x6040000003d0 is located 0 bytes inside of 40-byte region [0x6040000003d0,0x6040000003f8)
freed by thread T0 here:
    #0 0x4d7a6d in operator delete(void*) (/ssd/jgrad/espresso-fork-PR/build-seraue-clang/src/core/unit_tests/BondList_test+0x4d7a6d)
    #1 0x14c5412ce067  (/usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1+0x1d067)

previously allocated by thread T0 here:
    #0 0x4d720d in operator new(unsigned long) (/ssd/jgrad/espresso-fork-PR/build-seraue-clang/src/core/unit_tests/BondList_test+0x4d720d)
    #1 0x14c5412cd858 in boost::serialization::typeid_system::extended_type_info_typeid_0::type_register(std::type_info const&) (/usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1+0x1c858)

SUMMARY: AddressSanitizer: double-free (/ssd/jgrad/espresso-fork-PR/build-seraue-clang/src/core/unit_tests/BondList_test+0x4d7a6d) in operator delete(void*)
==2386854==ABORTING

@KaiSzuttor KaiSzuttor added the Bug label Nov 2, 2020
@jngrad
Copy link
Member

jngrad commented Nov 2, 2020

Aforementioned bug and ASAN report are gone with Clang 9.0.1 and ASAN and Boost 1.71 on Ubuntu 20.04, which will be deployed on all ICP machines within 2 weeks. After that, the minimal boost version with be increased to 1.66 by #3093 (comment).

@kodiakhq kodiakhq bot closed this as completed in #3994 Nov 16, 2020
kodiakhq bot added a commit that referenced this issue Nov 16, 2020
Fixes #3807, fixes #3093

Description of changes:
- increase Boost version to avoid singleton bug from 1.65.1
- improve parallelism of GPU integration tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants