Closed6
msquic のおためし

ビルド
$ git clone https://github.com/microsoft/msquic.git
$ cd msquic;
$ git submodule update --init --recursive
$ sudo dnf install dotnet-sdk-5.0
$ sudo dnf install cmake
$ sudo dnf install make
$ sudo dnf install gcc
$ sudo dnf install gcc-c++
$ sudo dnf install clang ※たぶんこれは不要。
$ sudo dnf install libatomic
$ pwsh
$ ./scripts/prepare-machine.ps1 -Configuration Dev
$ ./scripts/build.ps1 -Tls openssl

テスト
$ ./scripts/test.ps1 -Tls openssl
略
[08/05/2021 09:41:03] Process had nonzero exit code: 139 [08/05/2021 09:41:03] TlsTest.HandshakeCertFromFile failed: Note: Google Test filter = TlsTest.HandshakeCertFromFile [==========] Running 1 test from 1 test suite. [----------] Global test environment set-up. [----------] 1 test from TlsTest [ RUN ] TlsTest.HandshakeCertFromFile
/home/uniker9/git-work/msquic/src/platform/unittest/TlsTest.cpp:55: Failure
Value of: QUIC_SUCCEEDED(CxPlatTlsSecConfigCreate( CredConfig, TlsFlags, &TlsContext::TlsCallbacks, &SecConfig, OnSecConfigCreateComplete))
Actual: false
Expected: true
bash: 1 行: 43082 Segmentation fault (コアダンプ) /home/uniker9/git-work/msquic/artifacts/bin/linux/x64_Debug_openssl/msquicplatformtest --gtest_catch_exceptions=0 --gtest_filter=TlsTest.HandshakeCertFromFile --gtest_output=xml:/home/uniker9/git-work/msquic/artifacts/logs/msquicplatformtest/08.05.2021.09.41.02/TlsTest.HandshakeCertFromFile/results.xml -PfxPath:/home/uniker9/git-work/msquic/artifacts/bin/linux/x64_Debug_openssl/selfsignedservercert.pfx
コアダンプしてセグメンテーションエラーが発生してしまった…

openssl-devel をインストールし忘れてたのでインストール。
$ sudo dnf install openssl-devel
クリーンビルド後に再テストするも、またもセグる。
[08/05/2021 10:09:31] Process had nonzero exit code: 139 [08/05/2021 10:09:31] TlsTest.HandshakeCertFromFile failed: Note: Google Test filter = TlsTest.HandshakeCertFromFile [==========] Running 1 test from 1 test suite. [----------] Global test environment set-up. [----------] 1 test from TlsTest [ RUN ] TlsTest.HandshakeCertFromFile
/home/uniker9/git-work/msquic/src/platform/unittest/TlsTest.cpp:55: Failure
Value of: QUIC_SUCCEEDED(CxPlatTlsSecConfigCreate( CredConfig, TlsFlags, &TlsContext::TlsCallbacks, &SecConfig, OnSecConfigCreateComplete))
Actual: false
Expected: true
bash: 1 行: 53573 Segmentation fault (コアダンプ) /home/uniker9/git-work/msquic/artifacts/bin/linux/x64_Debug_openssl/msquicplatformtest --gtest_catch_exceptions=0 --gtest_filter=TlsTest.HandshakeCertFromFile --gtest_output=xml:/home/uniker9/git-work/msquic/artifacts/logs/msquicplatformtest/08.05.2021.10.09.31/TlsTest.HandshakeCertFromFile/results.xml -PfxPath:/home/uniker9/git-work/msquic/artifacts/bin/linux/x64_Debug_openssl/selfsignedservercert.pfx

全テストケースのリストを出力(実行はしない)
$ ./scripts/test.ps1 -Tls openssl -ListTestCases
ダンプしていた TlsTest.HandshakeCertFromFile を除外してテスト実行
$ ./scripts/test.ps1 -Tls openssl -Filter *-TlsTest.HandshakeCertFromFile
これを飛ばしてもエラー多数。とくに ParameterValidation/WithValidateStreamEventArgs.ValidateStreamEvents/6 で再びダンプ発生した。
08/09/2021 01:01:18] ParameterValidation/WithValidateStreamEventArgs.ValidateStreamEvents/6 failed: Note: Google Test filter = ParameterValidation/WithValidateStreamEventArgs.ValidateStreamEvents/6 [==========] Running 1 test from 1 test suite. [----------] Global test environment set-up. Initializing for User Mode tests [----------] 1 test from ParameterValidation/WithValidateStreamEventArgs
[ RUN ] ParameterValidation/WithValidateStreamEventArgs.ValidateStreamEvents/6
/home/uniker9/git-work/msquic/src/test/lib/EventTest.cpp:1289: Failure
Client.Complete.WaitTimeout(2000) not true
bash: 1 行: 118376 中止 (コアダンプ) /home/uniker9/git-work/msquic/artifacts/bin/linux/x64_Debug_openssl/msquictest --gtest_catch_exceptions=0 --gtest_filter=ParameterValidation/WithValidateStreamEventArgs.ValidateStreamEvents/6 --gtest_output=xml:/home/uniker9/git-work/msquic/artifacts/logs/msquictest/08.09.2021.01.00.23/ParameterValidation_WithValidateStreamEventArgs.ValidateStreamEvents_6/results.xml -PfxPath:/home/uniker9/git-work/msquic/artifacts/bin/linux/x64_Debug_openssl/selfsignedservercert.pfx

後続にさらにコアダンプ多数
Mtu/WithMtuArgs.MtuDiscovery/8
Mtu/WithMtuArgs.MtuDiscovery/9
...
Mtu/WithMtuArgs.MtuDiscovery/13
Handshake/WithHandshakeArgs1.Connect/8

Ubuntu だとさくっといけた。
このスクラップは2021/08/09にクローズされました
ログインするとコメントできます