brndnmtthws / conky

Light-weight system monitor for X, Wayland (sort of), and other things, too
https://conky.cc
GNU General Public License v3.0
7.17k stars 615 forks source link

Conky segfaults when using `$cpu` (`can't open /sys/devices/system/cpu/present`) #851

Closed simonwiles closed 1 year ago

simonwiles commented 5 years ago

Issue

Conky segfaults when using $cpu:

conky: can't open /sys/devices/system/cpu/present: No such file or directory
Segmentation fault

Information

$ conky --version
conky 1.10.6 compiled Fri Dec  9 09:25:19 UTC 2016 for Linux 3.16.0-4-amd64 x86_64

Compiled in features:

System config file: /etc/conky/conky.conf
Package library path: /usr/lib/conky

 General:
  * math
  * hddtemp
  * portmon
  * IPv6
  * support for IBM/Lenovo notebooks
  * builtin default configuration
  * old configuration syntax
  * apcupsd
  * iostats
  * ncurses
  * Internationalization support

 Music detection:
  * MPD
  * MOC

 Default values:
  * Netdevice: eth0
  * Local configfile: $HOME/.conkyrc
  * Localedir: /usr/share/locale
  * Maximum netdevices: 64
  * Maximum text size: 16384
  * Size text buffer: 256
$ lsb_release -crid
Distributor ID: Debian
Description:    Debian GNU/Linux 9.9 (stretch)
Release:        9.9
Codename:       stretch

(recently upgraded from Jessie).

lasers commented 5 years ago

For what it's worth...

conky 1.10.6 compiled Fri Dec 9 09:25:19 UTC 2016 (recently upgraded from Jessie).

2 years, 6 months ago. Too old and unreliable to troubleshoot this version. Try a newer version?

I'm on Arch. I have /sys/devices/system/cpu/present present too. What's your uname -a?

lasers commented 5 years ago

Looking around. I think this might be fixed in https://github.com/brndnmtthws/conky/issues/127 (v1.11.3).

simonwiles commented 5 years ago

Yeah, that's fair -- I've just upgraded this machine to Debian 9.9 and that's what's in the repos (I've been waiting for them to release buster, and just couldn't wait any longer for something I need).

$;uname -a
Linux simonw-ul 2.6.32-042stab120.11 #1 SMP Wed Nov 16 12:05:45 MSK 2016 x86_64 GNU/Linux

Seems odd that the version in the Debian Stable repos wouldn't work on Debian Stable, though, right?

lasers commented 5 years ago

Not #127 because I tried present0 and compiled. It's happening here too.

➜ conky
conky: no personal or system-wide config file found, using builtin default
conky: desktop window (25a) is root window
conky: window type - desktop
conky: drawing to created window (0x4200001)
conky: drawing to double buffer
conky: can't open /sys/devices/system/cpu/present0: No such file or directory
[1]    11756 segmentation fault (core dumped)  conky

Ought to find out why you don't have /sys/devices/system/cpu/present... and if there is a fallback file to parse? It print numbers like 0-3 or so. I think it is because you are on old kernel that doesn't have this.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 365 days with no activity. Remove stale label or comment, or this issue will be closed in 30 days.

github-actions[bot] commented 1 year ago

This issue was closed because it has been stalled for 30 days with no activity.