Skip to content

Fix race condition between RC and debugger#3848

Merged
jpbempel merged 5 commits into
masterfrom
jpbempel/fix-race-remote-config
Sep 19, 2022
Merged

Fix race condition between RC and debugger#3848
jpbempel merged 5 commits into
masterfrom
jpbempel/fix-race-remote-config

Conversation

@jpbempel
Copy link
Copy Markdown
Member

@jpbempel jpbempel commented Sep 16, 2022

What Does This Do

debugger should start and subscribe to RC before starting to poll
Product (Debugger or AppSec) shouldn't start ConfigurationPoller, but only perform in one place once everybody has subscribed to it

Motivation

fix race condition spotted by smoke tests

Additional Notes

debugger should start and subsribe to RC before starting to poll
@jpbempel jpbempel requested review from a team as code owners September 16, 2022 08:18
@jpbempel jpbempel requested review from shatzi and removed request for a team September 16, 2022 08:18
Comment on lines +102 to 104
} else {
log.warn("No configuration poller available from SharedCommunicationObjects");
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This warning is not useful our users - they won't know about SharedCommunicationObjects or what a configuration poller is.

This could be:

Cannot enable Dynamic Instrumentation because Remote Configuration is not enabled

Should we check remoteConfigEnabled and this log in the maybeStartDebugger method in the bootstrap class? We could then have this as a debug log here and leave it unchanged.

Comment on lines 381 to 384
if (debuggerEnabled) {
// start debugger before remote config to subscribe to it before starting to poll
startDebuggerAgent(instrumentation, scoClass, sco);
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For consistency with the other products, should we make a maybeStartDebugger method?

Copy link
Copy Markdown
Contributor

@cimi cimi left a comment

Choose a reason for hiding this comment

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

👍 Thanks!

Start it in only one place: maybeStartRemoteConfig in Agent class
@jpbempel jpbempel requested review from a team and ValentinZakharov as code owners September 16, 2022 12:04
@jpbempel jpbempel requested a review from cataphract September 16, 2022 12:20
@jpbempel jpbempel merged commit 4568db6 into master Sep 19, 2022
@jpbempel jpbempel deleted the jpbempel/fix-race-remote-config branch September 19, 2022 11:17
@github-actions github-actions Bot added this to the 0.109.0 milestone Sep 19, 2022
@ValentinZakharov ValentinZakharov added the tag: no release notes Changes to exclude from release notes label Sep 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tag: no release notes Changes to exclude from release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants