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

[ASAN] new-delete-type-mismatch in FWModelChangeManager::newItemSlot #36056

Open
iarspider opened this issue Nov 9, 2021 · 11 comments
Open

[ASAN] new-delete-type-mismatch in FWModelChangeManager::newItemSlot #36056

iarspider opened this issue Nov 9, 2021 · 11 comments

Comments

@iarspider
Copy link
Contributor

Log file: https://cmssdt.cern.ch/SDT/cgi-bin/logreader/slc7_amd64_gcc10/CMSSW_12_2_ASAN_X_2021-11-08-2300/unitTestLogs/Fireworks/Core#/4

Error message:

ERROR: AddressSanitizer: new-delete-type-mismatch on 0x6060004189a0 in thread T0:
  object passed to delete has wrong type:
  size of the allocated type:   64 bytes;
  size of the deallocated type: 48 bytes.
    #0 0x2b17f59c61f7 in operator delete(void*, unsigned long) ../../../../libsanitizer/asan/asan_new_delete.cpp:172
    #1 0x2b17f68c45e2 in FWModelChangeManager::newItemSlot(FWEventItem*) (...lib/slc7_amd64_gcc10/libFireworksCore.so+0x5e25e2)
    #2 0x419a40 in changemanager::test_method() (...test/slc7_amd64_gcc10/TestFireworksCore+0x419a40)
    #3 0x423016 in changemanager_invoker() (...test/slc7_amd64_gcc10/TestFireworksCore+0x423016)
    #4 0x2b17fa66381d in boost::detail::function::function_obj_invoker0<boost::detail::forward, int>::invoke(boost::detail::function::function_buffer&) (...external/slc7_amd64_gcc10/lib/libboost_unit_test_framework.so.1.75.0+0x3181d)
    #5 0x2b17fa662114 in boost::execution_monitor::catch_signals(boost::function<int ()> const&) (...external/slc7_amd64_gcc10/lib/libboost_unit_test_framework.so.1.75.0+0x30114)
    #6 0x2b17fa662183 in boost::execution_monitor::execute(boost::function<int ()> const&) (...external/slc7_amd64_gcc10/lib/libboost_unit_test_framework.so.1.75.0+0x30183)
    #7 0x2b17fa662200 in boost::execution_monitor::vexecute(boost::function<void ()> const&) (...external/slc7_amd64_gcc10/lib/libboost_unit_test_framework.so.1.75.0+0x30200)
    #8 0x2b17fa68ef83 in boost::unit_test::unit_test_monitor_t::execute_and_translate(boost::function<void ()> const&, unsigned long) (...external/slc7_amd64_gcc10/lib/libboost_unit_test_framework.so.1.75.0+0x5cf83)
    #9 0x2b17fa669217 in boost::unit_test::framework::state::execute_test_tree(unsigned long, unsigned long, boost::unit_test::framework::state::random_generator_helper const*) [clone .isra.0] (...external/slc7_amd64_gcc10/lib/libboost_unit_test_framework.so.1.75.0+0x37217)
    #10 0x2b17fa6694e8 in boost::unit_test::framework::state::execute_test_tree(unsigned long, unsigned long, boost::unit_test::framework::state::random_generator_helper const*) [clone .isra.0] (...external/slc7_amd64_gcc10/lib/libboost_unit_test_framework.so.1.75.0+0x374e8)
    #11 0x2b17fa66d36f in boost::unit_test::framework::run(unsigned long, bool) (...external/slc7_amd64_gcc10/lib/libboost_unit_test_framework.so.1.75.0+0x3b36f)
    #12 0x2b17fa68dbe5 in boost::unit_test::unit_test_main(bool (*)(), int, char**) (...external/slc7_amd64_gcc10/lib/libboost_unit_test_framework.so.1.75.0+0x5bbe5)
    #13 0x2b17fd2ae554 in __libc_start_main (/lib64/libc.so.6+0x22554)
    #14 0x416148  (...test/slc7_amd64_gcc10/TestFireworksCore+0x416148)

0x6060004189a0 is located 0 bytes inside of 64-byte region [0x6060004189a0,0x6060004189e0)
allocated by thread T0 here:
    #0 0x2b17f59c53d7 in operator new(unsigned long) ../../../../libsanitizer/asan/asan_new_delete.cpp:99
    #1 0x2b17f68c4396 in FWModelChangeManager::newItemSlot(FWEventItem*) (...lib/slc7_amd64_gcc10/libFireworksCore.so+0x5e2396)
    #2 0x419a40 in changemanager::test_method() (...test/slc7_amd64_gcc10/TestFireworksCore+0x419a40)
    #3 0x423016 in changemanager_invoker() (...test/slc7_amd64_gcc10/TestFireworksCore+0x423016)
    #4 0x2b17fa66381d in boost::detail::function::function_obj_invoker0<boost::detail::forward, int>::invoke(boost::detail::function::function_buffer&) (...external/slc7_amd64_gcc10/lib/libboost_unit_test_framework.so.1.75.0+0x3181d)
@iarspider
Copy link
Contributor Author

assign visualization

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 9, 2021

New categories assigned: visualization

@Dr15Jones,@makortel,@alja you have been requested to review this Pull request/Issue and eventually sign? Thanks

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 9, 2021

A new Issue was created by @iarspider .

@Dr15Jones, @perrotta, @dpiparo, @makortel, @smuzaffar, @qliphy can you please review it and eventually sign/assign? Thanks.

cms-bot commands are listed here

@alja
Copy link
Contributor

alja commented Nov 9, 2021

I'm looking into this.

@alja
Copy link
Contributor

alja commented Nov 9, 2021

Do I need to have any special fags when running the test?

I have project CMSSW_12_2_ASAN_X_2021-11-08-2300 build with SCRAM_ARCH slc7_amd64_gcc10. The 'scram b test` does not report anything in Fireworks/Core module.

@smuzaffar
Copy link
Contributor

no special flags needed, just running it on CMSSW_12_2_ASAN_X_2021-11-08-2300 should be good

@alja
Copy link
Contributor

alja commented Nov 9, 2021

@smuzaffar Thanks, I can see the error now. I had run scram runtests.

@alja
Copy link
Contributor

alja commented Nov 9, 2021

@smuzaffar @Dr15Jones
I debugged https://github.com/cms-sw/cmssw/blob/master/Fireworks/Core/test/unittest_changemanager.cc where the error comes from and later found out even a simple sigc::signal produces the same error. Here is a much simpler case: https://github.com/cms-sw/cmssw/blob/master/Fireworks/Core/test/unittest_changemanager.cc

I googled sigc new-delete-type-mismatch and got this as the first hit:
libsigcplusplus/libsigcplusplus#10

It is suggested to use sigc++-3.0 if I understand correctly.

@smuzaffar
Copy link
Contributor

Thanks @alja. @ddaina can you please update https://github.com/cms-sw/cmsdist/blob/IB/CMSSW_12_2_X/master/sigcpp.spec to use latest 3.0.7 version.

@smuzaffar
Copy link
Contributor

@alja , looks like fireworks needs changes for sigc++-3.0 , see the build errors cms-sw/cmsdist#7441 (comment)

@alja
Copy link
Contributor

alja commented Nov 13, 2021

@smuzaffar Thank you! I will look into it.

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

No branches or pull requests

4 participants