gRPCClient.jl icon indicating copy to clipboard operation
gRPCClient.jl copied to clipboard

Couldn't initialize byte buffer reader when calling SayHello in a loop

Open ikirill opened this issue 3 years ago • 0 comments

When trying this out with helloworld, https://github.com/grpc/grpc/tree/master/examples/cpp/helloworld, calling SayHello in a loop (without any printing to stdout) results in:

julia> @benchmark HelloworldClients.SayHello(client, HelloworldClients.helloworld.HelloRequest(name="Hello world"))         
ERROR: gRPCServiceCallException: 13, Couldn't initialize byte buffer reader
Stacktrace:
  [1] gRPCCheck(status::gRPCStatus; throw_error::Bool)
    @ gRPCClient ~/.julia/packages/gRPCClient/vWycW/src/grpc.jl:61
  [2] gRPCCheck(status_future::Task; throw_error::Bool)
    @ gRPCClient ~/.julia/packages/gRPCClient/vWycW/src/grpc.jl:57
  [3] gRPCCheck
    @ ~/.julia/packages/gRPCClient/vWycW/src/grpc.jl:57 [inlined]
  [4] call_method(channel::gRPCChannel, service::ProtoBuf.ServiceDescriptor, method::ProtoBuf.MethodDescriptor, controller::gRPCController, input::Channel{Main.HelloworldClients.helloworld.HelloRequest}, #unused#::Type{Main.HelloworldClient
s.helloworld.HelloReply})
    @ gRPCClient ~/.julia/packages/gRPCClient/vWycW/src/grpc.jl:207
  [5] call_method(channel::gRPCChannel, service::ProtoBuf.ServiceDescriptor, method::ProtoBuf.MethodDescriptor, controller::gRPCController, input::Channel{Main.HelloworldClients.helloworld.HelloRequest})
    @ gRPCClient ~/.julia/packages/gRPCClient/vWycW/src/grpc.jl:198
  [6] call_method
    @ ~/.julia/packages/gRPCClient/vWycW/src/grpc.jl:196 [inlined]
  [7] call_method(stub::ProtoBuf.ProtoServiceBlockingStub, meth::ProtoBuf.MethodDescriptor, controller::gRPCController, request::Main.HelloworldClients.helloworld.HelloRequest)
    @ ProtoBuf ~/.julia/packages/ProtoBuf/A71jO/src/svc.jl:100
  [8] SayHello
    @ ~/misc/grpc/jlbug1/helloworld_pb.jl:102 [inlined]
  [9] SayHello
    @ ~/misc/grpc/jlbug1/HelloworldClients.jl:49 [inlined]
 [10] var"##core#292"()
    @ Main ~/.julia/packages/BenchmarkTools/7xSXH/src/execution.jl:489
 [11] var"##sample#293"(::Tuple{}, __params::BenchmarkTools.Parameters)
    @ Main ~/.julia/packages/BenchmarkTools/7xSXH/src/execution.jl:495
 [12] _run(b::BenchmarkTools.Benchmark, p::BenchmarkTools.Parameters; verbose::Bool, pad::String, kwargs::Base.Pairs{Symbol, Integer, NTuple{4, Symbol}, NamedTuple{(:samples, :evals, :gctrial, :gcsample), Tuple{Int64, Int64, Bool, Bool}}})
    @ BenchmarkTools ~/.julia/packages/BenchmarkTools/7xSXH/src/execution.jl:99
 [13] #invokelatest#2
    @ ./essentials.jl:718 [inlined]
 [14] #run_result#45
    @ ~/.julia/packages/BenchmarkTools/7xSXH/src/execution.jl:34 [inlined]
 [15] run(b::BenchmarkTools.Benchmark, p::BenchmarkTools.Parameters; progressid::Nothing, nleaves::Float64, ndone::Float64, kwargs::Base.Pairs{Symbol, Integer, NTuple{5, Symbol}, NamedTuple{(:verbose, :samples, :evals, :gctrial, :gcsample), Tuple{Bool, Int64, Int64, Bool, Bool}}})
    @ BenchmarkTools ~/.julia/packages/BenchmarkTools/7xSXH/src/execution.jl:117
 [16] #warmup#54
    @ ~/.julia/packages/BenchmarkTools/7xSXH/src/execution.jl:169 [inlined]
 [17] tune!(b::BenchmarkTools.Benchmark, p::BenchmarkTools.Parameters; progressid::Nothing, nleaves::Float64, ndone::Float64, verbose::Bool, pad::String, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ BenchmarkTools ~/.julia/packages/BenchmarkTools/7xSXH/src/execution.jl:250
 [18] tune! (repeats 2 times)
    @ ~/.julia/packages/BenchmarkTools/7xSXH/src/execution.jl:250 [inlined]
 [19] top-level scope
    @ ~/.julia/packages/BenchmarkTools/7xSXH/src/execution.jl:394                                     

This goes away if I print something in between the calls.

ikirill avatar Aug 07 '22 02:08 ikirill