vmatare / thinkfan

The minimalist fan control program
GNU General Public License v3.0
552 stars 62 forks source link

Segmentation fault #137

Closed josgutie closed 3 years ago

josgutie commented 3 years ago
ERROR: Segmentation fault.
Backtrace:
thinkfan(+0x29a63) [0x55f99bb3fa63]
thinkfan(thinkfan::Error::Error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)+0x51) [0x55f99bb3ff61]
thinkfan(thinkfan::Bug::Bug(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)+0xd) [0x55f99bb400cd]
thinkfan(+0x123b7) [0x55f99bb283b7]
/lib64/libpthread.so.0(+0x13a20) [0x7f3fec27ba20]
thinkfan(thinkfan::ComplexLevel::down() const+0x2d) [0x55f99bb3362d]
thinkfan(thinkfan::StepwiseMapping::init_fanspeed(thinkfan::TemperatureState const&)+0x3e) [0x55f99bb3480e]
thinkfan(thinkfan::run(thinkfan::Config const&)+0x78) [0x55f99bb396d8]
thinkfan(main+0x309) [0x55f99bb32879]
/lib64/libc.so.6(__libc_start_main+0xd5) [0x7f3febe1db75]
thinkfan(_start+0x2e) [0x55f99bb334ce]

I've attached the configuration file, it's a Lenovo P1 Gen3.

vmatare commented 3 years ago

@josgutie I think your attachment got lost somehow. Could you just copy&paste your config in a comment, please?

josgutie commented 3 years ago
fans:
  - tpacpi: /proc/acpi/ibm/fan
sensors:
 - hwmon: /sys/devices/platform/coretemp.0/hwmon
   name: coretemp
   indices: [1,2,3,4,5,6,7]
 - hwmon: /sys/devices/platform/thinkpad_hwmon/hwmon
   name: thinkpad
   indices: [1,3,4,5,6,7]
 - hwmon: /sys/devices/virtual/thermal/thermal_zone0/device/thermal_zone/hwmon1
   name: acpitz
   indices: [1]
levels:
  - speed: 0
    lower_limit: 0
    upper_limit: 50

  - speed: 1 
    lower_limit: 50
    upper_limit: 60

  - speed: 2  
    lower_limit: 60
    upper_limit: 65

  - speed: 3
    lower_limit: 65
    upper_limit: 70

  - speed: 4
    lower_limit: 70 
    upper_limit: 75

  - speed: 5
    lower_limit: 75
    upper_limit: 80

  - speed: 6
    lower_limit: 80
    upper_limit: 85

  - speed: 7
    lower_limit: 85
    upper_limit: 32767
josgutie commented 3 years ago

Config file uploaded.

Thank you very much

boytunp commented 3 years ago
\ERROR: Segmentation fault.
Backtrace:
thinkfan(+0x3c9e5) [0x55bf910a49e5]
thinkfan(thinkfan::Bug::Bug(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)+0x51) [0x55bf910a6be1]
thinkfan(+0x1c05d) [0x55bf9108405d]
/usr/lib/libpthread.so.0(+0x13870) [0x7f9a1436f870]
thinkfan(thinkfan::ComplexLevel::down() const+0x30) [0x55bf91090a30]
thinkfan(thinkfan::StepwiseMapping::init_fanspeed(thinkfan::TemperatureState const&)+0x3e) [0x55bf91090cce]
thinkfan(thinkfan::run(thinkfan::Config const&)+0x80) [0x55bf9108d670]
thinkfan(main+0x363) [0x55bf9108b9c3]
/usr/lib/libc.so.6(__libc_start_main+0xd5) [0x7f9a13f09b25]
thinkfan(_start+0x2e) [0x55bf9108c35e]

This is probably a bug. Please consider reporting this at https://github.com/vmatare/thinkfan/issues. Thanks.

sensors:
  - hwmon: /sys/class/hwmon
    name: coretemp 
    indices: [1]
################################################################
fans:
  - tpacpi: /proc/acpi/ibm/fan

levels:
  - speed: 0
    upper_limit: 47

  - speed: 1
    lower_limit: 47
    upper_limit: 55

  - speed: 2
    lower_limit: 55
    upper_limit: 60

  - speed: 4
    lower_limit: 60
    upper_limit: 65

  - speed: 5
    lower_limit: 65
    upper_limit: 73

  - speed: 6
    lower_limit: 73
    upper_limit: 80

  - speed: 7
    lower_limit: 80
vmatare commented 3 years ago

There is an error in your config which wasn't being handled properly. I've pushed some updates that should give you a helpful error message. @josgutie, @boytunp, please test and let me know whether the message is helpful.

boytunp commented 3 years ago

Yes now it correctly shows the errors in the config. TYVM!