json-pushes can return vertical tab characters, which are invalid JSON (causes: "JSONDecodeError: Invalid control character u'\x1b' at: line 3 column 4473 (char 4495)")

RESOLVED FIXED

Status

Developer Services
Mercurial: Pushlog
P1
normal
RESOLVED FIXED
3 years ago
6 months ago

People

(Reporter: emorley, Unassigned)

Tracking

(Blocks: 1 bug)

Details

Is occurring on at least heroku + prod.

eg:
https://rpm.newrelic.com/accounts/677903/applications/7385291/traced_errors/70b0f6-b8c17eab-8021-11e5-900f-b82a72d22a14

and:
https://papertrailapp.com/systems/treeherder/events?r=597251633981992968-597251970272899096

Googling shows up:
https://code.google.com/p/simplejson/issues/detail?id=89

Which says that it's not valid JSON to have the vertical tab character not be escaped, so this may end up being a hg.m.o pushlog bug.

However annoyingly the neither the logs nor the new relic exception reports contain enough detail to be able to tell which repo (or revision) is providing the bad JSON.
Blocks: 1152896
I wasn't able to find out which commit caused this, but either way json-pushes seems to happily output commit messages that contain vertical tab characters, which is invalid JSON. Gregory, would you mind taking a look? :-)
Component: Treeherder: Data Ingestion → Mercurial: Pushlog
Flags: needinfo?(gps)
Product: Tree Management → Developer Services
Summary: Exception during pushlog fetching "JSONDecodeError: Invalid control character u'\x1b' at: line 3 column 4473 (char 4495)" → json-pushes can return vertical tab characters, which are invalid JSON (causes: "JSONDecodeError: Invalid control character u'\x1b' at: line 3 column 4473 (char 4495)")
Version: --- → unspecified
Assignee: emorley → nobody

Comment 2

3 years ago
This is likely fallout from bug 1171250. These represent upstream bugs in Mercurial's JSON escaper. We can probably back out our local changes if this is urgent for you. Does this break enough to warrant that work?
Depends on: 1171250
Flags: needinfo?(gps) → needinfo?(emorley)
(In reply to Gregory Szorc [:gps] from comment #2)
> This is likely fallout from bug 1171250. These represent upstream bugs in
> Mercurial's JSON escaper. We can probably back out our local changes if this
> is urgent for you. Does this break enough to warrant that work?

I haven't seen it again since to happy to wait on an upstream fix for now. 
Could you file upstream if it's not already? :-) (I'm now on PTO)
Flags: needinfo?(emorley)
(In reply to Gregory Szorc [:gps] from comment #4)
> https://bz.mercurial-scm.org/show_bug.cgi?id=4926

This upstream issue has since been fixed.
Status: NEW → RESOLVED
Last Resolved: 6 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.