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: Unhandled std::length_error: basic_string::_M_replace_aux. #128

Open
marco-parillo opened this issue Feb 25, 2021 · 3 comments
Open

Comments

@marco-parillo
Copy link

$ sudo thinkfan -n
[sudo] password for mparillo: 
ERROR: Unhandled std::length_error: basic_string::_M_replace_aux.
errno = No such file or directory.
Backtrace:
thinkfan(+0x37835) [0x556f9b74e835]
thinkfan(+0x205b2) [0x556f9b7375b2]
/usr/lib/libstdc++.so.6(+0xa2d3a) [0x7f3a7a74dd3a]
/usr/lib/libstdc++.so.6(+0xa2da7) [0x7f3a7a74dda7]
/usr/lib/libstdc++.so.6(+0xa304e) [0x7f3a7a74e04e]
/usr/lib/libstdc++.so.6(std::__throw_length_error(char const*)+0x45) [0x7f3a7a74455f]
/usr/lib/libstdc++.so.6(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(unsigned long, char)+0) [0x7f3a7a7e9ca0]
thinkfan(thinkfan::Config::try_read_config(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)+0x202) [0x556f9b73e4d2]
thinkfan(thinkfan::Config::read_config(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)+0x1a) [0x556f9b73f4da]
thinkfan(main+0x311) [0x556f9b738731]
/usr/lib/libc.so.6(__libc_start_main+0xd5) [0x7f3a7a4e9b25]
thinkfan(_start+0x2e) [0x556f9b73916e]

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

If it helps:

$ inxi -Fazy
System:
  Kernel: 5.11.1-arch1-1 x86_64 bits: 64 compiler: gcc v: 10.2.1 
  parameters: BOOT_IMAGE=/vmlinuz-linux 
  root=UUID=5254b91f-12c0-431c-bb4b-92f786328283 rw loglevel=3 
  Desktop: KDE Plasma 5.21.1 tk: Qt 5.15.2 wm: kwin_x11 dm: SDDM 
  Distro: Arch Linux 
Machine:
  Type: Laptop System: LENOVO product: 2522BH1 v: ThinkPad T410 
  serial: <filter> Chassis: type: 10 serial: <filter> 
  Mobo: LENOVO model: 2522BH1 serial: <filter> BIOS: LENOVO 
  v: 6IET84WW (1.44 ) date: 09/26/2012 
Battery:
  ID-1: BAT0 charge: 15.2 Wh condition: 15.2/93.2 Wh (16%) volts: 12.6/11.1 
  model: SANYO 42T4799 type: Li-ion serial: <filter> status: Full 
CPU:
  Info: Dual Core model: Intel Core i5 M 520 bits: 64 type: MT MCP 
  arch: Nehalem family: 6 model-id: 25 (37) stepping: 5 microcode: 3 
  L2 cache: 3 MiB 
  flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 bogomips: 19156 
  Speed: 1436 MHz min/max: 1199/2400 MHz boost: enabled Core speeds (MHz): 
  1: 1436 2: 1403 3: 1246 4: 1463 
  Vulnerabilities: Type: itlb_multihit status: KVM: VMX unsupported 
  Type: l1tf mitigation: PTE Inversion 
  Type: mds 
  status: Vulnerable: Clear CPU buffers attempted, no microcode; SMT vulnerable 
  Type: meltdown mitigation: PTI 
  Type: spec_store_bypass status: Vulnerable 
  Type: spectre_v1 
  mitigation: usercopy/swapgs barriers and __user pointer sanitization 
  Type: spectre_v2 
  mitigation: Full generic retpoline, STIBP: disabled, RSB filling 
  Type: srbds status: Not affected 
  Type: tsx_async_abort status: Not affected 
Graphics:
  Device-1: Intel Core Processor Integrated Graphics vendor: Lenovo 
  driver: i915 v: kernel bus ID: 00:02.0 chip ID: 8086:0046 class ID: 0300 
  Device-2: Chicony Integrated Camera type: USB driver: uvcvideo 
  bus ID: 1-1.6:5 chip ID: 17ef:480f class ID: 0e02 
  Display: x11 server: X.Org 1.20.10 compositor: kwin_x11 driver: 
  loaded: intel unloaded: modesetting alternate: fbdev,vesa display ID: :0 
  screens: 1 
  Screen-1: 0 s-res: 1440x900 s-dpi: 96 s-size: 381x238mm (15.0x9.4") 
  s-diag: 449mm (17.7") 
  Monitor-1: LVDS1 res: 1440x900 hz: 60 dpi: 122 size: 300x190mm (11.8x7.5") 
  diag: 355mm (14") 
  Message: Unable to show advanced data. Required tool glxinfo missing. 
Audio:
  Device-1: Intel 5 Series/3400 Series High Definition Audio vendor: Lenovo 
  driver: snd_hda_intel v: kernel bus ID: 00:1b.0 chip ID: 8086:3b56 
  class ID: 0403 
  Sound Server: ALSA v: k5.11.1-arch1-1 
Network:
  Device-1: Intel 82577LM Gigabit Network vendor: Lenovo driver: e1000e 
  v: kernel port: 1820 bus ID: 00:19.0 chip ID: 8086:10ea class ID: 0200 
  IF: enp0s25 state: down mac: <filter> 
  Device-2: Intel Centrino Advanced-N 6200 driver: iwlwifi v: kernel 
  port: 1880 bus ID: 03:00.0 chip ID: 8086:4239 class ID: 0280 
  IF: wlp3s0 state: up mac: <filter> 
Bluetooth:
  Device-1: Broadcom Corp Broadcom Bluetooth Device type: USB driver: btusb 
  v: 0.8 bus ID: 1-1.4:4 chip ID: 0a5c:217f class ID: fe01 serial: <filter> 
  Message: Required tool hciconfig not installed. Check --recommends 
Drives:
  Local Storage: total: 149.05 GiB used: 28.34 GiB (19.0%) 
  SMART Message: Unable to run smartctl. Root privileges required. 
  ID-1: /dev/sda maj-min: 8:0 vendor: Hitachi model: HTS725016A9A364 
  size: 149.05 GiB block size: physical: 512 B logical: 512 B speed: 3.0 Gb/s 
  rotation: 7200 rpm serial: <filter> rev: C70F scheme: MBR 
Partition:
  ID-1: / raw size: 148.34 GiB size: 145.01 GiB (97.76%) 
  used: 28.27 GiB (19.5%) fs: ext4 dev: /dev/sda2 maj-min: 8:2 
  ID-2: /boot raw size: 212 MiB size: 201.3 MiB (94.95%) 
  used: 72.8 MiB (36.2%) fs: ext4 dev: /dev/sda1 maj-min: 8:1 
Swap:
  Kernel: swappiness: 60 (default) cache pressure: 100 (default) 
  ID-1: swap-1 type: partition size: 512 MiB used: 0 KiB (0.0%) priority: -2 
  dev: /dev/sda3 maj-min: 8:3 
Sensors:
  System Temperatures: cpu: 55.0 C mobo: 0.0 C 
  Fan Speeds (RPM): cpu: 3685 
Info:
  Processes: 172 Uptime: 5h 24m wakeups: 1 Memory: 3.64 GiB 
  used: 1.58 GiB (43.3%) Init: systemd v: 247 Compilers: gcc: 10.2.0 
  clang: 11.1.0 Packages: pacman: 892 lib: 194 Shell: Bash v: 5.1.4 
  running in: konsole inxi: 3.3.01 
@vmatare
Copy link
Owner

vmatare commented Apr 15, 2021

Hi @marco-parillo, thanks for reporting. This issue looks unfamiliar to me and the auto-generated stack trace doesn't give me enough of a hint at what could be going wrong. Could you please:

  1. Post your thinkfan config file
  2. After thinkfan has crashed, generate a better stacktrace with: coredumpctl debug thinkfan -A "-ex bt -ex quit"

@vmatare
Copy link
Owner

vmatare commented Apr 9, 2022

Closing due to lack of information that would allow reproducing the issue.

@vmatare vmatare closed this as completed Apr 9, 2022
@TommiRommi
Copy link

funny how i have this exact same issue
thinkfan config file

##############################################################################
# thinkfan Example Config File
# ============================
#
# Please read the config manpage thinkfan.conf(5) before playing around with
# this.
#
# This is NOT a working config file that can just be copied. It is only meant
# to give a rough idea what can be done. In particular, don't copy & paste the
# fan speed config! Think about what you're doing.
#
# If you don't know what temperatures are right for your system, you should
# not be using thinkfan!
##############################################################################


##############################################################################
# Sensor Drivers and Temperature Inputs
# =====================================
#
# ATTENTION: The order in which sensors are specified here is significant when
# specifying the fan speeds further below!
#
# There are multiple ways in which a temperature input can be specified. An
# example for each is given below.
#
# The "correction:" and "optional:" keywords may be specified on any type of
# sensor.

sensors:
  # LM Sensors
  # ==========
  # Temperatures can be read directly from Linux drivers through the LM sensors.
  #
  # To configure this, install "lm-sensors" and "libsensors", then
  # run "sensors-detect", then run "sensors".
  # To build thinkfan from sources, you'll also need to install "libsensors-dev"
  # or equivalent package for your distribution.
  #
  # For example, the following output of "sensors":
  # ...
  # thinkpad-isa-0000
  # Adapter: ISA adapter
  # fan1:        2618 RPM
  # fan2:        2553 RPM
  # CPU:          +63.0 C
  # GPU 1:        +55.0 C
  # temp3:        +68.0 C
  # temp4:         +0.0 C
  # temp5:        +60.0 C
  # temp6:        +64.0 C
  # temp7:        +67.0 C
  # temp8:         +0.0 C
  # ...
  # would result in the following configuration:
  - chip: thinkpad-isa-0000
    ids: [ CPU, "GPU 1", temp3, temp4, temp5, temp6, temp7, temp8 ]

  # hwmon: Full path to a temperature file (single sensor).
  # =======================================================
  # Disadvantage is that the index in "hwmon0" depends on the load order of
  # the driver modules, which may change across bootups on some systems.
  - hwmon: /sys/class/hwmon/hwmon0/temp1_input

  # hwmon: Path to a complete driver folder
  # =======================================
  # Individual sensors need to be picked out with the "indices:" keyword.
  # This can be used with a stable path that does not depend on driver load
  # order. However certain drivers may not appear under such a stable path.
  - hwmon: /sys/devices/pci0000:00/0000:00:03.1/0000:27:00.0/hwmon
    indices: [1, 2, 5, 6] # adds 4 temperature sensors
    correction: [0, 0, 0, -5] # add -5 °C to temp6_input

  # hwmon: Base path with name-based search
  # =======================================
  # Thinkfan will search under the given path for a hwmon driver that has a
  # file called "name" which contains the given name. This method should work
  # with all hwmon drivers and is robust against driver load order.
  - hwmon: /sys/class/hwmon
    name: k10temp
    indices: [1]

  # Sensors can also be optional, e.g. in case of removable hardware
  - hwmon: /sys/class/block/sdc/device/hwmon
    indices: [1]
    optional: true # don't exit if the sensor can't be read

  # atasmart: Read the temperature from a hard disk via S.M.A.R.T
  # =============================================================
  # Note that this is unreasonably CPU-intensive. Since Linux 5.6, the kernel
  # can report the temperatures of hard disks via the hwmon interface (see the
  # example above), which should be preferred if available.
  #
  # This is only available if thinkfan was compiled with USE_ATASMART enabled.
  - atasmart: /dev/sda

  # tpacpi: Legacy interface to the thinkpad_acpi driver
  # ====================================================
  # Particularly on older Thinkpad laptops, this interface may give access to
  # 8-16 temperature sensors, but it may be hard to tell where/what exactly
  # they measure.
  # Some documentation for older models may be found at the thinkpad wiki:
  # https://www.thinkwiki.org/wiki/Thermal_Sensors
  #
  # Note that the hwmon interface is to be preferred nowadays.
  - tpacpi: /proc/acpi/ibm/thermal
    # Some of the temperature entries in /proc/acpi/ibm/thermal may be
    # irrelevant or unused, so individual ones can be selected:
    indices: [1, 2, 3, 4]

  # nvml: The proprietary nVidia driver
  # ===================================
  # Temperatures can be read directly from nVidia GPUs that run with the
  # proprietary driver. The "nvml:" entry must specify the PCI bus ID of the
  # GPU (can be found with lspci)
  #
  # Note that this does not work with the open-source "nouveau" driver. Open
  # source drivers should support the hwmon interface instead (see above).
  - nvml: 27:00.0

##############################################################################


##############################################################################
# Fan Drivers
# ===========
#
# Currently, thinkfan supports only one fan, but support for multiple fans is
# in development and will be released soon. For the time being, the examples
# given below are mutually exclusive.
#
fans:
  # hwmon: Full path to a PWM file
  # ==============================
  # Also subject to the potential problem with driver load order (see above)
  - hwmon: /sys/class/hwmon/hwmon0/pwm1

  # hwmon: Path to a complete driver folder
  # =======================================
  - hwmon: /sys/class/graphics/fb0/device/hwmon
    indices: [1] # Use pwm1

  # hwmon: Base path with name-based search
  # =======================================
  - hwmon: /sys/class/hwmon
    name: amdgpu
    indices: [1]

  # tpacpi: Thinkpad-specific fan interface
  # =======================================
  # Currently, this is the only way to use disengaged and automatic mode on
  # thinkpads.
  - tpacpi: /proc/acpi/ibm/fan

##############################################################################


##############################################################################
# Fan Speeds (simple mode)
# ========================
#
# In simple mode, each entry is a [FANSPEED, LOWER_LIMIT, UPPER_LIMIT] tuple.
# This is a quick way to configure a small system like a laptop, where the
# temperature ratings for all monitored devices are similar. Only the highest
# temperature found across all sensors will be compared against these limits.
# All other temperatures are ignored.
#
# Correction values on individual sensors (see above) may be used to equalize
# small discrepancies in temperature ratings.
#
# The FANSPEED values in this example are valid for the thinkpad_acpi fan
# driver only (see above)
#
levels:
  - [0, 0, 50]
  - ["level auto", 45, 75]
  - ["level disengaged", 70, 255]

##############################################################################


##############################################################################
# Fan Speeds (detailed mode)
# ==========================
#
# It is generally advisable to configure the temperature limits for each
# sensor individually.
#
# The speed values used here range from 0 to 255, which is valid for the PWM
# control files used by hwmon-based drivers.
#
# The temperatures specified in upper_limit and lower_limit apply to the
# sensors in the same order in which they were specified in the "sensors:"
# section above, and their length must match the total number of sensors that
# have been configured.
#
levels:
  - speed: 0
    upper_limit: [50, 50, 50]

  - speed: 100
    lower_limit: [45, 45, 45]
    upper_limit: [65, 65, 65]

  - speed: 255
    lower_limit: [60, 60, 60]

##############################################################################

stacktrace

           PID: 9045 (thinkfan)
           UID: 0 (root)
           GID: 0 (root)
        Signal: 6 (ABRT)
     Timestamp: Thu 2023-10-05 16:26:10 GMT (15s ago)
  Command Line: thinkfan -n
    Executable: /usr/bin/thinkfan
 Control Group: /user.slice/user-1000.slice/session-c1.scope
          Unit: session-c1.scope
         Slice: user-1000.slice
       Session: c1
     Owner UID: 1000 (tomas)
       Boot ID: 00342585409a476a8eafc44047d0b717
    Machine ID: 68290eca0c1e4744af7eb3b05fb55e38
      Hostname: protogen
       Storage: none
       Message: Process 9045 (thinkfan) of user 0 dumped core.

Coredump entry has no core attached (neither internally in the journal nor externally on disk).

then this

System:
  Kernel: 6.5.5-arch1-1 arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
    clocksource: tsc available: acpi_pm parameters: BOOT_IMAGE=/vmlinuz-linux
    root=UUID=4408af61-0474-4425-a0aa-2698c6963a3c rw loglevel=3 quiet
  Desktop: i3 v: 4.22 info: i3bar vt: 2 dm: N/A Distro: Arch Linux
Machine:
  Type: Laptop System: LENOVO product: 20S1S95G00 v: ThinkPad T14 Gen 1
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: LENOVO model: 20S1S95G00 v: SDK0J40697 WIN
    serial: <superuser required> UEFI: LENOVO v: N2XET38W (1.28 )
    date: 01/18/2023
Battery:
  ID-1: BAT0 charge: 35.5 Wh (83.7%) condition: 42.4/50.5 Wh (84.0%)
    power: 6.9 W volts: 12.0 min: 11.6 model: LGC 5B10W13905 type: Li-poly
    serial: <filter> status: discharging cycles: 225
CPU:
  Info: model: Intel Core i5-10310U bits: 64 type: MT MCP
    arch: Comet/Whiskey Lake note: check gen: core 10 level: v3 note: check
    built: 2018 process: Intel 14nm family: 6 model-id: 0x8E (142)
    stepping: 0xC (12) microcode: 0xF0
  Topology: cpus: 1x cores: 4 tpc: 2 threads: 8 smt: enabled cache:
    L1: 256 KiB desc: d-4x32 KiB; i-4x32 KiB L2: 1024 KiB desc: 4x256 KiB
    L3: 6 MiB desc: 1x6 MiB
  Speed (MHz): avg: 602 high: 766 min/max: 400/4400 scaling:
    driver: intel_pstate governor: powersave cores: 1: 754 2: 700 3: 766 4: 400
    5: 400 6: 400 7: 700 8: 702 bogomips: 35210
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: gather_data_sampling status: Vulnerable: No microcode
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data mitigation: Clear CPU buffers; SMT vulnerable
  Type: retbleed mitigation: Enhanced IBRS
  Type: spec_rstack_overflow status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: Enhanced / Automatic IBRS, IBPB: conditional,
    RSB filling, PBRSB-eIBRS: SW sequence
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort mitigation: TSX disabled
Graphics:
  Device-1: Intel CometLake-U GT2 [UHD Graphics] vendor: Lenovo driver: i915
    v: kernel arch: Gen-9.5 process: Intel 14nm built: 2016-20 ports:
    active: eDP-1 empty: DP-1, DP-2, HDMI-A-1, HDMI-A-2 bus-ID: 00:02.0
    chip-ID: 8086:9b41 class-ID: 0300
  Device-2: 8SSC20F27068L1GZ071DEBS Integrated Camera driver: uvcvideo
    type: USB rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-8:2
    chip-ID: 04ca:7070 class-ID: 0e02
  Display: x11 server: X.Org v: 21.1.8 driver: X: loaded: intel
    unloaded: modesetting alternate: fbdev,vesa dri: iris gpu: i915
    display-ID: :1 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.00x11.22")
    s-diag: 582mm (22.93")
  Monitor-1: eDP-1 mapped: eDP1 model: BOE Display 0x07c9 built: 2018
    res: 1920x1080 hz: 60 dpi: 163 gamma: 1.2 size: 300x170mm (11.81x6.69")
    diag: 345mm (13.6") ratio: 16:9 modes: 1920x1080
  API: OpenGL Message: Unable to show GL data. glxinfo is missing.
Audio:
  Device-1: Intel Comet Lake PCH-LP cAVS vendor: Lenovo
    driver: sof-audio-pci-intel-cnl alternate: snd_hda_intel, snd_soc_skl,
    snd_sof_pci_intel_cnl bus-ID: 00:1f.3 chip-ID: 8086:02c8 class-ID: 0403
  API: ALSA v: k6.5.5-arch1-1 status: kernel-api
    tools: alsactl,alsamixer,amixer
  Server-1: JACK v: 1.9.22 status: off tools: N/A
  Server-2: PulseAudio v: 16.1 status: active with: pulseaudio-alsa
    type: plugin tools: pacat,pactl,pavucontrol
Network:
  Device-1: Intel Comet Lake PCH-LP CNVi WiFi driver: iwlwifi v: kernel
    bus-ID: 00:14.3 chip-ID: 8086:02f0 class-ID: 0280
  IF: wlan0 state: up mac: <filter>
  Device-2: Intel Ethernet I219-LM vendor: Lenovo driver: e1000e v: kernel
    port: N/A bus-ID: 00:1f.6 chip-ID: 8086:0d4e class-ID: 0200
  IF: enp0s31f6 state: down mac: <filter>
Bluetooth:
  Device-1: N/A driver: btusb v: 0.8 type: USB rev: 2.0 speed: 12 Mb/s lanes: 1
    mode: 1.1 bus-ID: 1-10:3 chip-ID: 8087:0026 class-ID: e001
  Report: rfkill ID: hci0 rfk-id: 1 state: down bt-service: not found
    rfk-block: hardware: no software: no address: see --recommends
Drives:
  Local Storage: total: 267.35 GiB used: 6.24 GiB (2.3%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung model: MZVLB256HBHQ-000L7
    size: 238.47 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s
    lanes: 4 tech: SSD serial: <filter> fw-rev: 5M2QEXH7 temp: 35.9 C
    scheme: GPT
  ID-2: /dev/sda maj-min: 8:0 vendor: Kingston model: DataTraveler 3.0
    size: 28.88 GiB block-size: physical: 512 B logical: 512 B type: USB rev: 3.2
    spd: 5 Gb/s lanes: 1 mode: 3.2 gen-1x1 tech: N/A serial: <filter>
    fw-rev: PMAP scheme: MBR
Partition:
  ID-1: / raw-size: 221.97 GiB size: 217.43 GiB (97.95%) used: 6.14 GiB (2.8%)
    fs: ext4 dev: /dev/nvme0n1p3 maj-min: 259:3
  ID-2: /boot raw-size: 512 MiB size: 511 MiB (99.80%)
    used: 111.6 MiB (21.8%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default) zswap: yes
    compressor: zstd max-pool: 20%
  ID-1: swap-1 type: partition size: 16 GiB used: 0 KiB (0.0%) priority: -2
    dev: /dev/nvme0n1p2 maj-min: 259:2
Sensors:
  System Temperatures: cpu: 44.0 C pch: 49.0 C mobo: N/A
  Fan Speeds (rpm): fan-1: 0
Info:
  Processes: 197 Uptime: 57m wakeups: 3 Memory: total: 16 GiB note: est.
  available: 15.26 GiB used: 1.85 GiB (12.1%) Init: systemd v: 254
  default: graphical tool: systemctl Compilers: gcc: 13.2.1 Packages:
  pm: pacman pkgs: 481 libs: 143 tools: yay Shell: Zsh v: 5.9
  running-in: alacritty inxi: 3.3.30

@vmatare vmatare reopened this Nov 6, 2023
@vmatare vmatare removed the need info label Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants