Skip to content

[BUG] Rust 1.61 leads to Protobuf "buffer underflow" Error #1778

@MeloYang05

Description

@MeloYang05

Describe the bug
Our system heavily relies on grpc and protobuf. However, Rust crate prost! used to process protobuf message has some potential bugs in Rust's latest stable release 1.61 .
My investigation suggests that in Rust 1.61, prost!'s encode_to_vec() method has inconsistent behaviors when encode protobuf message, which may generate wrong code bytes, and then it leads to the rpc server's decode error: "buffer underflow"

To Reproduce
Steps to reproduce the behavior:

  1. Go to '.../GraphScope/research/query_service/ir/compiler'
  2. make install
  3. cd ..
  4. RUST_LOG=info ./target/release/start_rpc_server --config ./integrated/config/
  5. open another terminal tab, cd compiler && make run graph.schema:=../core/resource/modern_schema.json
  6. open another terminak tab, cd compiler && make gremlin_test
    Then you can see the protobuf buffer underflow error

Expected behavior
Pass all the test

Environment (please complete the following information):

  • GraphScope version: latest main
  • OS: macOS 12.4 with rust 1.61 or Linux Docker with rust 1.61 image

Therefore, currently it is not suggested to update to Rust 1.61

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcomponent:gaiaGAIA, the preview release of the next version of GIEcomponent:gie

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions