From mascarenhas at acm.org Fri Jul 25 15:58:18 2008 From: mascarenhas at acm.org (Fabio Mascarenhas) Date: Fri Jul 25 16:08:51 2008 Subject: Fwd: [Sputnik-list] Bug in sputnik + xavante/wsapi In-Reply-To: 7913df4d0807251057x2d892f34l423414d0b149e660@mail.gmail.com References: 20080717134733.GA15636@birba
<7913df4d0807180729h2d6c53abo4a3460ace8e41ab1@mail.gmail.com>
<7913df4d0807251057x2d892f34l423414d0b149e660@mail.gmail.com>
Message-ID: 7913df4d0807251058q3edf7e4fj51f377a749ecb4c1@mail.gmail.com
Now sending this to sputnik-list...
-- Fabio Mascarenhas
---------- Forwarded message ---------- From: Fabio Mascarenhas mascarenhas@acm.org Date: Fri, Jul 25, 2008 at 2:57 PM Subject: Fwd: [Sputnik-list] Bug in sputnik + xavante/wsapi To: Kepler Project mailing list kepler-project@lists.luaforge.net
Oops, forgot to "Reply to all" when sending this... Lua scripts and Lua pages get a global environment for themselves in every request, but WSAPI applications do not, so any global you set can potentially stick around to the next request.
-- Fabio Mascarenhas
---------- Forwarded message ---------- From: Fabio Mascarenhas mascarenhas@acm.org Date: Fri, Jul 18, 2008 at 11:29 AM Subject: Re: [Sputnik-list] Bug in sputnik + xavante/wsapi To: Enrico Tassi gareuselesinge@libero.it
Hi, Yuri,
My guess is that there's a global variable sneaking around, maybe due to a typo (the globals by default issue :-) ). It manifests when you use loadwsapiisolated because it tries to reuse Lua states, if you make mtime test always return false what you are forcing the launcher to create a new Lua state for each request, at a cost to performance (it becomes about as fast as CGI).
-- Fabio Mascarenhas
On Thu, Jul 17, 2008 at 10:47 AM, Enrico Tassi gareuselesinge@libero.it wrote:
Hi, I'm experiencing a nasty bug using sputnik on top of xavante. The bug is really nasty since many factors contribute to it. I belive it has something to do with the loadisolatedlauncher in wsapi.common.
It seems to try to reuse states to speedup the application loading and if (appstate.mtime == mtime) no reload operation is performed. Changing this test to fale (always call bootstraapp) solves the issue, but I'm pretty sure It can not be that wrong thus I must be missing something...
The bug is easy to reproduce on my setup, just edit a page (like the configuration file) and change the main colour of sputnik... The modification does not apply, repeatedly reloading the page gives sometimes the expected result (the new color shows up) but not always, while restarting xavante or touching sputnik.ws makes the modification "stable". The bug is even nastries sometimes, since realoding may lead the user to loose autentication (like if it was reusing a previous state in which the user had not log in yet...).
I've not tried sputnik on top of Apache, but I'll do soon to understand if the problem is wsapi of wsapi+xavante/rings. Not sure it is important, but I'm not using luarocks.require (but I'm using the very same software that luarocks installed, I've just copied it in the right path so that no luarocks.require is needed).
Any ideas? -- Enrico Tassi
Sputnik-list mailing list Sputnik-list@lists.luaforge.net http://lists.luaforge.net/cgi-bin/mailman/listinfo/sputnik-list
-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.luaforge.net/pipermail/sputnik-list/attachments/20080725/9fc88739/attachment.htm