conky icon indicating copy to clipboard operation
conky copied to clipboard

[Bug]: Conky crashes when config file is modified

Open jasondunsmore opened this issue 2 years ago • 5 comments

What happened?

Conky freezes whenever it's running and I update the config file. Here is the debug output:

$ pkill -9 conky && conky -DD
DEBUG(0) [/build/conky-kqhypt/conky-1.11.6/src/conky.cc:2555]: reading contents from config file '/home/jason/.conkyrc'
DEBUG(0) [/build/conky-kqhypt/conky-1.11.6/src/x11.cc:401]: enter init_X11()
DEBUG(0) [/build/conky-kqhypt/conky-1.11.6/src/x11.cc:482]: Fixed xinerama area to: 0 0 3840 2160
DEBUG(0) [/build/conky-kqhypt/conky-1.11.6/src/x11.cc:433]: leave init_X11()
DEBUG(0) [/build/conky-kqhypt/conky-1.11.6/src/x11.cc:642]: enter init_window()
DEBUG(0) [/build/conky-kqhypt/conky-1.11.6/src/x11.cc:482]: Fixed xinerama area to: 0 0 3840 2160
conky: desktop window (24a) is root window
conky: window type - desktop
conky: drawing to created window (0x1000001)
DEBUG(0) [/build/conky-kqhypt/conky-1.11.6/src/x11.cc:992]: leave init_window()
conky: drawing to double buffer
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/core.cc:2045]: no templates to replace
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/core.cc:700]: Adding $cpubar for CPU 1
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/core.cc:700]: Adding $cpubar for CPU 2
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/core.cc:700]: Adding $cpubar for CPU 3
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/core.cc:700]: Adding $cpubar for CPU 4
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/core.cc:700]: Adding $cpubar for CPU 5
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/core.cc:700]: Adding $cpubar for CPU 6
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/core.cc:700]: Adding $cpubar for CPU 7
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/core.cc:700]: Adding $cpubar for CPU 8
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/core.cc:686]: Adding $cpu for CPU 0
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/core.cc:706]: Adding $cpugraph for CPU 0
conky: forked to background, pid is 687164
$ 
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/fonts.cc:94]: setting up fonts
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/fonts.cc:149]: loading fonts
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/fonts.cc:94]: setting up fonts
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/fonts.cc:94]: setting up fonts
DEBUG(0) [/build/conky-kqhypt/conky-1.11.6/src/specials.cc:560]: reallocing graph from 0 to 60
DEBUG(0) [/build/conky-kqhypt/conky-1.11.6/src/specials.cc:560]: reallocing graph from 0 to 60
DEBUG(0) [/build/conky-kqhypt/conky-1.11.6/src/specials.cc:560]: reallocing graph from 0 to 60
DEBUG(0) [/build/conky-kqhypt/conky-1.11.6/src/specials.cc:560]: reallocing graph from 0 to 60
DEBUG(0) [/build/conky-kqhypt/conky-1.11.6/src/specials.cc:560]: reallocing graph from 0 to 60
DEBUG(0) [/build/conky-kqhypt/conky-1.11.6/src/specials.cc:560]: reallocing graph from 0 to 60
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/conky.cc:697]: jumping
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/fonts.cc:149]: loading fonts
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/fonts.cc:94]: setting up fonts
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/fonts.cc:94]: setting up fonts
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/fonts.cc:94]: setting up fonts
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/conky.cc:697]: jumping
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/fonts.cc:149]: loading fonts
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/fonts.cc:94]: setting up fonts
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/conky.cc:697]: jumping
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/fonts.cc:149]: loading fonts
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/fonts.cc:94]: setting up fonts
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/conky.cc:697]: jumping
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/fonts.cc:149]: loading fonts
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/fonts.cc:94]: setting up fonts
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/conky.cc:697]: jumping
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/fonts.cc:149]: loading fonts
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/fonts.cc:94]: setting up fonts
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/conky.cc:697]: jumping
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/fonts.cc:149]: loading fonts
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/fonts.cc:94]: setting up fonts
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/conky.cc:697]: jumping
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/fonts.cc:149]: loading fonts
DEBUG(1) [/build/conky-kqhypt/conkyConky crashes when config file is modified-1.11.6/src/fonts.cc:94]: setting up fonts
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/conky.cc:697]: jumping
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/fonts.cc:149]: loading fonts
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/fonts.cc:94]: setting up fonts
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/conky.cc:697]: jumping
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/fonts.cc:149]: loading fonts
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/fonts.cc:94]: setting up fonts
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/conky.cc:697]: jumping
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/fonts.cc:149]: loading fonts
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/fonts.cc:94]: setting up fonts
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/conky.cc:697]: jumping
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/fonts.cc:149]: loading fonts
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/fonts.cc:94]: setting up fonts
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/conky.cc:697]: jumping
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/fonts.cc:149]: loading fonts
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/fonts.cc:94]: setting up fonts
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/conky.cc:697]: jumping
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/fonts.cc:149]: loading fonts
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/fonts.cc:94]: setting up fonts
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/conky.cc:697]: jumping
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/fonts.cc:149]: loading fonts
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/fonts.cc:94]: setting up fonts
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/conky.cc:697]: jumping
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/fonts.cc:149]: loading fonts
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/fonts.cc:94]: setting up fonts
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/conky.cc:697]: jumping
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/fonts.cc:149]: loading fonts
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/fonts.cc:94]: setting up fonts
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/conky.cc:697]: jumping
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/fonts.cc:149]: loading fonts
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/fonts.cc:94]: setting up fonts
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/conky.cc:697]: jumping
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/fonts.cc:149]: loading fonts
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/fonts.cc:94]: setting up fonts
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/conky.cc:697]: jumping
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/fonts.cc:149]: loading fonts
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/fonts.cc:94]: setting up fonts
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/conky.cc:697]: jumping
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/fonts.cc:149]: loading fonts
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/fonts.cc:94]: setting up fonts
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/conky.cc:697]: jumping
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/fonts.cc:149]: loading fonts
DEBUG(1) [/build/conky-kqhypt/conky-1.11.6/src/fonts.cc:94]: setting up fonts
conky: '/home/jason/.conkyrc' modified, reloading...

At this point, conky is frozen and I have to issue a pkill -9 conky && conky to get it back up.

Conky didn't freeze when I first began working on my config file, so I suspected there was a buggy feature that I started using (possibly running_processes?). I've removed sections of the config file to test, but I'm seeing some inconsistent behavior - sometimes it freezes, sometimes it doesn't with the same config.

If I turn off double_buffer, conky starts to be redrawn but only the conky background window (a black box) is drawn to the screen before it freezes. With double_buffer on, conky freezes with as it was whenever I saved the modified config file.

Version

1.11.6

Which OS/distro are you seeing the problem on?

Debian

Conky config

conky.config = {
    alignment = 'top_left',
    background = true,
    border_width = 10,
    cpu_avg_samples = 2,
    default_color = '#76B705',
    default_outline_color = 'white',
    default_shade_color = 'white',
    double_buffer = true,
    draw_borders = false,
    draw_graph_borders = true,
    default_graph_height = 40,
    default_graph_width = 60,
    draw_outline = false,
    draw_shades = false,
    extra_newline = false,
    font = 'Monospace:size=11',
    gap_x = 600,
    gap_y = 25,
    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_class = 'Conky',
    own_window_type = 'desktop',
    own_window_colour = '#01001F',
    short_units = true,
    show_graph_range = false,
    show_graph_scale = false,
    stippled_borders = 0,
    update_interval = 1.0,
    uppercase = false,
    use_spacer = 'none',
    use_xft = true,
}

