Skip to content

deps: bump posthog-telemetry to 4cd2256 (teardown SIGSEGV fix)#89

Merged
jrosskopf merged 2 commits into
mainfrom
deps/posthog-telemetry-4cd2256
Jul 4, 2026
Merged

deps: bump posthog-telemetry to 4cd2256 (teardown SIGSEGV fix)#89
jrosskopf merged 2 commits into
mainfrom
deps/posthog-telemetry-4cd2256

Conversation

@jrosskopf

@jrosskopf jrosskopf commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Bumps the shared posthog-telemetry submodule from 0433745 to 4cd2256 (current posthog-telemetry main).

Why

0433745 can SIGSEGV at process exit: its atexit shutdown handler drains the telemetry queue, constructing new httplib Clients whose URL-parsing regex — a function-local static already destroyed at that point — gets dereferenced dead. Reproduced deterministically in quack-oauth (DuckDB v1.5.3 statically-linked unittest binary, exit 139 after all tests pass; gdb stack in DataZooDE/posthog-telemetry#4). The same mechanism fires in any consumer with telemetry events still queued at exit.

New pin

DataZooDE/posthog-telemetry#4: Stop() discards pending tasks (no new network I/O once shutdown begins) and Instance() pre-warms httplib's function-local statics before registering the atexit handler.

Verification

Part of the portfolio-wide sweep after DataZooDE/quack-oauth#8.

🤖 Generated with Claude Code


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.

jrosskopf added 2 commits July 4, 2026 11:10
The 0433745 pin can SIGSEGV at process exit: its atexit shutdown
handler drains the telemetry queue, constructing new httplib Clients
whose ctor regex (a function-local static, destroyed before the
handler runs) is already dead. Deterministic crash reproduced in
quack-oauth's DuckDB v1.5.3 statically-linked test binary (exit 139
after all tests pass); same mechanism applies to any consumer with
events still queued at exit.

New pin (DataZooDE/posthog-telemetry#4): Stop() discards pending
tasks instead of draining them, and Instance() pre-warms httplib's
statics before registering the atexit handler.
posthog-telemetry 0433745 reads the machine id from the IORegistry on
macOS (IORegistryEntryFromPath, IORegistryEntryCreateCFProperty), which
left the osx_arm64 extension link failing with undefined IOKit symbols.
Link IOKit and CoreFoundation explicitly for both extension targets.
@jrosskopf

Copy link
Copy Markdown
Contributor Author

The osx_arm64 failure predates this PR (main's #87 run hit it too): posthog-telemetry reads the machine id from the IORegistry on macOS, and the extension targets never linked IOKit. Cherry-picked the already-authored local fix (ad8a557, links IOKit + CoreFoundation for both targets). CI re-running.

@jrosskopf jrosskopf merged commit 3c26ea1 into main Jul 4, 2026
44 checks passed
@jrosskopf jrosskopf deleted the deps/posthog-telemetry-4cd2256 branch July 4, 2026 15:19
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