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

[Bug]: segmentation fault on fresh boot #1624

Closed IfGremlinThen closed 11 months ago

IfGremlinThen commented 1 year ago

What happened?

I was able to install and customize conky with relatively little effort on two separate computers and in doing so I closed and relaunched conky several times. On a fresh boot, however, I receive this error when launching the installed .deb package from the Terminal:

conky: desktop window (2800010) is subwindow of root window (782)
conky: window type - desktop
conky: drawing to created window (0x4600002)
conky: drawing to double buffer
Segmentation fault (core dumped)

The .deb package was a little older so I uninstalled it, downloaded the latest .appimage and attempted to execute that, however I receive the same error with that as well. Conky simply does not boot at launch even if I set it to.

I am currently running it on an ASUS laptop under Linux Mint: Debian Edition 6 (Beta), and will test it out on a desktop Linux Mint 21.2 when I have the opportunity.

Version

1.18.3/1.19.4

Which OS/distro are you seeing the problem on?

Linux (other)

Conky config

-- Conky, a system monitor https://github.com/brndnmtthws/conky
--
-- This configuration file is Lua code. You can write code in here, and it will
-- execute when Conky loads. You can use it to generate your own advanced
-- configurations.
--
-- Try this (remove the `--`):
--
--   print("Loading Conky config")
--
-- For more on Lua, see:
-- https://www.lua.org/pil/contents.html

conky.config = {
    alignment = 'top_right',
    background = false,
    border_width = 5,
    cpu_avg_samples = 2,
    default_color = 'white',
    default_outline_color = 'white',
    default_shade_color = 'white',
    double_buffer = true,
    draw_borders = false,
    draw_graph_borders = true,
    draw_outline = false,
    draw_shades = false,
    extra_newline = false,
    font = 'UbuntuMono Nerd Font:size=14',
    format_human_readable = enabled,
    gap_x = 16,
    gap_y = 48,
    minimum_height = 5,
    minimum_width = 5,
    net_avg_samples = 2,
    no_buffers = true,
    out_to_console = false,
    out_to_ncurses = false,
    out_to_stderr = false,
    out_to_x = true,
    own_window = true,
    own_window_argb_value = 170,
    own_window_argb_visual = true,
    own_window_colour = black,
    own_window_class = 'Conky',
    own_window_type = 'desktop',
    short_units = true,
    show_graph_range = false,
    show_graph_scale = false,
    stippled_borders = 0,
    temperature_unit = 'fahrenheit',
    total_run_times = 0,
    update_interval = 2.0,
    uppercase = false,
    use_spacer = 'none',
    use_xft = true,
}

conky.text = [[
${font BebasNeue:size=24}$alignc${time %l:%M%P  %A}${voffset -12}
$font${color white}󰃭  DAY: ${color grey}${time %D} $alignr${color white}󰅐  UP: ${color grey}$uptime_short
${voffset 6}${color white}${font BebasNeue:size=16}SYSTEM  ${hr 2}${voffset 2}$font
${color white}󰣚  OS: ${color grey}${exec inxi -S | grep "Desktop" | awk -F 'Distro: ' '{print $2}'}
${color white}󰇄  DE: ${color grey}${exec inxi -S | grep "Desktop" | awk -F 'Desktop: | Distro:' '{print $2}'}
${color white}  WM: ${color grey}${exec wmctrl -m | grep "Name:" | awk -F 'Name: ' '{print $2}'}
${color white}󰌌  KEY: ${color grey}$keyboard_layout
${voffset 6}${color white}${font BebasNeue:size=16}SPECS  ${hr 2}${voffset 2}$font
${voffset -6}   ${font UbuntuMono Nerd Font:size=10}COM: ${color grey}${exec cat /sys/class/dmi/id/product_name}
    ${color white}MOB: ${color grey}${exec cat /sys/class/dmi/id/board_vendor} ${exec cat /sys/class/dmi/id/board_name}  $alignr${color white}RAM: ${color grey}${exec free -h | awk '/^Mem:/ {print $2}' | sed 's/Gi/G/'}    ${color white}DSK: ${color grey}${exec df -h --total | awk '/total/{print $2}'}
    ${color white}CPU: ${color grey}${exec lscpu | grep "Model name" | sed 's/.*: *//; s/ with.*//'}
    ${color white}GPU: ${color grey}${exec inxi -G | grep "Device-1:" | awk -F ': ' '{print $2}' | sed 's/ \[.*\]//'}
${voffset 6}${color white}${font BebasNeue:size=16}HEALTH  ${hr 2}${voffset 2}$font
$font${color white}  CPU: ${color grey}$cpu% $color${cpubar 7}
$font${color white}  RAM: ${color grey}$memperc% $color${membar 7}
   ${voffset -3}${font UbuntuMono Nerd Font:size=10}TOP ${alignr}CPU     RAM       PID
    ${color grey}${top name 1} $alignr${top cpu 1}% ${top mem 1}% ${top pid 1}
    ${top name 2} $alignr${top cpu 2}% ${top mem 2}% ${top pid 2}
    ${top name 3} $alignr${top cpu 3}% ${top mem 3}% ${top pid 3}
${voffset 6}$font${color white}${font BebasNeue:size=16}STORAGE  ${hr 2}${voffset 2}$font
${color white}󰆦  DSK: ${color grey}${fs_used_perc /}% $color${fs_bar 7 /}
${color white}󰆧  PKG: ${color grey}${exec dpkg -l | grep -c '^ii'}
${voffset 6}${color white}${font BebasNeue:size=16}NETWORK  ${hr 2}${voffset 2}$font
${color white}󰖟  NET:  ${color grey}${exec if ip link show | grep -q "state UP"; then echo "Online"; else echo "Offline"; fi}
${color white}󰌗  LAN:  ${alignr}  ${color grey}${downspeed enp5s0}  ${color white}  ${color grey}${upspeed enp5s0}
${color white}󰖩  WIFI: ${color grey}${wireless_link_qual_perc wlo1}% ${alignr}${color white}  ${color grey}${downspeed wlo1}  ${color white}  ${color grey}${upspeed wlo1}
${color white}  BLUE: ${color grey}${exec if bluetoothctl paired-devices | grep -q "Device"; then echo "ON"; else echo "OFF"; fi} $alignr${exec bluetoothctl paired-devices | awk '{$1=$2=""; sub(/^ +/, ""); print $0}'}
]]

-- man conky
-- man strftime for $time formatting
--

-- ${font BebasNeuesize=16}$alignc${time %e of %B %Y}
-- $alignr${color white}󱌢  ARC: ${color grey}$machine
-- ${color white}󰻀  TUX: ${color grey}$kernel $machine
-- ${voffset 6}${color white}${font BebasNeue:size=16}PROCESSES  ${hr 2}${voffset 2}$font
-- ${color white}󰒓  TOP:               CPU ${alignr}PID
-- ${color grey}   ${top name 1} ${top cpu 1}% $alignr${top pid 1}
--    ${top name 2} ${top cpu 2}% $alignr${top pid 2}
--    ${top name 3} ${top cpu 3}% $alignr${top pid 3}
-- ${color white}󰉼  THM: ${color grey}${exec gsettings get org.gnome.desktop.interface gtk-theme | tr -d "'"}/${exec gsettings get org.cinnamon.desktop.interface gtk-theme | tr -d "'"}
-- ${color white}  MOB: ${color grey}${exec cat /sys/class/dmi/id/board_name}
-- ${color white}󰟀  FAM: ${color grey}${exec cat /sys/class/dmi/id/product_family}
-- $font${color white}  TMP: ${color grey}${exec sensors -f | awk '/Package id 0/{print $4}' | tr -d '+°F'} °F
-- ${exec chmod +x ~/.cache/wal/colors.sh && exec ~/.cache/wal/colors.sh -f}
-- $alignr${exec xdpyinfo | awk '/dimensions/ {print $2}'}px

Stack trace

Starting program: /usr/bin/conky -c ~/.config/conky/conky.conf
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
conky: desktop window (2800010) is subwindow of root window (782)
conky: window type - desktop
conky: drawing to created window (0x4600002)
conky: drawing to double buffer
[New Thread 0x7ffff26216c0 (LWP 3717)]
[New Thread 0x7ffff1e206c0 (LWP 3718)]
[New Thread 0x7ffff161f6c0 (LWP 3719)]
[Detaching after fork from child process 3720]
[New Thread 0x7ffff0e1e6c0 (LWP 3721)]
[Detaching after fork from child process 3722]
[New Thread 0x7fffebfff6c0 (LWP 3723)]
[New Thread 0x7fffeb7fe6c0 (LWP 3728)]
[Detaching after fork from child process 3729]
[New Thread 0x7fffeaffd6c0 (LWP 3730)]
[New Thread 0x7fffea7fc6c0 (LWP 3731)]
[Detaching after fork from child process 3732]
[New Thread 0x7fffe9ffb6c0 (LWP 3733)]
[Detaching after fork from child process 3734]
[New Thread 0x7fffe97fa6c0 (LWP 3739)]
[New Thread 0x7fffe8ff96c0 (LWP 3740)]
[Detaching after fork from child process 3741]
[New Thread 0x7fffd3fff6c0 (LWP 3744)]
[Detaching after fork from child process 3745]
[New Thread 0x7fffd37fe6c0 (LWP 3749)]
[Detaching after fork from child process 3750]
[New Thread 0x7fffd2ffd6c0 (LWP 3753)]
[Detaching after fork from child process 3755]
[New Thread 0x7fffd27fc6c0 (LWP 3756)]
[Detaching after fork from child process 3757]
[New Thread 0x7fffd1ffb6c0 (LWP 3760)]
[Detaching after fork from child process 3761]
[New Thread 0x7fffd17fa6c0 (LWP 3765)]
[Detaching after fork from child process 3766]
[New Thread 0x7fffd0ff96c0 (LWP 3767)]
[New Thread 0x7fffb3fff6c0 (LWP 3769)]
[Detaching after fork from child process 3770]
[New Thread 0x7fffb37fe6c0 (LWP 3774)]
[Detaching after fork from child process 3778]

Thread 1 "conky" received signal SIGSEGV, Segmentation fault.
0x000055555557fbb9 in ?? ()
#0  0x000055555557fbb9 in ?? ()
No symbol table info available.
#1  0x000055555558148c in ?? ()
No symbol table info available.
#2  0x00005555555b7415 in ?? ()
No symbol table info available.
#3  0x0000555555585507 in ?? ()
No symbol table info available.
#4  0x0000555555572b81 in main ()
No symbol table info available.
IfGremlinThen commented 1 year ago

I do not appear to experience this on Mint 21.2.

EDIT: I still experience this on Linux Mint: Debian Edition 6.

IfGremlinThen commented 11 months ago

UPDATE:

This is potentially an issue with piping the bluetoothctl paired-devices command into awk instead of grep. Requires some further testing.

IfGremlinThen commented 11 months ago

I figured out the issue. Linux Mint: Debian Edition 6 runs bluetoothctl 5.66, whereas Linux Mint 21.2 runs bluetoothctl 5.64. There seems to be a discrepancy between these versions in which the paired-devices argument appears to have become deprecated.

The following code accomplished the same task in both versions of Mint:

${exec bluetoothctl info | awk -F 'Name: ' '/Name:/ {print $2}'}