from JavaScript to Linux Kernel hacking

Today's hacking was particularly frustrating.

An attempt to deploy SAW into a production enviroment hosting multiprocess passenger (in nginx) failed badly reporting syntax erros in JavaScript that was operating just fine in development mode. 

My first suspicion was that JavaScript asset concatenation and compression done by Jammit produced some nasty output which failed to be interpreted by the browser. Chrome developer tools and Safari development mode rendered totally useless just reporting that there is a syntax error, but failing to point it out. First Firebug managed to point out that one of my composed JavaScript assets contains garbled content. So far so good. 

Debugging jammit was never easy, but this time it appeared that changes in its output are being completely ignored by the nginx/passenger duo. Long hours of hacking have shown that disabling nginx caching makes no change at all. 

To my surprise changing asset files with vi did not make a difference either. It was the moment I realized that this might have something to do with (lame) VBoxSF that I use to share project source between my Mac and Ubuntu server machine that I use for development. Eureka. Apparently VBoxSF implementation is totally lame and breaks up on notifying kernel that given file was changed. So at the end of the day asking nginx not to use sendfile did the trick.


1 comment: