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

Stall after damonizing with ${no_update ${fs_size /}} #888

Closed hexchain closed 1 year ago

hexchain commented 5 years ago

Issue Conky stalls after daemonizing (conky -d) with the following config.

Information

conky.config = {
    no_buffers = true,
    out_to_x = false,
    out_to_console = true,
}
conky.text = [[ ${no_update ${fs_size /}} ]]
lasers commented 5 years ago

How long before it stalls? What version? Seems okay for me on conky 1.11.6_pre.

hexchain commented 5 years ago

Sorry, I forgot to mention that it stalls only in daemon mode, i.e. with conky -d -c conky.conf.

It happens with the current git master.

lasers commented 5 years ago

I'm able to find conky with pgrep -a conky after an hour. I do not recall -d. I also don't know how to check if the variables are still being printed out with this simplistic config. How are you viewing the variables in console + daemon?

I'm wondering if it's something recent or if it's a longstanding bug. Once I am able to reproduce your bug, I'd want to git bisect this to see if a recent commit caused it... or if you're able to do that too, that'd be good too.

(Opinion) I think -d may be more for X11 than console, ncurse, web, etc.

hexchain commented 5 years ago

I had the problem when running conky from the .desktop file with my normal config - the window just doesn't show up but a process is hanging there if I start conky from the Plasma application menu. I tried to remove irrelevant parts of my config to isolate the culprit, which is ${no_update ${fs_size /}}, or just no_update - in fact, it works if you remove the no_update tag.

Having it output to console is for the ease of debugging. Even if conky forked to background it should still retain the reference to the invoking tty as its stdout. If you remove the no_update part then the output should look like this:

/tmp $ cat conky.conf
conky.config = {
    no_buffers = true,
    out_to_x = false,
    out_to_console = true,
}
conky.text = [[ ${fs_size /} ]]
/tmp $ conky -dc conky.conf
conky: forked to background, pid is 236076
/tmp $
 468GiB
 468GiB
 468GiB
 468GiB
 468GiB
kill 236076  # this is input
 468GiB
conky: received SIGHUP, SIGINT, or SIGTERM to terminate. bye!

And with no_update:

/tmp $ conky -dc conky.conf
conky: forked to background, pid is 236515
/tmp $

/tmp $ kill 236515
/tmp $ kill 236515
/tmp $ kill -9 236515
/tmp $ kill -9 236515
bash: kill: (236515) - No such process
lasers commented 5 years ago

c352069b31b2dbb4d87503603d6c6d3ddd517df6 is the first bad commit

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.

hexchain commented 1 year ago

I can't seem to reproduce this issue anymore.