oceanbase / oceanbase/seekdb

macOS build: protoc-gen-grpc killed by signal 9 during oblib_grpc code generation

Open
#778 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
2.9k
Forks
339
Avg merge
1d 19h
Merged PRs (30d)
52

Description

Summary

On macOS (arm64), parallel make fails while generating gRPC C++ stubs under deps/oblib/src/grpc/. protoc invokes protoc-gen-grpc (grpc_cpp_plugin), which is terminated with signal 9 (SIGKILL).

Error output

--grpc_out: protoc-gen-grpc: Plugin killed by signal 9.
make[2]: *** [.../deps/oblib/src/grpc/example.grpc.pb.cc] Error 1
make[2]: *** Waiting for unfinished jobs....
--grpc_out: protoc-gen-grpc: Plugin killed by signal 9.
make[2]: *** [.../deps/oblib/src/grpc/logservice.grpc.pb.cc] Error 1
make[1]: *** [deps/oblib/src/grpc/CMakeFiles/oblib_grpc.dir/all] Error 2
make: *** [all] Error 2

Build was around 10–15% when this happened (oblib_lib_extra had already built).

Environment

Item Value
OS macOS 15.7.4 (darwin 24.6.0)
Arch arm64 (Apple Silicon)
Plugin (CMake) deps/3rd/usr/local/oceanbase/deps/devel/bin/grpc_cpp_plugin
Proto targets example, storageservice, logservice, serverservice

Codegen is configured in deps/oblib/src/grpc/CMakeLists.txt (non-Windows: protoc --grpc_out=... --plugin=protoc-gen-grpc=${_GRPC_CPP_PLUGIN}).

Possible causes (for investigation)

  1. OOM under parallel make -jN — multiple concurrent protoc / grpc_cpp_plugin processes; SIGKILL is typical for memory pressure on macOS.
  2. macOS security — plugin process killed when run as protoc subprocess (verify with manual protoc invocation).
  3. Toolchain mismatch — bundled grpc_cpp_plugin vs protoc version (usually a different error, still worth checking).
  4. Missing serialization of gRPC codegen — parallel add_custom_command outputs for several .proto files.

Suggested next steps

  • Reproduce with make -j1 targeting oblib_grpc only.
  • Run the exact failing protoc line from the build log manually; watch memory in Activity Monitor.
  • On Apple platforms, consider serializing proto/gRPC generation (JOB_POOLS / single job pool) or documenting safe -j limits.
  • If OOM: reduce default parallelism for codegen on macOS or pre-generate checked-in stubs for dev builds (policy TBD).

Context

Reported from a local fork build on Apple Silicon; tracking here before a fix PR.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with deps/oblib/src/grpc/CMakeLists.txt and the oblib_grpc target. Reproduce with make -j1, then run the exact failing protoc command while monitoring memory and checking the bundled grpc_cpp_plugin; done means identifying the cause and making or documenting a reliable macOS parallel-build fix.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp, macos
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.