conky.text = [[
$color${cpubar cpu1}
${voffset -10}${cpubar cpu2}
${voffset -10}${cpubar cpu3}
${voffset -10}${cpubar cpu4}
${voffset -10}${cpubar cpu5}
${voffset -10}${cpubar cpu6}
${voffset -10}${cpubar cpu7}
${voffset -10}${cpubar cpu8}
${goto 20}${color grey}CPU ${goto 90}RAM ${goto 155}GPU ${goto 220}GRAM ${goto 285}NET UP ${goto 350}NET DN
${voffset -4}${font Monospace:size=9}${goto 20}${color grey}${cpu}%${goto 90}$memperc%${goto 155}${nvidia gpuutil}%${goto 220}${nvidia memutil}%${goto 285}${upspeedf wlp4s0}${goto 350}${downspeedf wlp4s0}${font}
${voffset -4}$color${cpugraph cpu0 40,60 00FF00 FF0000 -t} ${memgraph 40,60 00FF00 FF0000 -t} ${nvidiagraph gpuutil 40,60 00FF00 FF0000 -t 0} ${nvidiagraph memutil 40,60 00FF00 FF0000 -t 0} ${upspeedgraph wlp4s0} ${downspeedgraph wlp4s0}
${color grey}/ $color${fs_free /} free ${goto 185}${color grey}R: $color${diskio_read /dev/mapper/ashwa--vg-root} ${color grey}${goto 300}W: $color${diskio_write /dev/mapper/ashwa--vg-root}
${fs_bar 6 /}
${color grey}/home $color${fs_free /home} free ${goto 185}${color grey}R: $color${diskio_read /dev/mapper/ashwa--vg-home} ${color grey}${goto 300}W: $color${diskio_write /dev/mapper/ashwa--vg-home}
${fs_bar 6 /home}
$color${stippled_hr}
${color grey}Top CPU proc       PID      CPU%  TIME
${color #959595} ${top name 1} ${top pid 1} ${top cpu 1} ${top time 1}
${color grey}Top MEM proc       PID      MEM%  MEM
${color #959595} ${top_mem name 1} ${top_mem pid 1} ${top_mem mem 1}  ${top_mem mem_res 1} 
 ${top_mem name 2} ${top_mem pid 2} ${top_mem mem 2}  ${top_mem mem_res 2} 
 ${top_mem name 3} ${top_mem pid 3} ${top_mem mem 3}  ${top_mem mem_res 3} 
 ${top_mem name 4} ${top_mem pid 4} ${top_mem mem 4}  ${top_mem mem_res 4} 
$color${stippled_hr}
${color grey}Proc${goto 130}$color${running_processes} running / ${processes}
${color grey}Load Avg${goto 130}$color${loadavg 1}
${color grey}Uptime${goto 130}$color$uptime
${color grey}Battery${goto 130}$color${battery_percent BAT0}% ${battery_bar BAT0}
${color grey}Volume${goto 130}$color${if_pa_sink_muted}MUTED${else}$pa_sink_volume%${endif}
$color${stippled_hr}
${font Monospace:size=13}${color grey}${time %Y-%m-%d}${goto 185}${time %A}${alignr}${time %I:%M %p}
]];

Stack trace

$ gdb conky 
GNU gdb (Debian 10.1-1.7) 10.1.90.20210103-git
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from conky...
(No debugging symbols found in conky)
(gdb) run -c ~/.conkyrc
Starting program: /usr/bin/conky -c ~/.conkyrc
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
conky: desktop window (24a) is root window
conky: window type - desktop
conky: drawing to created window (0x1000001)
conky: drawing to double buffer
[New Thread 0x7fffef2b7700 (LWP 699139)]
[Detaching after fork from child process 699150]
conky: forked to background, pid is 699150
[Thread 0x7ffff35a2680 (LWP 699129) exited]
[Inferior 1 (process 699129) exited normally]
(gdb) 
conky: '/home/jason/.conkyrc' modified, reloading...

Relevant log output

No response

jasondunsmore avatar Dec 02 '22 16:12 jasondunsmore

If I set "background = false", then I don't have this problem. Conky auto-restarts when I update the config file.

jasondunsmore avatar Dec 05 '22 18:12 jasondunsmore

This bug started happening since kernel 6.0 was released, so it must have something to do with it. Fortunately I don't modify the config very often, unless abs. necessary, so I can live with this bug.

rado84-github avatar Jan 03 '23 14:01 rado84-github

I was running Ubuntu 20.04 without issues. I transfered the same conky config to Ubuntu 22.04 and started having crashes everytime I modify the config file. This doesn't happen if the lua file is modified . I checked and "background=false" is already set. conky.crash.zip

efthymiosc avatar Mar 24 '23 09:03 efthymiosc

If the developer is still reading these issues: is there any chance for that to be fixed anytime soon? It's been over a year since that started happening and still hasn't been fixed yet.

rado84-github avatar Feb 26 '24 08:02 rado84-github

If the developer is still reading these issues: is there any chance for that to be fixed anytime soon? It's been over a year since that started happening and still hasn't been fixed yet.

I can't reproduce the issue, and there isn't actionable information here. If you can get me a full stack trace with debug symbols then perhaps I can do something about it.

brndnmtthws avatar Feb 26 '24 13:02 brndnmtthws