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

Correct order of ossl_condvar_signal in quic_multistream_test #22616

Closed
wants to merge 7 commits into from

Commits on Nov 3, 2023

  1. Correct order of ossl_condvar_signal in quic_multistream_test

    quic_multistream test was issuing a signal on a condvar after dropping
    the corresponding mutex, not before, leading to potential race
    conditions in the reading of the associated data
    
    Fixes openssl#22588
    nhorman committed Nov 3, 2023
    Configuration menu
    Copy the full SHA
    ecad973 View commit details
    Browse the repository at this point in the history
  2. add locking around fake_now

    fake_now in the quictestlib is read/written by potentially many threads,
    and as such should have a surrounding lock to prevent WAR/RAW errors as
    caught by tsan:
    
    2023-11-03T16:27:23.7184999Z ==================
    2023-11-03T16:27:23.7185290Z WARNING: ThreadSanitizer: data race (pid=18754)
    2023-11-03T16:27:23.7185720Z   Read of size 8 at 0x558f6f9fe970 by main thread:
    2023-11-03T16:27:23.7186726Z     #0 qtest_create_quic_connection_ex <null> (quicapitest+0x14aead) (BuildId: d06f7b04830b55de9c8482b398a1781472d1c7d5)
    2023-11-03T16:27:23.7187665Z     openssl#1 qtest_create_quic_connection <null> (quicapitest+0x14b220) (BuildId: d06f7b04830b55de9c8482b398a1781472d1c7d5)
    2023-11-03T16:27:23.7188567Z     openssl#2 test_quic_write_read quicapitest.c (quicapitest+0x150ee2) (BuildId: d06f7b04830b55de9c8482b398a1781472d1c7d5)
    2023-11-03T16:27:23.7189561Z     openssl#3 run_tests <null> (quicapitest+0x2237ab) (BuildId: d06f7b04830b55de9c8482b398a1781472d1c7d5)
    2023-11-03T16:27:23.7190294Z     openssl#4 main <null> (quicapitest+0x223d2b) (BuildId: d06f7b04830b55de9c8482b398a1781472d1c7d5)
    2023-11-03T16:27:23.7190720Z
    2023-11-03T16:27:23.7190902Z   Previous write of size 8 at 0x558f6f9fe970 by thread T1:
    2023-11-03T16:27:23.7191607Z     #0 qtest_create_quic_connection_ex <null> (quicapitest+0x14aecf) (BuildId: d06f7b04830b55de9c8482b398a1781472d1c7d5)
    2023-11-03T16:27:23.7192505Z     openssl#1 run_server_thread quictestlib.c (quicapitest+0x14b1d6) (BuildId: d06f7b04830b55de9c8482b398a1781472d1c7d5)
    2023-11-03T16:27:23.7193361Z     openssl#2 thread_run quictestlib.c (quicapitest+0x14cadf) (BuildId: d06f7b04830b55de9c8482b398a1781472d1c7d5)
    2023-11-03T16:27:23.7193848Z
    2023-11-03T16:27:23.7194220Z   Location is global 'fake_now.0' of size 8 at 0x558f6f9fe970 (quicapitest+0x1af4970)
    2023-11-03T16:27:23.7194636Z
    2023-11-03T16:27:23.7194816Z   Thread T1 (tid=18760, running) created by main thread at:
    2023-11-03T16:27:23.7195465Z     #0 pthread_create <null> (quicapitest+0xca12d) (BuildId: d06f7b04830b55de9c8482b398a1781472d1c7d5)
    2023-11-03T16:27:23.7196317Z     openssl#1 qtest_create_quic_connection_ex <null> (quicapitest+0x14adcb) (BuildId: d06f7b04830b55de9c8482b398a1781472d1c7d5)
    2023-11-03T16:27:23.7197214Z     openssl#2 qtest_create_quic_connection <null> (quicapitest+0x14b220) (BuildId: d06f7b04830b55de9c8482b398a1781472d1c7d5)
    2023-11-03T16:27:23.7198111Z     openssl#3 test_quic_write_read quicapitest.c (quicapitest+0x150ee2) (BuildId: d06f7b04830b55de9c8482b398a1781472d1c7d5)
    2023-11-03T16:27:23.7198940Z     openssl#4 run_tests <null> (quicapitest+0x2237ab) (BuildId: d06f7b04830b55de9c8482b398a1781472d1c7d5)
    2023-11-03T16:27:23.7199661Z     openssl#5 main <null> (quicapitest+0x223d2b) (BuildId: d06f7b04830b55de9c8482b398a1781472d1c7d5)
    2023-11-03T16:27:23.7200083Z
    2023-11-03T16:27:23.7200862Z SUMMARY: ThreadSanitizer: data race (/home/runner/work/openssl/openssl/test/quicapitest+0x14aead) (BuildId: d06f7b04830b55de9c8482b398a1781472d1c7d5) in qtest_create_quic_connection_ex
    nhorman committed Nov 3, 2023
    Configuration menu
    Copy the full SHA
    a3c1041 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c6398a9 View commit details
    Browse the repository at this point in the history

Commits on Nov 6, 2023

  1. Configuration menu
    Copy the full SHA
    5b659c1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    620c64d View commit details
    Browse the repository at this point in the history

Commits on Nov 7, 2023

  1. Configuration menu
    Copy the full SHA
    c575519 View commit details
    Browse the repository at this point in the history

Commits on Nov 8, 2023

  1. Configuration menu
    Copy the full SHA
    4f32438 View commit details
    Browse the repository at this point in the history