Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

d-jagoda
Copy link
Contributor

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

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
16 checks passed
@d-jagoda d-jagoda deleted the mark-conn-exception-observed branch February 14, 2025 16:39
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.

2 participants