Skip to content

test: fixing a deadlock in simtime#6956

Merged
alyssawilk merged 3 commits intoenvoyproxy:masterfrom
alyssawilk:simtime
May 15, 2019
Merged

test: fixing a deadlock in simtime#6956
alyssawilk merged 3 commits intoenvoyproxy:masterfrom
alyssawilk:simtime

Conversation

@alyssawilk
Copy link
Copy Markdown
Contributor

If in one event loop, two things tried to post to a dispatcher, the dispatcher would (multiple times) set a 0 ms timer. For both instances, simtime would see the duration was 0, call activateLockHeld, increment pending alarms and set the base alarm to fire.
The base alarm would only fire once though, so the pending alarms would decrement once, pending would be true for ever and the whole system would "deadlock" waiting for pending to decrease to 0.

The symptom was the fault filter alarm being set to 200ms in #6933 but because of the extra dispatcher post triggering this deadlock the test would spin forever.

Risk Level: low (test only)
Testing: new unit test, verified fault filter test now works in the LDS PR
Docs Changes: n/a
Release Notes: n/a

Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
Copy link
Copy Markdown
Contributor

@jmarantz jmarantz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks & nice detective work!

@alyssawilk alyssawilk merged commit 2932ab4 into envoyproxy:master May 15, 2019
alyssawilk added a commit to alyssawilk/envoy that referenced this pull request May 15, 2019
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
htuch pushed a commit that referenced this pull request May 22, 2019
* test: adding an integration test framework for file-based LDS

Signed-off-by: Alyssa Wilk <alyssar@chromium.org>

* on by default

Signed-off-by: Alyssa Wilk <alyssar@chromium.org>

* deflaking integration test

Signed-off-by: Alyssa Wilk <alyssar@chromium.org>

* reviwer comments

Signed-off-by: Alyssa Wilk <alyssar@chromium.org>

* enabling test now #6956 landed

Signed-off-by: Alyssa Wilk <alyssar@chromium.org>

* Fix merge flake

Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
@alyssawilk alyssawilk deleted the simtime branch April 20, 2020 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants