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

SIGILL when panicking (unwinding?) on sparc64-linux #39646

Closed
japaric opened this issue Feb 8, 2017 · 2 comments
Closed

SIGILL when panicking (unwinding?) on sparc64-linux #39646

japaric opened this issue Feb 8, 2017 · 2 comments
Labels
C-bug Category: This is a bug. I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics. O-SPARC Target: SPARC processors

Comments

@japaric
Copy link
Member

japaric commented Feb 8, 2017

STR

fn main() {
    panic!();
}
$ rustc --target sparc64-unknown-linux-gnu panic.rs

$ QEMU_LD_PREFIX=/usr/sparc64-linux-gnu qemu-sparc64-static panic
thread 'main' panicked at 'explicit panic', panic.rs:1
note: Run with `RUST_BACKTRACE=1` for a backtrace.
Illegal instruction (core dumped)

Syscall trace:

783 brk(NULL) = 0x0000004000132000 783 uname(0x400093376a) = 0 783 access("/etc/ld.so.nohwcap",F_OK) = -1 errno=2 (No such file or directory) 783 mmap(NULL,8192,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS,-1,0) = 0x0000004000a5a000 783 access("/etc/ld.so.preload",R_OK) = -1 errno=2 (No such file or directory) 783 open("/etc/ld.so.cache",O_RDONLY|O_CLOEXEC) = 3 783 fstat64(3,0x0000004000932c40) = 0 783 mmap(NULL,17171,PROT_READ,MAP_PRIVATE,3,0) = 0x0000004000a5c000 783 close(3) = 0 783 open("/lib/sparc64-linux-gnu/tls/libdl.so.2",O_RDONLY|O_CLOEXEC) = -1 errno=2 (No such file or directory) 783 stat64("/lib/sparc64-linux-gnu/tls",0x0000004000932c50) = -1 errno=2 (No such file or directory) 783 open("/lib/sparc64-linux-gnu/libdl.so.2",O_RDONLY|O_CLOEXEC) = -1 errno=2 (No such file or directory) 783 stat64("/lib/sparc64-linux-gnu",0x0000004000932c50) = -1 errno=2 (No such file or directory) 783 open("/usr/lib/sparc64-linux-gnu/tls/libdl.so.2",O_RDONLY|O_CLOEXEC) = -1 errno=2 (No such file or directory) 783 stat64("/usr/lib/sparc64-linux-gnu/tls",0x0000004000932c50) = -1 errno=2 (No such file or directory) 783 open("/usr/lib/sparc64-linux-gnu/libdl.so.2",O_RDONLY|O_CLOEXEC) = -1 errno=2 (No such file or directory) 783 stat64("/usr/lib/sparc64-linux-gnu",0x0000004000932c50) = -1 errno=2 (No such file or directory) 783 open("/lib/tls/libdl.so.2",O_RDONLY|O_CLOEXEC) = -1 errno=2 (No such file or directory) 783 stat64("/lib/tls",0x0000004000932c50) = -1 errno=2 (No such file or directory) 783 open("/lib/libdl.so.2",O_RDONLY|O_CLOEXEC) = 3 783 read(3,0x933020,832) = 832 783 fstat64(3,0x0000004000932c30) = 0 783 mmap(NULL,1065984,PROT_EXEC|PROT_READ,MAP_PRIVATE|MAP_DENYWRITE,3,0) = 0x0000004000a62000 783 mprotect(0x0000004000a66000,1040384,PROT_NONE) = 0 783 mmap(0x0000004000b64000,16384,PROT_EXEC|PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_DENYWRITE|MAP_FIXED,3,0x2000) = 0x0000004000b64000 783 close(3) = 0 783 open("/lib/librt.so.1",O_RDONLY|O_CLOEXEC) = 3 783 read(3,0x932ff0,832) = 832 783 fstat64(3,0x0000004000932c00) = 0 783 mmap(NULL,1085880,PROT_EXEC|PROT_READ,MAP_PRIVATE|MAP_DENYWRITE,3,0) = 0x0000004000b68000 783 mprotect(0x0000004000b70000,1040384,PROT_NONE) = 0 783 mmap(0x0000004000c6e000,16384,PROT_EXEC|PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_DENYWRITE|MAP_FIXED,3,0x6000) = 0x0000004000c6e000 783 close(3) = 0 783 open("/lib/libpthread.so.0",O_RDONLY|O_CLOEXEC) = 3 783 read(3,0x932fc0,832) = 832 783 fstat64(3,0x0000004000932bd0) = 0 783 mmap(NULL,1166640,PROT_EXEC|PROT_READ,MAP_PRIVATE|MAP_DENYWRITE,3,0) = 0x0000004000c72000 783 mprotect(0x0000004000c8a000,1040384,PROT_NONE) = 0 783 mmap(0x0000004000d88000,16384,PROT_EXEC|PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_DENYWRITE|MAP_FIXED,3,0x16000) = 0x0000004000d88000 783 mmap(0x0000004000d8c000,11568,PROT_EXEC|PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS|MAP_FIXED,-1,0) = 0x0000004000d8c000 783 close(3) = 0 783 open("/lib/libgcc_s.so.1",O_RDONLY|O_CLOEXEC) = 3 783 read(3,0x932f90,832) = 832 783 fstat64(3,0x0000004000932ba0) = 0 783 mmap(NULL,8192,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS,-1,0) = 0x0000004000d90000 783 mmap(NULL,1116712,PROT_EXEC|PROT_READ,MAP_PRIVATE|MAP_DENYWRITE,3,0) = 0x0000004000d92000 783 mprotect(0x0000004000da2000,1040384,PROT_NONE) = 0 783 mmap(0x0000004000ea0000,16384,PROT_EXEC|PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_DENYWRITE|MAP_FIXED,3,0xe000) = 0x0000004000ea0000 783 close(3) = 0 783 open("/lib/libc.so.6",O_RDONLY|O_CLOEXEC) = 3 783 read(3,0x932f60,832) = 832 783 fstat64(3,0x0000004000932b70) = 0 783 mmap(NULL,2506496,PROT_EXEC|PROT_READ,MAP_PRIVATE|MAP_DENYWRITE,3,0) = 0x0000004000ea4000 783 mprotect(0x0000004000ffe000,1048576,PROT_NONE) = 0 783 mmap(0x00000040010fe000,32768,PROT_EXEC|PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_DENYWRITE|MAP_FIXED,3,0x15a000) = 0x00000040010fe000 783 mmap(0x0000004001106000,7936,PROT_EXEC|PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS|MAP_FIXED,-1,0) = 0x0000004001106000 783 close(3) = 0 783 mmap(NULL,8192,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS,-1,0) = 0x0000004001108000 783 mprotect(0x00000040010fe000,16384,PROT_READ) = 0 783 mprotect(0x0000004000ea0000,8192,PROT_READ) = 0 783 mprotect(0x0000004000d88000,8192,PROT_READ) = 0 783 mprotect(0x0000004000c6e000,8192,PROT_READ) = 0 783 mprotect(0x0000004000b64000,8192,PROT_READ) = 0 783 mprotect(0x000000400012c000,16384,PROT_READ) = 0 783 mprotect(0x0000004000a56000,8192,PROT_READ) = 0 783 munmap(0x0000004000a5c000,17171) = 0 783 set_tid_address(274895767616,17171,274887555240,274888752024,274892133624,1) = 783 783 set_robust_list(274895767632,24,274887555240,274888752024,274892133624,1) = -1 errno=38 (Function not implemented) 783 rt_sigaction(32,0x0000004000933760,NULL) = 0 783 rt_sigaction(33,0x0000004000933760,NULL) = -1 errno=22 (Invalid argument) 783 rt_sigprocmask(SIG_UNBLOCK,0x0000004000933960,NULL) = 0 783 getrlimit(3,274887555400,0,8,274893819160,274891036664) = 0 783 rt_sigaction(SIGPIPE,0x00000040009332f0,0x0000004000933388) = 0 783 brk(NULL) = 0x0000004000132000 783 brk(0x0000004000154000) = 0x0000004000132000 783 mmap(NULL,1048576,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS,-1,0) = 0x000000400110a000 783 open("/proc/self/maps",O_RDONLY|O_CLOEXEC) = 3 783 getrlimit(3,274887554544,1,274879156384,274888752024,274895773712) = 0 783 fstat64(3,0x0000004000933090) = 0 783 read(3,0x110a2c0,4096) = 3671 783 close(3) = 0 783 sched_getaffinity(783,32,274895773712,-16,0,274895746512) = 16 783 mmap(0x0000004000134000,8192,PROT_NONE,MAP_PRIVATE|MAP_ANONYMOUS|MAP_FIXED,-1,0) = 0x0000004000134000 783 rt_sigaction(SIGSEGV,0x00000040009334d0,NULL) = 0 783 rt_sigaction(10,0x00000040009334d0,NULL) = 0 783 sigaltstack((nil),0x40009335e8) = 0 783 write(2,0x24887,8)thread ' = 8 783 write(2,0x110a040,4)main = 4 783 write(2,0x2488f,15)' panicked at ' = 15 783 write(2,0x23570,14)explicit panic = 14 783 write(2,0x2489e,3)', = 3 783 write(2,0x2357e,8)panic.rs = 8 783 write(2,0x243de,1): = 1 783 write(2,0x932adf,1)1 = 1 783 write(2,0x23d86,1) = 1 783 write(2,0x248b0,51)note: Run with `RUST_BACKTRACE=1` for a backtrace. = 51 Illegal instruction (core dumped)

With RUST_BACKTRACE

$ QEMU_LD_PREFIX=/usr/sparc64-linux-gnu RUST_BACKTRACE=1 qemu-sparc64-static panic
thread 'main' panicked at 'explicit panic', panic.rs:1
stack backtrace:
Illegal instruction (core dumped)

std for sparc64-linux was built using rustbuild.

No GDB info at this moment.

Meta

$ rustc -V
rustc 1.17.0-dev

$ git rev-parse HEAD
c14f87e3b0823407a91a283796bf78ef83d5fe99
frewsxcv added a commit to frewsxcv/rust that referenced this issue Feb 9, 2017
build std for sparc64-unknown-linux-gnu

r? @alexcrichton

panicking / unwinding is broken (rust-lang#39646) but with std available at least people
will be able to debug that issue on real hardware
@Mark-Simulacrum Mark-Simulacrum added I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics. O-SPARC Target: SPARC processors labels Jun 23, 2017
@Mark-Simulacrum Mark-Simulacrum added the C-bug Category: This is a bug. label Jul 27, 2017
@glaubitz
Copy link
Contributor

I think this can be closed as rustc works stable now on sparc64-unknown-linux-gnu. There are some testsuite failures still, but those can be fixed later.

@sanxiyn
Copy link
Member

sanxiyn commented Feb 23, 2018

Closing.

@sanxiyn sanxiyn closed this as completed Feb 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics. O-SPARC Target: SPARC processors
Projects
None yet
Development

No branches or pull requests

4 participants