redmon icon indicating copy to clipboard operation
redmon copied to clipboard

Crash if SLOWLOG Contains Non-Ascii Characters

Open dcartoon opened this issue 11 years ago • 0 comments

This may be a bit of an edge-case for most people, but Redmon crashes if the results of SLOWLOG contain non-ascii characters. The occurred after using the MIGRATE command(since this does serialization + DUMP/RESTORE).

I'll see if I can submit a repro/bug fix later.

[13-04-27 00:02:41] !!! Redmon has shit the bed, restarting... "\x80" on US-ASCII [13-04-27 00:02:41] /var/lib/gems/1.9.1/gems/activesupport-3.2.13/lib/active_support/json/encoding.rb:123:in encode' [13-04-27 00:02:41] /var/lib/gems/1.9.1/gems/activesupport-3.2.13/lib/active_support/json/encoding.rb:123:inescape' [13-04-27 00:02:41] /var/lib/gems/1.9.1/gems/activesupport-3.2.13/lib/active_support/json/encoding.rb:69:in escape' [13-04-27 00:02:41] /var/lib/gems/1.9.1/gems/activesupport-3.2.13/lib/active_support/json/encoding.rb:171:inencode_json' [13-04-27 00:02:41] /var/lib/gems/1.9.1/gems/activesupport-3.2.13/lib/active_support/json/encoding.rb:48:in block in encode ' [13-04-27 00:02:41] /var/lib/gems/1.9.1/gems/activesupport-3.2.13/lib/active_support/json/encoding.rb:77:incheck_for_circu lar_references' [13-04-27 00:02:41] /var/lib/gems/1.9.1/gems/activesupport-3.2.13/lib/active_support/json/encoding.rb:46:in encode' [13-04-27 00:02:41] /var/lib/gems/1.9.1/gems/activesupport-3.2.13/lib/active_support/json/encoding.rb:246:inblock in encod.....

And here's a SLOWLOG entry that I think is reponsible:

    1. (integer) 61
    2. (integer) 1367003879
    3. (integer) 502592
      1. "RESTORE"
      2. "[key]"
      3. "470222651"
      4. "\x03\x80\x00\x01\xb8\x9b\x18........ (3012027 more bytes)"

dcartoon avatar Apr 27 '13 00:04 dcartoon