`cre update` installs a glibc-2.38 binary on glibc-2.36 hosts and bricks the CLI (an `_ldd2-35` asset exists but is never selected)
維護者通常 1 天內回覆
評估
研究方向
從 cre update 進入點開始,追蹤它如何選取和替換 release assets。在 glibc 低於 2.38 的主機上重現,然後確認是否會選取相容的 _ldd2-35 asset,或確認新的二進位檔是否會在替換前經過檢查,並在失敗時回滾。
由索引模型根據 Issue 內容生成。
描述
cre update unconditionally downloads the cre_linux_amd64 release asset, which is
built against GLIBC 2.38. On any Linux host with an older glibc — Debian 12
(2.36), Ubuntu 22.04 (2.35), RHEL 9 (2.34) — the freshly installed binary cannot
execute at all. Because cre update overwrites the existing binary in place with
no backup, this leaves the user with no working cre command and no obvious
path back.
The releases already ship a compatible cre_linux_amd64_ldd2-35 asset.
cre update just never chooses it.
Environment
| OS | Debian GNU/Linux 12 (bookworm) |
| glibc | 2.36 (ldd (Debian GLIBC 2.36-9+deb12u14)) |
| arch | x86_64 |
| cre before update | a development build |
| cre after update | v1.31.0 (cre_linux_amd64) |
Steps to reproduce
- On a host with glibc < 2.38, install the CRE CLI.
- Run
cre update. - Run any
crecommand.
Actual behaviour
cre update reports success:
Checking for updates...
! Could not compare versions (current: 'development', latest: 'v1.31.0'). Proceeding with update.
Updating...
Extracting...
✓ CRE CLI updated to v1.31.0
cre: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.38' not found (required by cre)
cre: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by cre)
! Failed to verify version: exit status 1
Every subsequent invocation then fails the same way:
$ cre version
cre: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.38' not found (required by cre)
cre: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by cre)
Note that ✓ CRE CLI updated to v1.31.0 is printed before the failure, so the
update reads as successful on a quick skim.
Expected behaviour
cre update should detect the host's glibc version and select the
cre_linux_amd64_ldd2-35 asset when the default build is incompatible — or, at
minimum, verify the new binary runs before replacing the old one, and roll back
if it does not.
Workaround
Download the compatible asset manually and replace the binary:
curl -sL -o cre.tar.gz \
https://github.com/smartcontractkit/cre-cli/releases/download/v1.31.0/cre_linux_amd64_ldd2-35.tar.gz
tar xzf cre.tar.gz
./cre_v1.31.0_linux_amd64 version # verify BEFORE installing
cp cre_v1.31.0_linux_amd64 ~/.cre/bin/cre && chmod +x ~/.cre/bin/cre
This restores a working v1.31.0. Existing credentials in ~/.cre/context.yaml
survive the swap — cre whoami still authenticates afterwards.
Suggested fixes, roughly in order of value
- Back up the current binary before replacing it, and restore it if the new
one fails its version check. This alone turns a bricked CLI into a no-op. - Select the asset by host glibc.
ldd --versionor a link-time check against
the ELF'sGLIBC_*version needs is enough to pick_ldd2-35. - Verify before replacing, not after — the current order guarantees the
failure mode. - If neither is feasible, fail loudly with the workaround in the error text,
naming the_ldd2-35asset. As it stands the error mentions only the missing
symbol, and nothing points to the compatible download.
Impact
Hits anyone on a stable/LTS distro. Debian 12 and Ubuntu 22.04 are both common
CI-runner and dev-VM baselines, so this is likely to show up in automated
environments as well as on laptops — and in a workshop or bootcamp setting it
takes an attendee fully offline mid-session, since the recovery is not
discoverable from the error message.
- 主要語言
- Go
- 星號
- 25
- 分支
- 31
- 平均合併
- 3 天 6 小時
- 30 天內合併 PR
- 7
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
smartcontractkit/cre-cli 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 65/100
smartcontractkit/cre-cli#430 ·
維護者通常 1 天內回覆
-
難度 3/5 1-2 天 新手友好度 55/100
smartcontractkit/cre-cli#631 ·
維護者通常 1 天內回覆
-
難度 5/5 一週以上 新手友好度 35/100
smartcontractkit/cre-cli#569 ·
維護者通常 1 天內回覆
-
難度 5/5 一週以上 新手友好度 15/100
smartcontractkit/cre-cli#507 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 4/5 3-5 天 新手友好度 52/100
smartcontractkit/cre-cli#393 ·
維護者通常 1 天內回覆
查看 smartcontractkit/cre-cli 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
google/osv-scanner#3341 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 69/100
維護者通常 2 天內回覆
-
[Bug] vela config-template apply drops the template's metadata.description可能已有人在做 @backendArchitect 今天認領。 未關閉area/cli area/config good first issue type/bug
難度 2/5 1-3 小時 新手友好度 82/100
kubevela/kubevela#7756 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 2 天內回覆