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

Error using verify steps in grpc.kafka.fanout #83

Closed
vordimous opened this issue Oct 23, 2023 · 5 comments · Fixed by #89
Closed

Error using verify steps in grpc.kafka.fanout #83

vordimous opened this issue Oct 23, 2023 · 5 comments · Fixed by #89
Assignees

Comments

@vordimous
Copy link
Contributor

Following the steps in the Unreliable server streaming section I get a panic error from grpcurl(version 1.8.8)

echo 'message: "test"' | protoc --encode=example.FanoutMessage proto/fanout.proto > binary.data

kcat -P -b localhost:9092 -t messages -k -e ./binary.data                      

 grpcurl -insecure -proto proto/fanout.proto -d '' localhost:9090 example.FanoutService.FanoutServerStreamproto/fanout.proto -d '' localhost:9090 example.FanoutService.FanoutServerStream
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x28 pc=0x104f5d4e8]

goroutine 1 [running]:
github.com/jhump/protoreflect/desc/protoparse.parseToProtoRecursive({0x1053f2c80, 0x1400000f308}, {0x1400005d920, 0x1b}, 0x140001e7608?, 0x104ef4bf4?, 0x0?)
        github.com/jhump/protoreflect@v1.15.2/desc/protoparse/parser.go:389 +0x148
github.com/jhump/protoreflect/desc/protoparse.parseToProtoRecursive.func1(0x140002eb380, 0x140000bfa90, 0x140000bf860, {0x1053f2c80, 0x1400000f308}, 0x1053a6560?, 0x140000b3f01?)
        github.com/jhump/protoreflect@v1.15.2/desc/protoparse/parser.go:401 +0x164
github.com/jhump/protoreflect/desc/protoparse.parseToProtoRecursive({0x1053f2c80, 0x1400000f308}, {0x16b77f749, 0x12}, 0x140002e9480?, 0x0?, 0x140001e77b8?)
        github.com/jhump/protoreflect@v1.15.2/desc/protoparse/parser.go:402 +0x1d8
github.com/jhump/protoreflect/desc/protoparse.parseToProtosRecursive({0x1053f2c80, 0x1400000f308}, {0x14000288da0, 0x1, 0x0?}, 0x0?, 0x0?)
        github.com/jhump/protoreflect@v1.15.2/desc/protoparse/parser.go:365 +0x80
github.com/jhump/protoreflect/desc/protoparse.Parser.ParseFiles({{0x0, 0x0, 0x0}, 0x1, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, ...}, ...)
        github.com/jhump/protoreflect@v1.15.2/desc/protoparse/parser.go:153 +0x210
github.com/fullstorydev/grpcurl.DescriptorSourceFromProtoFiles({0x0, 0x0, 0x0}, {0x14000288da0?, 0x140001e7b18?, 0x10468f018?})
        github.com/fullstorydev/grpcurl/desc_source.go:71 +0xbc
main.main()
        github.com/fullstorydev/grpcurl/cmd/grpcurl/grpcurl.go:501 +0xca8
adanelz@Andrews-MBP-2 grpc.kafka.fanout % 
@attilakreiner
Copy link
Contributor

attilakreiner commented Oct 25, 2023

I couldn't repro the issue, I just tried this example and LGTM.

The grpcurl command you included in the comment doesn't look right
grpcurl -insecure -proto proto/fanout.proto -d '' localhost:9090 example.FanoutService.FanoutServerStreamproto/fanout.proto -d '' localhost:9090 example.FanoutService.FanoutServerStream
vs
grpcurl -insecure -proto proto/fanout.proto -d '' localhost:9090 example.FanoutService.FanoutServerStream

@attilakreiner attilakreiner self-assigned this Oct 25, 2023
@vordimous
Copy link
Contributor Author

I could not reproduce it on another machine, either.

The grpcurl command you included in the comment doesn't look right
grpcurl -insecure -proto proto/fanout.proto -d '' localhost:9090 example.FanoutService.FanoutServerStreamproto/fanout.proto -d '' localhost:9090 example.FanoutService.FanoutServerStream
vs
grpcurl -insecure -proto proto/fanout.proto -d '' localhost:9090 example.FanoutService.FanoutServerStream

I think this is a bug in the output printing of my terminal

@vordimous
Copy link
Contributor Author

Ran into new issue, @attilakreiner were you able to build the grpc.reliable.streaming project?

cd grpc.reliable.streaming/
./mvnw clean install
cd ..
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Detecting the operating system and CPU architecture
[INFO] ------------------------------------------------------------------------
[INFO] os.detected.name: osx
[INFO] os.detected.arch: x86_64
[INFO] os.detected.bitness: 64
[INFO] os.detected.version: 10.16
[INFO] os.detected.version.major: 10
[INFO] os.detected.version.minor: 16
[INFO] os.detected.classifier: osx-x86_64
[INFO] 
[INFO] ----------------------< io.aklivity:grpc-example >----------------------
[INFO] Building grpc-example develop-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ grpc-example ---
[INFO] Deleting /Users/adanelz/Code/zilla-examples/grpc.kafka.fanout/grpc.reliable.streaming/target
[INFO] 
[INFO] --- maven-checkstyle-plugin:3.1.2:check (default) @ grpc-example ---
[INFO] You have 0 Checkstyle violations.
[INFO] 
[INFO] --- license-maven-plugin:4.1:check (default) @ grpc-example ---
[INFO] Checking licenses...
[INFO] 
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce) @ grpc-example ---
[WARNING] Rule 0: org.apache.maven.plugins.enforcer.RequireUpperBoundDeps failed with message:
Failed while enforcing RequireUpperBoundDeps. The error(s) are [
Require upper bound dependencies error for com.google.j2objc:j2objc-annotations:1.3 paths to dependency are:
+-io.aklivity:grpc-example:develop-SNAPSHOT
  +-com.google.protobuf:protobuf-java-util:3.21.7
    +-com.google.j2objc:j2objc-annotations:1.3
and
+-io.aklivity:grpc-example:develop-SNAPSHOT
  +-com.google.guava:guava:32.0.0-jre
    +-com.google.j2objc:j2objc-annotations:2.8
]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  4.929 s
[INFO] Finished at: 2023-10-25T09:41:57-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.4.1:enforce (enforce) on project grpc-example: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

@vordimous vordimous reopened this Oct 25, 2023
@attilakreiner
Copy link
Contributor

@vordimous, I just checked and I can confirm the maven build fails for me the same way.

@attilakreiner
Copy link
Contributor

The fix #89 has been merged for this issue.

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 a pull request may close this issue.

2 participants