capnproto: bump to 1.4.0 - #106
Draft
greatgitsby wants to merge 1 commit into
Draft
Conversation
Contributor
|
Don't we just have to bump pycapnp in openpilot's uv.lock? |
Contributor
Author
|
i suppose so, but then we'll be using different versions of capnp between py and cpp. separately, bumping
capnproto/pycapnp#407 will fix it upstream |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Matches the capnproto bundled by pycapnp 2.2.4. Context: commaai/openpilot#38761
After this merges and the wheel is published: bump
pycapnpto 2.2.4 in openpilot (drops the 2.1.0 pin) and re-lockcomma-deps-capnproto.Verified locally:
capnproto/build.sh, installed into an openpilot venv, regenerated capnp headers, fulltools/op.sh build, cabana demo route 30s,tests/test_cabana.pycapnp 2.2 memory leak
openpilot pinned
pycapnp==2.1.0(commaai/openpilot#38126) because 2.2 leaked in realtime processes (GC disabled). Root cause:from_dicttouchedself.schema.fieldsfor every kwarg, and that wrapper forms a reference cycle with the builder, so each message is kept alive until a GC pass. Fixed upstream in capnproto/pycapnp@a27c849 (#401, released in 2.2.3) by only doing the lookup forstrvalues.Repro, GC disabled, 300k messages per case, fresh process per case:
The
strkwarg path still leaks in 2.2.4 (the cycle itself was not fixed, only sidestepped). In openpilot the only caller passing astrkwarg is logmessaged (logMessage=record), which does not run with GC disabled. Everyconfig_realtime_processuser goes throughmessaging.new_message, which only passesvalidandlogMonoTime.