baiwyc119 / lxmppd

Automatically exported from code.google.com/p/lxmppd
0 stars 0 forks source link

Prosody trunk fails to execute module timers after running some time (a.k.a. THE timer problem) #460

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
How to reproduce: Run prosody-trunk from the prosody debian repository (tested 
with 1nightly541-1~wheezy and some earlier versions), and have either mod_bosh 
or mod_smacks (or both) enabled.

After some time, prosody will fail to execute timer code (mod_pinger, 
mod_smacks timeouts, ...).

waqas suggested to run the following from the admin console:

>local h,now=timer.add_task.h,timer.reschedule.get_time();for i,v in 
ipairs(h.priorities) do local 
cb,param=h.items[h.ids[i]],timer.add_task.params[h.ids[i]]; 
if(tostring(cb)=="function(moduleapi.lua:366)") then 
cb="api:"..tostring(param.callback); 
elseif(tostring(cb)=="function(watchdog.lua:12)") then 
cb="watchdog:"..tostring(cb.watchdog.callback) end print(i,v,v - now, cb); end

Currently it reports >1500 events in the queue with negative wait times:

...
| 1514  1422293771.4827 -8874.7103559971        function(mod_s2s.lua:557)
| 1515  1422294227.0253 -8419.1677281857        function(mod_smacks.lua:262)
| 1516  1422295940.906  -6705.2870650291        function(mod_smacks.lua:262)
| 1517  1422297073.3799 -5572.8131351471        function(mod_smacks.lua:262)
| 1518  1422298475.1318 -4171.0612580776        function(mod_smacks.lua:262)
| 1519  1422298191.1517 -4455.0413451195        function(dns.lua:775)
| 1520  1422298191.1523 -4455.0407102108        function(dns.lua:775)
| 1521  1422298191.1561 -4455.0369620323        function(mod_manifesto.lua:70)
| 1522  1422298777.1561 -3869.036935091 watchdog:function(mod_pinger.lua:14)
| 1523  1422298266.1904 -4380.0026640892        function(mod_s2s.lua:557)
| 1524  1422298176.9323 -4469.2607090473        api:function(mod_smacks.lua:155)
| 1525  1422298269.9654 -4376.2276530266        function(mod_s2s.lua:557)
| 1526  1422299816.5679 -2829.6250941753        function(mod_s2s.lua:557)
| Result: nil

Original issue reported on code.google.com by aprsdr...@googlemail.com on 26 Jan 2015 at 8:14