Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/sys_linux_loong64.s:360 Segment error occurred #68867

Closed
LidiYuan opened this issue Aug 14, 2024 · 4 comments
Closed

/sys_linux_loong64.s:360 Segment error occurred #68867

LidiYuan opened this issue Aug 14, 2024 · 4 comments
Labels
arch-loong64 Issues solely affecting the loongson architecture.

Comments

@LidiYuan
Copy link

Go version

go version 1.19 linux/loong64

Output of go env in your module/workspace:

Unable to run Go

What did you do?

os:
root@dev1-pc:~/test# cat /etc/lsb-release
DISTRIB_ID=Kylin
DISTRIB_RELEASE=V10
DISTRIB_CODENAME=kylin
DISTRIB_DESCRIPTION="Kylin V10 SP1"
DISTRIB_KYLIN_RELEASE=V10
DISTRIB_VERSION_TYPE=enterprise
DISTRIB_VERSION_MODE=normal

root@dev1-pc:~/test# uname -a
Linux dev1-pc 5.4.18-55-generic #44-KYLINOS SMP Thu Mar 17 09:05:13 UTC 2022 loongarch64 loongarch64 loongarch64 GNU/Linux

root@dev1-pc:~/test# go version
段错误 (核心已转储)

A segment error occurred while running Go

What did you see happen?

root@dev1-pc:~/test# gdb /usr/local/go/bin/go
(gdb) r version
Starting program: /usr/local/go/bin/go version

Program received signal SIGSEGV, Segmentation fault.
runtime.rtsigprocmask () at /home/dev1/mymd/go-linux-loong64-bootstrap/src/runtime/sys_linux_loong64.s:360
360 /home/dev1/mymd/go-linux-loong64-bootstrap/src/runtime/sys_linux_loong64.s: 没有那个文件或目录.
(gdb) bt
#0 runtime.rtsigprocmask () at /home/dev1/mymd/go-linux-loong64-bootstrap/src/runtime/sys_linux_loong64.s:360
#1 0x000000000004d264 in runtime.sigprocmask (how=, new=, old=)
at /home/dev1/mymd/go-linux-loong64-bootstrap/src/runtime/os_linux.go:442
#2 runtime.sigsave (p=) at /home/dev1/mymd/go-linux-loong64-bootstrap/src/runtime/signal_unix.go:1140
#3 runtime.schedinit () at /home/dev1/mymd/go-linux-loong64-bootstrap/src/runtime/proc.go:703
#4 0x000000000007a598 in runtime.rt0_go () at /home/dev1/mymd/go-linux-loong64-bootstrap/src/runtime/asm_loong64.s:59
(gdb) info r
zero ra tp sp
R0 0000000000000000 000000000004d264 0000000000000000 000000ffffff7308
a0 a1 a2 a3
R4 ffffffffffffffea fffffffffffff000 0000000000a1fde0 0000000000000008
a4 a5 a6 a7
R8 0000000000000000 000000c00000ea10 0000000000000000 0000000000000087
t0 t1 t2 t3
R12 0000000000000000 0000000000000004 9000000000237f00 0000000000000001
t4 t5 t6 t7
R16 0000000000000000 0000000000000000 0000000000000300 0000000000000001
t8 x fp s0
R20 000000fff7ea0000 0000000000000000 0000000000a1eba0 0000000000000031
s1 s2 s3 s4
R24 0000000000000188 0000000000000000 000000012012e000 000000c00000c000
s5 s6 s7 s8
R28 00000000009de180 000000ffffff72b8 ffffffffffffffa0 000000012011fba8
pc 0x7da18 0x7da18 <runtime.rtsigprocmask+32>
(gdb) disassemble
Dump of assembler code for function runtime.rtsigprocmask:
0x000000000007d9f8 <+0>: ld.w $r4,$r3,8(0x8)
0x000000000007d9fc <+4>: ld.d $r5,$r3,16(0x10)
0x000000000007da00 <+8>: ld.d $r6,$r3,24(0x18)
0x000000000007da04 <+12>: ld.w $r7,$r3,32(0x20)
0x000000000007da08 <+16>: addi.d $r11,$r0,135(0x87)
0x000000000007da0c <+20>: syscall 0x0
0x000000000007da10 <+24>: lu12i.w $r5,-1(0xfffff)
0x000000000007da14 <+28>: bgeu $r5,$r4,8(0x8) # 0x7da1c <runtime.rtsigprocmask+36>
=> 0x000000000007da18 <+32>: st.d $r0,$r0,241(0xf1)
0x000000000007da1c <+36>: jirl $r0,$r1,0
End of assembler dump.
(gdb)

What did you expect to see?

Go runs normally on loong64

@LidiYuan
Copy link
Author

Has this issue been resolved in which version? I have been using versions 22 and 23, but they are still not functioning properly

@seankhliao seankhliao added the arch-loong64 Issues solely affecting the loongson architecture. label Aug 14, 2024
@seankhliao
Copy link
Member

cc @golang/loong64

@abner-chenc
Copy link
Contributor

abner-chenc commented Aug 14, 2024

cc @golang/loong64

The minimum required kernel version on Linux/long64 is 5.19, and I think here is the answer you need.

If you need Go that can run on Linux/loong64 low version kernels (such as 4.19, 5.4, etc.), please move here.

Thanks!

@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-loong64 Issues solely affecting the loongson architecture.
Projects
None yet
Development

No branches or pull requests

4 participants