Skip to content

Fix keybase.io infinite loop: install function recursively calls itself#150

Merged
sebst merged 3 commits intomainfrom
copilot/fix-keybase-infinite-loop
Mar 21, 2026
Merged

Fix keybase.io infinite loop: install function recursively calls itself#150
sebst merged 3 commits intomainfrom
copilot/fix-keybase-infinite-loop

Conversation

Copy link
Contributor

Copilot AI commented Mar 21, 2026

The install() bash function in src/keybase.io/install.sh called install -m 0755 /dev/stdin /usr/local/bin/keybase internally — but bash resolves function names before external commands, so this recursively re-entered install() instead of calling /usr/bin/install, causing an infinite loop.

Changes

  • src/keybase.io/install.sh: Replace bare install with command install to explicitly invoke the external binary and bypass bash's function lookup.
# Before — triggers infinite recursion
dpkg-deb --fsys-tarfile "/tmp/${deb_file}" \
    | tar -xO ./usr/bin/keybase \
    | install -m 0755 /dev/stdin /usr/local/bin/keybase

# After — calls /usr/bin/install directly
dpkg-deb --fsys-tarfile "/tmp/${deb_file}" \
    | tar -xO ./usr/bin/keybase \
    | command install -m 0755 /dev/stdin /usr/local/bin/keybase
Original prompt

This section details on the original issue you should resolve

<issue_title>Feature keybase.io seems to be stuck in an infinite loop during test</issue_title>
<issue_description>https://github.com/devcontainer-community/devcontainer-features/actions/runs/23385754270/job/68032428477#step:4:6342</issue_description>

Comments on the Issue (you are @copilot in this section)

@sebst ``` #14 677.7 tar: Error is not recoverable: exiting now [2026-03-21T18:34:02.058Z] #14 678.3 dpkg-deb (subprocess): cannot copy archive member from '/tmp/keybase_amd64.deb' to decompressor pipe: unexpected end of file or stream [2026-03-21T18:34:02.242Z] #14 678.5 dpkg-deb (subprocess): decompressing archive '/tmp/keybase_amd64.deb' (size=157060932) member 'data.tar': lzma error: internal error (bug) [2026-03-21T18:34:02.407Z] #14 678.5 dpkg-deb: error: subprocess returned error exit status 2 #14 678.5 tar: Unexpected EOF in archive #14 678.5 tar: Error is not recoverable: exiting now [2026-03-21T18:34:03.054Z] #14 679.3 dpkg-deb (subprocess): cannot copy archive member from '/tmp/keybase_amd64.deb' to decompressor pipe: unexpected end of file or stream [2026-03-21T18:34:03.273Z] #14 679.5 dpkg-deb (subprocess): decompressing archive '/tmp/keybase_amd64.deb' (size=157060932) member 'data.tar': lzma error: internal error (bug) [2026-03-21T18:34:03.470Z] #14 679.6 dpkg-deb: error: subprocess returned error exit status 2 #14 679.6 tar: Unexpected EOF in archive #14 679.6 tar: Error is not recoverable: exiting now [2026-03-21T18:34:04.014Z] #14 680.3 dpkg-deb (subprocess): cannot copy archive member from '/tmp/keybase_amd64.deb' to decompressor pipe: unexpected end of file or stream [2026-03-21T18:34:04.491Z] #14 680.7 dpkg-deb (subprocess): decompressing archive '/tmp/keybase_amd64.deb' (size=157060932) member 'data.tar': lzma error: internal e [2026-03-21T18:34:04.648Z] rror (bug) #14 680.7 dpkg-deb: error: subprocess returned error exit status 2 #14 680.7 tar: Unexpected EOF in archive #14 680.7 tar: Error is not recoverable: exiting now [2026-03-21T18:34:05.061Z] #14 681.3 dpkg-deb (subprocess): cannot copy archive member from '/tmp/keybase_amd64.deb' to decompressor pipe: unexpected end of file or stream [2026-03-21T18:34:05.309Z] #14 681.4 dpkg-deb (subprocess): decompressing archive '/tmp/keybase_amd64.deb' (size=157060932) member 'data.tar': lzma error: internal error (bug) #14 681.4 dpkg-deb: error: subprocess returned error exit status 2 #14 681.4 tar: Unexpected EOF in archive #14 681.4 tar: Error is not recoverable: exiting now [2026-03-21T18:34:06.193Z] #14 682.4 dpkg-deb (subprocess): cannot copy archive member from '/tmp/keybase_amd64.deb' to decompressor pipe: unexpected end of file or stream [2026-03-21T18:34:06.431Z] #14 682.7 dpkg-deb (subprocess): decompressing archive '/tmp/keybase_amd64.deb' (size=157060932) member 'data.tar': lzma error: internal error (bug) [2026-03-21T18:34:06.614Z] #14 682.7 dpkg-deb: error: subprocess returned error exit status 2 #14 682.7 tar: Unexpected EOF in archive #14 682.7 tar: Error is not recoverable: exiting now ```

⚡ Quickly spin up Copilot coding agent tasks from anywhere on your macOS or Windows machine with Raycast.

Copilot AI changed the title [WIP] Fix infinite loop issue in keybase.io feature during test Fix keybase.io infinite loop: install function recursively calls itself Mar 21, 2026
Copilot AI requested a review from sebst March 21, 2026 18:42
Copy link
Member

@sebst sebst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

install.sh changed but version in devcontainer-feature.json not increased. increase minor version here

Copy link
Contributor Author

Copilot AI commented Mar 21, 2026

install.sh changed but version in devcontainer-feature.json not increased. increase minor version here

Done — bumped version from 1.1.0 to 1.2.0 in commit f6b3e52.

@sebst sebst marked this pull request as ready for review March 21, 2026 18:44
Copilot AI requested a review from sebst March 21, 2026 18:45
@sebst sebst merged commit 63f2475 into main Mar 21, 2026
3 checks passed
@sebst sebst deleted the copilot/fix-keybase-infinite-loop branch March 21, 2026 18:45
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.

Feature keybase.io seems to be stuck in an infinite loop during test

2 participants