Skip to content

Connect EmbeddedChannel when FuzzTesting #1569

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 16, 2023

Conversation

glbrntt
Copy link
Collaborator

@glbrntt glbrntt commented Feb 16, 2023

Motivation:

FuzzTesting uses EmbeddedChannel but never called connect meaning that channel active was never fired. HTTP/2 recently added activity state checking and complains that we fire inactive without having activated.

Modifications:

  • call connect on the EmbeddedChannel in fuzzing and in tests
  • if the connection manager is closed while connecting it waits for the connect to resolve before closing the channel, however the channel future is completed before channel active is fired so defer closing it until the next loop tick.

Result:

Channel active is more frequently fired at the right time.

Motivation:

FuzzTesting uses EmbeddedChannel but never called connect meaning that
channel active was never fired. HTTP/2 recently added activity state
checking and complains that we fire inactive without having activated.

Modifications:

- call connect on the EmbeddedChannel in fuzzing and in tests
- if the connection manager is closed while connecting it waits for the
  connect to resolve before closing the channel, however the channel
  future is completed before channel active is fired so defer closing it
  until the next loop tick.

Result:

Channel active is more frequently fired at the right time.
@glbrntt glbrntt added the 🔨 semver/patch No public API change. label Feb 16, 2023
@glbrntt glbrntt merged commit c4682a9 into grpc:main Feb 16, 2023
@glbrntt glbrntt deleted the gb-embedde-connect branch February 16, 2023 17:07
WendellXY pushed a commit to sundayfun/grpc-swift that referenced this pull request Aug 24, 2023
Motivation:

FuzzTesting uses EmbeddedChannel but never called connect meaning that
channel active was never fired. HTTP/2 recently added activity state
checking and complains that we fire inactive without having activated.

Modifications:

- call connect on the EmbeddedChannel in fuzzing and in tests
- if the connection manager is closed while connecting it waits for the
  connect to resolve before closing the channel, however the channel
  future is completed before channel active is fired so defer closing it
  until the next loop tick.

Result:

Channel active is more frequently fired at the right time.
pinlin168 pushed a commit to sundayfun/grpc-swift that referenced this pull request Aug 24, 2023
Motivation:

FuzzTesting uses EmbeddedChannel but never called connect meaning that
channel active was never fired. HTTP/2 recently added activity state
checking and complains that we fire inactive without having activated.

Modifications:

- call connect on the EmbeddedChannel in fuzzing and in tests
- if the connection manager is closed while connecting it waits for the
  connect to resolve before closing the channel, however the channel
  future is completed before channel active is fired so defer closing it
  until the next loop tick.

Result:

Channel active is more frequently fired at the right time.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 semver/patch No public API change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants