codebrowse is hanging/non responsive

Bug #834427 reported by Steve McInerney
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Critical
Benji York

Bug Description

We've seen a couple of these in recent days.
Basic symptoms are that codebrowse stops responding to requests.

Attempts to talk directly also 'hang':
loggerhead@guava:~$ wget -O- http://localhost:8081/thread-debug
--2011-08-26 06:21:21-- http://localhost:8081/thread-debug
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:8081... connected.
HTTP request sent, awaiting response... ^C

From a recent died, have done a core/dump:
https://pastebin.canonical.com/51779/

Related branches

Steve McInerney (spm)
tags: added: canonical-losa-lp
Revision history for this message
William Grant (wgrant) wrote :

pygments hangs in re when highlighting lp:openshot.code/openshot/main's openshot/transitions/clock_right_to_left.pgm. It's a 400KB file.

We should possibly put a size limit on syntax highlighting, but I'm also not sure why a pgm is being highlighted.

Changed in launchpad:
status: New → Triaged
importance: Undecided → Critical
Revision history for this message
William Grant (wgrant) wrote :
Revision history for this message
William Grant (wgrant) wrote :

PerlLexer.get_tokens_unprocessed is implicated in the hangs for both files.

Benji York (benji)
Changed in launchpad:
status: Triaged → In Progress
assignee: nobody → Benji York (benji)
Revision history for this message
Benji York (benji) wrote :

I'm pretty sure this is a case of backtracking run amok. An upstream
bug has already been filed: https://bitbucket.org/birkenfeld/pygments-main/issue/697/bad-regexp-in-perllexer

There is already a maximum file size the code will highlight, but
setting it even lower won't help; even very small files can cause this
problem (see the bug report for an example).

Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
tags: added: qa-needstesting
Changed in launchpad:
status: In Progress → Fix Committed
Benji York (benji)
tags: added: qa-untestable
removed: qa-needstesting
William Grant (wgrant)
Changed in launchpad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.