Skip to content
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

Some pubsub components can emit conflicting content-length header #7413

Closed
artursouza opened this issue Jan 19, 2024 · 0 comments · Fixed by #7421
Closed

Some pubsub components can emit conflicting content-length header #7413

artursouza opened this issue Jan 19, 2024 · 0 comments · Fixed by #7421
Labels
kind/bug Something isn't working P0
Milestone

Comments

@artursouza
Copy link
Member

artursouza commented Jan 19, 2024

In what area(s)?

/area runtime

/area operator

/area placement

/area docs

/area test-and-release

What version of Dapr?

1.1.x
1.0.x
edge: output of git describe --dirty

1.11.1 but it might be a day 0 issue.

Expected Behavior

PubSub messages can be delivered even when the publisher adds a content-length metadata.

Although I found Pulsar to be the one causing this, it can happen with other pubsub components and the fix can be centralized in runtime.

Actual Behavior

Message cannot be delivered to a gRPC service in Java (does not require Dapr's Java SDK and can impact other gRPC implementations too).

== APP == WARNING: Stream Error
== APP == io.grpc.netty.shaded.io.netty.handler.codec.http2.Http2Exception$StreamException: Received amount of data 446 does not match content-length header 777
== APP == 	at io.grpc.netty.shaded.io.netty.handler.codec.http2.Http2Exception.streamError(Http2Exception.java:153)
== APP == 	at io.grpc.netty.shaded.io.netty.handler.codec.http2.DefaultHttp2ConnectionDecoder$ContentLength.increaseReceivedBytes(DefaultHttp2ConnectionDecoder.java:806)
== APP == 	at io.grpc.netty.shaded.io.netty.handler.codec.http2.DefaultHttp2ConnectionDecoder.verifyContentLength(DefaultHttp2ConnectionDecoder.java:230)
== APP == 	at io.grpc.netty.shaded.io.netty.handler.codec.http2.DefaultHttp2ConnectionDecoder.access$300(DefaultHttp2ConnectionDecoder.java:53)
== APP == 	at io.grpc.netty.shaded.io.netty.handler.codec.http2.DefaultHttp2ConnectionDecoder$FrameReadListener.onDataRead(DefaultHttp2ConnectionDecoder.java:303)
== APP == 	at io.grpc.netty.shaded.io.netty.handler.codec.http2.Http2InboundFrameLogger$1.onDataRead(Http2InboundFrameLogger.java:48)
== APP == 	at io.grpc.netty.shaded.io.netty.handler.codec.http2.DefaultHttp2FrameReader.readDataFrame(DefaultHttp2FrameReader.java:415)
== APP == 	at io.grpc.netty.shaded.io.netty.handler.codec.http2.DefaultHttp2FrameReader.processPayloadState(DefaultHttp2FrameReader.java:250)
== APP == 	at io.grpc.netty.shaded.io.netty.handler.codec.http2.DefaultHttp2FrameReader.readFrame(DefaultHttp2FrameReader.java:159)
== APP == 	at io.grpc.netty.shaded.io.netty.handler.codec.http2.Http2InboundFrameLogger.readFrame(Http2InboundFrameLogger.java:41)
== APP == 	at io.grpc.netty.shaded.io.netty.handler.codec.http2.DefaultHttp2ConnectionDecoder.decodeFrame(DefaultHttp2ConnectionDecoder.java:173)
== APP == 	at io.grpc.netty.shaded.io.netty.handler.codec.http2.Http2ConnectionHandler$FrameDecoder.decode(Http2ConnectionHandler.java:393)

Steps to Reproduce the Problem

  1. Install Dapr in standalone mode.
  2. Install Pulsar and configure a basic pulsar pubsub component.
  3. Implement a pubsub example in Java where the subscriber is a gRPC app. Publish one message with content-length: 777 as a metadata pair (can be any arbitrary number that does not match the actual length in the pubsub event delivery to the app). See the exception above.

Release Note

RELEASE NOTE: FIXED conflict with content-length metadata in pubsub subscription.

@artursouza artursouza added kind/bug Something isn't working P0 labels Jan 19, 2024
@artursouza artursouza added this to the v1.13 milestone Jan 19, 2024
@artursouza artursouza changed the title Some pubsub components can emit content-length as header Some pubsub components can emit conflicting content-length header Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working P0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant