From 45663189a99c219b47939cf23327c0f892572587 Mon Sep 17 00:00:00 2001 From: Alexey Rybalchenko Date: Fri, 24 Feb 2023 11:49:57 +0100 Subject: [PATCH] Turn shm-monitor off by default resolves #459 --- examples/1-1/test-ex-1-1.sh.in | 2 ++ examples/1-n-1/test-ex-1-n-1.sh.in | 4 ++++ examples/builtin-devices/test-ex-builtin-devices.sh.in | 7 +++++++ examples/copypush/test-ex-copypush.sh.in | 3 +++ examples/multipart/test-ex-multipart.sh.in | 2 ++ examples/multiple-channels/test-ex-multiple-channels.sh.in | 3 +++ .../multiple-transports/test-ex-multiple-transports.sh.in | 3 +++ examples/region/fairmq-start-ex-region.sh.in | 4 ++-- examples/region/test-ex-region.sh.in | 2 ++ examples/req-rep/test-ex-req-rep.sh.in | 2 ++ fairmq/devices/startMQBenchmark.sh.in | 2 ++ fairmq/plugins/config/Config.cxx | 2 +- test/channel/_channel.cxx | 1 + test/memory_resources/_memory_resources.cxx | 2 ++ test/message/_message.cxx | 7 +++++++ test/poller/_poller.cxx | 2 ++ test/protocols/_pair.cxx | 2 ++ test/protocols/_push_pull.cxx | 2 ++ test/protocols/_push_pull_multipart.cxx | 2 ++ test/protocols/_req_rep.cxx | 3 +++ test/region/_region.cxx | 7 ++++++- test/transport/_options.cxx | 3 +++ test/transport/_shmem.cxx | 1 + test/transport/_transfer_timeout.cxx | 2 ++ 24 files changed, 66 insertions(+), 4 deletions(-) diff --git a/examples/1-1/test-ex-1-1.sh.in b/examples/1-1/test-ex-1-1.sh.in index 7976fa4e..475e43c1 100755 --- a/examples/1-1/test-ex-1-1.sh.in +++ b/examples/1-1/test-ex-1-1.sh.in @@ -24,6 +24,7 @@ SAMPLER+=" --transport $transport" SAMPLER+=" --verbosity veryhigh" SAMPLER+=" --session $session" SAMPLER+=" --shm-segment-size 100000000" +SAMPLER+=" --shm-monitor true" SAMPLER+=" --control static --color false" SAMPLER+=" --max-iterations 1" SAMPLER+=" --channel-config name=$chan,type=push,method=bind,address=ipc://$chanAddr,rateLogging=0" @@ -36,6 +37,7 @@ SINK+=" --transport $transport" SINK+=" --verbosity veryhigh" SINK+=" --session $session" SINK+=" --shm-segment-size 100000000" +SINK+=" --shm-monitor true" SINK+=" --control static --color false" SINK+=" --max-iterations 1" SINK+=" --channel-config name=$chan,type=pull,method=connect,address=ipc://$chanAddr,rateLogging=0" diff --git a/examples/1-n-1/test-ex-1-n-1.sh.in b/examples/1-n-1/test-ex-1-n-1.sh.in index f3388114..f00baab6 100755 --- a/examples/1-n-1/test-ex-1-n-1.sh.in +++ b/examples/1-n-1/test-ex-1-n-1.sh.in @@ -26,6 +26,7 @@ SAMPLER+=" --verbosity veryhigh" SAMPLER+=" --session $session" SAMPLER+=" --severity debug" SAMPLER+=" --shm-segment-size 100000000" +SAMPLER+=" --shm-monitor true" SAMPLER+=" --control static --color false" SAMPLER+=" --max-iterations 2" SAMPLER+=" --channel-config name=$chan1,type=push,method=bind,address=ipc://$chan1Addr,rateLogging=0" @@ -39,6 +40,7 @@ PROCESSOR1+=" --verbosity veryhigh" PROCESSOR1+=" --session $session" PROCESSOR1+=" --severity debug" PROCESSOR1+=" --shm-segment-size 100000000" +PROCESSOR1+=" --shm-monitor true" PROCESSOR1+=" --control static --color false" PROCESSOR1+=" --channel-config name=$chan1,type=pull,method=connect,address=ipc://$chan1Addr,rateLogging=0" PROCESSOR1+=" name=$chan2,type=push,method=connect,address=ipc://$chan2Addr,rateLogging=0" @@ -52,6 +54,7 @@ PROCESSOR2+=" --verbosity veryhigh" PROCESSOR2+=" --session $session" PROCESSOR2+=" --severity debug" PROCESSOR2+=" --shm-segment-size 100000000" +PROCESSOR2+=" --shm-monitor true" PROCESSOR2+=" --control static --color false" PROCESSOR2+=" --channel-config name=$chan1,type=pull,method=connect,address=ipc://$chan1Addr,rateLogging=0" PROCESSOR2+=" name=$chan2,type=push,method=connect,address=ipc://$chan2Addr,rateLogging=0" @@ -65,6 +68,7 @@ SINK+=" --verbosity veryhigh" SINK+=" --session $session" SINK+=" --severity debug" SINK+=" --shm-segment-size 100000000" +SINK+=" --shm-monitor true" SINK+=" --control static --color false" SINK+=" --max-iterations 2" SINK+=" --channel-config name=$chan2,type=pull,method=bind,address=ipc://$chan2Addr,rateLogging=0" diff --git a/examples/builtin-devices/test-ex-builtin-devices.sh.in b/examples/builtin-devices/test-ex-builtin-devices.sh.in index feb7ee65..6ce4c797 100755 --- a/examples/builtin-devices/test-ex-builtin-devices.sh.in +++ b/examples/builtin-devices/test-ex-builtin-devices.sh.in @@ -45,6 +45,7 @@ SAMPLER+=" --color false" SAMPLER+=" --control static" SAMPLER+=" --verbosity veryhigh" SAMPLER+=" --shm-segment-size 100000000" +SAMPLER+=" --shm-monitor true" SAMPLER+=" --severity debug" SAMPLER+=" --msg-size 100000" SAMPLER+=" --multipart $multipart" @@ -64,6 +65,7 @@ SPLITTER+=" --color false" SPLITTER+=" --control static" SPLITTER+=" --verbosity veryhigh" SPLITTER+=" --shm-segment-size 100000000" +SPLITTER+=" --shm-monitor true" SPLITTER+=" --multipart $multipart" SPLITTER+=" --in-channel $chan1" SPLITTER+=" --out-channel $chan2" @@ -80,6 +82,7 @@ PROXY1+=" --color false" PROXY1+=" --control static" PROXY1+=" --verbosity veryhigh" PROXY1+=" --shm-segment-size 100000000" +PROXY1+=" --shm-monitor true" PROXY1+=" --multipart $multipart" PROXY1+=" --in-channel $chan2" PROXY1+=" --out-channel $chan3" @@ -96,6 +99,7 @@ PROXY2+=" --color false" PROXY2+=" --control static" PROXY2+=" --verbosity veryhigh" PROXY2+=" --shm-segment-size 100000000" +PROXY2+=" --shm-monitor true" PROXY2+=" --multipart $multipart" PROXY2+=" --in-channel $chan2" PROXY2+=" --out-channel $chan3" @@ -112,6 +116,7 @@ MERGER+=" --color false" MERGER+=" --control static" MERGER+=" --verbosity veryhigh" MERGER+=" --shm-segment-size 100000000" +MERGER+=" --shm-monitor true" MERGER+=" --multipart $multipart" MERGER+=" --in-channel $chan3" MERGER+=" --out-channel $chan4" @@ -128,6 +133,7 @@ MULTIPLIER+=" --color false" MULTIPLIER+=" --control static" MULTIPLIER+=" --verbosity veryhigh" MULTIPLIER+=" --shm-segment-size 100000000" +MULTIPLIER+=" --shm-monitor true" MULTIPLIER+=" --multipart $multipart" MULTIPLIER+=" --in-channel $chan4" MULTIPLIER+=" --out-channel $chan5" @@ -145,6 +151,7 @@ SINK+=" --control static" SINK+=" --verbosity veryhigh" SINK+=" --severity debug" SINK+=" --multipart $multipart" +SINK+=" --shm-monitor true" SINK+=" --max-iterations 2" SINK+=" --in-channel $chan5" SINK+=" --channel-config name=$chan5,type=pull,method=bind,sndBufSize=50,rcvBufSize=50,address=ipc://$chan5Addr" diff --git a/examples/copypush/test-ex-copypush.sh.in b/examples/copypush/test-ex-copypush.sh.in index 29e4f7d5..79d18671 100755 --- a/examples/copypush/test-ex-copypush.sh.in +++ b/examples/copypush/test-ex-copypush.sh.in @@ -24,6 +24,7 @@ SAMPLER+=" --transport $transport" SAMPLER+=" --verbosity veryhigh" SAMPLER+=" --severity debug" SAMPLER+=" --shm-segment-size 100000000" +SAMPLER+=" --shm-monitor true" SAMPLER+=" --session $session" SAMPLER+=" --control static --color false" SAMPLER+=" --max-iterations 1" @@ -37,6 +38,7 @@ SINK1+=" --transport $transport" SINK1+=" --verbosity veryhigh" SINK1+=" --severity debug" SINK1+=" --shm-segment-size 100000000" +SINK1+=" --shm-monitor true" SINK1+=" --session $session" SINK1+=" --control static --color false" SINK1+=" --max-iterations 1" @@ -50,6 +52,7 @@ SINK2+=" --transport $transport" SINK2+=" --verbosity veryhigh" SINK2+=" --severity debug" SINK2+=" --shm-segment-size 100000000" +SINK2+=" --shm-monitor true" SINK2+=" --session $session" SINK2+=" --control static --color false" SINK2+=" --max-iterations 1" diff --git a/examples/multipart/test-ex-multipart.sh.in b/examples/multipart/test-ex-multipart.sh.in index 36865246..29380b87 100755 --- a/examples/multipart/test-ex-multipart.sh.in +++ b/examples/multipart/test-ex-multipart.sh.in @@ -29,6 +29,7 @@ SAMPLER+=" --transport $transport" SAMPLER+=" --verbosity veryhigh" SAMPLER+=" --session $session" SAMPLER+=" --shm-segment-size 100000000" +SAMPLER+=" --shm-monitor true" SAMPLER+=" --max-iterations 1" SAMPLER+=" --control static --color false" SAMPLER+=" --channel-config name=$chan,type=pair,method=connect,rateLogging=0,address=$chanAddr,linger=1000" @@ -41,6 +42,7 @@ SINK+=" --transport $transport" SINK+=" --verbosity veryhigh" SINK+=" --session $session" SINK+=" --shm-segment-size 100000000" +SINK+=" --shm-monitor true" SINK+=" --control static --color false" SINK+=" --channel-config name=$chan,type=pair,method=bind,rateLogging=0,address=$chanAddr" @CMAKE_CURRENT_BINARY_DIR@/$SINK & diff --git a/examples/multiple-channels/test-ex-multiple-channels.sh.in b/examples/multiple-channels/test-ex-multiple-channels.sh.in index e5c751ad..1ff73531 100755 --- a/examples/multiple-channels/test-ex-multiple-channels.sh.in +++ b/examples/multiple-channels/test-ex-multiple-channels.sh.in @@ -25,6 +25,7 @@ SINK+=" --session $session" SINK+=" --transport $transport" SINK+=" --verbosity veryhigh --severity debug" SINK+=" --shm-segment-size 100000000" +SINK+=" --shm-monitor true" SINK+=" --max-iterations 1" SINK+=" --control static --color false" SINK+=" --channel-config name=$dataChan,type=pull,method=connect,rateLogging=0,address=ipc://$dataChanAddr" @@ -40,6 +41,7 @@ SAMPLER+=" --session $session" SAMPLER+=" --transport $transport" SAMPLER+=" --verbosity veryhigh --severity debug" SAMPLER+=" --shm-segment-size 100000000" +SAMPLER+=" --shm-monitor true" SAMPLER+=" --max-iterations 1" SAMPLER+=" --control static --color false" SAMPLER+=" --channel-config name=$dataChan,type=push,method=bind,rateLogging=0,address=ipc://$dataChanAddr" @@ -53,6 +55,7 @@ BROADCASTER+=" --session $session" BROADCASTER+=" --transport $transport" BROADCASTER+=" --verbosity veryhigh --severity debug" BROADCASTER+=" --shm-segment-size 100000000" +BROADCASTER+=" --shm-monitor true" BROADCASTER+=" --control static --color false" BROADCASTER+=" --channel-config name=$broadcastChan,type=pub,method=bind,rateLogging=0,address=ipc://$broadcastChanAddr" @CMAKE_CURRENT_BINARY_DIR@/$BROADCASTER & diff --git a/examples/multiple-transports/test-ex-multiple-transports.sh.in b/examples/multiple-transports/test-ex-multiple-transports.sh.in index 3e53d797..1cb28505 100755 --- a/examples/multiple-transports/test-ex-multiple-transports.sh.in +++ b/examples/multiple-transports/test-ex-multiple-transports.sh.in @@ -18,6 +18,7 @@ SINK="fairmq-ex-multiple-transports-sink" SINK+=" --id sink1" SINK+=" --verbosity veryhigh --severity debug" SINK+=" --shm-segment-size 100000000" +SINK+=" --shm-monitor true" SINK+=" --session $session" SINK+=" --max-iterations 1" SINK+=" --control static --color false" @@ -33,6 +34,7 @@ SAMPLER1+=" --id sampler1" SAMPLER1+=" --session $session" SAMPLER1+=" --verbosity veryhigh --severity debug" SAMPLER1+=" --shm-segment-size 100000000" +SAMPLER1+=" --shm-monitor true" SAMPLER1+=" --max-iterations 1" SAMPLER1+=" --control static --color false" SAMPLER1+=" --transport shmem" @@ -46,6 +48,7 @@ SAMPLER2+=" --id sampler2" SAMPLER2+=" --session $session" SAMPLER2+=" --verbosity veryhigh --severity debug" SAMPLER2+=" --shm-segment-size 100000000" +SAMPLER2+=" --shm-monitor true" SAMPLER2+=" --max-iterations 1" SAMPLER2+=" --control static --color false" SAMPLER2+=" --transport zeromq" diff --git a/examples/region/fairmq-start-ex-region.sh.in b/examples/region/fairmq-start-ex-region.sh.in index 6f38f653..673ed73f 100755 --- a/examples/region/fairmq-start-ex-region.sh.in +++ b/examples/region/fairmq-start-ex-region.sh.in @@ -21,7 +21,7 @@ SAMPLER+=" --msg-size $msgSize" SAMPLER+=" --transport $transport" # SAMPLER+=" --external-region true" # SAMPLER+=" --shm-no-cleaup true" -# SAMPLER+=" --shm-monitor false" +SAMPLER+=" --shm-monitor true" # SAMPLER+=" --shmid 1" SAMPLER+=" --channel-config name=data,type=push,method=bind,address=tcp://127.0.0.1:7777,sndKernelSize=212992" xterm -geometry 120x60+0+0 -hold -e @EX_BIN_DIR@/$SAMPLER & @@ -31,7 +31,7 @@ SINK+=" --id sink1" SINK+=" --severity debug" SINK+=" --transport $transport" # SINK+=" --shm-no-cleaup true" -# SINK+=" --shm-monitor false" +SINK+=" --shm-monitor true" # SINK+=" --shmid 1" SINK+=" --channel-config name=data,type=pull,method=connect,address=tcp://127.0.0.1:7777,rcvKernelSize=212992" xterm -geometry 120x60+750+0 -hold -e @EX_BIN_DIR@/$SINK & diff --git a/examples/region/test-ex-region.sh.in b/examples/region/test-ex-region.sh.in index 5d23a20b..e690bc30 100755 --- a/examples/region/test-ex-region.sh.in +++ b/examples/region/test-ex-region.sh.in @@ -24,6 +24,7 @@ SAMPLER+=" --transport $transport" SAMPLER+=" --severity debug" SAMPLER+=" --session $session" SAMPLER+=" --shm-segment-size 100000000" +SAMPLER+=" --shm-monitor true" SAMPLER+=" --verbosity veryhigh" SAMPLER+=" --control static --color false" SAMPLER+=" --max-iterations 1" @@ -39,6 +40,7 @@ SINK+=" --transport $transport" SINK+=" --severity debug" SINK+=" --session $session" SINK+=" --shm-segment-size 100000000" +SINK+=" --shm-monitor true" SINK+=" --verbosity veryhigh" SINK+=" --control static --color false" SINK+=" --max-iterations 1" diff --git a/examples/req-rep/test-ex-req-rep.sh.in b/examples/req-rep/test-ex-req-rep.sh.in index 12708f2a..e7c838be 100755 --- a/examples/req-rep/test-ex-req-rep.sh.in +++ b/examples/req-rep/test-ex-req-rep.sh.in @@ -23,6 +23,7 @@ CLIENT+=" --transport $transport" CLIENT+=" --verbosity veryhigh" CLIENT+=" --session $session" CLIENT+=" --shm-segment-size 100000000" +CLIENT+=" --shm-monitor true" CLIENT+=" --control static --color false" CLIENT+=" --max-iterations 1" CLIENT+=" --channel-config name=$chan,type=req,method=connect,rateLogging=0,address=ipc://$chanAddr" @@ -35,6 +36,7 @@ SERVER+=" --transport $transport" SERVER+=" --verbosity veryhigh" SERVER+=" --session $session" SERVER+=" --shm-segment-size 100000000" +SERVER+=" --shm-monitor true" SERVER+=" --control static --color false" SERVER+=" --max-iterations 1" SERVER+=" --channel-config name=$chan,type=rep,method=bind,rateLogging=0,address=ipc://$chanAddr" diff --git a/fairmq/devices/startMQBenchmark.sh.in b/fairmq/devices/startMQBenchmark.sh.in index 21eeac8b..9813b333 100755 --- a/fairmq/devices/startMQBenchmark.sh.in +++ b/fairmq/devices/startMQBenchmark.sh.in @@ -63,6 +63,7 @@ echo "Usage: startBenchmark [message size=1000000] [number of iterations=0] [tra SAMPLER="fairmq-bsampler" SAMPLER+=" --id bsampler1" +SAMPLER+=" --shm-monitor true" #SAMPLER+=" --io-threads 2" #SAMPLER+=" --control static" SAMPLER+=" --transport $transport" @@ -81,6 +82,7 @@ echo "pid: $!" SINK="fairmq-sink" SINK+=" --id sink1" +SINK+=" --shm-monitor true" #SINK+=" --io-threads 2" #SINK+=" --control static" SINK+=" --transport $transport" diff --git a/fairmq/plugins/config/Config.cxx b/fairmq/plugins/config/Config.cxx index 0a438010..1abe2495 100644 --- a/fairmq/plugins/config/Config.cxx +++ b/fairmq/plugins/config/Config.cxx @@ -74,7 +74,7 @@ Plugin::ProgOptions ConfigPluginProgramOptions() ("shm-throw-bad-alloc", po::value()->default_value(true), "Shared memory: throw fair::mq::MessageBadAlloc if cannot allocate a message (retry if false).") ("bad-alloc-max-attempts", po::value(), "Maximum number of allocation attempts before throwing fair::mq::MessageBadAlloc. -1 is infinite. There is always at least one attempt, so 0 has safe effect as 1.") ("bad-alloc-attempt-interval", po::value()->default_value(50), "Interval between attempts if cannot allocate a message (in ms).") - ("shm-monitor", po::value()->default_value(true), "Shared memory: run monitor daemon.") + ("shm-monitor", po::value()->default_value(false), "Shared memory: run monitor daemon.") ("shm-no-cleanup", po::value()->default_value(false), "Shared memory: do not cleanup the memory when last device leaves.") ("ofi-size-hint", po::value()->default_value(0), "EXPERIMENTAL: OFI size hint for the allocator.") ("rate", po::value()->default_value(0.), "Rate for conditional run loop (Hz).") diff --git a/test/channel/_channel.cxx b/test/channel/_channel.cxx index 4c836853..ae23f0b7 100644 --- a/test/channel/_channel.cxx +++ b/test/channel/_channel.cxx @@ -102,6 +102,7 @@ auto testConnectedPeers(std::string const& transport) ProgOptions config; config.SetProperty("session", tools::Uuid()); + config.SetProperty("shm-monitor", true); string const address(tools::ToString("ipc://", config.GetProperty("session"))); unsigned long constexpr zero(0), one(1); auto factory(TransportFactory::CreateTransportFactory(transport, tools::Uuid(), &config)); diff --git a/test/memory_resources/_memory_resources.cxx b/test/memory_resources/_memory_resources.cxx index d5d563eb..1f6b2e5c 100644 --- a/test/memory_resources/_memory_resources.cxx +++ b/test/memory_resources/_memory_resources.cxx @@ -79,6 +79,7 @@ TEST(MemoryResources, transportAllocatorMap) size_t session{tools::UuidHash()}; ProgOptions config; config.SetProperty("session", to_string(session)); + config.SetProperty("shm-monitor", true); FactoryType factoryZMQ = TransportFactory::CreateTransportFactory("zeromq", fair::mq::tools::Uuid(), &config); FactoryType factorySHM = TransportFactory::CreateTransportFactory("shmem", fair::mq::tools::Uuid(), &config); @@ -129,6 +130,7 @@ TEST(MemoryResources, getMessage) size_t session{tools::UuidHash()}; ProgOptions config; config.SetProperty("session", to_string(session)); + config.SetProperty("shm-monitor", true); FactoryType factoryZMQ = TransportFactory::CreateTransportFactory("zeromq", fair::mq::tools::Uuid(), &config); FactoryType factorySHM = TransportFactory::CreateTransportFactory("shmem", fair::mq::tools::Uuid(), &config); diff --git a/test/message/_message.cxx b/test/message/_message.cxx index 49d8dbeb..137f3691 100644 --- a/test/message/_message.cxx +++ b/test/message/_message.cxx @@ -42,6 +42,7 @@ auto RunPushPullWithMsgResize(string const & transport, string const & _address) ProgOptions config; config.SetProperty("session", tools::Uuid()); config.SetProperty("shm-segment-size", 100000000); + config.SetProperty("shm-monitor", true); auto factory(TransportFactory::CreateTransportFactory(transport, tools::Uuid(), &config)); Channel push{"Push", "push", factory}; @@ -104,6 +105,7 @@ auto RunMsgRebuild(const string& transport) -> void ProgOptions config; config.SetProperty("session", tools::Uuid()); config.SetProperty("shm-segment-size", 100000000); + config.SetProperty("shm-monitor", true); auto factory(TransportFactory::CreateTransportFactory(transport, tools::Uuid(), &config)); size_t const msgSize{100}; @@ -137,6 +139,7 @@ auto RunPushPullWithAlignment(string const& transport, string const& _address) - ProgOptions config; config.SetProperty("session", tools::Uuid()); config.SetProperty("shm-segment-size", 100000000); + config.SetProperty("shm-monitor", true); auto factory(TransportFactory::CreateTransportFactory(transport, tools::Uuid(), &config)); Channel push{"Push", "push", factory}; @@ -191,6 +194,7 @@ auto EmptyMessage(string const& transport, string const& _address) -> void ProgOptions config; config.SetProperty("session", tools::Uuid()); config.SetProperty("shm-segment-size", 100000000); + config.SetProperty("shm-monitor", true); auto factory(TransportFactory::CreateTransportFactory(transport, tools::Uuid(), &config)); Channel push{"Push", "push", factory}; @@ -242,6 +246,7 @@ auto ZeroCopy() -> void ProgOptions config; config.SetProperty("session", tools::Uuid()); config.SetProperty("shm-segment-size", 100000000); + config.SetProperty("shm-monitor", true); auto factory(TransportFactory::CreateTransportFactory("shmem", tools::Uuid(), &config)); unique_ptr str(make_unique("asdf")); @@ -274,8 +279,10 @@ auto ZeroCopyFromUnmanaged(string const& address) -> void string session(tools::Uuid()); config1.SetProperty("session", session); config1.SetProperty("shm-segment-size", 100000000); + config1.SetProperty("shm-monitor", true); config2.SetProperty("session", session); config2.SetProperty("shm-segment-size", 100000000); + config2.SetProperty("shm-monitor", true); // ref counts should be accessible accross different segments config2.SetProperty("shm-segment-id", 2); auto factory1(TransportFactory::CreateTransportFactory("shmem", tools::Uuid(), &config1)); diff --git a/test/poller/_poller.cxx b/test/poller/_poller.cxx index ddee454d..1291d09f 100644 --- a/test/poller/_poller.cxx +++ b/test/poller/_poller.cxx @@ -38,6 +38,7 @@ auto RunPoller(string transport, int pollType) -> void << " --id pollout_"<< transport << " --control static" << " --color false" + << " --shm-monitor true" << " --session " << session << " --channel-config name=data1,type=push,method=bind,address=" << data1Address << " name=data2,type=push,method=bind,address=" << data2Address; @@ -51,6 +52,7 @@ auto RunPoller(string transport, int pollType) -> void << " --id pollin_" << transport << " --control static" << " --color false" + << " --shm-monitor true" << " --session " << session << " --poll-type " << pollType << " --channel-config name=data1,type=pull,method=connect,address=" << data1Address diff --git a/test/protocols/_pair.cxx b/test/protocols/_pair.cxx index c3d8d8c6..4ce84954 100644 --- a/test/protocols/_pair.cxx +++ b/test/protocols/_pair.cxx @@ -39,6 +39,7 @@ auto RunPair(string transport) -> void cmd << runTestDevice << " --id pairleft_" << transport << " --control static" + << " --shm-monitor true" << " --shm-segment-size 100000000" << " --session " << session << " --color false" @@ -52,6 +53,7 @@ auto RunPair(string transport) -> void cmd << runTestDevice << " --id pairright_" << transport << " --control static" + << " --shm-monitor true" << " --shm-segment-size 100000000" << " --session " << session << " --color false" diff --git a/test/protocols/_push_pull.cxx b/test/protocols/_push_pull.cxx index d3fff2c2..d7028b8d 100644 --- a/test/protocols/_push_pull.cxx +++ b/test/protocols/_push_pull.cxx @@ -34,6 +34,7 @@ auto RunPushPull(string transport) -> void cmd << runTestDevice << " --id push_" << transport << " --control static" + << " --shm-monitor true" << " --shm-segment-size 100000000" << " --session " << session << " --color false" @@ -47,6 +48,7 @@ auto RunPushPull(string transport) -> void cmd << runTestDevice << " --id pull_" << transport << " --control static" + << " --shm-monitor true" << " --shm-segment-size 100000000" << " --session " << session << " --color false" diff --git a/test/protocols/_push_pull_multipart.cxx b/test/protocols/_push_pull_multipart.cxx index feda63cc..1d08e65b 100644 --- a/test/protocols/_push_pull_multipart.cxx +++ b/test/protocols/_push_pull_multipart.cxx @@ -30,6 +30,7 @@ auto RunSingleThreadedMultipart(string transport, string address1, string addres fair::mq::ProgOptions config; config.SetProperty("session", tools::Uuid()); config.SetProperty("shm-segment-size", 100000000); + config.SetProperty("shm-monitor", true); auto factory = TransportFactory::CreateTransportFactory(transport, tools::Uuid(), &config); @@ -109,6 +110,7 @@ auto RunMultiThreadedMultipart(string transport, string address1) -> void config.SetProperty("session", tools::Uuid()); config.SetProperty("io-threads", 1); config.SetProperty("shm-segment-size", 20000000); // NOLINT + config.SetProperty("shm-monitor", true); auto factory = TransportFactory::CreateTransportFactory(transport, tools::Uuid(), &config); diff --git a/test/protocols/_req_rep.cxx b/test/protocols/_req_rep.cxx index ef8fa7be..f8b37b42 100644 --- a/test/protocols/_req_rep.cxx +++ b/test/protocols/_req_rep.cxx @@ -34,6 +34,7 @@ auto RunReqRep(string transport) -> void cmd << runTestDevice << " --id rep_" << transport << " --control static" + << " --shm-monitor true" << " --shm-segment-size 100000000" << " --session " << session << " --color false" @@ -47,6 +48,7 @@ auto RunReqRep(string transport) -> void cmd << runTestDevice << " --id req_1" << transport << " --control static" + << " --shm-monitor true" << " --shm-segment-size 100000000" << " --session " << session << " --color false" @@ -60,6 +62,7 @@ auto RunReqRep(string transport) -> void cmd << runTestDevice << " --id req_2" << transport << " --control static" + << " --shm-monitor true" << " --shm-segment-size 100000000" << " --session " << session << " --color false" diff --git a/test/region/_region.cxx b/test/region/_region.cxx index 5d2c237b..98b3bbfe 100644 --- a/test/region/_region.cxx +++ b/test/region/_region.cxx @@ -69,6 +69,7 @@ void RegionsSizeMismatch() ProgOptions config; config.SetProperty("session", to_string(session)); config.SetProperty("shm-segment-size", 100000000); + config.SetProperty("shm-monitor", true); auto factory = TransportFactory::CreateTransportFactory("shmem", tools::Uuid(), &config); @@ -92,8 +93,10 @@ void RegionsCache(const string& transport, const string& _address) ProgOptions config2; config1.SetProperty("session", to_string(session1)); config1.SetProperty("shm-segment-size", 100000000); + config1.SetProperty("shm-monitor", true); config2.SetProperty("session", to_string(session2)); config2.SetProperty("shm-segment-size", 100000000); + config2.SetProperty("shm-monitor", true); auto factory1 = TransportFactory::CreateTransportFactory(transport, tools::Uuid(), &config1); auto factory2 = TransportFactory::CreateTransportFactory(transport, tools::Uuid(), &config2); @@ -172,9 +175,10 @@ void RegionEventSubscriptions(const string& transport, bool external) ProgOptions config; config.SetProperty("session", to_string(session)); config.SetProperty("shm-segment-size", sSize); + config.SetProperty("shm-monitor", true); if (external) { config.SetProperty("shm-no-cleanup", true); - config.SetProperty("shm-monitor", false); + // config.SetProperty("shm-monitor", false); } auto factory = TransportFactory::CreateTransportFactory(transport, tools::Uuid(), &config); @@ -272,6 +276,7 @@ void RegionCallbacks(const string& transport, const string& _address) ProgOptions config; config.SetProperty("session", to_string(session)); config.SetProperty("shm-segment-size", sSize); + config.SetProperty("shm-monitor", true); auto factory = TransportFactory::CreateTransportFactory(transport, tools::Uuid(), &config); diff --git a/test/transport/_options.cxx b/test/transport/_options.cxx index 67163037..86117d67 100644 --- a/test/transport/_options.cxx +++ b/test/transport/_options.cxx @@ -41,6 +41,7 @@ void RunOptionsTest(const string& transport) { ProgOptions config; config.SetProperty("session", tools::Uuid()); + config.SetProperty("shm-monitor", true); config.SetProperty("shm-segment-size", 100000000); auto factory = TransportFactory::CreateTransportFactory(transport, tools::Uuid(), &config); Channel channel("Push", "push", factory); @@ -75,6 +76,7 @@ void ZeroingAndMlock(const string& transport) config.SetProperty("shm-segment-size", 16384); // NOLINT config.SetProperty("shm-zero-segment", true); config.SetProperty("shm-mlock-segment", true); + config.SetProperty("shm-monitor", true); auto factory = TransportFactory::CreateTransportFactory(transport, tools::Uuid(), &config); @@ -93,6 +95,7 @@ void ZeroingAndMlockOnCreation(const string& transport) config.SetProperty("shm-segment-size", 16384); // NOLINT config.SetProperty("shm-mlock-segment-on-creation", true); config.SetProperty("shm-zero-segment-on-creation", true); + config.SetProperty("shm-monitor", true); auto factory = TransportFactory::CreateTransportFactory(transport, tools::Uuid(), &config); diff --git a/test/transport/_shmem.cxx b/test/transport/_shmem.cxx index 79b14033..71f669f6 100644 --- a/test/transport/_shmem.cxx +++ b/test/transport/_shmem.cxx @@ -26,6 +26,7 @@ void GetFreeMemory() ProgOptions config; string sessionId(to_string(tools::UuidHash())); config.SetProperty("session", sessionId); + config.SetProperty("shm-monitor", true); ASSERT_THROW(shmem::Monitor::GetFreeMemory(shmem::SessionId{sessionId}, 0), shmem::Monitor::MonitorError); diff --git a/test/transport/_transfer_timeout.cxx b/test/transport/_transfer_timeout.cxx index fc83d778..da2010a0 100644 --- a/test/transport/_transfer_timeout.cxx +++ b/test/transport/_transfer_timeout.cxx @@ -52,6 +52,7 @@ auto RunTransferTimeout(string transport) -> void << " --control static" << " --shm-segment-size 100000000" << " --severity debug" + << " --shm-monitor true" << " --transport " << transport << " --session " << session << " --color false" @@ -75,6 +76,7 @@ void InterruptTransfer(const string& transport, const string& _address) fair::mq::ProgOptions config; config.SetProperty("session", to_string(session)); config.SetProperty("shm-segment-size", 100000000); + config.SetProperty("shm-monitor", true); auto factory = TransportFactory::CreateTransportFactory(transport, Uuid(), &config);