carapace-bin icon indicating copy to clipboard operation
carapace-bin copied to clipboard

termux: error

Open aicynide opened this issue 9 months ago • 4 comments

Current Behavior

SIGSYS: bad system call
PC=0x15f80 m=0 sigcode=1

goroutine 1 [syscall]:
syscall.Syscall6(0x400001ad50?, 0x28?, 0x28?, 0x400001ad80?, 0x0?, 0x4f?, 0xffffffffffffff9c?)
        /opt/hostedtoolcache/go/1.21.9/x64/src/syscall/syscall_linux.go:91 +0x2c fp=0x400019b930 sp=0x400019b8a0 pc=0x8f52c
syscall.faccessat2(0x400001ad50?, {0x400001ad50?, 0x75a66e0250?}, 0x1, 0xc0?)
        /opt/hostedtoolcache/go/1.21.9/x64/src/syscall/zsyscall_linux_arm64.go:33 +0x84 fp=0x400019b9a0 sp=0x400019b930 pc=0x8c5b4
syscall.Faccessat(0x400001ad50?, {0x400001ad50, 0x28}, 0x1, 0x200)
        /opt/hostedtoolcache/go/1.21.9/x64/src/syscall/syscall_linux.go:167 +0x3c fp=0x400019ba90 sp=0x400019b9a0 pc=0x89ecc
internal/syscall/unix.Eaccess(...)
        /opt/hostedtoolcache/go/1.21.9/x64/src/internal/syscall/unix/eaccess_linux.go:10
os/exec.findExecutable({0x400001ad50, 0x28})
        /opt/hostedtoolcache/go/1.21.9/x64/src/os/exec/lp_unix.go:31 +0x58 fp=0x400019bae0 sp=0x400019ba90 pc=0x205308
os/exec.LookPath({0x1d5fd2d, 0x4})
        /opt/hostedtoolcache/go/1.21.9/x64/src/os/exec/lp_unix.go:71 +0x1b8 fp=0x400019bb80 sp=0x400019bae0 pc=0x2055d8
github.com/carapace-sh/carapace/third_party/golang.org/x/sys/execabs.LookPath({0x1d5fd2d, 0x4})
        /home/runner/go/pkg/mod/github.com/carapace-sh/[email protected]/third_party/golang.org/x/sys/execabs/execabs.go:55 +0x24 fp=0x400019bc00 sp=0x400019bb80 pc=0x206144
github.com/carapace-sh/carapace/pkg/execlog.LookPath(...)
        /home/runner/go/pkg/mod/github.com/carapace-sh/[email protected]/pkg/execlog/execlog.go:43
github.com/carapace-sh/carapace-bridge/pkg/bridges.Bash()
        /home/runner/go/pkg/mod/github.com/carapace-sh/[email protected]/pkg/bridges/bash.go:16 +0x28 fp=0x400019bc30 sp=0x400019bc00 pc=0x2fcb18
github.com/carapace-sh/carapace-bin/cmd/carapace/cmd/lazyinit.Snippet({0x1d5e7e2, 0x3})
        /home/runner/work/carapace-bin/carapace-bin/cmd/carapace/cmd/lazyinit/snippet.go:20 +0x158 fp=0x400019bea0 sp=0x400019bc30 pc=0x1c4ee98
github.com/carapace-sh/carapace-bin/cmd/carapace/cmd.Execute({0x21dbb6c?, 0x40000021a0?})
        /home/runner/work/carapace-bin/carapace-bin/cmd/carapace/cmd/root.go:169 +0x360 fp=0x400019bf10 sp=0x400019bea0 pc=0x1c60400
main.main()
        /home/runner/work/carapace-bin/carapace-bin/cmd/carapace/main.go:11 +0x2c fp=0x400019bf30 sp=0x400019bf10 pc=0x1c783bc
runtime.main()
        /opt/hostedtoolcache/go/1.21.9/x64/src/runtime/proc.go:267 +0x2bc fp=0x400019bfd0 sp=0x400019bf30 pc=0x4ac7c
runtime.goexit()
        /opt/hostedtoolcache/go/1.21.9/x64/src/runtime/asm_arm64.s:1197 +0x4 fp=0x400019bfd0 sp=0x400019bfd0 pc=0x7ab54

goroutine 2 [force gc (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
        /opt/hostedtoolcache/go/1.21.9/x64/src/runtime/proc.go:398 +0xc8 fp=0x4000052f90 sp=0x4000052f70 pc=0x4b0a8
runtime.goparkunlock(...)
        /opt/hostedtoolcache/go/1.21.9/x64/src/runtime/proc.go:404
runtime.forcegchelper()
        /opt/hostedtoolcache/go/1.21.9/x64/src/runtime/proc.go:322 +0xb8 fp=0x4000052fd0 sp=0x4000052f90 pc=0x4af38
runtime.goexit()
        /opt/hostedtoolcache/go/1.21.9/x64/src/runtime/asm_arm64.s:1197 +0x4 fp=0x4000052fd0 sp=0x4000052fd0 pc=0x7ab54
created by runtime.init.6 in goroutine 1
        /opt/hostedtoolcache/go/1.21.9/x64/src/runtime/proc.go:310 +0x24

goroutine 3 [GC sweep wait]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
        /opt/hostedtoolcache/go/1.21.9/x64/src/runtime/proc.go:398 +0xc8 fp=0x4000053760 sp=0x4000053740 pc=0x4b0a8
runtime.goparkunlock(...)
        /opt/hostedtoolcache/go/1.21.9/x64/src/runtime/proc.go:404
runtime.bgsweep(0x0?)
        /opt/hostedtoolcache/go/1.21.9/x64/src/runtime/mgcsweep.go:280 +0xa0 fp=0x40000537b0 sp=0x4000053760 pc=0x37090
runtime.gcenable.func1()
        /opt/hostedtoolcache/go/1.21.9/x64/src/runtime/mgc.go:200 +0x28 fp=0x40000537d0 sp=0x40000537b0 pc=0x2bba8
runtime.goexit()
        /opt/hostedtoolcache/go/1.21.9/x64/src/runtime/asm_arm64.s:1197 +0x4 fp=0x40000537d0 sp=0x40000537d0 pc=0x7ab54
created by runtime.gcenable in goroutine 1
        /opt/hostedtoolcache/go/1.21.9/x64/src/runtime/mgc.go:200 +0x6c

goroutine 4 [GC scavenge wait]:
runtime.gopark(0x40000240e0?, 0x21cb098?, 0x1?, 0x0?, 0x4000002d00?)
        /opt/hostedtoolcache/go/1.21.9/x64/src/runtime/proc.go:398 +0xc8 fp=0x4000053f50 sp=0x4000053f30 pc=0x4b0a8
runtime.goparkunlock(...)
        /opt/hostedtoolcache/go/1.21.9/x64/src/runtime/proc.go:404
runtime.(*scavengerState).park(0x310ff80)
        /opt/hostedtoolcache/go/1.21.9/x64/src/runtime/mgcscavenge.go:425 +0x5c fp=0x4000053f80 sp=0x4000053f50 pc=0x3495c
runtime.bgscavenge(0x0?)
        /opt/hostedtoolcache/go/1.21.9/x64/src/runtime/mgcscavenge.go:653 +0x44 fp=0x4000053fb0 sp=0x4000053f80 pc=0x34ea4
runtime.gcenable.func2()
        /opt/hostedtoolcache/go/1.21.9/x64/src/runtime/mgc.go:201 +0x28 fp=0x4000053fd0 sp=0x4000053fb0 pc=0x2bb48
runtime.goexit()
        /opt/hostedtoolcache/go/1.21.9/x64/src/runtime/asm_arm64.s:1197 +0x4 fp=0x4000053fd0 sp=0x4000053fd0 pc=0x7ab54
created by runtime.gcenable in goroutine 1
        /opt/hostedtoolcache/go/1.21.9/x64/src/runtime/mgc.go:201 +0xac

goroutine 5 [finalizer wait]:
runtime.gopark(0x40000525a8?, 0x76844?, 0x1?, 0x25?, 0x86574?)
        /opt/hostedtoolcache/go/1.21.9/x64/src/runtime/proc.go:398 +0xc8 fp=0x4000052580 sp=0x4000052560 pc=0x4b0a8
runtime.runfinq()
        /opt/hostedtoolcache/go/1.21.9/x64/src/runtime/mfinal.go:193 +0x108 fp=0x40000527d0 sp=0x4000052580 pc=0x2ac58
runtime.goexit()
        /opt/hostedtoolcache/go/1.21.9/x64/src/runtime/asm_arm64.s:1197 +0x4 fp=0x40000527d0 sp=0x40000527d0 pc=0x7ab54
created by runtime.createfing in goroutine 1
        /opt/hostedtoolcache/go/1.21.9/x64/src/runtime/mfinal.go:163 +0x80

r0      0xffffffffffffff9c
r1      0x400001adb0
r2      0x1
r3      0x200
r4      0x0
r5      0x0
r6      0x0
r7      0x1
r8      0x1b7
r9      0x2f7273752f73656c
r10     0x742e6d6f632f6174
r11     0x69662f78756d7265
r12     0x2f7273752f73656c
r13     0x687361622f6e6962
r14     0x4a
r15     0x697a2f6572616873
r16     0x40001943a0
r17     0x400019ba20
r18     0x0
r19     0x70
r20     0x400019be80
r21     0x40001bd080
r22     0x4000004000
r23     0x0
r24     0x0
r25     0x1e59f2c
r26     0x1f240b8
r27     0x0
r28     0x40000021a0
r29     0x400019b838
lr      0x15f3c
sp      0x400019b840
pc      0x15f80
fault   0x0

Expected Behavior

No response

Steps To Reproduce

No response

Version

No response

OS

  • [X] Linux
  • [ ] OSX
  • [ ] Windows

Shell

  • [ ] Bash
  • [ ] Elvish
  • [ ] Fish
  • [ ] Nushell
  • [ ] Oil
  • [ ] Powershell
  • [ ] Xonsh
  • [X] Zsh

Anything else?

No response

aicynide avatar Apr 27 '24 11:04 aicynide

I can reproduce this with the deb from releases. It's fine when compiled in termux though.

rsteube avatar Apr 27 '24 17:04 rsteube

likely related : https://github.com/golang/go/issues/60125

rsteube avatar Apr 27 '24 17:04 rsteube

I can reproduce this with the deb from releases. It's fine when compiled in termux though.

Use https://github.com/termux/termux-docker in github actions to build carapace

aicynide avatar Apr 27 '24 17:04 aicynide

I think it just needs GOOS=android for the build. Just could run a binary built on my laptop in termux.

rsteube avatar Apr 27 '24 17:04 rsteube

Although its not network specific program, is there any solution for /etc/resolv.conf in termux?

aicynide avatar May 05 '24 21:05 aicynide

Either build in on termux (directy/container) or use a patched library: https://github.com/carapace-sh/go/tree/master/termux .

rsteube avatar May 06 '24 06:05 rsteube