2008-07-25 15:58 |
mascarenhas
Fabio Mascarenhas <mascarenhas at acm.org>
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 load_wsapi_isolated 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 load_isolated_launcher in wsapi.common. > > It seems to try to reuse states to speedup the application loading > and if (app_state.mtime == mtime) no reload operation is performed. > Changing this test to fale (always call bootstra_app) 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