You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by GitBox <gi...@apache.org> on 2019/11/04 15:50:48 UTC

[GitHub] [qpid-dispatch] kgiusti commented on issue #608: DISPATCH-1467: enable AddressSanitizer build option (ASAN)

kgiusti commented on issue #608: DISPATCH-1467: enable AddressSanitizer build option (ASAN)
URL: https://github.com/apache/qpid-dispatch/pull/608#issuecomment-549416481
 
 
   > When compiling and running tests with gcc, with libwebsocket available, I got this crash in test 9 and in other tests which don't readily print these messages, and in test 19 which prints it. After that I killed ctest.
   > 
   > When compiled without libwebsocket, I get clean result, except for system_tests_console. That probably should not run, when I don't have libwebsockets?
   > 
   > ```
   > 9: -----------------------------------------------------
   > 9: Suppressions used:
   > 9:   count      bytes template
   > 9:       1         48 qdr_core_subscribe
   > 9:     530     855269 *libpython*
   > 9:       1       1208 run_unit_tests.c
   > 9: -----------------------------------------------------
   > ```
   > 
   > ## The libwebsocket fail
   > 
   > ```
   > 9: 2019-11-04 15:20:33.327766 +0100 AGENT (debug) Add entity: RouterEntity(allowResumableLinkRoute=True, allowUnsettledMulticast=False, area=0, defaultDistribution=balanced, helloIntervalSeconds=1, helloMaxAgeSeconds=3, hostName=nixos, id=QDR, mode=standalone, raIntervalFluxSeconds=4, raIntervalSeconds=30, remoteLsMaxAgeSeconds=60, saslConfigName=qdrouterd, type=org.apache.qpid.dispatch.router, workerThreads=4)
   > 9: ASAN:DEADLYSIGNAL
   > 9: =================================================================
   > 9: ==18538==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7f61fce828eb bp 0x7ffcc66b7530 sp 0x7ffcc66b6ca0 T0)
   > 9: ==18538==The signal is caused by a READ memory access.
   > 9: ==18538==Hint: address points to the zero page.
   > 9:     #0 0x7f61fce828ea  (/nix/store/mvvw8d463lnbhz9nif13xfjk9n793p6r-gcc-7.4.0-lib/lib/libasan.so.4+0x5a8ea)
   > 9:     #1 0x7f61fb0ec46c in lh_insert (/nix/store/z8bn38sz1z1vm31j8qhkgzhw1frpyc5x-openssl-1.0.2t/lib/libcrypto.so.1.0.0+0x12f46c)
   > 9:     #2 0x7f61fb032b8a in OBJ_NAME_add (/nix/store/z8bn38sz1z1vm31j8qhkgzhw1frpyc5x-openssl-1.0.2t/lib/libcrypto.so.1.0.0+0x75b8a)
   > 9:     #3 0x7f61faeab3da in ossl_init_ssl_base_ossl_ (/nix/store/x8gkxxkrw46q3sxhpfrcvc2hlgvb144w-openssl-1.1.1c/lib/libssl.so.1.1+0x393da)
   > 9:     #4 0x7f61fc6b69c8 in __pthread_once_slow (/nix/store/iykxb0bmfjmi7s53kfg6pjbfpd8jmza6-glibc-2.27/lib/libpthread.so.0+0xf9c8)
   > 9:     #5 0x7f61fad84b78 in CRYPTO_THREAD_run_once (/nix/store/x8gkxxkrw46q3sxhpfrcvc2hlgvb144w-openssl-1.1.1c/lib/libcrypto.so.1.1+0x20db78)
   > 9:     #6 0x7f61faeab5d6 in OPENSSL_init_ssl (/nix/store/x8gkxxkrw46q3sxhpfrcvc2hlgvb144w-openssl-1.1.1c/lib/libssl.so.1.1+0x395d6)
   > 9:     #7 0x7f61fc2fea6f in lws_context_init_ssl_library (/nix/store/z3pys76m2hy4f8xr00yzsh98irwywsqg-libwebsockets-3.2.0/lib/libwebsockets.so.15+0x2ca6f)
   > 9:     #8 0x7f61fc2e4467 in lws_create_context (/nix/store/z3pys76m2hy4f8xr00yzsh98irwywsqg-libwebsockets-3.2.0/lib/libwebsockets.so.15+0x12467)
   > 9:     #9 0x7f61fcb06723 in qd_http_server ../src/http-libwebsockets.c:836
   > 9:     #10 0x7f61fcaedee0 in qd_server ../src/server.c:1244
   > 9:     #11 0x7f61fc9c718d in qd_dispatch_prepare ../src/dispatch.c:320
   > 9:     #12 0x7f61f800e05d in ffi_call_unix64 (/nix/store/8pivgdaciz2add2wv7ff13gbz0rijs3f-libffi-3.2.1/lib/libffi.so.6+0x805d)
   > 9:     #13 0x7f61f800d022 in ffi_call (/nix/store/8pivgdaciz2add2wv7ff13gbz0rijs3f-libffi-3.2.1/lib/libffi.so.6+0x7022)
   > 9:     #14 0x7f61f7e2a93c in _ctypes_callproc (/nix/store/yglc8kgzmdaskyngv90y1mw96fl00pjy-python3-3.7.4/lib/python3.7/lib-dynload/_ctypes.cpython-37m-x86_64-linux-gnu.so+0x1293c)
   > 9:     #15 0x7f61f7e2144b in PyCFuncPtr_call (/nix/store/yglc8kgzmdaskyngv90y1mw96fl00pjy-python3-3.7.4/lib/python3.7/lib-dynload/_ctypes.cpython-37m-x86_64-linux-gnu.so+0x944b)
   > 9:     #16 0x7f61fc3ce7d2 in _PyObject_FastCallKeywords (/nix/store/yglc8kgzmdaskyngv90y1mw96fl00pjy-python3-3.7.4/lib/libpython3.7m.so.1.0+0x9f7d2)
   > 9:     #17 0x7f61fc3a49a7 in _PyEval_EvalFrameDefault (/nix/store/yglc8kgzmdaskyngv90y1mw96fl00pjy-python3-3.7.4/lib/libpython3.7m.so.1.0+0x759a7)
   > 9:     #18 0x7f61fc4bc3fd in _PyEval_EvalCodeWithName (/nix/store/yglc8kgzmdaskyngv90y1mw96fl00pjy-python3-3.7.4/lib/libpython3.7m.so.1.0+0x18d3fd)
   > 9:     #19 0x7f61fc3ce02e in _PyFunction_FastCallDict (/nix/store/yglc8kgzmdaskyngv90y1mw96fl00pjy-python3-3.7.4/lib/libpython3.7m.so.1.0+0x9f02e)
   > 9:     #20 0x7f61fc3cfcb6 in PyObject_CallFunction (/nix/store/yglc8kgzmdaskyngv90y1mw96fl00pjy-python3-3.7.4/lib/libpython3.7m.so.1.0+0xa0cb6)
   > 9:     #21 0x7f61fc9c581a in qd_dispatch_load_config ../src/dispatch.c:120
   > 9:     #22 0x40494a in main ../tests/run_unit_tests.c:52
   > 9:     #23 0x7f61fb61cb8d in __libc_start_main (/nix/store/iykxb0bmfjmi7s53kfg6pjbfpd8jmza6-glibc-2.27/lib/libc.so.6+0x22b8d)
   > 9:     #24 0x404cd9 in _start (/home/jdanek/repos/qpid/qpid-dispatch/build/tests/unit_tests+0x404cd9)
   > 9: 
   > 9: AddressSanitizer can not provide additional info.
   > 9: SUMMARY: AddressSanitizer: SEGV (/nix/store/mvvw8d463lnbhz9nif13xfjk9n793p6r-gcc-7.4.0-lib/lib/libasan.so.4+0x5a8ea) 
   > 9: ==18538==ABORTING
   >  9/63 Test  #9: unit_tests ........................................***Failed    0.30 sec
   > ```
   > 
   > ## Console test fail
   > 
   > ```
   > 54: Test command: /nix/store/yglc8kgzmdaskyngv90y1mw96fl00pjy-python3-3.7.4/bin/python "/home/jdanek/repos/qpid/qpid-dispatch/build/tests/run.py" "-m" "unittest" "-v" "system_tests_console"
   > 54: Test timeout computed to be: 360
   > 54: ERROR
   > 54: /nix/store/yglc8kgzmdaskyngv90y1mw96fl00pjy-python3-3.7.4/lib/python3.7/subprocess.py:858: ResourceWarning: subprocess 6685 is still running
   > 54:   ResourceWarning, source=self)
   > 54: ResourceWarning: Enable tracemalloc to get the object allocation traceback
   > 54: 
   > 54: ======================================================================
   > 54: ERROR: setUpClass (system_tests_console.ConsoleTest)
   > 54: ----------------------------------------------------------------------
   > 54: Traceback (most recent call last):
   > 54:   File "/home/jdanek/repos/qpid/qpid-dispatch/tests/system_test.py", line 206, in wait_port
   > 54:     retry_exception(connect, exception_test=check, **retry_kwargs)
   > 54:   File "/home/jdanek/repos/qpid/qpid-dispatch/tests/system_test.py", line 156, in retry_exception
   > 54:     return function()
   > 54:   File "/home/jdanek/repos/qpid/qpid-dispatch/tests/system_test.py", line 201, in connect
   > 54:     s.connect((host, port))
   > 54: ConnectionRefusedError: [Errno 111] Connection refused
   > 54: 
   > 54: During handling of the above exception, another exception occurred:
   > 54: 
   > 54: Traceback (most recent call last):
   > 54:   File "/home/jdanek/repos/qpid/qpid-dispatch/tests/system_tests_console.py", line 91, in setUpClass
   > 54:     cls.router = cls.tester.qdrouterd('test-router', config)
   > 54:   File "/home/jdanek/repos/qpid/qpid-dispatch/tests/system_test.py", line 628, in qdrouterd
   > 54:     return self.cleanup(Qdrouterd(*args, **kwargs))
   > 54:   File "/home/jdanek/repos/qpid/qpid-dispatch/tests/system_test.py", line 417, in __init__
   > 54:     self.wait_ready()
   > 54:   File "/home/jdanek/repos/qpid/qpid-dispatch/tests/system_test.py", line 549, in wait_ready
   > 54:     self.wait_ports(**retry_kwargs)
   > 54:   File "/home/jdanek/repos/qpid/qpid-dispatch/tests/system_test.py", line 534, in wait_ports
   > 54:     wait_ports(self.ports_family, **retry_kwargs)
   > 54:   File "/home/jdanek/repos/qpid/qpid-dispatch/tests/system_test.py", line 214, in wait_ports
   > 54:     wait_port(port=port, protocol_family=protocol_family, **retry_kwargs)
   > 54:   File "/home/jdanek/repos/qpid/qpid-dispatch/tests/system_test.py", line 208, in wait_port
   > 54:     raise Exception("wait_port timeout on port %s: %s" % (port, e))
   > 54: Exception: wait_port timeout on port 20734: [Errno 111] Connection refused
   > 54: 
   > 54: ----------------------------------------------------------------------
   > 54: Ran 0 tests in 60.010s
   > 54: 
   > 54: FAILED (errors=1)
   > 54/62 Test #54: system_tests_console ..............................***Failed   61.04 sec
   > ```
   
   The libwebsockets issue is known - there's some sort of illegal memory bug in certain versions of libwebsockets:
   
   https://issues.apache.org/jira/browse/DISPATCH-1258
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org