Skip to content

Ensure that exceptions propagated to Connection's Initialized task is observed#9280

Merged
ReubenBond merged 1 commit into
dotnet:mainfrom
d-jagoda:mark-conn-exception-observed
Jan 28, 2025
Merged

Ensure that exceptions propagated to Connection's Initialized task is observed#9280
ReubenBond merged 1 commit into
dotnet:mainfrom
d-jagoda:mark-conn-exception-observed

Conversation

@d-jagoda

@d-jagoda d-jagoda commented Jan 14, 2025

Copy link
Copy Markdown
Contributor

Issue: #9245

Connection tested with curl

C:\Users\djagoda>curl localhost:11111
curl: (1) Received HTTP/0.9 when not allowed

Test Silo after bad connection

  • Before
Silo0 started.
Press enter to trigger GC
info: Orleans.Runtime.Messaging.NetworkingTrace[0]
      Closing connection [Local: 127.0.0.1:11111, Remote: 127.0.0.1:53288, ConnectionId: 0HN9KH9UUKKLM]
      System.InvalidOperationException: Remote connection sent preamble length of 542393671, which is greater than maximum allowed size of 1024.
         at Orleans.Runtime.Messaging.ConnectionPreambleHelper.Read(ConnectionContext connection) in D:\Projects\External\djagoda\orleans\src\Orleans.Core\Networking\ConnectionPreamble.cs:line 96
         at Orleans.Runtime.Messaging.SiloConnection.<RunInternal>g__ReadPreamble|26_1() in D:\Projects\External\djagoda\orleans\src\Orleans.Runtime\Networking\SiloConnection.cs:line 222
         at Orleans.Runtime.Messaging.SiloConnection.RunInternal() in D:\Projects\External\djagoda\orleans\src\Orleans.Runtime\Networking\SiloConnection.cs:line 192
         at Orleans.Runtime.Messaging.Connection.Run() in D:\Projects\External\djagoda\orleans\src\Orleans.Core\Networking\Connection.cs:line 88
info: Orleans.Runtime.Messaging.NetworkingTrace[0]
      Connection [Local: 127.0.0.1:11111, Remote: 127.0.0.1:53288, ConnectionId: 0HN9KH9UUKKLN] terminated

Triggered GC
System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (Remote connection sent preamble length of 542393671, which is greater than maximum allowed size of 1024.)
 ---> System.InvalidOperationException: Remote connection sent preamble length of 542393671, which is greater than maximum allowed size of 1024.
   at Orleans.Runtime.Messaging.ConnectionPreambleHelper.Read(ConnectionContext connection) in D:\Projects\External\djagoda\orleans\src\Orleans.Core\Networking\ConnectionPreamble.cs:line 96
   at Orleans.Runtime.Messaging.SiloConnection.<RunInternal>g__ReadPreamble|26_1() in D:\Projects\External\djagoda\orleans\src\Orleans.Runtime\Networking\SiloConnection.cs:line 222
   at Orleans.Runtime.Messaging.SiloConnection.RunInternal() in D:\Projects\External\djagoda\orleans\src\Orleans.Runtime\Networking\SiloConnection.cs:line 192
   at Orleans.Runtime.Messaging.Connection.Run() in D:\Projects\External\djagoda\orleans\src\Orleans.Core\Networking\Connection.cs:line 88
   --- End of inner exception stack trace ---
  • After
Silo0 started.
Press enter to trigger GC
info: Orleans.Runtime.Messaging.NetworkingTrace[0]
      Closing connection [Local: 127.0.0.1:11111, Remote: 127.0.0.1:53365, ConnectionId: 0HN9KHB0C36DS]
      System.InvalidOperationException: Remote connection sent preamble length of 542393671, which is greater than maximum allowed size of 1024.
         at Orleans.Runtime.Messaging.ConnectionPreambleHelper.Read(ConnectionContext connection) in D:\Projects\External\djagoda\orleans\src\Orleans.Core\Networking\ConnectionPreamble.cs:line 96
         at Orleans.Runtime.Messaging.SiloConnection.<RunInternal>g__ReadPreamble|26_1() in D:\Projects\External\djagoda\orleans\src\Orleans.Runtime\Networking\SiloConnection.cs:line 222
         at Orleans.Runtime.Messaging.SiloConnection.RunInternal() in D:\Projects\External\djagoda\orleans\src\Orleans.Runtime\Networking\SiloConnection.cs:line 192
         at Orleans.Runtime.Messaging.Connection.Run() in D:\Projects\External\djagoda\orleans\src\Orleans.Core\Networking\Connection.cs:line 88
info: Orleans.Runtime.Messaging.NetworkingTrace[0]
      Connection [Local: 127.0.0.1:11111, Remote: 127.0.0.1:53365, ConnectionId: 0HN9KHB0C36DT] terminated

Triggered GC
Triggered GC
Microsoft Reviewers: Open in CodeFlow

@d-jagoda
d-jagoda force-pushed the mark-conn-exception-observed branch from ea7fd4e to 5c2eedd Compare January 26, 2025 11:10
@ReubenBond
ReubenBond merged commit aa23850 into dotnet:main Jan 28, 2025
@d-jagoda
d-jagoda deleted the mark-conn-exception-observed branch February 14, 2025 16:39
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants