eclipse-cyclonedds / cyclonedds

Eclipse Cyclone DDS project
https://projects.eclipse.org/projects/iot.cyclonedds
Other
874 stars 357 forks source link

ddssec_builtin_process_handshake_crl test failure "double free" #887

Closed jacobperron closed 3 years ago

jacobperron commented 3 years ago

We're seeing this failure on ROS 2 CI for several platforms, for instance: https://ci.ros2.org/job/nightly_linux_debug/1995/testReport/junit/projectroot.src.security.builtin_plugins/tests/CUnit_ddssec_builtin_process_handshake_crl/

test 276
    Start 276: CUnit_ddssec_builtin_process_handshake_crl

276: Test command: /home/jenkins-agent/workspace/nightly_linux_debug/ws/build/cyclonedds/bin/cunit_security_plugins "-s" "ddssec_builtin_process_handshake" "-t" "crl"
276: Environment variables: 
276:  LD_LIBRARY_PATH=/home/jenkins-agent/workspace/nightly_linux_debug/ws/build/cyclonedds/lib:/home/jenkins-agent/workspace/nightly_linux_debug/ws/install/iceoryx_binding_c/lib:/home/jenkins-agent/workspace/nightly_linux_debug/ws/install/iceoryx_binding_c/lib:/home/jenkins-agent/workspace/nightly_linux_debug/ws/install/iceoryx_posh/lib:/home/jenkins-agent/workspace/nightly_linux_debug/ws/install/iceoryx_utils/lib:/home/rosbuild/rti_connext_dds-5.3.1/lib/x64Linux3gcc5.4.0
276: Test timeout computed to be: 10
276: 
276: 
276:      CUnit - A unit testing framework for C - Version 2.1-3
276:      http://cunit.sourceforge.net/
276: 
276: validate_local_identity_failed: Certificate not valid: error: CRL has expired; subject: /C=NL/ST=Some-State/O=Internet Widgits Pty Ltd/CN=CHAM500 cert
276: 
276: Suite ddssec_builtin_process_handshake, Test crl had failures:
276:     1. /home/jenkins-agent/workspace/nightly_linux_debug/ws/src/eclipse-cyclonedds/cyclonedds/src/security/builtin_plugins/tests/process_handshake/src/process_handshake_utests.c:2629  - !validate_local_identity(revoker_identity_ca, local_identity_certificate, local_private_key, NULL, crl)return_identity_handle failed: return_identity_handle: Invalid handle provided
276: return_identity_handle failed: return_identity_handle: Invalid handle provided
276: return_identity_handle failed: return_identity_handle: Invalid handle provided
276: free(): double free detected in tcache 2

First noticed July 18th; it's not clear to me what is causing the error since the last change to the iceoryx branch was 5 days ago. Perhaps the failure is being caused by a change to a dependency.

eboasson commented 3 years ago

@jacobperron that was a double-free in the code path taken by a failing test case, where the test case was failing because the CRL's expiry date had passed (Similar to #878.) I've done my best to make sure this particular issue is gone for good.

jacobperron commented 3 years ago

Thanks for the quick response :bow: