eclipse-iceoryx / eclipse-iceoryx/iceoryx2

semaphore test fails on mac os

Open
#147 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Rust
Stars
2.5k
Forks
185
Avg merge
2d 14h
Merged PRs (30d)
34

Description

## Required information

**Operating system:**
* mac os

**Rust version:**
`rustc 1.76`

**Cargo version:**
`cargo 1.76`

**iceoryx2 version:**
`main`

**Observed result or behaviour:**
```
thread 'semaphore_unnamed_semaphore_wait_blocks' panicked at iceoryx2-bb/posix/tests/semaphore_tests.rs:308:9:
assertion failed: expr: counter.load(Ordering::Relaxed) == 1; value: 0 == 1
stack backtrace:
0: rust_begin_unwind
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:645:5
1: core::panicking::panic_fmt
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/panicking.rs:72:14
2: semaphore_tests::wait_blocks::{{closure}}
at ./tests/semaphore_tests.rs:308:9
3: std::thread::scoped::scope::{{closure}}
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/thread/scoped.rs:146:51
4: as core::ops::function::FnOnce<()>>::call_once
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/panic/unwind_safe.rs:272:9
5: std::panicking::try::do_call
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:552:40
6: ___rust_try
7: std::panicking::try
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:516:19
8: std::panic::catch_unwind
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panic.rs:142:14
9: std::thread::scoped::scope
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/thread/scoped.rs:146:18
10: semaphore_tests::wait_blocks
at ./tests/semaphore_tests.rs:296:5
11: semaphore_tests::semaphore_unnamed_semaphore_wait_blocks
at ./tests/semaphore_tests.rs:329:5
12: semaphore_tests::semaphore_unnamed_semaphore_wait_blocks::{{closure}}
at ./tests/semaphore_tests.rs:322:45
13: core::ops::function::FnOnce::call_once
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/ops/function.rs:250:5
14: core::ops::function::FnOnce::call_once
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
```

**Conditions where it occurred / Performed steps:**
The bug was encountered once when Cirrus CI was under heavy load.

Contributor guide

Open the contributing guide

Research direction

Start with iceoryx2-bb/posix/tests/semaphore_tests.rs, especially wait_blocks around lines 296-308 and semaphore_unnamed_semaphore_wait_blocks around lines 322-329. Run the failing semaphore test on macOS under load and inspect its timing assumptions. Done means the test reliably passes in the reported macOS and CI conditions.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
operating-systems, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.