@mark1russell7/machines 0.3.11 → 0.3.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -95,6 +95,10 @@ A change to the version of a system changes its sources too. Each fact of the do
95
95
 
96
96
  In this repository, a snapshot of the predictions of the cells (`packages/cells/src/__snapshots__/predictions.json`) shows each prediction that a change to a document moves.
97
97
 
98
+ ### 0.3.12
99
+
100
+ - **The send timeout of the client socket of Supavisor.** Supavisor 2.9.13 locks ranch 2.2.0. ranch gives each client socket a send timeout of 30 s that closes the socket (src/ranch_tcp.erl:108-109). Thus a write of a reply that waits 30 s ends the client. `supavisor-client` gives it as a source and a note, with no timer. A write waits only when the client takes no data, and on a broken path the FIN of the close waits behind the data. In run 39170773426, behind an MTU black hole, the socket closed 30.068 to 30.086 s after the fault in each of 11 runs.
101
+
98
102
  ### 0.3.11
99
103
 
100
104
  - **The connect timer of PgBouncer can fire early.** libevent 2.1 counts a timeout from its cached time of the pass, not from the clock (event.c, `event_add_nolock` with `gettime` and `tv_cache`). Thus server_connect_timeout can fire up to one pass early, and its band has an early slack of 10 ms. In run 39160356281 the timer closed the socket at 127.998993 s, 1.007 ms before 128 s.
package/build/index.d.ts CHANGED
@@ -283,6 +283,11 @@ export declare const POSTGRES_SESSION: Machine;
283
283
  * At the defaults the handler writes a heartbeat to an idle client each 60 s: a ParameterStatus of
284
284
  * application_name. A failed write ends the client. client_idle_timeout does not end a session in
285
285
  * 2.9.13: its timer fires an event that no clause handles. Each client socket has SO_KEEPALIVE.
286
+ *
287
+ * Each client socket also has the send timeout of ranch: a write to the client that waits 30 s fails,
288
+ * and the BEAM closes the socket. This document gives it no timer. A write waits when the client takes no
289
+ * data: a broken path, or a client that reads nothing. On a broken path, the FIN of the close waits
290
+ * behind the data that the kernel did not send.
286
291
  */
287
292
  export declare const SUPAVISOR_CLIENT: Machine;
288
293
  //#endregion
package/build/index.js CHANGED
@@ -9615,6 +9615,11 @@ const SV = "v2.9.13";
9615
9615
  * At the defaults the handler writes a heartbeat to an idle client each 60 s: a ParameterStatus of
9616
9616
  * application_name. A failed write ends the client. client_idle_timeout does not end a session in
9617
9617
  * 2.9.13: its timer fires an event that no clause handles. Each client socket has SO_KEEPALIVE.
9618
+ *
9619
+ * Each client socket also has the send timeout of ranch: a write to the client that waits 30 s fails,
9620
+ * and the BEAM closes the socket. This document gives it no timer. A write waits when the client takes no
9621
+ * data: a broken path, or a client that reads nothing. On a broken path, the FIN of the close waits
9622
+ * behind the data that the kernel did not send.
9618
9623
  */
9619
9624
  const SUPAVISOR_CLIENT = machineSchema.parse({
9620
9625
  format: "mark1russell7.machine/1",
@@ -9641,6 +9646,14 @@ const SUPAVISOR_CLIENT = machineSchema.parse({
9641
9646
  ref: `${SV} lib/supavisor/application.ex:71-83 each listener is ranch_tcp with keepalive true: each client socket has SO_KEEPALIVE`,
9642
9647
  rung: "implemented"
9643
9648
  },
9649
+ {
9650
+ ref: `ranch 2.2.0, the version of mix.lock at ${SV}: src/ranch_tcp.erl:108-109 a listener sets send_timeout 30000 and send_timeout_close true, and each accepted socket has the options of its listener. Thus a write to the client that waits 30 s fails, and the BEAM closes the socket. The server connection ignores the result of each write of a reply to the client (lib/supavisor/db_handler.ex:890-905)`,
9651
+ rung: "implemented"
9652
+ },
9653
+ {
9654
+ ref: `${SV} run 39170773426 of mark1russell7/systems, T03.defaults.59: behind an MTU black hole at a router, each of 11 runs had a reply of 2 MB in flight. The client socket of Supavisor left ESTABLISHED for FIN_WAIT1 30.068 to 30.086 s after the fault, and the client got nothing in 60 s`,
9655
+ rung: "observed"
9656
+ },
9644
9657
  {
9645
9658
  ref: `${SV} lib/supavisor/client_handler.ex:21-23, :123, :198 a state_timeout of 5_000 ms in :handshake, and 2_500 ms for a TLS handshake`,
9646
9659
  rung: "implemented"
@@ -10007,7 +10020,7 @@ const SUPAVISOR_CLIENT = machineSchema.parse({
10007
10020
  },
10008
10021
  sets: {},
10009
10022
  ends: "client.gone",
10010
- note: "The socket of the client. ranch sets SO_KEEPALIVE and no other keepalive option, thus the three keepalive sysctls of the namespace apply"
10023
+ note: "The socket of the client. ranch sets SO_KEEPALIVE and no other keepalive option, thus the three keepalive sysctls of the namespace apply. It also sets a send timeout of 30 s that closes the socket. That close has no timer here: the kernel sends the FIN only after the data before it, an assumption of this document"
10011
10024
  }
10012
10025
  });
10013
10026
  //#endregion