Closed khv2online closed 1 year ago
This doesn't seem to happen again. So I'll close the PR
I'm running into this exact same problem with AWS 24 (alire), gnat 13.2.1 (alire). Server is running fine for hours and hours all day, but overnight I come back to this in my log; same files as @khv2online 's:
Fatal error, slot 5 is dead now.
raised AWS.NET.SOCKET_ERROR : Send : [32] Broken pipe
0x62eedc Aws.Net.Std.Raise_Exception at aws-net-std__gnat.adb:632
0x62f31f Aws.Net.Std.Send at aws-net-std__gnat.adb:695
0x6bb3f4 Aws.Net.Send at aws-net.adb:480
0x5e4a67 Aws.Net.Buffered.Flush at aws-net-buffered.adb:76
0x56282d Aws.Http2.Frame.Send at aws-http2-frame.adb:209
0x736b90 Aws.Server.Protocol_Handler at aws-server-protocol_handler.adb:295
0x7322ab Aws.Server.LineT at aws-server.adb:395
0x8ec059 System.Tasking.Stages.Task_Wrapper at s-tassta.adb:1211
[/lib/x86_64-linux-gnu/libpthread.so.0]
0x7fbc4393eea5
[/lib/x86_64-linux-gnu/libc.so.6]
0x7fbc43718a6d
0xfffffffffffffffe
Fatal error, slot 3 is dead now.
raised AWS.NET.SOCKET_ERROR : Send : [32] Broken pipe
0x62eedc Aws.Net.Std.Raise_Exception at aws-net-std__gnat.adb:632
0x62f31f Aws.Net.Std.Send at aws-net-std__gnat.adb:695
0x6bb3f4 Aws.Net.Send at aws-net.adb:480
0x5e4a67 Aws.Net.Buffered.Flush at aws-net-buffered.adb:76
0x56282d Aws.Http2.Frame.Send at aws-http2-frame.adb:209
0x736b90 Aws.Server.Protocol_Handler at aws-server-protocol_handler.adb:295
0x7322ab Aws.Server.LineT at aws-server.adb:395
0x8ec059 System.Tasking.Stages.Task_Wrapper at s-tassta.adb:1211
[/lib/x86_64-linux-gnu/libpthread.so.0]
0x7fbc4393eea5
[/lib/x86_64-linux-gnu/libc.so.6]
0x7fbc43718a6d
0xfffffffffffffffe
Fatal error, slot 2 is dead now.
raised AWS.NET.SOCKET_ERROR : Send : [32] Broken pipe
0x62eedc Aws.Net.Std.Raise_Exception at aws-net-std__gnat.adb:632
0x62f31f Aws.Net.Std.Send at aws-net-std__gnat.adb:695
0x6bb3f4 Aws.Net.Send at aws-net.adb:480
0x5e4a67 Aws.Net.Buffered.Flush at aws-net-buffered.adb:76
0x56282d Aws.Http2.Frame.Send at aws-http2-frame.adb:209
0x736b90 Aws.Server.Protocol_Handler at aws-server-protocol_handler.adb:295
0x7322ab Aws.Server.LineT at aws-server.adb:395
0x8ec059 System.Tasking.Stages.Task_Wrapper at s-tassta.adb:1211
[/lib/x86_64-linux-gnu/libpthread.so.0]
0x7fbc4393eea5
[/lib/x86_64-linux-gnu/libc.so.6]
0x7fbc43718a6d
0xfffffffffffffffe
Fatal error, slot 4 is dead now.
raised AWS.NET.SOCKET_ERROR : Send : [32] Broken pipe
0x62eedc Aws.Net.Std.Raise_Exception at aws-net-std__gnat.adb:632
0x62f31f Aws.Net.Std.Send at aws-net-std__gnat.adb:695
0x6bb3f4 Aws.Net.Send at aws-net.adb:480
0x5e4a67 Aws.Net.Buffered.Flush at aws-net-buffered.adb:76
0x56282d Aws.Http2.Frame.Send at aws-http2-frame.adb:209
0x736b90 Aws.Server.Protocol_Handler at aws-server-protocol_handler.adb:295
0x7322ab Aws.Server.LineT at aws-server.adb:395
0x8ec059 System.Tasking.Stages.Task_Wrapper at s-tassta.adb:1211
[/lib/x86_64-linux-gnu/libpthread.so.0]
0x7fbc4393eea5
[/lib/x86_64-linux-gnu/libc.so.6]
0x7fbc43718a6d
0xfffffffffffffffe
Fatal error, slot 1 is dead now.
raised AWS.NET.SOCKET_ERROR : Send : [32] Broken pipe
0x62eedc Aws.Net.Std.Raise_Exception at aws-net-std__gnat.adb:632
0x62f31f Aws.Net.Std.Send at aws-net-std__gnat.adb:695
0x6bb3f4 Aws.Net.Send at aws-net.adb:480
0x5e4a67 Aws.Net.Buffered.Flush at aws-net-buffered.adb:76
0x56282d Aws.Http2.Frame.Send at aws-http2-frame.adb:209
0x736b90 Aws.Server.Protocol_Handler at aws-server-protocol_handler.adb:295
0x7322ab Aws.Server.LineT at aws-server.adb:395
0x8ec059 System.Tasking.Stages.Task_Wrapper at s-tassta.adb:1211
[/lib/x86_64-linux-gnu/libpthread.so.0]
0x7fbc4393eea5
[/lib/x86_64-linux-gnu/libc.so.6]
0x7fbc43718a6d
0xfffffffffffffffe
@AJ-Ianozi : Would you be able to test a patch?
@TurboGit Absolutely.
Here it is, you can do a simple edit of the aws-server-protocol_handler.adb file based on the change below:
diff --git a/src/core/aws-server-protocol_handler.adb b/src/core/aws-server-protocol_handler.adb
index 5cb54e481..63d9fca73 100644
--- a/src/core/aws-server-protocol_handler.adb
+++ b/src/core/aws-server-protocol_handler.adb
@@ -290,9 +290,17 @@ begin
or else (CNF.HTTP2_Activated (LA.Server.Properties)
and then not CNF.Security (LA.Server.Properties))
then
- HTTP2.Frame.GoAway.Create
- (Stream_Id => 0,
- Error => HTTP2.C_Protocol_Error).Send (Sock_Ptr.all);
+ -- We don't want to fail, if the socket is closed already
+ -- we ignore the socket error.
+
+ begin
+ HTTP2.Frame.GoAway.Create
+ (Stream_Id => 0,
+ Error => HTTP2.C_Protocol_Error).Send (Sock_Ptr.all);
+ exception
+ when Net.Socket_Error =>
+ null;
+ end;
exit For_Every_Request;
Thanks, I'll let you know how it goes!
@TurboGit Just wanted to follow back up, it's been a week and the server has not crashed yet. I think the patch is the solution.
Nginx (HTTP2) is used as a reverse proxy server.
Process logs