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

rustc segmentation fault #58871

Closed
WolfBookyr opened this issue Mar 2, 2019 · 2 comments
Closed

rustc segmentation fault #58871

WolfBookyr opened this issue Mar 2, 2019 · 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. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@WolfBookyr
Copy link

I installed rust with curl https://sh.rustup.rs -sSf | sh. Everything installed correctly except for rustc: stable installed - (error reading rustc version). Cargo and rustup work perfectly fine (except where they use rustc).

Calling cargo run gets stuck with no output and doesn't exit.

Calling rustc --version outputs:
Segmentation fault (core dumped)

System info:

$ rustup which rustc
/home/user/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc

$ cat /etc/*-release
DISTRIB_ID=LinuxMint
DISTRIB_RELEASE=19.1
DISTRIB_CODENAME=tessa
DISTRIB_DESCRIPTION="Linux Mint 19.1 Tessa"
NAME="Linux Mint"
VERSION="19.1 (Tessa)"
ID=linuxmint
ID_LIKE=ubuntu
PRETTY_NAME="Linux Mint 19.1"
VERSION_ID="19.1"
HOME_URL="https://www.linuxmint.com/"
SUPPORT_URL="https://forums.ubuntu.com/"
BUG_REPORT_URL="http://linuxmint-troubleshooting-guide.readthedocs.io/en/latest/"
PRIVACY_POLICY_URL="https://www.linuxmint.com/"
VERSION_CODENAME=tessa
UBUNTU_CODENAME=bionic
cat: /etc/upstream-release: Is a directory

$ uname --all
Linux XXXX 4.15.0-45-generic #48-Ubuntu SMP Tue Jan 29 16:28:13 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

$ lscpu
Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
CPU(s):              12
On-line CPU(s) list: 0-11
Thread(s) per core:  2
Core(s) per socket:  6
Socket(s):           1
NUMA node(s):        1
Vendor ID:           GenuineIntel
CPU family:          6
Model:               158
Model name:          Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz
Stepping:            10
CPU MHz:             880.326
CPU max MHz:         4800.0000
CPU min MHz:         800.0000
BogoMIPS:            7392.00
Virtualisation:      VT-x
L1d cache:           32K
L1i cache:           32K
L2 cache:            256K
L3 cache:            12288K
NUMA node0 CPU(s):   0-11
Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp flush_l1d

Using gdb:

gdb -quiet --args rustc --version
Reading symbols from rustc...done.
(gdb) run
Starting program: /home/user/.cargo/bin/rustc --version
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
process 9374 is executing new program: /home/user/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()

(gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x00007ffff7e8957c in ?? () from /usr/lib/x86_64-linux-gnu/libesets_pac.so
#2  0x00007ffff7e896a0 in fcntl ()
   from /usr/lib/x86_64-linux-gnu/libesets_pac.so
#3  0x0000555555585656 in os_overcommits_proc ()
    at /rustc/2aa4c46cfdd726e97360c2734835aa3515e8c858/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/build/jemalloc-sys-539c8a7040e7c5bc/out/jemalloc/src/pages.c:447
#4  _rjem_je_pages_boot ()
    at /rustc/2aa4c46cfdd726e97360c2734835aa3515e8c858/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/build/jemalloc-sys-539c8a7040e7c5bc/out/jemalloc/src/pages.c:579
#5  0x0000555555561911 in malloc_init_hard_a0_locked ()
    at /rustc/2aa4c46cfdd726e97360c2734835aa3515e8c858/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/build/jemalloc-sys-539c8a7040e7c5bc/out/jemalloc/src/jemalloc.c:1291
#6  0x000055555555c258 in malloc_init_hard ()
    at /rustc/2aa4c46cfdd726e97360c2734835aa3515e8c858/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/build/jemalloc-sys-539c8a7040e7c5bc/out/jemalloc/src/jemalloc.c:1517
#7  malloc_init ()
    at /rustc/2aa4c46cfdd726e97360c2734835aa3515e8c858/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/build/jemalloc-sys-539c8a7040e7c5bc/out/jemalloc/src/jemalloc.c:217
#8  imalloc (sopts=<optimised out>, dopts=<optimised out>)
    at /rustc/2aa4c46cfdd726e97360c2734835aa3515e8c858/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/build/jemalloc-sys-539c8a7040e7c5bc/out/jemalloc/src/jemalloc.c:1986
#9  calloc (num=num@entry=1, size=size@entry=32)
    at /rustc/2aa4c46cfdd726e97360c2734835aa3515e8c858/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/build/jemalloc-sys-539c8a7040e7c5bc/out/jemalloc/src/jemalloc.c:2138
#10 0x00007ffff72677e5 in _dlerror_run (
    operate=operate@entry=0x7ffff72670d0 <dlsym_doit>, 
    args=args@entry=0x7fffffffdcf0) at dlerror.c:140
#11 0x00007ffff7267166 in __dlsym (handle=<optimised out>, 
    name=0x7ffff7eb3297 "open") at dlsym.c:70
#12 0x00007ffff7e867c9 in ?? () from /usr/lib/x86_64-linux-gnu/libesets_pac.so
#13 0x00007ffff7e87aa7 in ?? () from /usr/lib/x86_64-linux-gnu/libesets_pac.so
#14 0x00007ffff7eb3256 in ?? () from /usr/lib/x86_64-linux-gnu/libesets_pac.so
#15 0x0000000000000002 in ?? ()
#16 0x0000000000000001 in ?? ()
#17 0x0000000000000002 in ?? ()
#18 0x00007ffff7e8589b in ?? () from /usr/lib/x86_64-linux-gnu/libesets_pac.so
#19 0x0000000000000002 in ?? ()
#20 0x00007ffff7de56ec in call_init (env=0x7fffffffde30, argv=0x7fffffffde18,env=0x7fffffffde30) at dl-init.c:119
#22 0x00007ffff7dd60ca in _dl_start_user () from /lib64/ld-linux-x86-64.so.2
#23 0x0000000000000002 in ?? ()
#24 0x00007fffffffe16b in ?? ()
#25 0x00007fffffffe1b4 in ?? ()
#26 0x0000000000000000 in ?? ()

Unlike this issue #52772 strace does not fix it.

Is there a way to fix this? Is there any more info you would need to help identify the cause of this?

@jonas-schievink jonas-schievink added I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. C-bug Category: This is a bug. labels Mar 2, 2019
@nagisa
Copy link
Member

nagisa commented Mar 2, 2019

If the backtrace is in any way correct, this is caused by some sort of antivirus software. See #56736 for a similar issue. Should report to your vendor rather than here.

@WolfBookyr
Copy link
Author

You are indeed correct. Disabling antivirus fixed it. Thanks a lot for the help.

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. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants