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

error: illegal hardware instruction #35

Open
don-dolarson opened this issue Dec 13, 2023 · 7 comments
Open

error: illegal hardware instruction #35

don-dolarson opened this issue Dec 13, 2023 · 7 comments
Labels
bug Something isn't working

Comments

@don-dolarson
Copy link

Problem

Just installed it on Debian 12 LXQt and trying to run it with & without sudo but a window just flashes and that's it.

$ fan-control
[1]    39111 illegal hardware instruction  fan-control
$ sudo fan-control
error: XDG_RUNTIME_DIR is invalid or not set in the environment.
error: XDG_RUNTIME_DIR is invalid or not set in the environment.
error: XDG_RUNTIME_DIR is invalid or not set in the environment.
[1]    86757 illegal hardware instruction  sudo fan-control

Tried to set the XDG_RUNTIME_DIR variable but it's still the same

export XDG_RUNTIME_DIR="/tmp/xdg"
mkdir -p /tmp/xdg; chmod 0700 /tmp/xdg

Steps

No response

Possible Solution(s)

No response

Notes

No response

Version

No response

@don-dolarson don-dolarson added the bug Something isn't working label Dec 13, 2023
@wiiznokes
Copy link
Owner

error: XDG_RUNTIME_DIR is invalid or not set in the environment.

I have the same message on my machine, it works anyways.

Can you share what architecture you're running? I suspect you're on ARM or somethings

@wiiznokes
Copy link
Owner

Looking a bit on the internet, i suspect you're running an old CPU, that don't support an instruction used by the app. But i'm not aware of anythings unusual i use.

You should try to run with logs:

export RUST_LOG=debug
fan-control

I also thinks if you build the app yourself, it will works

@don-dolarson
Copy link
Author

That's right, I'm trying to run it on an old Intel(R) Core(TM)2 Duo CPU T7500.

Tried to built it myself now. cargo package is needed too, to run the cargo cmd.

I maybe do something wrong here as I'm a 6 months linux user, but:

git clone https://github.com/wiiznokes/fan-control.git
cd fan-control
make libsensors
...
Updating ...
...
Download...
...
cargo run --release
error: package `toml_datetime v0.6.3` cannot be built because it requires rustc 1.64.0 or newer, while the currently active rustc version is 1.63.0
Either upgrade to rustc 1.64.0 or newer, or use
cargo update -p toml_datetime@0.6.3 --precise ver
where `ver` is the latest version of `toml_datetime` supporting rustc 1.63.0

Latest version in repo at the moment is 1.63.0+dfsg1-2

@wiiznokes
Copy link
Owner

wiiznokes commented Dec 13, 2023

I maybe do something wrong here as I'm a 6 months linux user, but:

You're not doing anythings wrong, it's just that debian does'nt provide the latest package, it's more of a stable distro. So you will have to install Rust the manual way (and the recommended way btw). Don't worry, it's just one command: https://www.rust-lang.org/tools/install.

Don't forget to remove the cargo package you installed via apt, sudo apt remove cargo, to be sure to use the right cargo command.

I'm still curious about the log, it will show what state the app reach before it crash.
And for reference, please, provide the output of lscpu. It will list the feature your CPU support.

@don-dolarson
Copy link
Author

don-dolarson commented Dec 16, 2023

So you will have to install Rust the manual way (and the recommended way btw).

Good to know. Thanks.

❯ lscpu                    
Architecture:            x86_64
  CPU op-mode(s):        32-bit, 64-bit
  Address sizes:         36 bits physical, 48 bits virtual
  Byte Order:            Little Endian
CPU(s):                  2
  On-line CPU(s) list:   0,1
Vendor ID:               GenuineIntel
  Model name:            Intel(R) Core(TM)2 Duo CPU     T7500  @ 2.20GHz
    CPU family:          6
    Model:               15
    Thread(s) per core:  1
    Core(s) per socket:  2
    Socket(s):           1
    Stepping:            10
    Frequency boost:     enabled
    CPU(s) scaling MHz:  100%
    CPU max MHz:         2201.0000
    CPU min MHz:         800.0000
    BogoMIPS:            4388.79
    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 ht tm pbe 
                         syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl cpuid aperfmperf pni dtes64 monitor ds_cpl vmx est tm2
                          ssse3 cx16 xtpr pdcm lahf_lm pti tpr_shadow vnmi flexpriority vpid dtherm ida
Virtualization features: 
  Virtualization:        VT-x
Caches (sum of all):     
  L1d:                   64 KiB (2 instances)
  L1i:                   64 KiB (2 instances)
  L2:                    4 MiB (1 instance)
NUMA:                    
  NUMA node(s):          1
  NUMA node0 CPU(s):     0,1
Vulnerabilities:         
  Gather data sampling:  Not affected
  Itlb multihit:         KVM: Mitigation: VMX disabled
  L1tf:                  Mitigation; PTE Inversion; VMX conditional cache flushes, SMT disabled
  Mds:                   Vulnerable: Clear CPU buffers attempted, no microcode; SMT disabled
  Meltdown:              Mitigation; PTI
  Mmio stale data:       Unknown: No mitigations
  Retbleed:              Not affected
  Spec rstack overflow:  Not affected
  Spec store bypass:     Vulnerable
  Spectre v1:            Mitigation; usercopy/swapgs barriers and __user pointer sanitization
  Spectre v2:            Mitigation; Retpolines, STIBP disabled, RSB filling, PBRSB-eIBRS Not affected
  Srbds:                 Not affected
  Tsx async abort:       Not affected

I've compiled the app and at the end of the building, it tried to start itself but a window just flashed with an error in the terminal "Illegal instruction". When I try to run it from "~/Downloads/fan-control/fan-control/target/release$" ./fan-control, the very same error appears as when installing the pre-build .deb package (with different numbers at the beginning) [1] 39310 illegal hardware instruction ./fan-control.

Can't see anything in the journal though the export RUST_LOG=debug command has been executed.

@zhangjing-GitHub-Code
Copy link

(with different numbers at the beginning) [1] 39310 illegal hardware instruction ./fan-control.

The number is the died PID( if you don't know what PID is, just do nothing with it ).

Can't see anything in the journal though the export RUST_LOG=debug command has been executed.

Can you execute strace (fancontrol_command) ?
If 'command not found', install by apt install strace.
That will show what library functions the app calls. ( but sorry I'm not good at debugging with strace )
@don-dolarson

@wiiznokes
Copy link
Owner

You should try the flatpak version, i hope it fix your issue

@wiiznokes wiiznokes changed the title Application not running at all error: illegal hardware instruction Jun 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants