JanDeDobbeleer / oh-my-posh

The most customisable and low-latency cross platform/shell prompt renderer
https://ohmyposh.dev
MIT License
17.02k stars 2.37k forks source link

termux bad system call #4038

Closed BPplays closed 1 year ago

BPplays commented 1 year ago

Code of Conduct

What happened?

when trying to run versions above v14.10.0 specifically v17.6.0 it gives the error SIGSYS: bad system call

Theme

{ "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", "palette": { "os": "#ACB0BE", "pink-old": "#f5c2e7", "pink": "#cba6f7", "lavender": "#b4befe", "blue": "#89b4fa", "wight": "#FFFFFF", "wight-old": "#cdd6f4", "text": "#45475a" }, "blocks": [ { "alignment": "left", "segments": [ { "background": "p:blue", "foreground": "p:wight", "powerline_symbol": "\ue0b4", "leading_diamond": "\ue0b6", "style": "diamond", "template": "{{.Icon}} ", "type": "os" }, { "background": "p:blue", "foreground": "p:text", "powerline_symbol": "\ue0b4", "style": "diamond", "template": "{{ .UserName }}@{{ $truncated_hostname := split \".\" .HostName }}{{ $truncated_hostname._0 }}", "type": "session" }, { "background": "p:pink", "foreground": "p:text", "properties": { "folder_icon": "..\ue5fe..", "home_icon": "~", "style": "agnoster_short" }, "powerline_symbol": "\ue0b4", "style": "powerline", "template": " {{ .Path }}", "type": "path" }, { "background": "p:lavender", "foreground": "p:text", "style": "powerline", "properties": { "branch_icon": "\ue725 ", "cherry_pick_icon": "\ue29b ", "commit_icon": "\uf417 ", "fetch_status": false, "fetch_upstream_icon": false, "merge_icon": "\ue727 ", "no_commits_icon": "\uf594 ", "rebase_icon": "\ue728 ", "revert_icon": "\uf0e2 ", "tag_icon": "\uf412 " }, "powerline_symbol": "\ue0b4", "template": " {{ .HEAD }}", "type": "git" } ], "type": "prompt" } ], "final_space": true, "version": 2 }

What OS are you seeing the problem on?

No response

Which shell are you using?

fish

Log output

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

goroutine 21 [syscall]:
syscall.Syscall6(0x4000144b10?, 0x27?, 0x27?, 0x4000144b40?, 0x0?, 0x4f?, 0xffffffffffffff9c?)
        /opt/hostedtoolcache/go/src/syscall/syscall_linux.go:91 +0x2c fp=0x400011aa60 sp=0x400011a9d0 pc=0xc5d6c
syscall.faccessat2(0x4000144b10?, {0x4000144b10?, 0x77a96edbc8?}, 0x1, 0xc0?)
        /opt/hostedtoolcache/go/src/syscall/zsyscall_linux_arm64.go:33 +0x84 fp=0x400011aad0 sp=0x400011aa60 pc=0xc29a4
syscall.Faccessat(0x4000144b10?, {0x4000144b10, 0x27}, 0x1, 0x200)
        /opt/hostedtoolcache/go/src/syscall/syscall_linux.go:167 +0x3c fp=0x400011abc0 sp=0x400011aad0 pc=0xc036c
internal/syscall/unix.Eaccess(...)
        /opt/hostedtoolcache/go/src/internal/syscall/unix/eaccess_linux.go:10
os/exec.findExecutable({0x4000144b10, 0x27})
        /opt/hostedtoolcache/go/src/os/exec/lp_unix.go:31 +0x58 fp=0x400011ac10 sp=0x400011abc0 pc=0x1b3608
os/exec.LookPath({0x7f3044, 0x3})
        /opt/hostedtoolcache/go/src/os/exec/lp_unix.go:71 +0x1b8 fp=0x400011acb0 sp=0x400011ac10 pc=0x1b38d8
github.com/jandedobbeleer/oh-my-posh/src/platform.(*Shell).CommandPath(0x4000261030, {0x7f3044, 0x3})
        /home/runner/work/oh-my-posh/oh-my-posh/src/platform/shell.go:596 +0xa0 fp=0x400011ad70 sp=0x400011acb0 pc=0x331710
github.com/jandedobbeleer/oh-my-posh/src/platform.(*Shell).HasCommand(0x4000261030, {0x7f3044, 0x3})
        /home/runner/work/oh-my-posh/oh-my-posh/src/platform/shell.go:608 +0x8c fp=0x400011ade0 sp=0x400011ad70 pc=0x33196c
github.com/jandedobbeleer/oh-my-posh/src/segments.(*scm).hasCommand(0x400025c480, {0x7f3044, 0x3})
        /home/runner/work/oh-my-posh/oh-my-posh/src/segments/scm.go:161 +0xf0 fp=0x400011ae40 sp=0x400011ade0 pc=0x4ff160
github.com/jandedobbeleer/oh-my-posh/src/segments.(*Git).shouldDisplay(0x400025c480)
        /home/runner/work/oh-my-posh/oh-my-posh/src/segments/git.go:255 +0x30 fp=0x400011ae90 sp=0x400011ae40 pc=0x4e7ee0
github.com/jandedobbeleer/oh-my-posh/src/segments.(*Git).Enabled(0x400025c480)
        /home/runner/work/oh-my-posh/oh-my-posh/src/segments/git.go:151 +0x60 fp=0x400011aed0 sp=0x400011ae90 pc=0x4e75a0
github.com/jandedobbeleer/oh-my-posh/src/engine.(*Segment).SetEnabled(0x400037c000, {0x960000, 0x4000261030})
        /home/runner/work/oh-my-posh/oh-my-posh/src/engine/segment.go:493 +0x12c fp=0x400011af60 sp=0x400011aed0 pc=0x6a1bfc
github.com/jandedobbeleer/oh-my-posh/src/engine.(*Block).setEnabledSegments.func1(0x0?)
        /home/runner/work/oh-my-posh/oh-my-posh/src/engine/block.go:114 +0x58 fp=0x400011afb0 sp=0x400011af60 pc=0x68f488
github.com/jandedobbeleer/oh-my-posh/src/engine.(*Block).setEnabledSegments.func3()
        /home/runner/work/oh-my-posh/oh-my-posh/src/engine/block.go:115 +0x30 fp=0x400011afd0 sp=0x400011afb0 pc=0x68f3f0
runtime.goexit()
        /opt/hostedtoolcache/go/src/runtime/asm_arm64.s:1172 +0x4 fp=0x400011afd0 sp=0x400011afd0 pc=0x74ed4
created by github.com/jandedobbeleer/oh-my-posh/src/engine.(*Block).setEnabledSegments
        /home/runner/work/oh-my-posh/oh-my-posh/src/engine/block.go:112 +0x8c

goroutine 1 [semacquire]:
runtime.gopark(0xebce60?, 0x1bfe4?, 0x0?, 0xa0?, 0x332240?)
        /opt/hostedtoolcache/go/src/runtime/proc.go:381 +0xe0 fp=0x4000189590 sp=0x4000189570 pc=0x46500
runtime.goparkunlock(...)
        /opt/hostedtoolcache/go/src/runtime/proc.go:387
runtime.semacquire1(0x4000356a38, 0x4c?, 0x1, 0x0, 0x28?)
        /opt/hostedtoolcache/go/src/runtime/sema.go:160 +0x20c fp=0x40001895f0 sp=0x4000189590 pc=0x5702c
sync.runtime_Semacquire(0x4000189648?)
        /opt/hostedtoolcache/go/src/runtime/sema.go:62 +0x2c fp=0x4000189630 sp=0x40001895f0 pc=0x70c6c
sync.(*WaitGroup).Wait(0x4000356a30)
        /opt/hostedtoolcache/go/src/sync/waitgroup.go:116 +0x74 fp=0x4000189650 sp=0x4000189630 pc=0x904a4
github.com/jandedobbeleer/oh-my-posh/src/engine.(*Block).setEnabledSegments.func2()
        /home/runner/work/oh-my-posh/oh-my-posh/src/engine/block.go:110 +0x28 fp=0x4000189670 sp=0x4000189650 pc=0x68f558
github.com/jandedobbeleer/oh-my-posh/src/engine.(*Block).setEnabledSegments(0x40001548f0)
        /home/runner/work/oh-my-posh/oh-my-posh/src/engine/block.go:117 +0x170 fp=0x40001896f0 sp=0x4000189670 pc=0x68f390
github.com/jandedobbeleer/oh-my-posh/src/engine.(*Block).executeSegmentLogic(0x40001548f0)
        /home/runner/work/oh-my-posh/oh-my-posh/src/engine/block.go:86 +0x68 fp=0x4000189720 sp=0x40001896f0 pc=0x68f038
github.com/jandedobbeleer/oh-my-posh/src/engine.(*Block).Init(...)
        /home/runner/work/oh-my-posh/oh-my-posh/src/engine/block.go:65
github.com/jandedobbeleer/oh-my-posh/src/engine.(*Engine).renderBlock(0x4000261260, 0x40001548f0, 0x1)
        /home/runner/work/oh-my-posh/oh-my-posh/src/engine/engine.go:155 +0x134 fp=0x4000189840 sp=0x4000189720 pc=0x695b24
github.com/jandedobbeleer/oh-my-posh/src/engine.(*Engine).Primary(0x4000261260)
        /home/runner/work/oh-my-posh/oh-my-posh/src/engine/prompt.go:37 +0x304 fp=0x4000189c50 sp=0x4000189840 pc=0x69d584
github.com/jandedobbeleer/oh-my-posh/src/cli.glob..func14(0xe8f740?, {0x40002702d0, 0x1?, 0xf?})
        /home/runner/work/oh-my-posh/oh-my-posh/src/cli/print.go:74 +0x3fc fp=0x4000189d40 sp=0x4000189c50 pc=0x6a7ccc
github.com/spf13/cobra.(*Command).execute(0xe8f740, {0x40002701e0, 0xf, 0xf})
        /opt/hostedtoolcache/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:944 +0x5ac fp=0x4000189e80 sp=0x4000189d40 pc=0x1a3a7c
github.com/spf13/cobra.(*Command).ExecuteC(0xe8fa20)
        /opt/hostedtoolcache/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:1068 +0x340 fp=0x4000189f40 sp=0x4000189e80 pc=0x1a41d0
github.com/spf13/cobra.(*Command).Execute(...)
        /opt/hostedtoolcache/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:992
github.com/jandedobbeleer/oh-my-posh/src/cli.Execute()
        /home/runner/work/oh-my-posh/oh-my-posh/src/cli/root.go:38 +0x24 fp=0x4000189f60 sp=0x4000189f40 pc=0x6a84e4
main.main()
        /home/runner/work/oh-my-posh/oh-my-posh/src/main.go:6 +0x1c fp=0x4000189f70 sp=0x4000189f60 pc=0x6a8e9c
runtime.main()
        /opt/hostedtoolcache/go/src/runtime/proc.go:250 +0x200 fp=0x4000189fd0 sp=0x4000189f70 pc=0x460f0
runtime.goexit()
        /opt/hostedtoolcache/go/src/runtime/asm_arm64.s:1172 +0x4 fp=0x4000189fd0 sp=0x4000189fd0 pc=0x74ed4

goroutine 2 [force gc (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
        /opt/hostedtoolcache/go/src/runtime/proc.go:381 +0xe0 fp=0x4000066fa0 sp=0x4000066f80 pc=0x46500
runtime.goparkunlock(...)
        /opt/hostedtoolcache/go/src/runtime/proc.go:387
runtime.forcegchelper()
        /opt/hostedtoolcache/go/src/runtime/proc.go:305 +0xb0 fp=0x4000066fd0 sp=0x4000066fa0 pc=0x46350
runtime.goexit()
        /opt/hostedtoolcache/go/src/runtime/asm_arm64.s:1172 +0x4 fp=0x4000066fd0 sp=0x4000066fd0 pc=0x74ed4
created by runtime.init.6
        /opt/hostedtoolcache/go/src/runtime/proc.go:293 +0x24

goroutine 3 [GC sweep wait]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
        /opt/hostedtoolcache/go/src/runtime/proc.go:381 +0xe0 fp=0x4000067760 sp=0x4000067740 pc=0x46500
runtime.goparkunlock(...)
        /opt/hostedtoolcache/go/src/runtime/proc.go:387
runtime.bgsweep(0x0?)
        /opt/hostedtoolcache/go/src/runtime/mgcsweep.go:278 +0x98 fp=0x40000677b0 sp=0x4000067760 pc=0x32d28
runtime.gcenable.func1()
        /opt/hostedtoolcache/go/src/runtime/mgc.go:178 +0x28 fp=0x40000677d0 sp=0x40000677b0 pc=0x27de8
runtime.goexit()
        /opt/hostedtoolcache/go/src/runtime/asm_arm64.s:1172 +0x4 fp=0x40000677d0 sp=0x40000677d0 pc=0x74ed4
created by runtime.gcenable
        /opt/hostedtoolcache/go/src/runtime/mgc.go:178 +0x6c

goroutine 4 [GC scavenge wait]:
runtime.gopark(0x400007e000?, 0x9475f8?, 0x1?, 0x0?, 0x0?)
        /opt/hostedtoolcache/go/src/runtime/proc.go:381 +0xe0 fp=0x4000067f50 sp=0x4000067f30 pc=0x46500
runtime.goparkunlock(...)
        /opt/hostedtoolcache/go/src/runtime/proc.go:387
runtime.(*scavengerState).park(0xeb6500)
        /opt/hostedtoolcache/go/src/runtime/mgcscavenge.go:400 +0x5c fp=0x4000067f80 sp=0x4000067f50 pc=0x30cbc
runtime.bgscavenge(0x0?)
        /opt/hostedtoolcache/go/src/runtime/mgcscavenge.go:628 +0x44 fp=0x4000067fb0 sp=0x4000067f80 pc=0x311f4
runtime.gcenable.func2()
        /opt/hostedtoolcache/go/src/runtime/mgc.go:179 +0x28 fp=0x4000067fd0 sp=0x4000067fb0 pc=0x27d88
runtime.goexit()
        /opt/hostedtoolcache/go/src/runtime/asm_arm64.s:1172 +0x4 fp=0x4000067fd0 sp=0x4000067fd0 pc=0x74ed4
created by runtime.gcenable
        /opt/hostedtoolcache/go/src/runtime/mgc.go:179 +0xac

goroutine 17 [finalizer wait]:
runtime.gopark(0x40000665a8?, 0x60000000025868?, 0xa8?, 0xd9?, 0x1?)
        /opt/hostedtoolcache/go/src/runtime/proc.go:381 +0xe0 fp=0x4000066580 sp=0x4000066560 pc=0x46500
runtime.runfinq()
        /opt/hostedtoolcache/go/src/runtime/mfinal.go:193 +0x100 fp=0x40000667d0 sp=0x4000066580 pc=0x26eb0
runtime.goexit()
        /opt/hostedtoolcache/go/src/runtime/asm_arm64.s:1172 +0x4 fp=0x40000667d0 sp=0x40000667d0 pc=0x74ed4
created by runtime.createfing
        /opt/hostedtoolcache/go/src/runtime/mfinal.go:163 +0x80

goroutine 18 [runnable]:
runtime.gcTrigger.test({0x0?, 0x0?, 0x0?})
        /opt/hostedtoolcache/go/src/runtime/mgc.go:547 +0x144 fp=0x40000625b0 sp=0x40000625b0 pc=0x28294
runtime.mallocgc(0x30, 0x7c47c0, 0x1)
        /opt/hostedtoolcache/go/src/runtime/malloc.go:1171 +0x790 fp=0x4000062620 sp=0x40000625b0 pc=0x1c690
runtime.newobject(0x0?)
        /opt/hostedtoolcache/go/src/runtime/malloc.go:1254 +0x2c fp=0x4000062650 sp=0x4000062620 pc=0x1c8dc
runtime.makemap_small()
        /opt/hostedtoolcache/go/src/runtime/map.go:294 +0x24 fp=0x4000062680 sp=0x4000062650 pc=0x1d434
github.com/jandedobbeleer/oh-my-posh/src/engine.(*Segment).mapSegmentWithWriter(0x4000103a00, {0x960000?, 0x4000261030})
        /home/runner/work/oh-my-posh/oh-my-posh/src/engine/segment.go:413 +0x64 fp=0x40000626d0 sp=0x4000062680 pc=0x6a16b4
github.com/jandedobbeleer/oh-my-posh/src/engine.(*Segment).SetEnabled(0x4000103a00, {0x960000, 0x4000261030})
        /home/runner/work/oh-my-posh/oh-my-posh/src/engine/segment.go:477 +0x58 fp=0x4000062760 sp=0x40000626d0 pc=0x6a1b28
github.com/jandedobbeleer/oh-my-posh/src/engine.(*Block).setEnabledSegments.func1(0x0?)
        /home/runner/work/oh-my-posh/oh-my-posh/src/engine/block.go:114 +0x58 fp=0x40000627b0 sp=0x4000062760 pc=0x68f488
github.com/jandedobbeleer/oh-my-posh/src/engine.(*Block).setEnabledSegments.func3()
        /home/runner/work/oh-my-posh/oh-my-posh/src/engine/block.go:115 +0x30 fp=0x40000627d0 sp=0x40000627b0 pc=0x68f3f0
runtime.goexit()
        /opt/hostedtoolcache/go/src/runtime/asm_arm64.s:1172 +0x4 fp=0x40000627d0 sp=0x40000627d0 pc=0x74ed4
created by github.com/jandedobbeleer/oh-my-posh/src/engine.(*Block).setEnabledSegments
        /home/runner/work/oh-my-posh/oh-my-posh/src/engine/block.go:112 +0x8c

goroutine 20 [runnable]:
runtime.gopark(0x4000063508?, 0x251bc?, 0x0?, 0x0?, 0x0?)
        /opt/hostedtoolcache/go/src/runtime/proc.go:381 +0xe0 fp=0x4000117c90 sp=0x4000117c70 pc=0x46500
runtime.goparkunlock(...)
        /opt/hostedtoolcache/go/src/runtime/proc.go:387
runtime.semacquire1(0x4000261084, 0xa0?, 0x3, 0x1, 0xd0?)
        /opt/hostedtoolcache/go/src/runtime/sema.go:160 +0x20c fp=0x4000117cf0 sp=0x4000117c90 pc=0x5702c
sync.runtime_SemacquireMutex(0x0?, 0x0?, 0x4000063588?)
        /opt/hostedtoolcache/go/src/runtime/sema.go:77 +0x28 fp=0x4000117d30 sp=0x4000117cf0 pc=0x70d58
sync.(*Mutex).lockSlow(0x4000261080)
        /opt/hostedtoolcache/go/src/sync/mutex.go:171 +0x174 fp=0x4000117d80 sp=0x4000117d30 pc=0x8e664
sync.(*Mutex).Lock(...)
        /opt/hostedtoolcache/go/src/sync/mutex.go:90
sync.(*RWMutex).Lock(0x4000261080?)
        /opt/hostedtoolcache/go/src/sync/rwmutex.go:147 +0x70 fp=0x4000117db0 sp=0x4000117d80 pc=0x8fe70
github.com/jandedobbeleer/oh-my-posh/src/platform.(*Shell).Pwd(0x4000261030)
        /home/runner/work/oh-my-posh/oh-my-posh/src/platform/shell.go:402 +0x44 fp=0x4000117e50 sp=0x4000117db0 pc=0x32f6c4
github.com/jandedobbeleer/oh-my-posh/src/engine.(*Segment).cwdExcluded(0x4000103d40)
        /home/runner/work/oh-my-posh/oh-my-posh/src/engine/segment.go:377 +0x9c fp=0x4000117eb0 sp=0x4000117e50 pc=0x6a13cc
github.com/jandedobbeleer/oh-my-posh/src/engine.(*Segment).shouldIncludeFolder(0x4000103d40)
        /home/runner/work/oh-my-posh/oh-my-posh/src/engine/segment.go:345 +0x34 fp=0x4000117ed0 sp=0x4000117eb0 pc=0x6a11f4
github.com/jandedobbeleer/oh-my-posh/src/engine.(*Segment).SetEnabled(0x4000103d40, {0x960000, 0x4000261030})
        /home/runner/work/oh-my-posh/oh-my-posh/src/engine/segment.go:478 +0x6c fp=0x4000117f60 sp=0x4000117ed0 pc=0x6a1b3c
github.com/jandedobbeleer/oh-my-posh/src/engine.(*Block).setEnabledSegments.func1(0x0?)
        /home/runner/work/oh-my-posh/oh-my-posh/src/engine/block.go:114 +0x58 fp=0x4000117fb0 sp=0x4000117f60 pc=0x68f488
github.com/jandedobbeleer/oh-my-posh/src/engine.(*Block).setEnabledSegments.func3()
        /home/runner/work/oh-my-posh/oh-my-posh/src/engine/block.go:115 +0x30 fp=0x4000117fd0 sp=0x4000117fb0 pc=0x68f3f0
runtime.goexit()
        /opt/hostedtoolcache/go/src/runtime/asm_arm64.s:1172 +0x4 fp=0x4000117fd0 sp=0x4000117fd0 pc=0x74ed4
created by github.com/jandedobbeleer/oh-my-posh/src/engine.(*Block).setEnabledSegments
        /home/runner/work/oh-my-posh/oh-my-posh/src/engine/block.go:112 +0x8c

r0      0xffffffffffffff9c
r1      0x4000144b70
r2      0x1
r3      0x200
r4      0x0
r5      0x0
r6      0x0
r7      0x1
r8      0x1b7
r9      0x2f7273752f73656c
r10     0x2e6d6f632f617461
r11     0x662f78756d726574
r12     0x7273752f73656c69
r13     0x7469672f6e69622f
r14     0x3e
r15     0x5c58f354be08
r16     0x400011a3a0
r17     0x400011ab50
r18     0x0
r19     0x0
r20     0x400011ac40
r21     0xeb7320
r22     0x4000004000
r23     0x1000000
r24     0x4000164ec8
r25     0xc8
r26     0x400011abd0
r27     0x1
r28     0x400037c680
r29     0x400011a968
lr      0x12f3c
sp      0x400011a970
pc      0x12f80
fault   0x0
JanDeDobbeleer commented 1 year ago

@BPplays Android isn't supported by oh-my-posh out of the box. And ever since golang refactored their syscalls in 1.20, this breaks on Android and they do not want to fix it. The solution is to build for Android, which is possible, but not out of the box. And due to the limited use-case, I can't justify putting in that effort.

JanDeDobbeleer commented 1 year ago

@BPplays I went the extra smile and tried to create an android build. Can you check if this work?

jggamba commented 1 year ago

@JanDeDobbeleer It works !!! Will it be released or is already on the distributions?

JanDeDobbeleer commented 1 year ago

@jggamba not released just yet, I want to build a container first so I can build from there instead of compiling golang every time.

JanDeDobbeleer commented 1 year ago

@jggamba this one's built using a specific container. Can you validate one last time? If OK I can merge that change and it will be part of future releases.

BPplays commented 1 year ago

@JanDeDobbeleer it seems to work fine, but {{.Icon}} should probably be f0032 (nf-md-android) ​ ​ ​

JanDeDobbeleer commented 1 year ago

@BPplays it's live.

github-actions[bot] commented 8 months ago

This issue has been automatically locked since there has not been any recent activity (i.e. last half year) after it was closed. It helps our maintainers focus on the active issues. If you have found a problem that seems similar, please open a discussion first, complete the body with all the details necessary to reproduce, and mention this issue as reference.