Skip to content

Feature/multi message handler#1

Merged
BEagle1984 merged 5 commits into
masterfrom
feature/MultiMessageHandler
Apr 7, 2018
Merged

Feature/multi message handler#1
BEagle1984 merged 5 commits into
masterfrom
feature/MultiMessageHandler

Conversation

@BEagle1984

Copy link
Copy Markdown
Owner

No description provided.

@BEagle1984
BEagle1984 merged commit 658c7d5 into master Apr 7, 2018
@BEagle1984
BEagle1984 deleted the feature/MultiMessageHandler branch April 7, 2018 10:03
msallin added a commit to msallin/silverback that referenced this pull request Apr 12, 2026
Five new concurrency tests targeting findings from the deep library audit.
All five fail on master:

BEagle1984#1 LazyMessageStreamEnumerable TCS double-set (CRITICAL)
  GetOrCreateStream() and Cancel() both call Set on the same
  TaskCompletionSource without synchronization. The second Set throws
  InvalidOperationException which is lost in a fire-and-forget context.
  Loc: LazyMessageStreamEnumerable`1.cs:49-59

BEagle1984#2 ConsumerChannel CTS dispose-while-active (CRITICAL)
  StartReading() disposes and recreates _readCancellationTokenSource
  without synchronization. Concurrent readers that cached the old token
  get ObjectDisposedException.
  Loc: ConsumerChannel`1.cs:86-102

BEagle1984#4 InMemoryKafkaOffsetStore live collection escapes lock (HIGH)
  GetStoredOffsets() returns Dictionary.Values (a live view) after
  releasing the lock. StoreOffsetsAsync mutates the dict under lock,
  but the caller enumerates the live Values outside the lock.
  Loc: InMemoryKafkaOffsetStore.cs:20-28

BEagle1984#5 EnumerableSelectExtensions semaphore leak on throw (HIGH)
  ParallelSelectAsync releases the semaphore in the try block, not the
  finally. When the selector throws, the token is permanently leaked,
  reducing effective parallelism to zero over time.
  Loc: EnumerableSelectExtensions.cs:42-61

MC5 MQTT ConsumedApplicationMessage TCS reassignment race (HIGH)
  After awaiting the TCS, the channel reader reassigns it. A concurrent
  CommitCoreAsync/RollbackCoreAsync calls SetResult on the OLD reference.
  The new TCS is never signaled; the channel reader blocks forever.
  Loc: ConsumerChannelsManager.cs:73 + MqttConsumer.cs:164,171
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant