Skip to content

AddressSanitizer CHECK failed #9

@zenker

Description

@zenker

I'm trying to debug my application using googles AddressSanitizer, which can be enabled e.g. in ControlSystemAdapter-OPC-UA-Adapter. I can not start my application because of a problem found by AddressSanitizer. Surprisingly, the problems is caused inside the python script which is executed at startup of my application. Consequently, running the python script standalone fails with the same error.

The output of AddressSanitizer looks like this:

==201008==AddressSanitizer CHECK failed: ../../../../src/libsanitizer/asan/asan_interceptors.cc:291 "((IndirectExternCall(__interception::real___cxa_throw))) != (0)" (0x0, 0x0)
    #0 0x7fe0e9489631  (/usr/lib/x86_64-linux-gnu/libasan.so.2+0xa0631)
    #1 0x7fe0e948e5e3 in __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0xa55e3)
    #2 0x7fe0e941f706 in __cxa_throw (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x36706)
    #3 0x7fe0e4d15af6  (/usr/lib/libChimeraTK-DeviceAccess.so.01.09xenial2+0x7ccaf6)
    #4 0x7fe0e4e7d859 in ChimeraTK::FixedPointConverter::vectorToCooked_impl::impl(ChimeraTK::FixedPointConverter const&, int const* const&, int const* const&, signed char*) (/usr/lib/libChimeraTK-DeviceAccess.so.01.09xenial2+0x934859)
    #5 0x7fe0e4e7905d in ChimeraTK::FixedPointConverter::reconfigure(unsigned int, int, bool) (/usr/lib/libChimeraTK-DeviceAccess.so.01.09xenial2+0x93005d)
    #6 0x7fe0e4e7d65b in ChimeraTK::FixedPointConverter::FixedPointConverter(std::__cxx11::basic_string, std::allocator >, unsigned int, int, bool) (/usr/lib/libChimeraTK-DeviceAccess.so.01.09xenial2+0x93465b)
    #7 0x7fe0e4e26de0 in ChimeraTK::NumericAddressedBackendRegisterAccessor::NumericAddressedBackendRegisterAccessor(boost::shared_ptr, ChimeraTK::RegisterPath const&, unsigned long, unsigned long, ChimeraTK::Acces
sModeFlags) (/usr/lib/libChimeraTK-DeviceAccess.so.01.09xenial2+0x8ddde0)
    #8 0x7fe0e4dc2de0 in boost::shared_ptr > ChimeraTK::NumericAddressedBackend::getRegisterAccessor_impl(ChimeraTK::RegisterPath const&, unsigned long, unsigned long, ChimeraTK::AccessModeFlags) (/usr/lib/libChimeraTK-DeviceAccess.so.01.09xen
ial2+0x879de0)
    #9 0x7fe0e4dba1eb  (/usr/lib/libChimeraTK-DeviceAccess.so.01.09xenial2+0x8711eb)
    #10 0x7fe0e56c0d3d in ChimeraTK::OneDRegisterAccessor ChimeraTK::Device::getOneDRegisterAccessor(ChimeraTK::RegisterPath const&, unsigned long, unsigned long, ChimeraTK::AccessModeFlags const&) const (/usr/lib/python3/dist-packages/mtca4udeviceaccess.so+0x33d3d)
    #11 0x7fe0e56c05c6 in mtca4upy::DeviceAccess::getRawOneDAccessor(ChimeraTK::Device const&, std::__cxx11::basic_string, std::allocator > const&, unsigned long, unsigned long) (/usr/lib/python3/dist-packages/mtca4udeviceaccess.so+0x335c6)
    #12 0x7fe0e56b6ee0 in boost::python::objects::caller_py_function_impl (*)(ChimeraTK::Device const&, std::__cxx11::basic_string, std::allocator > const&, unsigned long, unsigned 
long), boost::python::default_call_policies, boost::mpl::vector5, ChimeraTK::Device const&, std::__cxx11::basic_string, std::allocator > const&, unsigned long, unsigned long> > >::operator()(_object*, _object*) 
(/usr/lib/python3/dist-packages/mtca4udeviceaccess.so+0x29ee0)
    #13 0x7fe0e3a9c00c in boost::python::objects::function::call(_object*, _object*) const (/usr/lib/x86_64-linux-gnu/libboost_python-py35.so.1.58.0+0x2900c)
    #14 0x7fe0e3a9c207  (/usr/lib/x86_64-linux-gnu/libboost_python-py35.so.1.58.0+0x29207)
    #15 0x7fe0e3aa4052 in boost::python::handle_exception_impl(boost::function0) (/usr/lib/x86_64-linux-gnu/libboost_python-py35.so.1.58.0+0x31052)
    #16 0x7fe0e3a99408  (/usr/lib/x86_64-linux-gnu/libboost_python-py35.so.1.58.0+0x26408)
    #17 0x5c3bd6 in PyObject_Call (/usr/bin/python3.5+0x5c3bd6)
    #18 0x5354ae in PyEval_EvalFrameEx (/usr/bin/python3.5+0x5354ae)
    #19 0x539a12  (/usr/bin/python3.5+0x539a12)
    #20 0x5356a1 in PyEval_EvalFrameEx (/usr/bin/python3.5+0x5356a1)
    #21 0x539a12  (/usr/bin/python3.5+0x539a12)
    #22 0x53a6ce in PyEval_EvalCode (/usr/bin/python3.5+0x53a6ce)
    #23 0x6292c1  (/usr/bin/python3.5+0x6292c1)
    #24 0x62b769 in PyRun_FileExFlags (/usr/bin/python3.5+0x62b769)
    #25 0x62bf5b in PyRun_SimpleFileExFlags (/usr/bin/python3.5+0x62bf5b)
    #26 0x63d505 in Py_Main (/usr/bin/python3.5+0x63d505)
    #27 0x4cfd10 in main (/usr/bin/python3.5+0x4cfd10)
    #28 0x7fe0e8e2282f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
    #29 0x5d36e8 in _start (/usr/bin/python3.5+0x5d36e8)

The python does nothing fancy just reads a register via the pcie backend:

#!/usr/bin/python3
import mtca4u
import sys
deviceName = sys.argv[1]

mtca4u.set_dmap_location("devMapFile.dmap")
device = mtca4u.Device(deviceName)
status = device.read_raw("BOARD.0", "WORD_BOOT_STATUS")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions