Discussion:
[awesome bugs] #1127 - awesome freezes if some widgets uses network and network isn't stable
(too old to reply)
awesome
2013-03-17 16:38:15 UTC
Permalink
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

A new Flyspray task has been opened. Details are below.

User who did this - aweuser (aweuser)

Attached to Project - awesome
Summary - awesome freezes if some widgets uses network and network isn't stable
Task Type - Bug Report
Category - Widgets
Status - Unconfirmed
Assigned To -
Operating System - Linux
Severity - High
Priority - Normal
Reported Version - 3.4.15
Due in Version - Undecided
Due Date - Undecided
Details - Hi,

I'm using awesome since 2.3 version and this bug was present in all versions and I still didn't find even any workaround (unless not using such widgets).

When I use any widget that uses network and network isn't stable enough, the whole environment get freeze until widget gets out of time from network.

"Freeze" means awesome doesn't switch tags or windows or whatever action lays on awesome wm side, however focused app responds very well.

For example, I use mail notofication widget and every time my network is down, I get this problem. Or mpd widget to remote server (in the same local network) do such thing while torrent is downloading (cause I've wifi network and it sometimes is not very stable while p2p is used).

I'm using GNU/Debian sid (x64)
with awesome 3.4.15-1+b1 and awesome-extra 2012061101

ps. mpd widget code

rc.lua part:

101 mpdwidget = widget({ type = 'textbox' })
102 vicious.register(mpdwidget,vicious.widgets.mpd,
103 function (widget, args)
104 if args[1] == "Stopped" then return ''
105 else return args[1]..' : '
106 end
107 end)

visious part:

7 -- {{{ Grab environment
8 local type = type
9 local io = { popen = io.popen }
10 local setmetatable = setmetatable
11 local string = { find = string.find }
12 local helpers = require("vicious.helpers")
13 -- }}}
14
15
16 -- Mpd: provides the currently playing song in MPD
17 module("vicious.mpd")
18
19
20 -- {{{ MPD widget type
21 local function worker(format, warg)
22 -- Get data from mpc
23 local f = io.popen("mpc -h 192.168.1.10")
24 local np = f:read("*line")
25 f:close()
26
27 -- Not installed,
28 if np == nil or -- off or stoppped.
29 (string.find(np, "MPD_HOST") or string.find(np, "volume:"))
30 then
31 return {"Stopped"}
32 end
33
34 -- Check if we should scroll, or maybe truncate
35 if warg then
36 if type(warg) == "table" then
37 np = helpers.scroll(np, warg[1], warg[2])
38 else
39 np = helpers.truncate(np, warg)
40 end
41 end
42
43 return {helpers.escape(np)}
44 end
45 -- }}}
46
47 setmetatable(_M, { __call = function(_, ...) return worker(...) end })

More information can be found at the following URL:
https://awesome.naquadah.org/bugs/index.php?do=details&task_id=1127

You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
--
To unsubscribe, send mail to awesome-devel-***@naquadah.org.
awesome
2013-03-17 16:44:18 UTC
Permalink
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

The following task has a new comment added:

FS#1127 - awesome freezes if some widgets uses network and network isn't stable
User who did this - Uli Schlachter (psychon)

----------
No idea what we could do about this. Awesome / lua just happens to be single-threaded and that is unlikely to change..
----------

More information can be found at the following URL:
https://awesome.naquadah.org/bugs/index.php?do=details&task_id=1127#comment3524

You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
--
To unsubscribe, send mail to awesome-devel-***@naquadah.org.
awesome
2013-03-17 16:59:20 UTC
Permalink
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

The following task has a new comment added:

FS#1127 - awesome freezes if some widgets uses network and network isn't stable
User who did this - aweuser (aweuser)

----------
So there is noway to fix within awesome. So sad.
Looks like the only way to put that command to users crontab and redirect it to temp file, after that just read file content in widget. Am I right?

----------

More information can be found at the following URL:
https://awesome.naquadah.org/bugs/index.php?do=details&task_id=1127#comment3525

You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
--
To unsubscribe, send mail to awesome-devel-***@naquadah.org.
awesome
2013-03-17 17:14:25 UTC
Permalink
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

The following task has a new comment added:

FS#1127 - awesome freezes if some widgets uses network and network isn't stable
User who did this - Uli Schlachter (psychon)

----------
Well, instead of blockingly reading from the output of mpc, you could write your own mpc protocol library using luasocket and using socket.select() to figure out if there is anything that can be read. With awesome 3.5, you can even integrate this nicely into awesome's main loop.
----------

More information can be found at the following URL:
https://awesome.naquadah.org/bugs/index.php?do=details&task_id=1127#comment3527

You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
--
To unsubscribe, send mail to awesome-devel-***@naquadah.org.
awesome
2013-03-17 17:29:21 UTC
Permalink
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

The following task has a new comment added:

FS#1127 - awesome freezes if some widgets uses network and network isn't stable
User who did this - anrxc (anrxc)

----------
By the way this is an oudated mpd widget, new one tries to timeout as soon as possible. I feel that's the least damaging solution before deciding to use a cronjob and just read its output.
----------

More information can be found at the following URL:
https://awesome.naquadah.org/bugs/index.php?do=details&task_id=1127#comment3528

You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
--
To unsubscribe, send mail to awesome-devel-***@naquadah.org.
awesome
2013-03-17 17:42:58 UTC
Permalink
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

The following task has a new comment added:

FS#1127 - awesome freezes if some widgets uses network and network isn't stable
User who did this - aweuser (aweuser)

----------
Thanks, anrxc.
So I got it and think this ticket can be closed now.

Thanks everyone.
----------

More information can be found at the following URL:
https://awesome.naquadah.org/bugs/index.php?do=details&task_id=1127#comment3529

You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
--
To unsubscribe, send mail to awesome-devel-***@naquadah.org.
awesome
2013-03-18 12:03:22 UTC
Permalink
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

The following task is now closed:

FS#1127 - awesome freezes if some widgets uses network and network isn't stable
User who did this - Uli Schlachter (psychon)

Reason for closing: Deferred
Additional comments about closing: Lua is inherently single-threaded. We might need to make it easier to do things in a non-blocking fashion, but not right now.

More information can be found at the following URL:
https://awesome.naquadah.org/bugs/index.php?do=details&task_id=1127

You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
--
To unsubscribe, send mail to awesome-devel-***@naquadah.org.
Loading...