macOS build: protoc-gen-grpc killed by signal 9 during oblib_grpc code generation
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)
- OOM under parallel
make -jN— multiple concurrentprotoc/grpc_cpp_pluginprocesses; SIGKILL is typical for memory pressure on macOS. - macOS security — plugin process killed when run as protoc subprocess (verify with manual
protocinvocation). - Toolchain mismatch — bundled
grpc_cpp_pluginvsprotocversion (usually a different error, still worth checking). - Missing serialization of gRPC codegen — parallel
add_custom_commandoutputs for several.protofiles.
Suggested next steps
- Reproduce with
make -j1targetingoblib_grpconly. - Run the exact failing
protocline 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-jlimits. - 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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