Skip to content

fix: unpin onnxruntime, fix HUM-6564 at the source - #4

Merged
fatherlinux merged 1 commit into
mainfrom
fix/unpin-onnxruntime-hum-6564
Aug 31, 2026
Merged

fatherlinux merged 1 commit into
mainfrom
fix/unpin-onnxruntime-hum-6564

Conversation

@fatherlinux

Copy link
Copy Markdown
Member

Summary

Replaces the onnxruntime<1.20 pin with a fix for the actual cause, letting the ONNX embedding runtime run current again.

onnxruntime vendors cpp_client_telemetry, which reads /etc/machine-id. When unusable it falls back to popen("blkid") — NULL with no /bin/sh — and the unchecked pclose(NULL) segfaults on import. Upstream: microsoft/onnxruntime#32173, fixed by microsoft/onnxruntime#32226, not yet released.

Two independent guards: populated /etc/machine-id + ORT_DISABLE_TELEMETRY=1.

Test plan

Verified on registry.access.redhat.com/hi/python:3.12 (py 3.12.14, onnxruntime 1.29.0):

config result
both guards imports OK
telemetry on, machine-id populated imports OK
telemetry off, machine-id absent imports OK
both off SIGSEGV (139) — reproduces HUM-6564

An empty /etc/machine-id still segfaults; it must be populated.

🤖 Generated with Claude Code

https://claude.ai/code/session_013t1uJRVqhkikr52jXxxvck

The <1.20 pin worked around the distroless segfault by holding the ONNX
embedding runtime nine minor versions back. Fix the actual cause instead.

onnxruntime vendors cpp_client_telemetry, which reads /etc/machine-id for
a device ID. When the value is unusable it falls back to popen("blkid"),
which returns NULL with no /bin/sh. The SDK does not check that, so the
following pclose(NULL) segfaults on `import onnxruntime`. Upstream is
onnxruntime#32173, fixed by #32226 but not yet in a release.

Two independent guards: a populated /etc/machine-id (generated in the
builder while root) and ORT_DISABLE_TELEMETRY=1.

Verified on registry.access.redhat.com/hi/python:3.12, py 3.12.14,
onnxruntime 1.29.0 — the ticket's exact environment:

  both guards            -> imports OK
  telemetry on, id set   -> imports OK
  telemetry off, no id   -> imports OK
  both off               -> SIGSEGV (139), reproduces the bug

The file must be POPULATED; an empty "first boot" machine-id still
segfaults. ORT_DISABLE_TELEMETRY also stops onnxruntime writing
/tmp/mat-debug-1.log and /tmp/.ses, unwanted in this image regardless.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013t1uJRVqhkikr52jXxxvck
@fatherlinux
fatherlinux merged commit 9781154 into main Aug 31, 2026
1 check passed
@fatherlinux
fatherlinux deleted the fix/unpin-onnxruntime-hum-6564 branch August 31, 2026 11:17
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