Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable GC for acton pkg upgrade #2166

Merged
merged 1 commit into from
Feb 13, 2025
Merged

Disable GC for acton pkg upgrade #2166

merged 1 commit into from
Feb 13, 2025

Conversation

plajjan
Copy link
Contributor

@plajjan plajjan commented Feb 13, 2025

The TLS lib doesn't interoperate well with our GC. While tlsuv does allow custom mallocs, there is an asymmetry for where malloc / free is done for DNS addrinfo structs. We control the malloc side and point to GC_malloc while on the free side, a normal free() is used. That leads to crashes, so if the GC runs at the wrong time, we'll crash.

Since pkg upgrade is a very small and simple operation, memory usage is negligible and thus we can live without GC. It's ugly, but at least pkg upgrade works.

Clearly the solution is to fix the DNS resolution. We already have this working for TCPConnection, so should port that to TLSConnection.

The TLS lib doesn't interoperate well with our GC. While tlsuv does
allow custom mallocs, there is an asymmetry for where malloc / free is
done for DNS addrinfo structs. We control the malloc side and point to
GC_malloc while on the free side, a normal free() is used. That leads to
crashes, so if the GC runs at the wrong time, we'll crash.

Since pkg upgrade is a very small and simple operation, memory usage is
negligible and thus we can live without GC. It's ugly, but at least pkg
upgrade works.

Clearly the solution is to fix the DNS resolution. We already have this
working for TCPConnection, so should port that to TLSConnection.
@plajjan plajjan enabled auto-merge February 13, 2025 10:30
@plajjan plajjan merged commit 003cb97 into main Feb 13, 2025
29 of 30 checks passed
@plajjan plajjan deleted the pkg-upgrade-disable-gc branch February 13, 2025 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant