Possible CPU Hanging Issue

Subscribe to Possible CPU Hanging Issue 2 post(s), 1 voice(s)

 
Avatar rick Administator 545 post(s)

I helped Josh Goebel troubleshoot an issue with Pastie where the CPU would star maxing out and locking the rails process. We tracked it down to a certain PHP file that was causing the issue. I’m not sure if it’s necessarily a ruby issue though, since the same file has the same problem with Textmate. At any rate, it’ll be reported to Allan (author of Textmate).

Until some solution is found, you can choose to disable the PHP syntax altogether. Warehouse has some mods that let me ignore syntax files by name, but I will be adding a config option in a future version of Warehouse.

To do it manually, just look for line 44 of config/initializers/general.rb, starting with “Uv.syntax_list = ”. Find php in the list and remove it (while preserving the single space between each syntax name).

This isn’t for all PHP files, but certain ones that seem to trigger some obscure bug. Also, don’t bother worrying about this if you’re not using Ultraviolet.

 
Avatar rick Administator 545 post(s)

Infininight in #textmate found the issue and committed a fix in minutes. Apparently the regular expression got itself into some exponential back referencing loop. A fix is available here.

curl "http://pastie.caboo.se/paste/asset/138555/php_syntax_fix.diff.txt" | patch -p1