Skip to content

Clippy crashes due to SIGABRT (signal: 6, SIGABRT: process abort signal) #14437

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

Open
nandotorterolo opened this issue Mar 19, 2025 · 8 comments
Labels
C-bug Category: Clippy is not doing the correct thing I-ICE Issue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@nandotorterolo
Copy link

Description

Hi, I am not sure how to report this bug, (possibly it is not a bug), but I don't know how to proceed.
I appreciate any suggestion that you can provide me and be able to run clippy, and obtain the root cause of the issue.

Many thanks,
Fernando

> cargo clippy
error: process didn't exit successfully: `/home/fernando/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/clippy-driver /home/fernando/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc -vV` (signal: 6, SIGABRT: process abort signal)
--- stdout
rustc 1.85.1 (4eb161250 2025-03-15)
binary: rustc
commit-hash: 4eb161250e340c8f48f66e2b929ef4a5bed7c181
commit-date: 2025-03-15
host: x86_64-unknown-linux-gnu
release: 1.85.1
LLVM version: 19.1.7

--- stderr
double free or corruption (out)

double free or corruption (out)
[1]    4363 IOT instruction (core dumped)  cargo clippy
exit 134
~/.cargo/bin> ./clippy-driver -V
clippy 0.1.85 (4eb161250e 2025-03-15)
free(): double free detected in tcache 2
[1]    4711 IOT instruction (core dumped)  ./clippy-driver -V
exit 134

~/.cargo/bin> lsb_release -a
No LSB modules are available.
Distributor ID: Neon
Description:    KDE neon 6.3
Release:        24.04
Codename:       noble
> rustup toolchain list
stable-x86_64-unknown-linux-gnu (active, default)
nightly-x86_64-unknown-linux-gnu

Similar closed issues:

Version

rustc 1.85.1 (4eb161250 2025-03-15)
binary: rustc
commit-hash: 4eb161250e340c8f48f66e2b929ef4a5bed7c181
commit-date: 2025-03-15
host: x86_64-unknown-linux-gnu
release: 1.85.1
LLVM version: 19.1.7

Additional Labels

No response

@blyxyas
Copy link
Member

blyxyas commented Mar 19, 2025

