Skip to content

grpc: fix stats scope dangling lifetime in Google gRPC.#2642

Merged
dnoe merged 3 commits intoenvoyproxy:masterfrom
htuch:stats-ownership
Feb 22, 2018
Merged

grpc: fix stats scope dangling lifetime in Google gRPC.#2642
dnoe merged 3 commits intoenvoyproxy:masterfrom
htuch:stats-ownership

Conversation

@htuch
Copy link
Copy Markdown
Member

@htuch htuch commented Feb 19, 2018

The scope was owned by the factory, which might disappear before the client. In this PR, we now
refcount the stats scope via shared_ptr.

Risk Level: Low
Testing: New ADS integration test for failed connections, which is where the segfault that resulted
from this bug manifested.

Signed-off-by: Harvey Tuch htuch@google.com

The scope was owned by the factory, which might disappear before the client. In this PR, we now
refcount the stats scope via shared_ptr.

Risk Level: Low
Testing: New ADS integration test for failed connections, which is where the segfault that resulted
  from this bug manifested.

Signed-off-by: Harvey Tuch <htuch@google.com>
@danielhochman danielhochman self-assigned this Feb 20, 2018
MockStubFactory stub_factory_;
const Protobuf::MethodDescriptor* method_descriptor_;
Stats::IsolatedStoreImpl stats_store_;
Stats::ScopeSharedPtr stats_store_{new Stats::IsolatedStoreImpl};
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.

Can you use std::make_shared for this?

@dnoe dnoe merged commit d1868a3 into envoyproxy:master Feb 22, 2018
jpsim pushed a commit that referenced this pull request Nov 28, 2022
Disable flaky TestConfig.StringAccessors util the cause of flakiness is addressed.

#2641
Risk Level: Low
Testing: N/A
Docs Changes: N/A
Release Notes: N/A

Signed-off-by: Ryan Hamilton rch@google.com
Signed-off-by: JP Simard <jp@jpsim.com>
jpsim pushed a commit that referenced this pull request Nov 29, 2022
Disable flaky TestConfig.StringAccessors util the cause of flakiness is addressed.

#2641
Risk Level: Low
Testing: N/A
Docs Changes: N/A
Release Notes: N/A

Signed-off-by: Ryan Hamilton rch@google.com
Signed-off-by: JP Simard <jp@jpsim.com>
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.

3 participants