Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/splittingred/protobuf-315-leak
Illustrates leak in protobuf 3.15.
https://github.com/splittingred/protobuf-315-leak
Last synced: 8 days ago
JSON representation
Illustrates leak in protobuf 3.15.
- Host: GitHub
- URL: https://github.com/splittingred/protobuf-315-leak
- Owner: splittingred
- Created: 2021-03-22T22:12:46.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-01-19T02:39:01.000Z (almost 3 years ago)
- Last Synced: 2024-10-19T15:49:42.657Z (20 days ago)
- Language: Shell
- Size: 11.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Google Protobuf 3.15 Memory Leak
[![CircleCI](https://circleci.com/gh/splittingred/protobuf-315-leak/tree/main.svg?style=svg)](https://circleci.com/gh/splittingred/protobuf-315-leak/tree/main)
This repository illustrates a memory leak in the google-protobuf 3.15 gem when used in gRPC.
See https://github.com/protocolbuffers/protobuf/issues/8421
## How to Run
Run: `./run.sh`
This will export a memory benchmark using https://github.com/michaelherold/benchmark-memory, illustrating that
google protobuf does not release allocated objects for GC appropriately.## Sample Output
```
Running Protobuf 3.14 test
------------------
Installing gems...
Fetching gem metadata from https://rubygems.org/.........
Resolving dependencies...
Using memory_profiler 0.9.14
Using benchmark-memory 0.1.2
Using bundler 1.17.3
Using google-protobuf 3.14.0 (universal-darwin)
Using googleapis-common-protos-types 1.0.6
Using grpc 1.36.0 (universal-darwin)
Bundle updated!
Starting grpc server...
Letting server boot...
Beginning benchmark...
Calculating -------------------------------------
client 3.976M memsize ( 0.000 retained)
30.000k objects ( 0.000 retained)
4.000 strings ( 0.000 retained)
Calculating -------------------------------------
client 3.976M memsize ( 0.000 retained)
30.000k objects ( 0.000 retained)
4.000 strings ( 0.000 retained)
Running Protobuf 3.15 test
------------------
Installing gems...
Fetching gem metadata from https://rubygems.org/.........
Resolving dependencies...
Using memory_profiler 0.9.14
Using benchmark-memory 0.1.2
Using bundler 1.17.3
Using google-protobuf 3.15.6 (universal-darwin)
Using googleapis-common-protos-types 1.0.6
Using grpc 1.36.0 (universal-darwin)
Bundle updated!
Starting grpc server...
Letting server boot...
Beginning benchmark...
Calculating -------------------------------------
client 4.616M memsize ( 160.040k retained)
46.001k objects ( 4.001k retained)
6.000 strings ( 0.000 retained)
Calculating -------------------------------------
client 4.600M memsize ( 153.720k retained)
45.606k objects ( 3.843k retained)
6.000 strings ( 0.000 retained)
Benchmarks successful! Shutting down server...
Server shutdown, benchmark finished successfully.
```