Hi! Do you have a minimal reproducible example or a codebase that you could share? (The ideal scenario is that it's as small as possible)

@blyxyas blyxyas added I-ICE Issue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️ C-bug Category: Clippy is not doing the correct thing labels Mar 19, 2025
@nandotorterolo
Copy link
Author

nandotorterolo commented Mar 19, 2025

Thank you for your help Alejandra, @blyxyas
I am available to do a screen/remote session if works for you. I am not able to use clippy in all scenarios, for example this simple scenario. Possibly there is something on my local that crash, but I don't know which is the root cause, and I would like solve it, maybe my issue helps to debug clippy-ecosystem on your side.

~>  cargo new hello_cargo
    Creating binary (application) `hello_cargo` package
note: see more `Cargo.toml` keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
hello_cargo> cargo run
   Compiling hello_cargo v0.1.0 (/home/fernando/plasma/hello_cargo)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.53s
     Running `target/debug/hello_cargo`
Hello, world!
hello_cargo> cargo clippy
error: process didn't exit successfully: `/home/fernando/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/clippy-driver /home/fernando/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc -vV` (signal: 6, SIGABRT: process abort signal)
--- stdout
rustc 1.85.1 (4eb161250 2025-03-15)
binary: rustc
commit-hash: 4eb161250e340c8f48f66e2b929ef4a5bed7c181
commit-date: 2025-03-15
host: x86_64-unknown-linux-gnu
release: 1.85.1
LLVM version: 19.1.7

--- stderr
double free or corruption (out)

double free or corruption (out)
[1]    41341 IOT instruction (core dumped)  cargo clippy
exit 134
?master ~/plasma/hello_cargo> 

@blyxyas
Copy link
Member

blyxyas commented Mar 19, 2025

Just to rule some possibilities I've looked into: What CPU do you have? And just to make sure, and does this still happen on today's nightly?

You can check out the first thing with lscpu, and then second with rustup install nightly-2025-03-19.
While you submit that information, I'll go check Clippy with miri for some weird UB.

If I can't find anything, I'm open to do a live debugging session.

@nandotorterolo
Copy link
Author

lscpu

Architecture:             x86_64
  CPU op-mode(s):         32-bit, 64-bit
  Address sizes:          43 bits physical, 48 bits virtual
  Byte Order:             Little Endian
CPU(s):                   8
  On-line CPU(s) list:    0-7
Vendor ID:                AuthenticAMD
  Model name:             AMD Ryzen 7 3750H with Radeon Vega Mobile Gfx
    CPU family:           23
    Model:                24
    Thread(s) per core:   2
    Core(s) per socket:   4
    Socket(s):            1
    Stepping:             1
    Frequency boost:      enabled
    CPU(s) scaling MHz:   94%
    CPU max MHz:          2300,0000
    CPU min MHz:          1400,0000
    BogoMIPS:             4591,21
    Flags:                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmp
                          erf rapl pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw skinit wdt tce topoext perfc
                          tr_core perfctr_nb bpext perfctr_llc mwaitx cpb hw_pstate ssbd ibpb vmmcall fsgsbase bmi1 avx2 smep bmi2 rdseed adx smap clflushopt sha_ni xsaveopt xsavec xgetbv1 clzero irperf xsaveerptr arat npt lbrv svm_lock
                           nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif overflow_recov succor smca sev sev_es
Virtualization features:  
  Virtualization:         AMD-V
Caches (sum of all):      
  L1d:                    128 KiB (4 instances)
  L1i:                    256 KiB (4 instances)
  L2:                     2 MiB (4 instances)
  L3:                     4 MiB (1 instance)
NUMA:                     
  NUMA node(s):           1
  NUMA node0 CPU(s):      0-7
Vulnerabilities:          
  Gather data sampling:   Not affected
  Itlb multihit:          Not affected
  L1tf:                   Not affected
  Mds:                    Not affected
  Meltdown:               Not affected
  Mmio stale data:        Not affected
  Reg file data sampling: Not affected
  Retbleed:               Mitigation; untrained return thunk; SMT vulnerable
  Spec rstack overflow:   Mitigation; Safe RET
  Spec store bypass:      Mitigation; Speculative Store Bypass disabled via prctl
  Spectre v1:             Mitigation; usercopy/swapgs barriers and __user pointer sanitization
  Spectre v2:             Mitigation; Retpolines; IBPB conditional; STIBP disabled; RSB filling; PBRSB-eIBRS Not affected; BHI Not affected
  Srbds:                  Not affected
  Tsx async abort:        Not affected

@nandotorterolo
Copy link
Author

nandotorterolo commented Mar 19, 2025

does this output means that my rust stable toolchain is broken?

nightly-2025-03-19-x86_64-unknown-linux-gnu installed - rustc 1.87.0-nightly (75530e9f7 2025-03-18)

info: checking for self-update
?master ~/plasma/hello_cargo> rustup toolchain list
stable-x86_64-unknown-linux-gnu (active, default)
nightly-x86_64-unknown-linux-gnu
nightly-2025-03-19-x86_64-unknown-linux-gnu

?master ~/plasma/hello_cargo> cargo +nightly-2025-03-19-x86_64-unknown-linux-gnu clippy
    Checking hello_cargo v0.1.0 (/home/fernando/plasma/hello_cargo)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.22s             <<<<<< works

?master ~/plasma/hello_cargo> cargo +nightly-x86_64-unknown-linux-gnu clippy
    Checking hello_cargo v0.1.0 (/home/fernando/plasma/hello_cargo)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.61s            <<<<<<< works

?master ~/plasma/hello_cargo> cargo +stable-x86_64-unknown-linux-gnu clippy      <<< didn't work
error: process didn't exit successfully: `/home/fernando/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/clippy-driver /home/fernando/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc -vV` (signal: 6, SIGABRT: process abort signal)
--- stdout
rustc 1.85.1 (4eb161250 2025-03-15)
binary: rustc
commit-hash: 4eb161250e340c8f48f66e2b929ef4a5bed7c181
commit-date: 2025-03-15
host: x86_64-unknown-linux-gnu
release: 1.85.1
LLVM version: 19.1.7

--- stderr
double free or corruption (out)

double free or corruption (out)
[1]    51274 IOT instruction (core dumped)  cargo +stable-x86_64-unknown-linux-gnu clippy
exit 134
?master ~/plasma/hello_cargo> 

@blyxyas
Copy link
Member

blyxyas commented Mar 19, 2025

It could mean several things:

  • For some weird reason your toolchain has been modified in some weird way.
  • The stable toolchain is being applied an optimization that breaks it, maybe coming from Clippy or maybe coming from Rustc
  • The issue has been resolved between the 1.85.1 stable and today.

Checking your CPU, it doesn't seem to have a reported issue related to this and your architecture seems pretty common.
Could you share the output of RUSTC_LOG=debug cargo clippy? (Probably in a compressed file, it's usually very long)

@blyxyas blyxyas closed this as completed Mar 19, 2025
@blyxyas blyxyas reopened this Mar 19, 2025
@nandotorterolo
Copy link
Author

RUSTC_LOG=debug cargo clippy

main ~/plasma/plasma-consensus> RUSTC_LOG=debug cargo clippy
error: process didn't exit successfully: `/home/fernando/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/clippy-driver /home/fernando/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc -vV` (signal: 6, SIGABRT: process abort signal)
--- stdout
rustc 1.86.0 (05f9846f8 2025-03-31)
binary: rustc
commit-hash: 05f9846f893b09a1be1fc8560e33fc3c815cfecb
commit-date: 2025-03-31
host: x86_64-unknown-linux-gnu
release: 1.86.0
LLVM version: 19.1.7

--- stderr
double free or corruption (out)

double free or corruption (out)
[1]    12019 IOT instruction (core dumped)  RUSTC_LOG=debug cargo clippy
exit 134

@nandotorterolo
Copy link
Author

main ~> coredumpctl gdb           
           PID: 9555 (clippy-driver)
           UID: 1000 (fernando)
           GID: 1000 (fernando)
        Signal: 6 (ABRT)
     Timestamp: Mon 2025-04-07 12:06:39 -03 (35min ago)
  Command Line: /home/fernando/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/clippy-driver /home/fernando/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc -vV
    Executable: /home/fernando/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/clippy-driver
 Control Group: /user.slice/user-1000.slice/[email protected]/app.slice/[email protected]
          Unit: [email protected]
     User Unit: [email protected]
         Slice: user-1000.slice
     Owner UID: 1000 (fernando)
       Boot ID: ebb52f110d01481091389b3d04babd16
    Machine ID: 0739ae941e584e33b6a2ac2ffc4e4f41
      Hostname: fernando-um700
       Storage: /var/lib/systemd/coredump/core.clippy-driver.1000.ebb52f110d01481091389b3d04babd16.9555.1744038399000000.zst (present)
  Size on Disk: 2.4M
       Message: Process 9555 (clippy-driver) of user 1000 dumped core.
                
                Module /home/fernando/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/clippy-driver without build-id.
                Module /home/fernando/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/clippy-driver
                Module libstdc++.so.6 from deb gcc-14-14.2.0-4ubuntu2~24.04.amd64
                Module libzstd.so.1 from deb libzstd-1.5.5+dfsg2-2build1.1.amd64
                Module libgcc_s.so.1 from deb gcc-14-14.2.0-4ubuntu2~24.04.amd64
                Module libnxegl.so without build-id.
                Stack trace of thread 9555:
                #0  0x00007ffff049eb2c __pthread_kill_implementation (libc.so.6 + 0x9eb2c)
                #1  0x00007ffff044527e __GI_raise (libc.so.6 + 0x4527e)
                #2  0x00007ffff04288ff __GI_abort (libc.so.6 + 0x288ff)
                #3  0x00007ffff04297b6 __libc_message_impl (libc.so.6 + 0x297b6)
                #4  0x00007ffff04a8ff5 malloc_printerr (libc.so.6 + 0xa8ff5)
                #5  0x00007ffff04ab120 _int_free_merge_chunk (libc.so.6 + 0xab120)
                #6  0x00007ffff04addae __GI___libc_free (libc.so.6 + 0xaddae)
                #7  0x00007fffde19d215 n/a (libLLVM.so.19.1 + 0x139d215)
                #8  0x00007ffff0447382 __cxa_finalize (libc.so.6 + 0x47382)
                #9  0x00007fffddb6ad67 n/a (libLLVM.so.19.1 + 0xd6ad67)
                #10 0x00007ffff7fc60f2 _dl_call_fini (ld-linux-x86-64.so.2 + 0x10f2)
                #11 0x00007ffff7fca578 _dl_fini (ld-linux-x86-64.so.2 + 0x5578)
                #12 0x00007ffff0447a76 __run_exit_handlers (libc.so.6 + 0x47a76)
                #13 0x00007ffff0447bbe __GI_exit (libc.so.6 + 0x47bbe)
                #14 0x00007ffff6425ef5 n/a (n/a + 0x0)
                #15 0x00007ffff6425ee0 n/a (n/a + 0x0)
                #16 0x00005555558c1ca2 n/a (/home/fernando/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/clippy-driver + 0x36dca2)
                ELF object binary architecture: AMD x86-64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Clippy is not doing the correct thing I-ICE Issue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

2 participants