Closed rickardoberg closed 4 months ago
Thanks for raising this @rickardoberg
We will look into this ASAP.
May I ask what platform you are running on, by any chance are you running on ARM?
Windows laptop, so no Apple.
Hey @rickardoberg and thanks for reporting your issue.
Could you provide more information on your environment please? I ran your example as-is locally and it just works.
My setup is:
OS: Fedora 39 (Kernel 6.7.6) Arch: x86_64 Java: OpenJDK 11.0.22 2024-01-16 EventStoreDB: 23.10.1
I tried to run your code snippet on Windows 11 and still got it to work.
OS: Windows 11 (23H2) Build 22631.3155 Arch: x86_64 Java: OpenJDK 11.0.22 2024-01-16 LTS (Microsoft OpenJDK build) EventStoreDB: 23.10.1
Note that on both cases (Linux and Windows), I started the server with those parameters:
--insecure --enable-atom-pub-over-http
Also my connection string was esdb://localhost:2113?tls=false
Don't hesitate giving us as much information as possible so we can help you figuring out the situation.
@YoEight thanks for investigating! Ok, this one is fascinating then. I have created a minimal project to illustrate the issue. eventstoretest.zip
OS: Windows 11 (23H2) Build 22631.3155 Arch: x86_64 Java: OpenJDK 11.0.22 2024-03-04 LTS (Microsoft OpenJDK build) EventStoreDB: 23.10.0-bookworm-slim Docker container (tested with 23.10.1-bookworm-slim as well, same result)
If I run that with 5.3.0 it passes, if I only change client version to 5.3.1 it fails.
Thanks @rickardoberg for providing your project. I was able to reproduce your behavior and I would like you to add this in your pom.xml
and tell me if it's working after the change.
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>3.25.3</version>
</dependency>
Thank you for your patience.
I can confirm that this is the only change needed to make it work. With the default 3.25.1 it hangs on 5.3.1, and with 3.25.3 it works.
@rickardoberg I'm glad it's working.
We are using Gradle to build the client. For some reason, Gradle does something that Maven isn't doing.
The culprit is the generated gRPC code emits the com.google.protobuf.MapFieldReflectionAccessor
type, which doesn't exist in the protobuf-java
version (3.24.4) that the client uses. When calling the appendStream
function it will load a gRPC class that has a com.google.protobuf.MapFieldReflectionAccessor
field, throwing a ClassNotFoundException
.
Because that exception happens in a different thread (the one running the client core logic), from the user perceptive, the client isn't making any progress (its main thread crashed after all!)
Thanks again for reporting this issue. A patch will be out as soon as possible.
Hi @rickardoberg
We have released a patch on v5.3.2 to address the bug.
I upgraded in your reproducible example and the test passes, please let us know if you see otherwise.
Thanks again for reporting this!
For some reason the 5.3.1 release doesn't work. Example code:
This works great with 5.3.0 and hangs with 5.3.1. I tried downgrading to GRPC 1.59.0, same result. The semver fix that was in 5.3.1 seems ok too. So the only remaining change in 5.3.1 that might cause issues is the change of protoc version.