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

Sanitizer errors #370

Closed
dennisklein opened this issue Jun 17, 2021 · 0 comments · Fixed by #374
Closed

Sanitizer errors #370

dennisklein opened this issue Jun 17, 2021 · 0 comments · Fixed by #374
Assignees
Labels
bug Something isn't working

Comments

@dennisklein
Copy link
Member

dennisklein commented Jun 17, 2021

compiled with -Og -g -Wshadow -Wall -Wextra -Wpedantic -fsanitize=address,leak,undefined (GCC 11.1.1)

10: Protocols.PushPull.Multipart_ST_ipc_shmem
10: Test command: /home/dklein/projects/FairMQ2/build/test/testsuite_Protocols "--gtest_filter=PushPull.Multipart_ST_ipc_shmem" "--gtest_also_run_disabled_tests"
10: Test timeout computed to be: 5
10: Note: Google Test filter = PushPull.Multipart_ST_ipc_shmem
10: [==========] Running 1 test from 1 test suite.
10: [----------] Global test environment set-up.
10: [----------] 1 test from PushPull
10: [ RUN      ] PushPull.Multipart_ST_ipc_shmem
10: ../fairmq/shmem/Socket.h:319:85: runtime error: reference binding to misaligned address 0x62900002820a for type 'struct MetaHeader', which requires 8 byte alignment
10: 0x62900002820a: note: pointer points here
10:  be be  00 60 01 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 be be  be be b0 00 00 00
10:               ^
10: /usr/include/c++/11/bits/unique_ptr.h:962:57: runtime error: reference binding to misaligned address 0x62900002820a for type 'struct type', which requires 8 byte alignment
10: 0x62900002820a: note: pointer points here
10:  be be  00 60 01 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 be be  be be b0 00 00 00
10:               ^
10: /usr/include/c++/11/bits/move.h:78:36: runtime error: reference binding to misaligned address 0x62900002820a for type 'struct MetaHeader', which requires 8 byte alignment
10: 0x62900002820a: note: pointer points here
10:  be be  00 60 01 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 be be  be be b0 00 00 00
10:               ^
10: ../fairmq/shmem/Message.h:131:11: runtime error: reference binding to misaligned address 0x62900002820a for type 'const struct MetaHeader', which requires 8 byte alignment
10: 0x62900002820a: note: pointer points here
10:  be be  00 60 01 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 be be  be be b0 00 00 00
10:               ^
10: [INFO] Cleaning up for shared memory id 'effd6d85'...
10: [INFO] No region counter found. No regions to cleanup.
10: [INFO] Successfully removed 'fmq_effd6d85_m_0'.
10: [INFO] Successfully removed 'fmq_effd6d85_mng'.
10: [INFO] Successfully removed 'fmq_effd6d85_mtx'.
10: [INFO] Successfully removed 'fmq_effd6d85_cv'.
10: [       OK ] PushPull.Multipart_ST_ipc_shmem (6 ms)
10: [----------] 1 test from PushPull (6 ms total)
10:
10: [----------] Global test environment tear-down
10: [==========] 1 test from 1 test suite ran. (6 ms total)
10: [  PASSED  ] 1 test.
 10/199 Test  #10: Protocols.PushPull.Multipart_ST_ipc_shmem .........................   Passed    0.43 sec
14: Protocols.PushPull.Multipart_MT_ipc_shmem
14: Test command: /home/dklein/projects/FairMQ2/build/test/testsuite_Protocols "--gtest_filter=PushPull.Multipart_MT_ipc_shmem" "--gtest_also_run_disabled_tests"
14: Test timeout computed to be: 5
14: Note: Google Test filter = PushPull.Multipart_MT_ipc_shmem
14: [==========] Running 1 test from 1 test suite.
14: [----------] Global test environment set-up.
14: [----------] 1 test from PushPull
14: [ RUN      ] PushPull.Multipart_MT_ipc_shmem
14: ../fairmq/shmem/Socket.h:319:85: runtime error: reference binding to misaligned address 0x62900001420a for type 'struct MetaHeader', which requires 8 byte alignment
14: 0x62900001420a: note: pointer points here
14:  be be  00 60 01 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 be be  be be b0 00 00 00
14:               ^
14: /usr/include/c++/11/bits/unique_ptr.h:962:57: runtime error: reference binding to misaligned address 0x62900001420a for type 'struct type', which requires 8 byte alignment
 14/199 Test  #14: Protocols.PushPull.Multipart_MT_ipc_shmem .........................***Timeout  51.49 sec
16: Protocols.ReqRep.shmem
16: Test command: /home/dklein/projects/FairMQ2/build/test/testsuite_Protocols "--gtest_filter=ReqRep.shmem" "--gtest_also_run_disabled_tests"
16: Test timeout computed to be: 5
16: Note: Google Test filter = ReqRep.shmem
16: [==========] Running 1 test from 1 test suite.
16: [----------] Global test environment set-up.
16: [----------] 1 test from ReqRep
16: [ RUN      ] ReqRep.shmem
16: [REP]/home/dklein/projects/FairMQ2/build/test/testhelper_runTestDevice --id rep_shmem --control static --session 3975083349870646623 --color false --mq-config "/home/dklein/projects/FairMQ2/build/test/testsuite_FairMQ.IOPatterns_config.json"
16: [REQ1]/home/dklein/projects/FairMQ2/build/test/testhelper_runTestDevice --id req_1shmem --control static --session 3975083349870646623 --color false --mq-config "/home/dklein/projects/FairMQ2/build/test/testsuite_FairMQ.IOPatterns_config.json"
16: [REQ2]/home/dklein/projects/FairMQ2/build/test/testhelper_runTestDevice --id req_2shmem --control static --session 3975083349870646623 --color false --mq-config "/home/dklein/projects/FairMQ2/build/test/testsuite_FairMQ.IOPatterns_config.json"
16: [REP]fair::mq::tools::execute: pid: 2536777
16: [REQ1]fair::mq::tools::execute: pid: 2536778
16: [REQ2]fair::mq::tools::execute: pid: 2536779
16: [REP][20:33:41][INFO]
16: [REP]      ______      _    _______  _________
16: [REP]     / ____/___ _(_)_______   |/  /_  __ \    version 1.4.38-47-g1850f658-dirty
16: [REP]    / /_  / __ `/ / ___/__  /|_/ /_  / / /    build Debug
16: [REP]   / __/ / /_/ / / /    _  /  / / / /_/ /     https://github.com/FairRootGroup/FairMQ
16: [REP]  /_/    \__,_/_/_/     /_/  /_/  \___\_\     LGPL-3.0  © 2012-2021 GSI
16: [REP]
16: [REP][20:33:41][STATE] Starting FairMQ state machine --> IDLE
16: [REP][20:33:41][STATE] IDLE ---> INITIALIZING DEVICE
16: [REQ2][20:33:41][INFO]
16: [REQ2]      ______      _    _______  _________
16: [REQ2]     / ____/___ _(_)_______   |/  /_  __ \    version 1.4.38-47-g1850f658-dirty
16: [REQ2]    / /_  / __ `/ / ___/__  /|_/ /_  / / /    build Debug
16: [REQ2]   / __/ / /_/ / / /    _  /  / / / /_/ /     https://github.com/FairRootGroup/FairMQ
16: [REQ1][20:33:41][INFO]
16: [REQ2]  /_/    \__,_/_/_/     /_/  /_/  \___\_\     LGPL-3.0  © 2012-2021 GSI
16: [REQ2]
16: [REQ1]      ______      _    _______  _________
16: [REQ1]     / ____/___ _(_)_______   |/  /_  __ \    version 1.4.38-47-g1850f658-dirty
16: [REQ1]    / /_  / __ `/ / ___/__  /|_/ /_  / / /    build Debug
16: [REQ1]   / __/ / /_/ / / /    _  /  / / / /_/ /     https://github.com/FairRootGroup/FairMQ
16: [REQ1]  /_/    \__,_/_/_/     /_/  /_/  \___\_\     LGPL-3.0  © 2012-2021 GSI
16: [REQ1]
16: [REQ2][20:33:41][STATE] Starting FairMQ state machine --> IDLE
16: [REQ1][20:33:41][STATE] Starting FairMQ state machine --> IDLE
16: [REQ1][20:33:41][STATE] IDLE ---> INITIALIZING DEVICE
16: [REQ2][20:33:41][STATE] IDLE ---> INITIALIZING DEVICE
16: [REP][20:33:41][STATE] INITIALIZING DEVICE ---> INITIALIZED
16: [REP][20:33:41][STATE] INITIALIZED ---> BINDING
16: [REQ1][20:33:41][STATE] INITIALIZING DEVICE ---> INITIALIZED
16: [REQ1][20:33:41][STATE] INITIALIZED ---> BINDING
16: [REQ1][20:33:41][STATE] BINDING ---> BOUND
16: [REQ1][20:33:41][STATE] BOUND ---> CONNECTING
16: [REQ2][20:33:41][STATE] INITIALIZING DEVICE ---> INITIALIZED
16: [REQ2][20:33:41][STATE] INITIALIZED ---> BINDING
16: [REQ2][20:33:41][STATE] BINDING ---> BOUND
16: [REQ2][20:33:41][STATE] BOUND ---> CONNECTING
16: [REQ1][20:33:41][STATE] CONNECTING ---> DEVICE READY
16: [REQ1][20:33:41][STATE] DEVICE READY ---> INITIALIZING TASK
16: [REQ2][20:33:41][STATE] CONNECTING ---> DEVICE READY
16: [REQ2][20:33:41][STATE] DEVICE READY ---> INITIALIZING TASK
16: [REP][20:33:41][STATE] BINDING ---> BOUND
16: [REP][20:33:41][STATE] BOUND ---> CONNECTING
16: [REP][20:33:41][STATE] CONNECTING ---> DEVICE READY
16: [REP][20:33:41][STATE] DEVICE READY ---> INITIALIZING TASK
16: [REQ1][20:33:41][STATE] INITIALIZING TASK ---> READY
16: [REQ2][20:33:41][STATE] INITIALIZING TASK ---> READY
16: [REQ1][20:33:41][STATE] READY ---> RUNNING
16: [REQ2][20:33:41][STATE] READY ---> RUNNING
16: [REQ1][20:33:41][INFO] DEVICE: Running...
16: [REP][20:33:41][STATE] INITIALIZING TASK ---> READY
16: [REQ2][20:33:41][INFO] DEVICE: Running...
16: [REP][20:33:41][STATE] READY ---> RUNNING
16: [REP][20:33:41][INFO] DEVICE: Running...
16: [REQ1]error: ../fairmq/shmem/Message.h:94:24: runtime error: null pointer passed as argument 2, which is declared to never be null
16: [REQ2]error: ../fairmq/shmem/Message.h:94:24: runtime error: null pointer passed as argument 2, which is declared to never be null
16: [REP][20:33:41][INFO] Received request 1
16: [REP]error: ../fairmq/shmem/Message.h:94:24: runtime error: null pointer passed as argument 2, which is declared to never be null
16: [REP][20:33:41][INFO] Received request 2
16: [REP][20:33:41][INFO] REQ-REP test successfull
16: [REQ1][20:33:41][INFO] received reply
16: [REQ2][20:33:41][INFO] received reply
16: [REP][20:33:41][STATE] RUNNING ---> READY
16: [REQ1][20:33:41][STATE] RUNNING ---> READY
16: [REQ2][20:33:41][STATE] RUNNING ---> READY
16: [REP][20:33:41][STATE] READY ---> RESETTING TASK
16: [REP][20:33:41][STATE] RESETTING TASK ---> DEVICE READY
16: [REQ1][20:33:41][STATE] READY ---> RESETTING TASK
16: [REQ2][20:33:41][STATE] READY ---> RESETTING TASK
16: [REQ1][20:33:41][STATE] RESETTING TASK ---> DEVICE READY
16: [REP][20:33:41][STATE] DEVICE READY ---> RESETTING DEVICE
16: [REQ2][20:33:41][STATE] RESETTING TASK ---> DEVICE READY
16: [REQ2][20:33:41][STATE] DEVICE READY ---> RESETTING DEVICE
16: [REQ1][20:33:41][STATE] DEVICE READY ---> RESETTING DEVICE
16: [REQ2][20:33:41][STATE] RESETTING DEVICE ---> IDLE
16: [REP][20:33:41][STATE] RESETTING DEVICE ---> IDLE
16: [REQ2][20:33:41][STATE] IDLE ---> EXITING
16: [REQ1][20:33:41][INFO] Cleaning up for shared memory id 'f953abd4'...
16: [REQ1][20:33:41][INFO] No region counter found. No regions to cleanup.
16: [REQ1][20:33:41][INFO] Successfully removed 'fmq_f953abd4_m_0'.
16: [REQ1][20:33:41][INFO] Successfully removed 'fmq_f953abd4_mng'.
16: [REP][20:33:41][STATE] IDLE ---> EXITING
16: [REQ1][20:33:41][INFO] Successfully removed 'fmq_f953abd4_mtx'.
16: [REQ1][20:33:41][INFO] Successfully removed 'fmq_f953abd4_cv'.
16: [REQ1][20:33:41][STATE] RESETTING DEVICE ---> IDLE
16: [REQ1][20:33:41][STATE] IDLE ---> EXITING
16: [REP][20:33:41][STATE] Exiting FairMQ state machine
16: [REQ2][20:33:41][STATE] Exiting FairMQ state machine
16: [REQ1][20:33:41][STATE] Exiting FairMQ state machine
16: [REP]fair::mq::tools::execute: exit code: 0
16: [REQ2]fair::mq::tools::execute: exit code: 0
16: [REQ1]fair::mq::tools::execute: exit code: 0
16: [       OK ] ReqRep.shmem (1257 ms)
16: [----------] 1 test from ReqRep (1257 ms total)
16:
16: [----------] Global test environment tear-down
16: [==========] 1 test from 1 test suite ran. (1257 ms total)
16: [  PASSED  ] 1 test.
 16/199 Test  #16: Protocols.ReqRep.shmem ............................................   Passed    1.68 sec
30: Region.EventSubscriptions.zeromq
30: Test command: /home/dklein/projects/FairMQ2/build/test/testsuite_Region "--gtest_filter=EventSubscriptions.zeromq" "--gtest_also_run_disabled_tests"
30: Test timeout computed to be: 5
30: Note: Google Test filter = EventSubscriptions.zeromq
30: [==========] Running 1 test from 1 test suite.
30: [----------] Global test environment set-up.
30: [----------] 1 test from EventSubscriptions
30: [ RUN      ] EventSubscriptions.zeromq
30: [INFO] waiting for blockers...
30: [INFO] >>> local_only: managed, id: 0, ptr: 0, size: 0, flags: 0
30: [INFO] >>> created: unmanaged, id: 1, ptr: 0x7f978bf90800, size: 1000000, flags: 0
30: [INFO] >>> created: unmanaged, id: 2, ptr: 0x7f978bac9800, size: 5000000, flags: 12345
30: [INFO] 1 done.
30: [INFO] 2 done.
30: [INFO] >>> destroyed: unmanaged, id: 2, ptr: 0x7f978bac9800, size: 5000000, flags: 12345
30: [INFO] 3 done.
30: [INFO] >>> destroyed: unmanaged, id: 1, ptr: 0x7f978bf90800, size: 1000000, flags: 0
30: =================================================================
30: ==2537033==ERROR: AddressSanitizer: stack-use-after-scope on address 0x7ffd2022fa30 at pc 0x00000043dd21 bp 0x7f978bac5ca0 sp 0x7f978bac5c98
30: READ of size 8 at 0x7ffd2022fa30 thread T1
30:     #0 0x43dd20 in operator() ../test/region/_region.cxx:132
30:     #1 0x43e2b0 in __invoke_impl<void, (anonymous namespace)::RegionEventSubscriptions(const string&)::<lambda(FairMQRegionInfo)>&, fair::mq::RegionInfo> /usr/include/c++/11/bits/invoke.h:61
30:     #2 0x43e2b0 in __invoke_r<void, (anonymous namespace)::RegionEventSubscriptions(const string&)::<lambda(FairMQRegionInfo)>&, fair::mq::RegionInfo> /usr/include/c++/11/bits/invoke.h:111
30:     #3 0x43e2b0 in _M_invoke /usr/include/c++/11/bits/std_function.h:291
30:     #4 0x7f979870b3c1 in fair::mq::zmq::Context::RegionEventsSubscription() (/home/dklein/projects/FairMQ2/build/fairmq/libFairMQ.so.1.4+0x3f3b3c1)
30:     #5 0x7f9798646595 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (fair::mq::zmq::Context::*)(), fair::mq::zmq::Context*> > >::_M_run() (/home/dklein/projects/FairMQ2/build/fairmq/libFairMQ.so.1.4+0x3e76595)
30:     #6 0x7f979326bc83 in execute_native_thread_routine (/lib64/libstdc++.so.6+0xd9c83)
30:     #7 0x7f97926a9298 in start_thread (/lib64/libpthread.so.0+0x9298)
30:     #8 0x7f97925d1352 in clone (/lib64/libc.so.6+0x100352)
30:
30: Address 0x7ffd2022fa30 is located in stack of thread T0 at offset 672 in frame
30:     #0 0x435cdf in RegionEventSubscriptions ../test/region/_region.cxx:88
30:
30:   This frame has 94 object(s):
30:     [32, 33) '<unknown>'
30:     [48, 49) '<unknown>'
30:     [64, 65) '<unknown>'
30:     [80, 81) '<unknown>'
30:     [96, 97) '<unknown>'
30:     [112, 113) '<unknown>'
30:     [128, 129) '<unknown>'
30:     [144, 145) '<unknown>'
30:     [160, 161) '<unknown>'
30:     [176, 177) '<unknown>'
30:     [192, 193) '<unknown>'
30:     [208, 209) '<unknown>'
30:     [224, 225) '<unknown>'
30:     [240, 241) '<unknown>'
30:     [256, 257) '<unknown>'
30:     [272, 273) '<unknown>'
30:     [288, 289) '<unknown>'
30:     [304, 305) '<unknown>'
30:     [320, 321) '<unknown>'
30:     [336, 337) '<unknown>'
30:     [352, 353) '<unknown>'
30:     [368, 369) '<unknown>'
30:     [384, 385) '<unknown>'
30:     [400, 401) '<unknown>'
30:     [416, 417) '<unknown>'
30:     [432, 433) '<unknown>'
30:     [448, 449) '<unknown>'
30:     [464, 465) '<unknown>'
30:     [480, 481) '__f' (line 87)
30:     [496, 497) '__f' (line 87)
30:     [512, 514) '<unknown>'
30:     [528, 530) '<unknown>'
30:     [544, 548) 'size1' (line 96)
30:     [560, 564) 'size2' (line 97)
30:     [576, 584) 'userFlags' (line 98)
30:     [608, 616) 'region1' (line 102)
30:     [640, 648) 'ptr1' (line 103)
30:     [672, 680) 'id1' (line 104) <== Memory access at offset 672 is inside this variable
30:     [704, 712) '<unknown>'
30:     [736, 744) '<unknown>'
30:     [768, 776) '<unknown>'
30:     [800, 808) 'region2' (line 107)
30:     [832, 840) 'ptr2' (line 108)
30:     [864, 872) 'id2' (line 109)
30:     [896, 904) '<unknown>'
30:     [928, 936) '<unknown>'
30:     [960, 968) '<unknown>'
30:     [992, 1000) '<unknown>'
30:     [1024, 1032) '<unknown>'
30:     [1056, 1064) '<unknown>'
30:     [1088, 1096) '<unknown>'
30:     [1120, 1128) '<unknown>'
30:     [1152, 1160) '<unknown>'
30:     [1184, 1200) 'factory' (line 94)
30:     [1216, 1232) 'gtest_ar' (line 105)
30:     [1248, 1264) 'gtest_ar' (line 110)
30:     [1280, 1296) 'gtest_ar' (line 112)
30:     [1312, 1328) 'gtest_ar' (line 139)
30:     [1344, 1360) 'gtest_ar' (line 155)
30:     [1376, 1408) '<unknown>'
30:     [1440, 1472) '<unknown>'
30:     [1504, 1536) '<unknown>'
30:     [1568, 1600) '<unknown>'
30:     [1632, 1664) '<unknown>'
30:     [1696, 1728) '<unknown>'
30:     [1760, 1792) '<unknown>'
30:     [1824, 1856) '<unknown>'
30:     [1888, 1920) '<unknown>'
30:     [1952, 1984) '<unknown>'
30:     [2016, 2048) '<unknown>'
30:     [2080, 2112) '<unknown>'
30:     [2144, 2176) '<unknown>'
30:     [2208, 2240) '<unknown>'
30:     [2272, 2304) '<unknown>'
30:     [2336, 2368) '<unknown>'
30:     [2400, 2432) '<unknown>'
30:     [2464, 2496) '<unknown>'
30:     [2528, 2560) '<unknown>'
30:     [2592, 2624) '<unknown>'
30:     [2656, 2688) '<unknown>'
30:     [2720, 2752) '<unknown>'
30:     [2784, 2816) '<unknown>'
30:     [2848, 2880) '<unknown>'
30:     [2912, 2944) '<unknown>'
30:     [2976, 3008) '<unknown>'
30:     [3040, 3104) '__f' (line 87)
30:     [3136, 3232) 'blocker' (line 99)
30:     [3264, 3776) 'config' (line 91)
30:     [3840, 5488) '<unknown>'
30:     [5616, 7264) '<unknown>'
30:     [7392, 9040) '<unknown>'
30:     [9168, 10816) '<unknown>'
30:     [10944, 12592) '<unknown>'
30:     [12720, 14368) '<unknown>'
30: HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork
30:       (longjmp and C++ exceptions *are* supported)
30: SUMMARY: AddressSanitizer: stack-use-after-scope ../test/region/_region.cxx:132 in operator()
30: Shadow bytes around the buggy address:
30:   0x10002403def0: 00 00 f1 f1 f1 f1 f8 f2 f8 f2 f8 f2 f8 f2 f8 f2
30:   0x10002403df00: f8 f2 f8 f2 f8 f2 f8 f2 f8 f2 f8 f2 f8 f2 f8 f2
30:   0x10002403df10: f8 f2 f8 f2 f8 f2 f8 f2 f8 f2 f8 f2 01 f2 01 f2
30:   0x10002403df20: 01 f2 01 f2 01 f2 01 f2 01 f2 01 f2 f8 f2 01 f2
30:   0x10002403df30: 01 f2 f8 f2 f8 f2 04 f2 04 f2 00 f2 f2 f2 f8 f2
30: =>0x10002403df40: f2 f2 f8 f2 f2 f2[f8]f2 f2 f2 f8 f2 f2 f2 00 f2
30:   0x10002403df50: f2 f2 00 f2 f2 f2 f8 f2 f2 f2 f8 f2 f2 f2 f8 f2
30:   0x10002403df60: f2 f2 f8 f2 f2 f2 00 f2 f2 f2 00 f2 f2 f2 00 f2
30:   0x10002403df70: f2 f2 00 f2 f2 f2 00 f2 f2 f2 00 f2 f2 f2 00 f2
30:   0x10002403df80: f2 f2 00 f2 f2 f2 00 00 f2 f2 f8 f8 f2 f2 f8 f8
30:   0x10002403df90: f2 f2 f8 f8 f2 f2 f8 f8 f2 f2 00 00 f2 f2 f8 f8
30: Shadow byte legend (one shadow byte represents 8 application bytes):
30:   Addressable:           00
30:   Partially addressable: 01 02 03 04 05 06 07
30:   Heap left redzone:       fa
30:   Freed heap region:       fd
30:   Stack left redzone:      f1
30:   Stack mid redzone:       f2
30:   Stack right redzone:     f3
30:   Stack after return:      f5
30:   Stack use after scope:   f8
30:   Global redzone:          f9
30:   Global init order:       f6
30:   Poisoned by user:        f7
30:   Container overflow:      fc
30:   Array cookie:            ac
30:   Intra object redzone:    bb
30:   ASan internal:           fe
30:   Left alloca redzone:     ca
30:   Right alloca redzone:    cb
30:   Shadow gap:              cc
30: Thread T1 created by T0 here:
30:     #0 0x7f979c7918d6 in pthread_create (/lib64/libasan.so.6+0x568d6)
30:     #1 0x7f979326bf39 in std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) (/lib64/libstdc++.so.6+0xd9f39)
30:
30: ==2537033==ABORTING
 30/199 Test  #30: Region.EventSubscriptions.zeromq ..................................***Failed    0.48 sec
135: Poller.Subchannel.shmem
135: Test command: /home/dklein/projects/FairMQ2/build/test/testsuite_Poller "--gtest_filter=Subchannel.shmem" "--gtest_also_run_disabled_tests"
135: Test timeout computed to be: 5
135: Note: Google Test filter = Subchannel.shmem
135: [==========] Running 1 test from 1 test suite.
135: [----------] Global test environment set-up.
135: [----------] 1 test from Subchannel
135: [ RUN      ] Subchannel.shmem
135: [POLLIN]/home/dklein/projects/FairMQ2/build/test/testhelper_runTestDevice --id pollin_shmem --control static --color false --session 2648406435429349724 --mq-config "/home/dklein/projects/FairMQ2/build/test/testsuite_FairMQ.IOPatterns_config.json" --poll-type 0
135: [POLLOUT]/home/dklein/projects/FairMQ2/build/test/testhelper_runTestDevice --id pollout_shmem --control static --color false --session 2648406435429349724 --mq-config "/home/dklein/projects/FairMQ2/build/test/testsuite_FairMQ.IOPatterns_config.json"
135: [POLLIN]fair::mq::tools::execute: pid: 2538411
135: [POLLOUT]fair::mq::tools::execute: pid: 2538412
135: [POLLIN][20:39:07][INFO]
135: [POLLIN]      ______      _    _______  _________
135: [POLLIN]     / ____/___ _(_)_______   |/  /_  __ \    version 1.4.38-47-g1850f658-dirty
135: [POLLIN]    / /_  / __ `/ / ___/__  /|_/ /_  / / /    build Debug
135: [POLLIN]   / __/ / /_/ / / /    _  /  / / / /_/ /     https://github.com/FairRootGroup/FairMQ
135: [POLLIN]  /_/    \__,_/_/_/     /_/  /_/  \___\_\     LGPL-3.0  © 2012-2021 GSI
135: [POLLIN]
135: [POLLIN][20:39:07][STATE] Starting FairMQ state machine --> IDLE
135: [POLLIN][20:39:07][STATE] IDLE ---> INITIALIZING DEVICE
135: [POLLOUT][20:39:07][INFO]
135: [POLLOUT]      ______      _    _______  _________
135: [POLLOUT]     / ____/___ _(_)_______   |/  /_  __ \    version 1.4.38-47-g1850f658-dirty
135: [POLLOUT]    / /_  / __ `/ / ___/__  /|_/ /_  / / /    build Debug
135: [POLLOUT]   / __/ / /_/ / / /    _  /  / / / /_/ /     https://github.com/FairRootGroup/FairMQ
135: [POLLOUT]  /_/    \__,_/_/_/     /_/  /_/  \___\_\     LGPL-3.0  © 2012-2021 GSI
135: [POLLOUT]
135: [POLLOUT][20:39:07][STATE] Starting FairMQ state machine --> IDLE
135: [POLLOUT][20:39:07][STATE] IDLE ---> INITIALIZING DEVICE
135: [POLLIN][20:39:07][STATE] INITIALIZING DEVICE ---> INITIALIZED
135: [POLLIN][20:39:07][STATE] INITIALIZED ---> BINDING
135: [POLLIN][20:39:07][STATE] BINDING ---> BOUND
135: [POLLOUT][20:39:07][STATE] INITIALIZING DEVICE ---> INITIALIZED
135: [POLLOUT][20:39:07][STATE] INITIALIZED ---> BINDING
135: [POLLIN][20:39:07][STATE] BOUND ---> CONNECTING
135: [POLLIN][20:39:07][STATE] CONNECTING ---> DEVICE READY
135: [POLLIN][20:39:07][STATE] DEVICE READY ---> INITIALIZING TASK
135: [POLLOUT][20:39:07][STATE] BINDING ---> BOUND
135: [POLLOUT][20:39:07][STATE] BOUND ---> CONNECTING
135: [POLLOUT][20:39:07][STATE] CONNECTING ---> DEVICE READY
135: [POLLOUT][20:39:07][STATE] DEVICE READY ---> INITIALIZING TASK
135: [POLLIN][20:39:07][STATE] INITIALIZING TASK ---> READY
135: [POLLOUT][20:39:07][STATE] INITIALIZING TASK ---> READY
135: [POLLIN][20:39:07][STATE] READY ---> RUNNING
135: [POLLIN][20:39:07][INFO] DEVICE: Running...
135: [POLLOUT][20:39:07][STATE] READY ---> RUNNING
135: [POLLOUT][20:39:07][INFO] DEVICE: Running...
135: [POLLOUT]error: ../fairmq/shmem/Message.h:94:24: runtime error: null pointer passed as argument 2, which is declared to never be null
135: [POLLIN][20:39:07][INFO] POLL test successfull
135: [POLLOUT][20:39:07][STATE] RUNNING ---> READY
135: [POLLOUT][20:39:07][STATE] READY ---> RESETTING TASK
135: [POLLOUT][20:39:07][STATE] RESETTING TASK ---> DEVICE READY
135: [POLLIN][20:39:07][STATE] RUNNING ---> READY
135: [POLLOUT][20:39:07][STATE] DEVICE READY ---> RESETTING DEVICE
135: [POLLIN][20:39:07][STATE] READY ---> RESETTING TASK
135: [POLLIN][20:39:07][STATE] RESETTING TASK ---> DEVICE READY
135: [POLLIN][20:39:07][STATE] DEVICE READY ---> RESETTING DEVICE
135: [POLLOUT][20:39:07][STATE] RESETTING DEVICE ---> IDLE
135: [POLLIN][20:39:07][INFO] Cleaning up for shared memory id '267a8ca1'...
135: [POLLOUT][20:39:07][STATE] IDLE ---> EXITING
135: [POLLIN][20:39:07][INFO] No region counter found. No regions to cleanup.
135: [POLLIN][20:39:07][INFO] Successfully removed 'fmq_267a8ca1_m_0'.
135: [POLLIN][20:39:07][INFO] Successfully removed 'fmq_267a8ca1_mng'.
135: [POLLIN][20:39:07][INFO] Successfully removed 'fmq_267a8ca1_mtx'.
135: [POLLIN][20:39:07][INFO] Successfully removed 'fmq_267a8ca1_cv'.
135: [POLLIN][20:39:07][STATE] RESETTING DEVICE ---> IDLE
135: [POLLIN][20:39:07][STATE] IDLE ---> EXITING
135: [POLLIN][20:39:07][STATE] Exiting FairMQ state machine
135: [POLLOUT][20:39:07][STATE] Exiting FairMQ state machine
135: [POLLIN]fair::mq::tools::execute: exit code: 0
135: [POLLOUT]fair::mq::tools::execute: exit code: 0
135: [       OK ] Subchannel.shmem (1264 ms)
135: [----------] 1 test from Subchannel (1264 ms total)
135:
135: [----------] Global test environment tear-down
135: [==========] 1 test from 1 test suite ran. (1265 ms total)
135: [  PASSED  ] 1 test.
135/199 Test #135: Poller.Subchannel.shmem ...........................................   Passed    1.70 sec
176: Commands.Format.SerializationJSON
176: Test command: /home/dklein/projects/FairMQ2/build/test/testsuite_Commands "--gtest_filter=Format.SerializationJSON" "--gtest_also_run_disabled_tests"
176: Test timeout computed to be: 30
176: Note: Google Test filter = Format.SerializationJSON
176: [==========] Running 1 test from 1 test suite.
176: [----------] Global test environment set-up.
176: [----------] 1 test from Format
176: [ RUN      ] Format.SerializationJSON
176: =================================================================
176: ==2544815==ERROR: AddressSanitizer: heap-use-after-free on address 0x6190000019d8 at pc 0x7f8d629a5135 bp 0x7ffc7db64ba0 sp 0x7ffc7db64b98
176: READ of size 4 at 0x6190000019d8 thread T0
176:     #0 0x7f8d629a5134 in flatbuffers::Vector<flatbuffers::Offset<fair::mq::sdk::cmd::FBCommand> >::size() const /usr/include/flatbuffers/flatbuffers.h:247
176:     #1 0x7f8d629a5134 in fair::mq::sdk::cmd::Cmds::Deserialize(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, fair::mq::sdk::cmd::Format) ../fairmq/sdk/commands/Commands.cxx:408
176:     #2 0x44778a in TestBody ../test/commands/_commands.cxx:237
176:     #3 0x4d1474 in void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (/home/dklein/projects/FairMQ2/build/test/testsuite_Commands+0x4d1474)
176:     #4 0x4ca47c in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (/home/dklein/projects/FairMQ2/build/test/testsuite_Commands+0x4ca47c)
176:     #5 0x4a2c59 in testing::Test::Run() (/home/dklein/projects/FairMQ2/build/test/testsuite_Commands+0x4a2c59)
176:     #6 0x4a3550 in testing::TestInfo::Run() (/home/dklein/projects/FairMQ2/build/test/testsuite_Commands+0x4a3550)
176:     #7 0x4a3d1f in testing::TestSuite::Run() (/home/dklein/projects/FairMQ2/build/test/testsuite_Commands+0x4a3d1f)
176:     #8 0x4b27db in testing::internal::UnitTestImpl::RunAllTests() (/home/dklein/projects/FairMQ2/build/test/testsuite_Commands+0x4b27db)
176:     #9 0x4d227a in bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) (/home/dklein/projects/FairMQ2/build/test/testsuite_Commands+0x4d227a)
176:     #10 0x4cb4dc in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) (/home/dklein/projects/FairMQ2/build/test/testsuite_Commands+0x4cb4dc)
176:     #11 0x4b120f in testing::UnitTest::Run() (/home/dklein/projects/FairMQ2/build/test/testsuite_Commands+0x4b120f)
176:     #12 0x40d3a5 in RUN_ALL_TESTS() extern/googletest_install/include/gtest/gtest.h:2490
176:     #13 0x40d3a5 in main test/runner.cxx:31
176:     #14 0x7f8d60675b74 in __libc_start_main (/lib64/libc.so.6+0x27b74)
176:     #15 0x40d1bd in _start (/home/dklein/projects/FairMQ2/build/test/testsuite_Commands+0x40d1bd)
176:
176: 0x6190000019d8 is located 88 bytes inside of 1024-byte region [0x619000001980,0x619000001d80)
176: freed by thread T0 here:
176:     #0 0x7f8d62cd6fa7 in operator delete[](void*) (/lib64/libasan.so.6+0xb0fa7)
176:     #1 0x7f8d62a306ac in flatbuffers::DefaultAllocator::deallocate(unsigned char*, unsigned long) /usr/include/flatbuffers/flatbuffers.h:633
176:     #2 0x7f8d62a306ac in flatbuffers::Deallocate(flatbuffers::Allocator*, unsigned char*, unsigned long) /usr/include/flatbuffers/flatbuffers.h:651
176:     #3 0x7f8d62a306ac in flatbuffers::vector_downward::clear_buffer() /usr/include/flatbuffers/flatbuffers.h:873
176:     #4 0x7f8d62a306ac in flatbuffers::vector_downward::~vector_downward() /usr/include/flatbuffers/flatbuffers.h:845
176:     #5 0x7f8d62a306ac in flatbuffers::FlatBufferBuilder::~FlatBufferBuilder() /usr/include/flatbuffers/flatbuffers.h:1144
176:     #6 0x7f8d62a306ac in flatbuffers::Parser::~Parser() /usr/include/flatbuffers/idl.h:788
176:     #7 0x7ffc7db65d6f  ([stack]+0x1ed6f)
176:
176: previously allocated by thread T0 here:
176:     #0 0x7f8d62cd65e7 in operator new[](unsigned long) (/lib64/libasan.so.6+0xb05e7)
176:     #1 0x7f8d605dfe63 in flatbuffers::vector_downward::reallocate(unsigned long) (/lib64/libflatbuffers.so.1+0xee63)
176:
176: SUMMARY: AddressSanitizer: heap-use-after-free /usr/include/flatbuffers/flatbuffers.h:247 in flatbuffers::Vector<flatbuffers::Offset<fair::mq::sdk::cmd::FBCommand> >::size() const
176: Shadow bytes around the buggy address:
176:   0x0c327fff82e0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
176:   0x0c327fff82f0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
176:   0x0c327fff8300: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
176:   0x0c327fff8310: fd fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
176:   0x0c327fff8320: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
176: =>0x0c327fff8330: fd fd fd fd fd fd fd fd fd fd fd[fd]fd fd fd fd
176:   0x0c327fff8340: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
176:   0x0c327fff8350: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
176:   0x0c327fff8360: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
176:   0x0c327fff8370: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
176:   0x0c327fff8380: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
176: Shadow byte legend (one shadow byte represents 8 application bytes):
176:   Addressable:           00
176:   Partially addressable: 01 02 03 04 05 06 07
176:   Heap left redzone:       fa
176:   Freed heap region:       fd
176:   Stack left redzone:      f1
176:   Stack mid redzone:       f2
176:   Stack right redzone:     f3
176:   Stack after return:      f5
176:   Stack use after scope:   f8
176:   Global redzone:          f9
176:   Global init order:       f6
176:   Poisoned by user:        f7
176:   Container overflow:      fc
176:   Array cookie:            ac
176:   Intra object redzone:    bb
176:   ASan internal:           fe
176:   Left alloca redzone:     ca
176:   Right alloca redzone:    cb
176:   Shadow gap:              cc
176: ==2544815==ABORTING
176/199 Test #176: Commands.Format.SerializationJSON .................................***Failed    0.09 sec
@dennisklein dennisklein added the bug Something isn't working label Jun 17, 2021
@rbx rbx self-assigned this Jun 18, 2021
@rbx rbx mentioned this issue Jun 24, 2021
@dennisklein dennisklein linked a pull request Jun 24, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants