Stack overflow (0xc00000fd) in RPCRT4.dll when using Bot Media SDK with .NET 9.0
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- csharp
調査の方向性
.NET 9.0、Microsoft.Skype.Bots.Media 1.31.0.225-preview、Windows Server 2022 を使用して、まず 6 つの再現手順を実行し、その後 CETCompat を false に設定した場合の動作と比較します。互換性の動作を確認し、サポートされている .NET バージョンと回避策を文書化するか、クラッシュを防ぐ SDK 更新を提供できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Description
When using the Microsoft Bot Media SDK (Microsoft.Skype.Bots.Media version 1.31.0.225-preview) with .NET 9.0, the application crashes with a stack overflow (STATUS_STACK_OVERFLOW / 0xc00000fd) in RPCRT4.dll shortly after successfully joining a Teams meeting.
Environment
- OS: Windows Server 2022 Datacenter (Azure VM)
- .NET Version: .NET 9.0
- SDK Versions:
Microsoft.Skype.Bots.Media: 1.31.0.225-previewMicrosoft.Graph.Communications.Calls.Media: 1.2.0.15690Microsoft.Graph.Communications.Client: 1.2.0.15690
Symptoms
- Bot successfully authenticates and joins the Teams meeting
- Media session is established (call state transitions to
Established) - ~5-10 seconds after joining, the process crashes with:
- Exception Code:
0xc00000fd(STATUS_STACK_OVERFLOW) - Faulting Module:
RPCRT4.dll - Faulting Application:
VoiceRail.Voice.exe
- Exception Code:
Investigation Findings
We extensively tested various hypotheses:
- Disabled ALL event handlers (AudioMediaReceived, AudioSendStatusChanged, Participants.OnUpdated) - still crashed
- Offloaded event handlers to ThreadPool - still crashed
- Deferred event subscription from constructor - still crashed
- Tested SDK version 1.31.0.225-preview (minimum required by Calls.Media) - still crashed
The crash occurs INSIDE the SDK's native code, not in our managed code.
Root Cause
After extensive research, we identified this as a .NET 9.0 Control Flow Guard (CFG) compatibility issue:
- .NET 9.0 introduced stricter CFG/CET (Control-flow Enforcement Technology) enforcement
- The Bot Media SDK's native DLLs make RPC callbacks into managed code
- These callbacks fail CFG stack validation, causing the stack overflow in RPCRT4.dll
- Related issue: https://github.com/dotnet/runtime/issues/119067
Workaround
Adding <CETCompat>false</CETCompat> to the project file resolves the issue:
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<!-- Disable CET/CFG compatibility for Bot Media SDK native interop -->
<CETCompat>false</CETCompat>
</PropertyGroup>
Request
- Documentation: Please document the .NET 9.0 compatibility issue and the
CETCompatworkaround - SDK Update: Consider updating the Bot Media SDK to be compatible with .NET 9.0's CFG enforcement
- Official Support: Clarify if .NET 9.0 is officially supported or if .NET 8.0 LTS should be used
Reproduction Steps
- Create a new .NET 9.0 project targeting
win-x64 - Add
Microsoft.Skype.Bots.Media1.31.0.225-preview - Implement a basic Teams meeting bot following the samples
- Deploy to Windows Server 2022
- Join a Teams meeting
- Observe crash ~5-10 seconds after joining
Additional Context
- The same code works correctly when
<CETCompat>false</CETCompat>is added - We have not tested with .NET 8.0 (downgrade would also likely resolve the issue)
- All Windows Media Foundation components and VC++ Redistributables are installed
- 主要言語
- 言語のデータがありません
- スター
- 252
- フォーク
- 276
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoftgraph/microsoft-graph-comms-samples のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
microsoftgraph/microsoft-graph-comms-samples#871 · コメント 5 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
microsoftgraph/microsoft-graph-comms-samples#870 · コメント 11 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
microsoftgraph/microsoft-graph-comms-samples#869 · コメント 1 件 · リアクション 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
microsoftgraph/microsoft-graph-comms-samples#868 · コメント 1 件 ·
microsoftgraph/microsoft-graph-comms-samples の issue をすべて見る
似ている issue
-
good first issue style
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
-
## Summaryオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
hv2znbvdy9-glitch/DEVITO#198 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
-
backlog enhancement needs info priority: low
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
storytold/filmcraft#3788 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信