[BUG] IllegalStateException when cancelling Service Bus session acquisition on a Reactor thread
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 56/100
調査の方向性
Start with ServiceBusSessionAcquirer.java around the cancellation cleanup at line 213, then trace how it disposes the receive link through ReactorReceiver.java and its close methods. Compare the 7.17.17 and 7.18.1 cancellation paths and inspect related tests for session acquisition cancellation. Done means cancellation closes the link without triggering Reactor’s blocking-operation exception and the processor handles the acquisition outcome.
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
A session-enabled Service Bus processor intermittently raises a Reactor IllegalStateException when session acquisition is cancelled.
The exception occurs while the SDK closes the receive link after cancellation. The close operation calls Mono.block(...) from a Reactor non-blocking scheduler thread.
Exception or Stack Trace
java.lang.IllegalStateException: block()/blockFirst()/blockLast() are blocking, which is not supported in thread parallel-2
at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:121)
at reactor.core.publisher.Mono.block(Mono.java:1754)
at com.azure.core.amqp.implementation.ReactorReceiver.close(ReactorReceiver.java:309)
at com.azure.core.amqp.implementation.ReactorReceiver.dispose(ReactorReceiver.java:304)
at com.azure.messaging.servicebus.ServiceBusSessionAcquirer.lambda$acquireSession$4(ServiceBusSessionAcquirer.java:213)
at reactor.core.publisher.FluxDoFinally$DoFinallySubscriber.runFinally(FluxDoFinally.java:146)
at reactor.core.publisher.FluxDoFinally$DoFinallySubscriber.cancel(FluxDoFinally.java:135)
at reactor.core.publisher.MonoFlatMap$FlatMapMain.cancel(MonoFlatMap.java:207)
at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.drainLoop(Operators.java:2425)
at reactor.core.publisher.FluxTimeout$TimeoutMainSubscriber.handleTimeout(FluxTimeout.java:295)
To Reproduce
- Use a session-enabled Service Bus queue or subscription.
- Create a session-enabled ServiceBusProcessorClient.
- Start the processor.
- Let session acquisition be cancelled, for example when acquisition times out while a receiver is being created.
- Observe the exception during receiver disposal.
The issue is intermittent and depends on session acquisition cancellation, broker latency, or session contention.
Expected behavior
Cancelling session acquisition should close the receive link without invoking a blocking operation on a Reactor non-blocking thread.
The processor should recover or report the acquisition failure without raising a Reactor blocking-operation exception.
Screenshots
Not applicable.
Setup
- OS: Linux, running in Kubernetes
- Libraries:
- com.azure:azure-messaging-servicebus:7.18.1
- com.azure:azure-core-amqp:2.12.2
- Previous version: com.azure:azure-messaging-servicebus:7.17.17
- Java version: 21
- App Server/Environment: Kubernetes
- Frameworks:
- Spring Boot
- Reactor
- OpenTelemetry Java agent
Additional context
The issue appeared after upgrading the Azure SDK from: azure-messaging-servicebus:7.17.17 (azure-core-amqp:2.12.1) to: azure-messaging-servicebus:7.18.1 (azure-core-amqp:2.12.2)
The new version was deployed on 6 November 2026. The exception then appeared intermittently in Application Insights.
By comparing the implementations between 7.17.17 and 7.18.1, the session acquisition cancellation path appears to have changed.
In 7.18.1, cancellation disposes the receive link. ReactorReceiver.dispose() delegates to close(), which synchronously calls closeAsync().block(...).
The corresponding cancellation cleanup callback is not present in 7.17.17.
No application code calls block() in this execution path. The blocking call originates inside the Azure SDK during cancellation cleanup.
The issue was observed with session-enabled consumers.
Information Checklist
- Bug Description Added
- Repro Steps Added
- Setup information Added
- 主要言語
- Java
- スター
- 2.6k
- フォーク
- 2.2k
- 平均マージ
- 1日 17時間
- マージ済み PR(30日)
- 259
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Azure/azure-sdk-for-java のほかの issue
-
mgmt, in track 1 migration guide, call out that file-based authentication method is not recommended再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンAzure.Identity
難易度 1/5 1時間未満 初心者へのやさしさ 74/100
Azure/azure-sdk-for-java#48894 ·
メンテナーはふだん 1 日以内に返信
-
needs-triage
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
Azure/azure-sdk-for-java#51237 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
needs-triage
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
Azure/azure-sdk-for-java#51221 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
needs-triage
難易度 4/5 3〜5日 初心者へのやさしさ 57/100
Azure/azure-sdk-for-java#51215 · コメント 1 件 · リアクション 2 件 ·
メンテナーはふだん 1 日以内に返信
-
[BUG] KeyVaultEnvironmentPostProcessor cannot load configured property-sources in Spring Boot 4 AOT / GraalVM native image対応中かも @moarychan が 1 日前に担当しました。 オープンazure-spring bug Client customer-reported needs-team-attention
Azure/azure-sdk-for-java#51209 · コメント 2 件 · リアクション 2 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
Azure/azure-sdk-for-java の issue をすべて見る
似ている issue
-
bug emitter:client:csharp
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
microsoft/typespec#12572 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
GCC 15.2: -Wcast-qual warning - cast discards const qualifier from pointer target type (H5trace.c)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
メンテナーはふだん 1 日以内に返信
-
[Bug] RemotingHelper.connect swaps the socket send and receive buffer configuration対応中かも @amalsaidov が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
needs-area-label
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信
-
area/ai area/backend component/zeebe kind/task
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信