diff --git a/flow b/flow index 0ebc35c32..ca6ede42a 160000 --- a/flow +++ b/flow @@ -1 +1 @@ -Subproject commit 0ebc35c32990f3a5ca1973c99b5ed0aa919d3317 +Subproject commit ca6ede42a4239178e4c7396da492f963e0f9ed6a diff --git a/ipc_session b/ipc_session index 5ded14401..eb52fc2a9 160000 --- a/ipc_session +++ b/ipc_session @@ -1 +1 @@ -Subproject commit 5ded14401de4167e831301e38ae24593d99eaddb +Subproject commit eb52fc2a92ce60e8cc94ff87811ff6764b7c41a9 diff --git a/ipc_shm b/ipc_shm index 1d3c128ea..440e3358f 160000 --- a/ipc_shm +++ b/ipc_shm @@ -1 +1 @@ -Subproject commit 1d3c128ea76fd980ebe013dea1453a060fcc47d0 +Subproject commit 440e3358f554608e4cbea0a5cdc65913f6ca04aa diff --git a/ipc_shm_arena_lend b/ipc_shm_arena_lend index d8a9da701..072ae338d 160000 --- a/ipc_shm_arena_lend +++ b/ipc_shm_arena_lend @@ -1 +1 @@ -Subproject commit d8a9da7010329b4a33121b4bd47822bafefcc3c0 +Subproject commit 072ae338d33998158ed3bd44d1a446b6a918ac76 diff --git a/test/suite/perf_demo/main_cli.cpp b/test/suite/perf_demo/main_cli.cpp index 08897fc19..81ffb03b7 100644 --- a/test/suite/perf_demo/main_cli.cpp +++ b/test/suite/perf_demo/main_cli.cpp @@ -427,9 +427,6 @@ void run_capnp_zero_cpy([[maybe_unused]] flow::log::Logger* logger_ptr, Channel_ g_capnp_zero_cpy_rtt = m_timer->since_start().m_values[size_t(Clock_type::S_REAL_HI_RES)]; rsp.reset(); - FLOW_LOG_INFO("> Signaling server we are done; they can blow everything away now."); - - m_chan.send(m_chan.create_msg()); g_asio.stop(); } // on_complete_response() }; // class Algo diff --git a/test/suite/perf_demo/main_srv.cpp b/test/suite/perf_demo/main_srv.cpp index 713498ed7..f7a9383f5 100644 --- a/test/suite/perf_demo/main_srv.cpp +++ b/test/suite/perf_demo/main_srv.cpp @@ -498,33 +498,7 @@ void run_capnp_zero_copy(flow::log::Logger* logger_ptr, Channel_struc* chan_ptr, FLOW_LOG_INFO("> Sending get-cache (quite large) response."); m_chan.send(m_capnp_msg, req.get()); FLOW_LOG_INFO("= Done."); - m_capnp_msg = {}; - - /* There's a little subtlety here; basically everything is cool with the backing memory, until - * the Session_server dtor runs, specifically in SHM-jemalloc's case; as it'll deinitialize jemalloc - * and... stuff; the details don't matter (actually the fact that SHM-classic doesn't have this to worry about - * is merely an internal property; formally one should still not access SHM-backed items once session-server - * goes away -- even with SHM-classic). What matters = the principles explained in - * "Sessions: Teardown; Organizing Your Code" in the guided Manual; which is that when a session-hosing - * error is reported, one should nullify any SHM-backed objects related to that session; then sometime later - * (usually soon but w/e) destroy the Session object (have its dtor run). If it's done in that order, - * and it's not a crash/zombie situation on the other side, then everything will be safe. (If it's a crash/zombie - * situation, then one should still follow that procedure; and there's a good -- as good as possible -- chance - * one would escape bad consequences.) As we explained in the "disclaimer" comment at the top: we didn't - * arrange this app in that nice organized way (for reasons); and our session and channel error handlers - * literally just no-op (see above). It is OK though; we control the order of things; all we need to do - * is nullify SHM-backed stuff before server goes down. That's why we let the client do that and then - * send us a message after that... and then we stop. To be clear: This isn't unsafe; it is safe and formally - * at that. Just, don't do this kind of stuff in serious applications. - * - * Also one should (not "must") use .async_end_sending() before Channel dtor. Again though... doesn't matter for - * us! But serious apps should do all the good stuff as recommended. */ - - FLOW_LOG_INFO("< Expecting client to signal they are done; so we can blow everything away."); - req.reset(); - m_chan.expect_msg(Channel_struc::Msg_which_in::GET_CACHE_REQ, &req, - [&](auto&&) { g_asio.stop(); }); - if (req) { g_asio.stop(); } + g_asio.stop(); /* The .stop() is needed here, because struc::Channel is always reading all internally incoming messages ASAP; * so it always has an .async_wait() outstanding. Hence the .run() never runs out of work, unless we