Bug Report: BarrierNewTest fails with TCP_LAZY transport after using additional context
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 38/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- cpp
- Domain
- networking, testing-qa
Research direction
Start with gloo/test/barrier_test.cc and apply the provided context-reuse patch. Run the barrier test suite, focusing on BarrierNewDefault/BarrierNewTest.Default/1 with TCP_LAZY, then compare its behavior with TCP. Done means the reproduced hang is resolved and both transports pass the test.
Written by the indexing model from the issue text.
Description
After applying a patch to test context reuse in BarrierNewTest, I observe that the test passes when using the TCP transport, but fails when using TCP_LAZY.
Steps to Reproduce:
- Apply the following patch to gloo/test/barrier_test.cc:
diff --git a/gloo/test/barrier_test.cc b/gloo/test/barrier_test.cc
index 1b76f37..c666b86 100644
--- a/gloo/test/barrier_test.cc
+++ b/gloo/test/barrier_test.cc
@@ -87,15 +87,25 @@ class BarrierNewTest : public BaseTest,
public ::testing::WithParamInterface<NewParam> {};
TEST_P(BarrierNewTest, Default) {
- const auto transport = std::get<0>(GetParam());
+ const auto transport = TCP_LAZY;
const auto contextSize = std::get<1>(GetParam());
+ auto hashStore = std::make_shared<::gloo::rendezvous::HashStore>();
+
spawn(transport, contextSize, [&](std::shared_ptr<Context> context) {
BarrierOptions opts(context);
// Run barrier to synchronize processes after starting.
barrier(opts);
+ auto lateDestroyContext = std::make_shared<::gloo::rendezvous::Context>(
+ context->rank, context->size, context->base);
+ lateDestroyContext->connectFullMesh(hashStore, context->getDevice());
+ BarrierOptions opts1(lateDestroyContext);
+
+ barrier(opts1);
+
+
// Take turns in sleeping for a bit and checking that all processes
// saw that artificial delay through the barrier.
auto singleProcessDelay = std::chrono::milliseconds(10);
- Run barrier test suite.
- BarrierNewDefault/BarrierNewTest.Default/1 hangs.
Expected Behavior
Both TCP and TCP_LAZY transports should behave identically and pass the test.
Environment
Gloo version: fe67c4bea940a117ff539d23f4110efc19404edb (main 16.05.2025)
- Dominant language
- C++
- Stars
- 1.5k
- Forks
- 368
- Avg merge
- 19h 32m
- Merged PRs (30d)
- 3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from pytorch/gloo
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
Difficulty 4/5 3-5 days Newbie friendliness 28/100
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Sensor initialization takes very long when `--initial-sim-time` is set to current UNIX timestamp Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
gazebosim/gz-sensors#662 · 1 comment ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
LadybirdBrowser/ladybird#12123 ·