jesseduffield / lazygit

simple terminal UI for git commands
MIT License
53.51k stars 1.86k forks source link

Crash on start on termux (Android) #4028

Closed luisdavim closed 3 weeks ago

luisdavim commented 3 weeks ago

Describe the bug

When trying to run lazygit on termux (Android).

To Reproduce Steps to reproduce the behavior:

  1. run lazygit
  2. see the error
SIGSYS: bad system call
PC=0x15b40 m=0 sigcode=1

goroutine 1 gp=0x40000021c0 m=0 mp=0x117ce80 [syscall, locked to thread]:
syscall.Syscall6(0x1b7, 0xffffffffffffff9c, 0x4000128bc0, 0x1, 0x200, 0x0, 0x0)
        /opt/hostedtoolcache/go/1.22.7/x64/src/syscall/syscall_linux.go:91 +0x2c fp=0x4000163bc0 sp=0x4000163b60 pc=0xeb2dc
syscall.faccessat2(0xffffffffffffff9c, {0x4000128b40?, 0x4000128b80?}, 0x1, 0x200)
        /opt/hostedtoolcache/go/1.22.7/x64/src/syscall/zsyscall_linux_arm64.go:33 +0x84 fp=0x4000163c20 sp=0x4000163bc0 pc=0xe7544
syscall.Faccessat(0xffffffffffffff9c, {0x4000128b40, 0x38}, 0x1, 0x200)
        /opt/hostedtoolcache/go/1.22.7/x64/src/syscall/syscall_linux.go:167 +0x3c fp=0x4000163d00 sp=0x4000163c20 pc=0xe4b3c
internal/syscall/unix.Eaccess(...)
        /opt/hostedtoolcache/go/1.22.7/x64/src/internal/syscall/unix/eaccess_linux.go:10
os/exec.findExecutable({0x4000128b40, 0x38})
        /opt/hostedtoolcache/go/1.22.7/x64/src/os/exec/lp_unix.go:31 +0x58 fp=0x4000163d50 sp=0x4000163d00 pc=0x346808
os/exec.LookPath({0x9493c7, 0x14})
        /opt/hostedtoolcache/go/1.22.7/x64/src/os/exec/lp_unix.go:71 +0x198 fp=0x4000163df0 sp=0x4000163d50 pc=0x346ab8
github.com/atotto/clipboard.init.0()
        /home/runner/work/lazygit/lazygit/vendor/github.com/atotto/clipboard/clipboard_unix.go:80 +0x318 fp=0x4000163e10 sp=0x4000163df0 pc=0x52ef68
runtime.doInit1(0x10d2580)
        /opt/hostedtoolcache/go/1.22.7/x64/src/runtime/proc.go:7176 +0xd4 fp=0x4000163f40 sp=0x4000163e10 pc=0x5ee64
runtime.doInit(...)
        /opt/hostedtoolcache/go/1.22.7/x64/src/runtime/proc.go:7143
runtime.main()
        /opt/hostedtoolcache/go/1.22.7/x64/src/runtime/proc.go:253 +0x344 fp=0x4000163fd0 sp=0x4000163f40 pc=0x4ef14
runtime.goexit({})
        /opt/hostedtoolcache/go/1.22.7/x64/src/runtime/asm_arm64.s:1222 +0x4 fp=0x4000163fd0 sp=0x4000163fd0 pc=0x88a74

goroutine 2 gp=0x4000002700 m=nil [force gc (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
        /opt/hostedtoolcache/go/1.22.7/x64/src/runtime/proc.go:402 +0xc8 fp=0x400006ef90 sp=0x400006ef70 pc=0x4f2b8
runtime.goparkunlock(...)
        /opt/hostedtoolcache/go/1.22.7/x64/src/runtime/proc.go:408
runtime.forcegchelper()
        /opt/hostedtoolcache/go/1.22.7/x64/src/runtime/proc.go:326 +0xb8 fp=0x400006efd0 sp=0x400006ef90 pc=0x4f118
runtime.goexit({})
        /opt/hostedtoolcache/go/1.22.7/x64/src/runtime/asm_arm64.s:1222 +0x4 fp=0x400006efd0 sp=0x400006efd0 pc=0x88a74
created by runtime.init.6 in goroutine 1
        /opt/hostedtoolcache/go/1.22.7/x64/src/runtime/proc.go:314 +0x24

goroutine 3 gp=0x4000002c40 m=nil [GC sweep wait]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
        /opt/hostedtoolcache/go/1.22.7/x64/src/runtime/proc.go:402 +0xc8 fp=0x400006f760 sp=0x400006f740 pc=0x4f2b8
runtime.goparkunlock(...)
        /opt/hostedtoolcache/go/1.22.7/x64/src/runtime/proc.go:408
runtime.bgsweep(0x4000044070)
        /opt/hostedtoolcache/go/1.22.7/x64/src/runtime/mgcsweep.go:278 +0xa0 fp=0x400006f7b0 sp=0x400006f760 pc=0x38f30
runtime.gcenable.gowrap1()
        /opt/hostedtoolcache/go/1.22.7/x64/src/runtime/mgc.go:203 +0x28 fp=0x400006f7d0 sp=0x400006f7b0 pc=0x2d148
runtime.goexit({})
        /opt/hostedtoolcache/go/1.22.7/x64/src/runtime/asm_arm64.s:1222 +0x4 fp=0x400006f7d0 sp=0x400006f7d0 pc=0x88a74
created by runtime.gcenable in goroutine 1
        /opt/hostedtoolcache/go/1.22.7/x64/src/runtime/mgc.go:203 +0x6c

goroutine 4 gp=0x4000002e00 m=nil [GC scavenge wait]:
runtime.gopark(0x4000044070?, 0xac02c8?, 0x1?, 0x0?, 0x4000002e00?)
        /opt/hostedtoolcache/go/1.22.7/x64/src/runtime/proc.go:402 +0xc8 fp=0x400006ff60 sp=0x400006ff40 pc=0x4f2b8
runtime.goparkunlock(...)
        /opt/hostedtoolcache/go/1.22.7/x64/src/runtime/proc.go:408
runtime.(*scavengerState).park(0x117b440)
        /opt/hostedtoolcache/go/1.22.7/x64/src/runtime/mgcscavenge.go:425 +0x5c fp=0x400006ff90 sp=0x400006ff60 pc=0x3692c
runtime.bgscavenge(0x4000044070)
        /opt/hostedtoolcache/go/1.22.7/x64/src/runtime/mgcscavenge.go:653 +0x44 fp=0x400006ffb0 sp=0x400006ff90 pc=0x36e74
runtime.gcenable.gowrap2()
        /opt/hostedtoolcache/go/1.22.7/x64/src/runtime/mgc.go:204 +0x28 fp=0x400006ffd0 sp=0x400006ffb0 pc=0x2d0e8
runtime.goexit({})
        /opt/hostedtoolcache/go/1.22.7/x64/src/runtime/asm_arm64.s:1222 +0x4 fp=0x400006ffd0 sp=0x400006ffd0 pc=0x88a74
created by runtime.gcenable in goroutine 1
        /opt/hostedtoolcache/go/1.22.7/x64/src/runtime/mgc.go:204 +0xac

goroutine 17 gp=0x400011e000 m=nil [finalizer wait]:
runtime.gopark(0x400006e5b8?, 0x83ba8?, 0x8?, 0x0?, 0x7dc6a0?)
        /opt/hostedtoolcache/go/1.22.7/x64/src/runtime/proc.go:402 +0xc8 fp=0x400006e580 sp=0x400006e560 pc=0x4f2b8
runtime.runfinq()
        /opt/hostedtoolcache/go/1.22.7/x64/src/runtime/mfinal.go:194 +0x108 fp=0x400006e7d0 sp=0x400006e580 pc=0x2c218
runtime.goexit({})
        /opt/hostedtoolcache/go/1.22.7/x64/src/runtime/asm_arm64.s:1222 +0x4 fp=0x400006e7d0 sp=0x400006e7d0 pc=0x88a74
created by runtime.createfing in goroutine 1
        /opt/hostedtoolcache/go/1.22.7/x64/src/runtime/mfinal.go:164 +0x80

r0      0xffffffffffffff9c
r1      0x4000128bc0
r2      0x1
r3      0x200
r4      0x0
r5      0x0
r6      0x0
r7      0x1
r8      0x1b7
r9      0x2f7273752f73656c
r10     0x2f7273752f73656c
r11     0x6d7265742f6e6962
r12     0x6270696c632d7875
r13     0x7465732d6472616f
r14     0x2f
r15     0x30
r16     0x80
r17     0x4000163b20
r18     0x0
r19     0x92cedf
r20     0x4000163e10
r21     0x4000163e08
r22     0x4000004000
r23     0x930676
r24     0x93067d
r25     0x0
r26     0x9ddaa0
r27     0x1
r28     0x40000021c0
r29     0x4000163af8
lr      0x15afc
sp      0x4000163b00
pc      0x15b40
fault   0x0

Expected behavior expect the app not to crash

Version info: Run lazygit --version and paste the result here the command crashes when trying to get the version as well... but from the package manager I get:

╰─ ❯ apt search lazygit
Sorting... Done
Full Text Search... Done
lazygit/stable 0.44.1 aarch64
  Simple terminal UI for git commands

Run git --version and paste the result here

git version 2.47.0
mark2185 commented 3 weeks ago

Which android are you running it on?

I tried building it from source today on an aarch64, using go 1.23.2 android/arm64 and it launches okay.

luisdavim commented 3 weeks ago

humm, looks like uninstalling and installing it agin solved the issue.