msgpack / msgpack-ruby

MessagePack implementation for Ruby / msgpack.org[Ruby]
http://msgpack.org/
Apache License 2.0
764 stars 117 forks source link

Packer can overwrite earlier parts of its buffer in version 1.6.0 #309

Closed qcn closed 1 year ago

qcn commented 2 years ago

Since upgrading to msgpack 1.6.0 we've been seeing occasional data corruption when packing, which did not happen with 1.5.6. The behaviour is non-deterministic and we haven't been able to explicitly reproduce it yet, but we have several examples of the corrupted data. The symptom is that some bytes from later in the packed data are copied over bytes from earlier, so those bytes appear twice in the packed data (and there is data loss from the corruption).

Example, using Ruby 2.7.6 and msgpack 1.6.0:

The original Ruby object:

{"propertyValues"=>
  {"fill"=>nil,
   "stroke"=>"rgb(0,0,0)",
   "fontColor"=>"rgb(0,0,0)",
   "strokeWidth"=>3,
   "stileArrowHead"=>"arrowHeadNone",
   "fontSize"=>16,
   "fontFamily"=>"Open Sans",
   "shapeName"=>"ellipse"},
 "artboard"=>{"width"=>960, "height"=>540},
 "fabricState"=>
  {"objects"=>
    [{"type"=>"upload",
      "originX"=>"center",
      "originY"=>"center",
      "left"=>479.32,
      "top"=>270.38,
      "width"=>1001,
      "height"=>563,
      "fill"=>"rgb(0,0,0)",
      "stroke"=>nil,
      "strokeWidth"=>1,
      "strokeDashArray"=>nil,
      "strokeLineCap"=>"butt",
      "strokeLineJoin"=>"miter",
      "strokeMiterLimit"=>10,
      "scaleX"=>0.96,
      "scaleY"=>0.96,
      "angle"=>0,
      "flipX"=>false,
      "flipY"=>false,
      "opacity"=>1,
      "shadow"=>nil,
      "visible"=>true,
      "clipTo"=>nil,
      "backgroundColor"=>"",
      "fillRule"=>"nonzero",
      "globalCompositeOperation"=>"source-over",
      "stileLocked"=>true,
      "stileUuid"=>"12aad370-b069-47fa-a8ab-a834b8f5903e",
      "stileImageNeedsToBeAutosized"=>false,
      "stileTransientObject"=>false,
      "perPixelTargetFind"=>false,
      "strokeScaledX"=>1,
      "strokeScaledY"=>1,
      "uploadId"=>
       "8224e788d3c957e0749ba7782ae66be5dd68c182d73d60209b2ad49f17b1c705"},
     {"type"=>"upload",
      "originX"=>"center",
      "originY"=>"center",
      "left"=>112.19,
      "top"=>507.7,
      "width"=>131,
      "height"=>76,
      "fill"=>"rgb(0,0,0)",
      "stroke"=>nil,
      "strokeWidth"=>1,
      "strokeDashArray"=>nil,
      "strokeLineCap"=>"butt",
      "strokeLineJoin"=>"miter",
      "strokeMiterLimit"=>10,
      "scaleX"=>1,
      "scaleY"=>1,
      "angle"=>0,
      "flipX"=>false,
      "flipY"=>false,
      "opacity"=>1,
      "shadow"=>nil,
      "visible"=>true,
      "clipTo"=>nil,
      "backgroundColor"=>"",
      "fillRule"=>"nonzero",
      "globalCompositeOperation"=>"source-over",
      "stileUuid"=>"25103e7a-c97b-47f8-bbb5-a9d899e86f08",
      "stileImageNeedsToBeAutosized"=>false,
      "stileTransientObject"=>false,
      "perPixelTargetFind"=>false,
      "strokeScaledX"=>1,
      "strokeScaledY"=>1,
      "uploadId"=>
       "11daecfd06cf9a99b4bc5b8b75492d1bc945fa5d6f0aff8681338d7e0bc9b68f"},
     {"type"=>"upload",
      "originX"=>"center",
      "originY"=>"center",
      "left"=>246.42,
      "top"=>502.08,
      "width"=>131,
      "height"=>76,
      "fill"=>"rgb(0,0,0)",
      "stroke"=>nil,
      "strokeWidth"=>1,
      "strokeDashArray"=>nil,
      "strokeLineCap"=>"butt",
      "strokeLineJoin"=>"miter",
      "strokeMiterLimit"=>10,
      "scaleX"=>1,
      "scaleY"=>1,
      "angle"=>0,
      "flipX"=>false,
      "flipY"=>false,
      "opacity"=>1,
      "shadow"=>nil,
      "visible"=>true,
      "clipTo"=>nil,
      "backgroundColor"=>"",
      "fillRule"=>"nonzero",
      "globalCompositeOperation"=>"source-over",
      "stileUuid"=>"da8399f3-a912-479e-9a91-7aabc01e909d",
      "stileImageNeedsToBeAutosized"=>false,
      "stileTransientObject"=>false,
      "perPixelTargetFind"=>false,
      "strokeScaledX"=>1,
      "strokeScaledY"=>1,
      "uploadId"=>
       "3138a30ea079e44cab0d0cccb1ec89d25aec1572c7051a992ecdb78332da54a6"},
     {"type"=>"upload",
      "originX"=>"center",
      "originY"=>"center",
      "left"=>375.9,
      "top"=>509.7,
      "width"=>131,
      "height"=>76,
      "fill"=>"rgb(0,0,0)",
      "stroke"=>nil,
      "strokeWidth"=>1,
      "strokeDashArray"=>nil,
      "strokeLineCap"=>"butt",
      "strokeLineJoin"=>"miter",
      "strokeMiterLimit"=>10,
      "scaleX"=>1,
      "scaleY"=>1,
      "angle"=>0,
      "flipX"=>false,
      "flipY"=>false,
      "opacity"=>1,
      "shadow"=>nil,
      "visible"=>true,
      "clipTo"=>nil,
      "backgroundColor"=>"",
      "fillRule"=>"nonzero",
      "globalCompositeOperation"=>"source-over",
      "stileUuid"=>"1ba77443-6a7f-4936-b14d-8bdaf59dac38",
      "stileImageNeedsToBeAutosized"=>false,
      "stileTransientObject"=>false,
      "perPixelTargetFind"=>false,
      "strokeScaledX"=>1,
      "strokeScaledY"=>1,
      "uploadId"=>
       "9e207dc985f09ddf7dee44a3e140f4106d709510f4df1186d4a96f970e417eca"},
     {"type"=>"upload",
      "originX"=>"center",
      "originY"=>"center",
      "left"=>527.81,
      "top"=>510.47,
      "width"=>131,
      "height"=>76,
      "fill"=>"rgb(0,0,0)",
      "stroke"=>nil,
      "strokeWidth"=>1,
      "strokeDashArray"=>nil,
      "strokeLineCap"=>"butt",
      "strokeLineJoin"=>"miter",
      "strokeMiterLimit"=>10,
      "scaleX"=>1,
      "scaleY"=>1,
      "angle"=>0,
      "flipX"=>false,
      "flipY"=>false,
      "opacity"=>1,
      "shadow"=>nil,
      "visible"=>true,
      "clipTo"=>nil,
      "backgroundColor"=>"",
      "fillRule"=>"nonzero",
      "globalCompositeOperation"=>"source-over",
      "stileUuid"=>"c601ca22-0de3-43d4-97bd-6a21f251190d",
      "stileImageNeedsToBeAutosized"=>false,
      "stileTransientObject"=>false,
      "perPixelTargetFind"=>false,
      "strokeScaledX"=>1,
      "strokeScaledY"=>1,
      "uploadId"=>
       "916fa809fc2cff3d08ba54b3825fe6a698a1a76fff89510b20791ffd923ba1d2"},
     {"type"=>"upload",
      "originX"=>"center",
      "originY"=>"center",
      "left"=>216.63,
      "top"=>229.95,
      "width"=>131,
      "height"=>76,
      "fill"=>"rgb(0,0,0)",
      "stroke"=>nil,
      "strokeWidth"=>1,
      "strokeDashArray"=>nil,
      "strokeLineCap"=>"butt",
      "strokeLineJoin"=>"miter",
      "strokeMiterLimit"=>10,
      "scaleX"=>1,
      "scaleY"=>1,
      "angle"=>90.41,
      "flipX"=>false,
      "flipY"=>false,
      "opacity"=>1,
      "shadow"=>nil,
      "visible"=>true,
      "clipTo"=>nil,
      "backgroundColor"=>"",
      "fillRule"=>"nonzero",
      "globalCompositeOperation"=>"source-over",
      "stileUuid"=>"8b061f24-9ffc-494b-b27a-730d11ad5181",
      "stileImageNeedsToBeAutosized"=>false,
      "stileTransientObject"=>false,
      "perPixelTargetFind"=>false,
      "strokeScaledX"=>1,
      "strokeScaledY"=>1,
      "uploadId"=>
       "0c5f99074c47d45540aaef3690d70476d81aac861bb4d82dc9892bed43326f15"},
     {"type"=>"upload",
      "originX"=>"center",
      "originY"=>"center",
      "left"=>420.35,
      "top"=>194.43,
      "width"=>131,
      "height"=>76,
      "fill"=>"rgb(0,0,0)",
      "stroke"=>nil,
      "strokeWidth"=>1,
      "strokeDashArray"=>nil,
      "strokeLineCap"=>"butt",
      "strokeLineJoin"=>"miter",
      "strokeMiterLimit"=>10,
      "scaleX"=>1,
      "scaleY"=>1,
      "angle"=>89.96,
      "flipX"=>false,
      "flipY"=>false,
      "opacity"=>1,
      "shadow"=>nil,
      "visible"=>true,
      "clipTo"=>nil,
      "backgroundColor"=>"",
      "fillRule"=>"nonzero",
      "globalCompositeOperation"=>"source-over",
      "stileUuid"=>"7b49ee8d-98aa-4d74-beaa-2f405083090e",
      "stileImageNeedsToBeAutosized"=>false,
      "stileTransientObject"=>false,
      "perPixelTargetFind"=>false,
      "strokeScaledX"=>1,
      "strokeScaledY"=>1,
      "uploadId"=>
       "1313e0e9d3cf85ed8ad548308c4e318e269232c1b9cd7732e8ddf15227b96d16"},
     {"type"=>"upload",
      "originX"=>"center",
      "originY"=>"center",
      "left"=>105.28,
      "top"=>229.95,
      "width"=>131,
      "height"=>76,
      "fill"=>"rgb(0,0,0)",
      "stroke"=>nil,
      "strokeWidth"=>1,
      "strokeDashArray"=>nil,
      "strokeLineCap"=>"butt",
      "strokeLineJoin"=>"miter",
      "strokeMiterLimit"=>10,
      "scaleX"=>1,
      "scaleY"=>1,
      "angle"=>89.87,
      "flipX"=>false,
      "flipY"=>false,
      "opacity"=>1,
      "shadow"=>nil,
      "visible"=>true,
      "clipTo"=>nil,
      "backgroundColor"=>"",
      "fillRule"=>"nonzero",
      "globalCompositeOperation"=>"source-over",
      "stileUuid"=>"a1ef069a-b9e5-40e8-bd32-cd93b1f9753b",
      "stileImageNeedsToBeAutosized"=>false,
      "stileTransientObject"=>false,
      "perPixelTargetFind"=>false,
      "strokeScaledX"=>1,
      "strokeScaledY"=>1,
      "uploadId"=>
       "b1e5517afba17410b6a94f80c4d61894f710409089fc64bb32bc41eae2d0ab87"},
     {"type"=>"upload",
      "originX"=>"center",
      "originY"=>"center",
      "left"=>471.96,
      "top"=>297.51,
      "width"=>131,
      "height"=>76,
      "fill"=>"rgb(0,0,0)",
      "stroke"=>nil,
      "strokeWidth"=>1,
      "strokeDashArray"=>nil,
      "strokeLineCap"=>"butt",
      "strokeLineJoin"=>"miter",
      "strokeMiterLimit"=>10,
      "scaleX"=>1,
      "scaleY"=>1,
      "angle"=>0,
      "flipX"=>false,
      "flipY"=>false,
      "opacity"=>1,
      "shadow"=>nil,
      "visible"=>true,
      "clipTo"=>nil,
      "backgroundColor"=>"",
      "fillRule"=>"nonzero",
      "globalCompositeOperation"=>"source-over",
      "stileUuid"=>"a4476d6e-6fa0-423c-9a35-706c81ac9dc3",
      "stileImageNeedsToBeAutosized"=>false,
      "stileTransientObject"=>false,
      "perPixelTargetFind"=>false,
      "strokeScaledX"=>1,
      "strokeScaledY"=>1,
      "uploadId"=>
       "687c4572f889f63e0c1c7b7f2bfac5017a675373b9e8592ee8af7a156fc15051"},
     {"type"=>"upload",
      "originX"=>"center",
      "originY"=>"center",
      "left"=>476.76,
      "top"=>130.47,
      "width"=>131,
      "height"=>76,
      "fill"=>"rgb(0,0,0)",
      "stroke"=>nil,
      "strokeWidth"=>1,
      "strokeDashArray"=>nil,
      "strokeLineCap"=>"butt",
      "strokeLineJoin"=>"miter",
      "strokeMiterLimit"=>10,
      "scaleX"=>1,
      "scaleY"=>1,
      "angle"=>0,
      "flipX"=>false,
      "flipY"=>false,
      "opacity"=>1,
      "shadow"=>nil,
      "visible"=>true,
      "clipTo"=>nil,
      "backgroundColor"=>"",
      "fillRule"=>"nonzero",
      "globalCompositeOperation"=>"source-over",
      "stileUuid"=>"de28ecd6-3a33-43de-a6e1-1be54cc882f3",
      "stileImageNeedsToBeAutosized"=>false,
      "stileTransientObject"=>false,
      "perPixelTargetFind"=>false,
      "strokeScaledX"=>1,
      "strokeScaledY"=>1,
      "uploadId"=>
       "764d6f504829c5ef9e6ec757beb4c73b3d36a664ba3cd82c7ea3cd1d0d316c45"},
     {"type"=>"upload",
      "originX"=>"center",
      "originY"=>"center",
      "left"=>161.69,
      "top"=>166.95,
      "width"=>131,
      "height"=>76,
      "fill"=>"rgb(0,0,0)",
      "stroke"=>nil,
      "strokeWidth"=>1,
      "strokeDashArray"=>nil,
      "strokeLineCap"=>"butt",
      "strokeLineJoin"=>"miter",
      "strokeMiterLimit"=>10,
      "scaleX"=>1,
      "scaleY"=>1,
      "angle"=>0,
      "flipX"=>false,
      "flipY"=>false,
      "opacity"=>1,
      "shadow"=>nil,
      "visible"=>true,
      "clipTo"=>nil,
      "backgroundColor"=>"",
      "fillRule"=>"nonzero",
      "globalCompositeOperation"=>"source-over",
      "stileUuid"=>"694701c6-7265-4e53-93fd-8c597bcd4ce0",
      "stileImageNeedsToBeAutosized"=>false,
      "stileTransientObject"=>false,
      "perPixelTargetFind"=>false,
      "strokeScaledX"=>1,
      "strokeScaledY"=>1,
      "uploadId"=>
       "f7cc62c50b63a356349e2848ab42a8442c002ea085840efb71ef077eae920432"},
     {"type"=>"upload",
      "originX"=>"center",
      "originY"=>"center",
      "left"=>162.84,
      "top"=>281.19,
      "width"=>131,
      "height"=>76,
      "fill"=>"rgb(0,0,0)",
      "stroke"=>nil,
      "strokeWidth"=>1,
      "strokeDashArray"=>nil,
      "strokeLineCap"=>"butt",
      "strokeLineJoin"=>"miter",
      "strokeMiterLimit"=>10,
      "scaleX"=>1,
      "scaleY"=>1,
      "angle"=>0,
      "flipX"=>false,
      "flipY"=>false,
      "opacity"=>1,
      "shadow"=>nil,
      "visible"=>true,
      "clipTo"=>nil,
      "backgroundColor"=>"",
      "fillRule"=>"nonzero",
      "globalCompositeOperation"=>"source-over",
      "stileUuid"=>"f102f8d3-dbf5-4ebc-a380-88b1f7c54d66",
      "stileImageNeedsToBeAutosized"=>false,
      "stileTransientObject"=>false,
      "perPixelTargetFind"=>false,
      "strokeScaledX"=>1,
      "strokeScaledY"=>1,
      "uploadId"=>
       "bbde3263cb15282b528334cebbaabb422dc07755e615321da81da29be70f1d5a"},
     {"type"=>"upload",
      "originX"=>"center",
      "originY"=>"center",
      "left"=>376.67,
      "top"=>509.7,
      "width"=>131,
      "height"=>76,
      "fill"=>"rgb(0,0,0)",
      "stroke"=>nil,
      "strokeWidth"=>1,
      "strokeDashArray"=>nil,
      "strokeLineCap"=>"butt",
      "strokeLineJoin"=>"miter",
      "strokeMiterLimit"=>10,
      "scaleX"=>1,
      "scaleY"=>1,
      "angle"=>0,
      "flipX"=>false,
      "flipY"=>false,
      "opacity"=>1,
      "shadow"=>nil,
      "visible"=>true,
      "clipTo"=>nil,
      "backgroundColor"=>"",
      "fillRule"=>"nonzero",
      "globalCompositeOperation"=>"source-over",
      "stileUuid"=>"9181a6c8-7765-41e2-ad65-6bab5d5def06",
      "stileImageNeedsToBeAutosized"=>false,
      "stileTransientObject"=>false,
      "perPixelTargetFind"=>false,
      "strokeScaledX"=>1,
      "strokeScaledY"=>1,
      "uploadId"=>
       "058b3921fa09b44745e64c1bef5847e313b7867613b71a731d888675f0297a91"},
     {"type"=>"upload",
      "originX"=>"center",
      "originY"=>"center",
      "left"=>375.9,
      "top"=>509.7,
      "width"=>131,
      "height"=>76,
      "fill"=>"rgb(0,0,0)",
      "stroke"=>nil,
      "strokeWidth"=>1,
      "strokeDashArray"=>nil,
      "strokeLineCap"=>"butt",
      "strokeLineJoin"=>"miter",
      "strokeMiterLimit"=>10,
      "scaleX"=>1,
      "scaleY"=>1,
      "angle"=>0,
      "flipX"=>false,
      "flipY"=>false,
      "opacity"=>1,
      "shadow"=>nil,
      "visible"=>true,
      "clipTo"=>nil,
      "backgroundColor"=>"",
      "fillRule"=>"nonzero",
      "globalCompositeOperation"=>"source-over",
      "stileUuid"=>"a86f36c2-86f5-4653-a300-60b52694404a",
      "stileImageNeedsToBeAutosized"=>false,
      "stileTransientObject"=>false,
      "perPixelTargetFind"=>false,
      "strokeScaledX"=>1,
      "strokeScaledY"=>1,
      "uploadId"=>
       "1fd072a991befce7ead3fffb546534844e56e1bfc73f05c601ea20a409de33a4"},
     {"type"=>"upload",
      "originX"=>"center",
      "originY"=>"center",
      "left"=>527.81,
      "top"=>510.47,
      "width"=>131,
      "height"=>76,
      "fill"=>"rgb(0,0,0)",
      "stroke"=>nil,
      "strokeWidth"=>1,
      "strokeDashArray"=>nil,
      "strokeLineCap"=>"butt",
      "strokeLineJoin"=>"miter",
      "strokeMiterLimit"=>10,
      "scaleX"=>1,
      "scaleY"=>1,
      "angle"=>0,
      "flipX"=>false,
      "flipY"=>false,
      "opacity"=>1,
      "shadow"=>nil,
      "visible"=>true,
      "clipTo"=>nil,
      "backgroundColor"=>"",
      "fillRule"=>"nonzero",
      "globalCompositeOperation"=>"source-over",
      "stileUuid"=>"002b600c-27d9-4d0c-8627-06e3edb1d19a",
      "stileImageNeedsToBeAutosized"=>false,
      "stileTransientObject"=>false,
      "perPixelTargetFind"=>false,
      "strokeScaledX"=>1,
      "strokeScaledY"=>1,
      "uploadId"=>
       "3d7f48636f9b0cc5b10819d406582d2d4fc15840b11542a018a8b6160c5b1de7"},
     {"type"=>"upload",
      "originX"=>"center",
      "originY"=>"center",
      "left"=>528.58,
      "top"=>510.47,
      "width"=>131,
      "height"=>76,
      "fill"=>"rgb(0,0,0)",
      "stroke"=>nil,
      "strokeWidth"=>1,
      "strokeDashArray"=>nil,
      "strokeLineCap"=>"butt",
      "strokeLineJoin"=>"miter",
      "strokeMiterLimit"=>10,
      "scaleX"=>1,
      "scaleY"=>1,
      "angle"=>0,
      "flipX"=>false,
      "flipY"=>false,
      "opacity"=>1,
      "shadow"=>nil,
      "visible"=>true,
      "clipTo"=>nil,
      "backgroundColor"=>"",
      "fillRule"=>"nonzero",
      "globalCompositeOperation"=>"source-over",
      "stileUuid"=>"b41e5211-15a2-4d19-9ec1-29953ceb0fe8",
      "stileImageNeedsToBeAutosized"=>false,
      "stileTransientObject"=>false,
      "perPixelTargetFind"=>false,
      "strokeScaledX"=>1,
      "strokeScaledY"=>1,
      "uploadId"=>
       "493f0fb48d011d96710d22767b422de9c72115da8bfb3fb7bf6f711a4ed05963"}],
   "background"=>"white",
   "perPixelTargetFind"=>false},
 "migrations"=>["pathScalingHack"],
 "enableColorMap2017"=>false,
 "missileUuids"=>[],
 "marksAreSetManually"=>true,
 "branchedAtWorksheetItemVersion"=>1}

Usually the output from running this through MessagePack.pack is:

"\x88\xAEpropertyValues\x88\xA4fill\xC0\xA6stroke\xAArgb(0,0,0)\xA9fontColor\xAArgb(0,0,0)\xABstrokeWidth\x03\xAEstileArrowHead\xADarrowHeadNone\xA8fontSize\x10\xAAfontFamily\xA9Open Sans\xA9shapeName\xA7ellipse\xA8artboard\x82\xA5width\xCD\x03\xC0\xA6height\xCD\x02\x1C\xABfabricState\x83\xA7objects\xDC\x00\x10\xDE\x00\"\xA4type\xA6upload\xA7originX\xA6center\xA7originY\xA6center\xA4left\xCB@}\xF5\x1E\xB8Q\xEB\x85\xA3top\xCB@p\xE6\x14z\xE1G\xAE\xA5width\xCD\x03\xE9\xA6height\xCD\x023\xA4fill\xAArgb(0,0,0)\xA6stroke\xC0\xABstrokeWidth\x01\xAFstrokeDashArray\xC0\xADstrokeLineCap\xA4butt\xAEstrokeLineJoin\xA5miter\xB0strokeMiterLimit\n\xA6scaleX\xCB?\xEE\xB8Q\xEB\x85\x1E\xB8\xA6scaleY\xCB?\xEE\xB8Q\xEB\x85\x1E\xB8\xA5angle\x00\xA5flipX\xC2\xA5flipY\xC2\xA7opacity\x01\xA6shadow\xC0\xA7visible\xC3\xA6clipTo\xC0\xAFbackgroundColor\xA0\xA8fillRule\xA7nonzero\xB8globalCompositeOperation\xABsource-over\xABstileLocked\xC3\xA9stileUuid\xD9$12aad370-b069-47fa-a8ab-a834b8f5903e\xBCstileImageNeedsToBeAutosized\xC2\xB4stileTransientObject\xC2\xB2perPixelTargetFind\xC2\xADstrokeScaledX\x01\xADstrokeScaledY\x01\xA8uploadId\xD9@8224e788d3c957e0749ba7782ae66be5dd68c182d73d60209b2ad49f17b1c705\xDE\x00!\xA4type\xA6upload\xA7originX\xA6center\xA7originY\xA6center\xA4left\xCB@\\\f(\xF5\xC2\x8F\\\xA3top\xCB@\x7F\xBB33333\xA5width\xCC\x83\xA6heightL\xA4fill\xAArgb(0,0,0)\xA6stroke\xC0\xABstrokeWidth\x01\xAFstrokeDashArray\xC0\xADstrokeLineCap\xA4butt\xAEstrokeLineJoin\xA5miter\xB0strokeMiterLimit\n\xA6scaleX\x01\xA6scaleY\x01\xA5angle\x00\xA5flipX\xC2\xA5flipY\xC2\xA7opacity\x01\xA6shadow\xC0\xA7visible\xC3\xA6clipTo\xC0\xAFbackgroundColor\xA0\xA8fillRule\xA7nonzero\xB8globalCompositeOperation\xABsource-over\xA9stileUuid\xD9$25103e7a-c97b-47f8-bbb5-a9d899e86f08\xBCstileImageNeedsToBeAutosized\xC2\xB4stileTransientObject\xC2\xB2perPixelTargetFind\xC2\xADstrokeScaledX\x01\xADstrokeScaledY\x01\xA8uploadId\xD9@11daecfd06cf9a99b4bc5b8b75492d1bc945fa5d6f0aff8681338d7e0bc9b68f\xDE\x00!\xA4type\xA6upload\xA7originX\xA6center\xA7originY\xA6center\xA4left\xCB@n\xCDp\xA3\xD7\n=\xA3top\xCB@\x7FaG\xAE\x14z\xE1\xA5width\xCC\x83\xA6heightL\xA4fill\xAArgb(0,0,0)\xA6stroke\xC0\xABstrokeWidth\x01\xAFstrokeDashArray\xC0\xADstrokeLineCap\xA4butt\xAEstrokeLineJoin\xA5miter\xB0strokeMiterLimit\n\xA6scaleX\x01\xA6scaleY\x01\xA5angle\x00\xA5flipX\xC2\xA5flipY\xC2\xA7opacity\x01\xA6shadow\xC0\xA7visible\xC3\xA6clipTo\xC0\xAFbackgroundColor\xA0\xA8fillRule\xA7nonzero\xB8globalCompositeOperation\xABsource-over\xA9stileUuid\xD9$da8399f3-a912-479e-9a91-7aabc01e909d\xBCstileImageNeedsToBeAutosized\xC2\xB4stileTransientObject\xC2\xB2perPixelTargetFind\xC2\xADstrokeScaledX\x01\xADstrokeScaledY\x01\xA8uploadId\xD9@3138a30ea079e44cab0d0cccb1ec89d25aec1572c7051a992ecdb78332da54a6\xDE\x00!\xA4type\xA6upload\xA7originX\xA6center\xA7originY\xA6center\xA4left\xCB@w~fffff\xA3top\xCB@\x7F\xDB33333\xA5width\xCC\x83\xA6heightL\xA4fill\xAArgb(0,0,0)\xA6stroke\xC0\xABstrokeWidth\x01\xAFstrokeDashArray\xC0\xADstrokeLineCap\xA4butt\xAEstrokeLineJoin\xA5miter\xB0strokeMiterLimit\n\xA6scaleX\x01\xA6scaleY\x01\xA5angle\x00\xA5flipX\xC2\xA5flipY\xC2\xA7opacity\x01\xA6shadow\xC0\xA7visible\xC3\xA6clipTo\xC0\xAFbackgroundColor\xA0\xA8fillRule\xA7nonzero\xB8globalCompositeOperation\xABsource-over\xA9stileUuid\xD9$1ba77443-6a7f-4936-b14d-8bdaf59dac38\xBCstileImageNeedsToBeAutosized\xC2\xB4stileTransientObject\xC2\xB2perPixelTargetFind\xC2\xADstrokeScaledX\x01\xADstrokeScaledY\x01\xA8uploadId\xD9@9e207dc985f09ddf7dee44a3e140f4106d709510f4df1186d4a96f970e417eca\xDE\x00!\xA4type\xA6upload\xA7originX\xA6center\xA7originY\xA6center\xA4left\xCB@\x80~z\xE1G\xAE\x14\xA3top\xCB@\x7F\xE7\x85\x1E\xB8Q\xEC\xA5width\xCC\x83\xA6heightL\xA4fill\xAArgb(0,0,0)\xA6stroke\xC0\xABstrokeWidth\x01\xAFstrokeDashArray\xC0\xADstrokeLineCap\xA4butt\xAEstrokeLineJoin\xA5miter\xB0strokeMiterLimit\n\xA6scaleX\x01\xA6scaleY\x01\xA5angle\x00\xA5flipX\xC2\xA5flipY\xC2\xA7opacity\x01\xA6shadow\xC0\xA7visible\xC3\xA6clipTo\xC0\xAFbackgroundColor\xA0\xA8fillRule\xA7nonzero\xB8globalCompositeOperation\xABsource-over\xA9stileUuid\xD9$c601ca22-0de3-43d4-97bd-6a21f251190d\xBCstileImageNeedsToBeAutosized\xC2\xB4stileTransientObject\xC2\xB2perPixelTargetFind\xC2\xADstrokeScaledX\x01\xADstrokeScaledY\x01\xA8uploadId\xD9@916fa809fc2cff3d08ba54b3825fe6a698a1a76fff89510b20791ffd923ba1d2\xDE\x00!\xA4type\xA6upload\xA7originX\xA6center\xA7originY\xA6center\xA4left\xCB@k\x14(\xF5\xC2\x8F\\\xA3top\xCB@l\xBEfffff\xA5width\xCC\x83\xA6heightL\xA4fill\xAArgb(0,0,0)\xA6stroke\xC0\xABstrokeWidth\x01\xAFstrokeDashArray\xC0\xADstrokeLineCap\xA4butt\xAEstrokeLineJoin\xA5miter\xB0strokeMiterLimit\n\xA6scaleX\x01\xA6scaleY\x01\xA5angle\xCB@V\x9A=p\xA3\xD7\n\xA5flipX\xC2\xA5flipY\xC2\xA7opacity\x01\xA6shadow\xC0\xA7visible\xC3\xA6clipTo\xC0\xAFbackgroundColor\xA0\xA8fillRule\xA7nonzero\xB8globalCompositeOperation\xABsource-over\xA9stileUuid\xD9$8b061f24-9ffc-494b-b27a-730d11ad5181\xBCstileImageNeedsToBeAutosized\xC2\xB4stileTransientObject\xC2\xB2perPixelTargetFind\xC2\xADstrokeScaledX\x01\xADstrokeScaledY\x01\xA8uploadId\xD9@0c5f99074c47d45540aaef3690d70476d81aac861bb4d82dc9892bed43326f15\xDE\x00!\xA4type\xA6upload\xA7originX\xA6center\xA7originY\xA6center\xA4left\xCB@zE\x99\x99\x99\x99\x9A\xA3top\xCB@hM\xC2\x8F\\(\xF6\xA5width\xCC\x83\xA6heightL\xA4fill\xAArgb(0,0,0)\xA6stroke\xC0\xABstrokeWidth\x01\xAFstrokeDashArray\xC0\xADstrokeLineCap\xA4butt\xAEstrokeLineJoin\xA5miter\xB0strokeMiterLimit\n\xA6scaleX\x01\xA6scaleY\x01\xA5angle\xCB@V}p\xA3\xD7\n=\xA5flipX\xC2\xA5flipY\xC2\xA7opacity\x01\xA6shadow\xC0\xA7visible\xC3\xA6clipTo\xC0\xAFbackgroundColor\xA0\xA8fillRule\xA7nonzero\xB8globalCompositeOperation\xABsource-over\xA9stileUuid\xD9$7b49ee8d-98aa-4d74-beaa-2f405083090e\xBCstileImageNeedsToBeAutosized\xC2\xB4stileTransientObject\xC2\xB2perPixelTargetFind\xC2\xADstrokeScaledX\x01\xADstrokeScaledY\x01\xA8uploadId\xD9@1313e0e9d3cf85ed8ad548308c4e318e269232c1b9cd7732e8ddf15227b96d16\xDE\x00!\xA4type\xA6upload\xA7originX\xA6center\xA7originY\xA6center\xA4left\xCB@ZQ\xEB\x85\x1E\xB8R\xA3top\xCB@l\xBEfffff\xA5width\xCC\x83\xA6heightL\xA4fill\xAArgb(0,0,0)\xA6stroke\xC0\xABstrokeWidth\x01\xAFstrokeDashArray\xC0\xADstrokeLineCap\xA4butt\xAEstrokeLineJoin\xA5miter\xB0strokeMiterLimit\n\xA6scaleX\x01\xA6scaleY\x01\xA5angle\xCB@Vw\xAE\x14z\xE1H\xA5flipX\xC2\xA5flipY\xC2\xA7opacity\x01\xA6shadow\xC0\xA7visible\xC3\xA6clipTo\xC0\xAFbackgroundColor\xA0\xA8fillRule\xA7nonzero\xB8globalCompositeOperation\xABsource-over\xA9stileUuid\xD9$a1ef069a-b9e5-40e8-bd32-cd93b1f9753b\xBCstileImageNeedsToBeAutosized\xC2\xB4stileTransientObject\xC2\xB2perPixelTargetFind\xC2\xADstrokeScaledX\x01\xADstrokeScaledY\x01\xA8uploadId\xD9@b1e5517afba17410b6a94f80c4d61894f710409089fc64bb32bc41eae2d0ab87\xDE\x00!\xA4type\xA6upload\xA7originX\xA6center\xA7originY\xA6center\xA4left\xCB@}\x7F\\(\xF5\xC2\x8F\xA3top\xCB@r\x98(\xF5\xC2\x8F\\\xA5width\xCC\x83\xA6heightL\xA4fill\xAArgb(0,0,0)\xA6stroke\xC0\xABstrokeWidth\x01\xAFstrokeDashArray\xC0\xADstrokeLineCap\xA4butt\xAEstrokeLineJoin\xA5miter\xB0strokeMiterLimit\n\xA6scaleX\x01\xA6scaleY\x01\xA5angle\x00\xA5flipX\xC2\xA5flipY\xC2\xA7opacity\x01\xA6shadow\xC0\xA7visible\xC3\xA6clipTo\xC0\xAFbackgroundColor\xA0\xA8fillRule\xA7nonzero\xB8globalCompositeOperation\xABsource-over\xA9stileUuid\xD9$a4476d6e-6fa0-423c-9a35-706c81ac9dc3\xBCstileImageNeedsToBeAutosized\xC2\xB4stileTransientObject\xC2\xB2perPixelTargetFind\xC2\xADstrokeScaledX\x01\xADstrokeScaledY\x01\xA8uploadId\xD9@687c4572f889f63e0c1c7b7f2bfac5017a675373b9e8592ee8af7a156fc15051\xDE\x00!\xA4type\xA6upload\xA7originX\xA6center\xA7originY\xA6center\xA4left\xCB@}\xCC(\xF5\xC2\x8F\\\xA3top\xCB@`O\n=p\xA3\xD7\xA5width\xCC\x83\xA6heightL\xA4fill\xAArgb(0,0,0)\xA6stroke\xC0\xABstrokeWidth\x01\xAFstrokeDashArray\xC0\xADstrokeLineCap\xA4butt\xAEstrokeLineJoin\xA5miter\xB0strokeMiterLimit\n\xA6scaleX\x01\xA6scaleY\x01\xA5angle\x00\xA5flipX\xC2\xA5flipY\xC2\xA7opacity\x01\xA6shadow\xC0\xA7visible\xC3\xA6clipTo\xC0\xAFbackgroundColor\xA0\xA8fillRule\xA7nonzero\xB8globalCompositeOperation\xABsource-over\xA9stileUuid\xD9$de28ecd6-3a33-43de-a6e1-1be54cc882f3\xBCstileImageNeedsToBeAutosized\xC2\xB4stileTransientObject\xC2\xB2perPixelTargetFind\xC2\xADstrokeScaledX\x01\xADstrokeScaledY\x01\xA8uploadId\xD9@764d6f504829c5ef9e6ec757beb4c73b3d36a664ba3cd82c7ea3cd1d0d316c45\xDE\x00!\xA4type\xA6upload\xA7originX\xA6center\xA7originY\xA6center\xA4left\xCB@d6\x14z\xE1G\xAE\xA3top\xCB@d\xDEfffff\xA5width\xCC\x83\xA6heightL\xA4fill\xAArgb(0,0,0)\xA6stroke\xC0\xABstrokeWidth\x01\xAFstrokeDashArray\xC0\xADstrokeLineCap\xA4butt\xAEstrokeLineJoin\xA5miter\xB0strokeMiterLimit\n\xA6scaleX\x01\xA6scaleY\x01\xA5angle\x00\xA5flipX\xC2\xA5flipY\xC2\xA7opacity\x01\xA6shadow\xC0\xA7visible\xC3\xA6clipTo\xC0\xAFbackgroundColor\xA0\xA8fillRule\xA7nonzero\xB8globalCompositeOperation\xABsource-over\xA9stileUuid\xD9$694701c6-7265-4e53-93fd-8c597bcd4ce0\xBCstileImageNeedsToBeAutosized\xC2\xB4stileTransientObject\xC2\xB2perPixelTargetFind\xC2\xADstrokeScaledX\x01\xADstrokeScaledY\x01\xA8uploadId\xD9@f7cc62c50b63a356349e2848ab42a8442c002ea085840efb71ef077eae920432\xDE\x00!\xA4type\xA6upload\xA7originX\xA6center\xA7originY\xA6center\xA4left\xCB@dZ\xE1G\xAE\x14{\xA3top\xCB@q\x93\n=p\xA3\xD7\xA5width\xCC\x83\xA6heightL\xA4fill\xAArgb(0,0,0)\xA6stroke\xC0\xABstrokeWidth\x01\xAFstrokeDashArray\xC0\xADstrokeLineCap\xA4butt\xAEstrokeLineJoin\xA5miter\xB0strokeMiterLimit\n\xA6scaleX\x01\xA6scaleY\x01\xA5angle\x00\xA5flipX\xC2\xA5flipY\xC2\xA7opacity\x01\xA6shadow\xC0\xA7visible\xC3\xA6clipTo\xC0\xAFbackgroundColor\xA0\xA8fillRule\xA7nonzero\xB8globalCompositeOperation\xABsource-over\xA9stileUuid\xD9$f102f8d3-dbf5-4ebc-a380-88b1f7c54d66\xBCstileImageNeedsToBeAutosized\xC2\xB4stileTransientObject\xC2\xB2perPixelTargetFind\xC2\xADstrokeScaledX\x01\xADstrokeScaledY\x01\xA8uploadId\xD9@bbde3263cb15282b528334cebbaabb422dc07755e615321da81da29be70f1d5a\xDE\x00!\xA4type\xA6upload\xA7originX\xA6center\xA7originY\xA6center\xA4left\xCB@w\x8A\xB8Q\xEB\x85\x1F\xA3top\xCB@\x7F\xDB33333\xA5width\xCC\x83\xA6heightL\xA4fill\xAArgb(0,0,0)\xA6stroke\xC0\xABstrokeWidth\x01\xAFstrokeDashArray\xC0\xADstrokeLineCap\xA4butt\xAEstrokeLineJoin\xA5miter\xB0strokeMiterLimit\n\xA6scaleX\x01\xA6scaleY\x01\xA5angle\x00\xA5flipX\xC2\xA5flipY\xC2\xA7opacity\x01\xA6shadow\xC0\xA7visible\xC3\xA6clipTo\xC0\xAFbackgroundColor\xA0\xA8fillRule\xA7nonzero\xB8globalCompositeOperation\xABsource-over\xA9stileUuid\xD9$9181a6c8-7765-41e2-ad65-6bab5d5def06\xBCstileImageNeedsToBeAutosized\xC2\xB4stileTransientObject\xC2\xB2perPixelTargetFind\xC2\xADstrokeScaledX\x01\xADstrokeScaledY\x01\xA8uploadId\xD9@058b3921fa09b44745e64c1bef5847e313b7867613b71a731d888675f0297a91\xDE\x00!\xA4type\xA6upload\xA7originX\xA6center\xA7originY\xA6center\xA4left\xCB@w~fffff\xA3top\xCB@\x7F\xDB33333\xA5width\xCC\x83\xA6heightL\xA4fill\xAArgb(0,0,0)\xA6stroke\xC0\xABstrokeWidth\x01\xAFstrokeDashArray\xC0\xADstrokeLineCap\xA4butt\xAEstrokeLineJoin\xA5miter\xB0strokeMiterLimit\n\xA6scaleX\x01\xA6scaleY\x01\xA5angle\x00\xA5flipX\xC2\xA5flipY\xC2\xA7opacity\x01\xA6shadow\xC0\xA7visible\xC3\xA6clipTo\xC0\xAFbackgroundColor\xA0\xA8fillRule\xA7nonzero\xB8globalCompositeOperation\xABsource-over\xA9stileUuid\xD9$a86f36c2-86f5-4653-a300-60b52694404a\xBCstileImageNeedsToBeAutosized\xC2\xB4stileTransientObject\xC2\xB2perPixelTargetFind\xC2\xADstrokeScaledX\x01\xADstrokeScaledY\x01\xA8uploadId\xD9@1fd072a991befce7ead3fffb546534844e56e1bfc73f05c601ea20a409de33a4\xDE\x00!\xA4type\xA6upload\xA7originX\xA6center\xA7originY\xA6center\xA4left\xCB@\x80~z\xE1G\xAE\x14\xA3top\xCB@\x7F\xE7\x85\x1E\xB8Q\xEC\xA5width\xCC\x83\xA6heightL\xA4fill\xAArgb(0,0,0)\xA6stroke\xC0\xABstrokeWidth\x01\xAFstrokeDashArray\xC0\xADstrokeLineCap\xA4butt\xAEstrokeLineJoin\xA5miter\xB0strokeMiterLimit\n\xA6scaleX\x01\xA6scaleY\x01\xA5angle\x00\xA5flipX\xC2\xA5flipY\xC2\xA7opacity\x01\xA6shadow\xC0\xA7visible\xC3\xA6clipTo\xC0\xAFbackgroundColor\xA0\xA8fillRule\xA7nonzero\xB8globalCompositeOperation\xABsource-over\xA9stileUuid\xD9$002b600c-27d9-4d0c-8627-06e3edb1d19a\xBCstileImageNeedsToBeAutosized\xC2\xB4stileTransientObject\xC2\xB2perPixelTargetFind\xC2\xADstrokeScaledX\x01\xADstrokeScaledY\x01\xA8uploadId\xD9@3d7f48636f9b0cc5b10819d406582d2d4fc15840b11542a018a8b6160c5b1de7\xDE\x00!\xA4type\xA6upload\xA7originX\xA6center\xA7originY\xA6center\xA4left\xCB@\x80\x84\xA3\xD7\n=q\xA3top\xCB@\x7F\xE7\x85\x1E\xB8Q\xEC\xA5width\xCC\x83\xA6heightL\xA4fill\xAArgb(0,0,0)\xA6stroke\xC0\xABstrokeWidth\x01\xAFstrokeDashArray\xC0\xADstrokeLineCap\xA4butt\xAEstrokeLineJoin\xA5miter\xB0strokeMiterLimit\n\xA6scaleX\x01\xA6scaleY\x01\xA5angle\x00\xA5flipX\xC2\xA5flipY\xC2\xA7opacity\x01\xA6shadow\xC0\xA7visible\xC3\xA6clipTo\xC0\xAFbackgroundColor\xA0\xA8fillRule\xA7nonzero\xB8globalCompositeOperation\xABsource-over\xA9stileUuid\xD9$b41e5211-15a2-4d19-9ec1-29953ceb0fe8\xBCstileImageNeedsToBeAutosized\xC2\xB4stileTransientObject\xC2\xB2perPixelTargetFind\xC2\xADstrokeScaledX\x01\xADstrokeScaledY\x01\xA8uploadId\xD9@493f0fb48d011d96710d22767b422de9c72115da8bfb3fb7bf6f711a4ed05963\xAAbackground\xA5white\xB2perPixelTargetFind\xC2\xAAmigrations\x91\xAFpathScalingHack\xB2enableColorMap2017\xC2\xACmissileUuids\x90\xB3marksAreSetManually\xC3\xBEbranchedAtWorksheetItemVersion\x01"

We've observed the following corrupted serialization from msgpack:

"\x88\xAEpropertyValues\x88\xA4fill\xC0\xA6stroke\xAArgb(0,0,0)\xA9fontColor\xAArgb(0,0,0)\xABstrokeWidth\x03\xAEstileArrowHead\xADarrowHeadNone\xA8fontSize\x10\xAAfontFamily\xA9Open Sans\xA9shapeName\xA7ellipse\xA8artboard\x82\xA5width\xCD\x03\xC0\xA6height\xCD\x02\x1C\xABfabricState\x83\xA7objects\xDC\x00\x10\xDE\x00\"\xA4type\xA6upload\xA7originX\xA6center\xA7originY\xA6center\xA4left\xCB@}\xF5\x1E\xB8Q\xEB\x85\xA3top\xCB@p\xE6\x14z\xE1G\xAE\xA5width\xCD\x03\xE9\xA6height\xCD\x023\xA4fill\xAArgb(0,0,0)\xA6stroke\xC0\xABstrokeWidth\x01\xAFstrokeDashArray\xC0\xADstrokeLineCap\xA4butt\xAEstrokeLineJoin\xA5miter\xB0strokeMiterLimit\n\xA6scaleX\xCB?\xEE\xB8Q\xEB\x85\x1E\xB8\xA6scaleY\xCB?\xEE\xB8Q\xEB\x85\x1E\xB8\xA5angle\x00\xA5flipX\xC2\xA5flipY\xC2\xA7opacity\x01\xA6shadow\xC0\xA7visible\xC3\xA6clipTo\xC0\xAFbackgroundColor\xA0\xA8fillRule\xA7nonzero\xB8globalCompositeOperation\xABsource-over\xABstileLocked\xC3\xA9stileUuid\xD9$12aad370-b069-47fa-a8ab-a834b8f5903e\xBCstileImageNeedsToBeAutosized\xC2\xB4stileTransientObject\xC2\xB2perPixelTargetFind\xC2\xADstrokeScaledX\x01\xADstrokeScaledY\x01\xA8uploadId\xD9@8224e788d3c957e0749ba7782ae66be5dd68c182d73d60209b2ad49f17b1c705\xDE\x00!\xA4type\xA6upload\xA7originX\xA6center\xA7originY\xA6center\xA4left\xCB@\\\f(\xF5\xC2\x8F\\\xA3top\xCB@\x7F\xBB33333\xA5width\xCC\x83\xA6heightL\xA4fill\xAArgb(0,0,0)\xA6stroke\xC0\xABstrokeWidth\x01\xAFstrokeDashArray\xC0\xADstrokeLineCap\xA4butt\xAEstrokeLineJoin\xA5miter\xB0strokeMiterLimit\n\xA6scaleX\x01\xA6scaleY\x01\xA5angle\x00\xA5flipX\xC2\xA5flipY\xC2\xA7opacity\x01\xA6shadow\xC0\xA7visible\xC3\xA6clipTo\xC0\xAFbackgroundColor\xA0\xA8fillRule\xA7nonzero\xB8globalCompositeOperation\xABsource-over\xA9stileUuid\xD9$25103e7a-c97b-47f8-bbb5-a9d899e86f08\xBCstileImageNeedsToBeAutosized\xC2\xB4stileTransientObject\xC2\xB2perPixelTargetFind\xC2\xADstrokeScaledX\x01\xADstrokeScaledY\x01\xA8uploadId\xD9@11daecfd06cf9a99b4bc5b8b75492d1bc945fa5d6f0aff8681338d7e0bc9b68f\xDE\x00!\xA4type\xA6upload\xA7originX\xA6center\xA7originY\xA6center\xA4left\xCB@n\xCDp\xA3\xD7\n=\xA3top\xCB@\x7FaG\xAE\x14z\xE1\xA5width\xCC\x83\xA6heightL\xA4fill\xAArgb(0,0,0)\xA6stroke\xC0\xABstrokeWidth\x01\xAFstrokeDashArray\xC0\xADstrokeLineCap\xA4butt\xAEstrokeLineJoin\xA5miter\xB0strokeMiterLimit\n\xA6scaleX\x01\xA6scaleY\x01\xA5angle\x00\xA5flipX\xC2\xA5flipY\xC2\xA7opacity\x01\xA6shadow\xC0\xA7visible\xC3\xA6clipTo\xC0\xAFbackgroundColor\xA0\xA8fillRule\xA7nonzero\xB8globalCompositeOperation\xABsource-over\xA9stileUuid\xD9$da8399f3-a912-479e-9a91-7aabc01e909d\xBCstileImageNeedsToBeAutosized\xC2\xB4stileTransientObject\xC2\xB2perPixelTargetFind\xC2\xADstrokeScaledX\x01\xADstrokeScaledY\x01\xA8uploadId\xD9@3138a30ea079e44cab0d0cccb1ec89d25aec1572c7051a992ecdb78332da54a6\xDE\x00!\xA4type\xA6upload\xA7originX\xA6center\xA7originY\xA6center\xA4left\xCB@w~fffff\xA3top\xCB@\x7F\xDB33333\xA5width\xCC\x83\xA6heightL\xA4fill\xAArgb(0,0,0)\xA6stroke\xC0\xABstrokeWidth\x01\xAFstrokeDashArray\xC0\xADstrokeLineCap\xA4butt\xAEstrokeLineJoin\xA5miter\xB0strokeMiterLimit\n\xA6scaleX\x01\xA6scaleY\x01\xA5angle\x00\xA5flipX\xC2\xA5flipY\xC2\xA7opacity\x01\xA6shadow\xC0\xA7visible\xC3\xA6clipTo\xC0\xAFbackgroundColor\xA0\xA8fillRule\xA7nonzero\xB8globalCompositeOperation\xABsource-over\xA9stileUuid\xD9$1ba77443-6a7f-4936-b14d-8bdaf59dac38\xBCstileImageNeedsToBeAutosized\xC2\xB4stileTransientObject\xC2\xB2perPixelTargetFind\xC2\xADstrokeScaledX\x01\xADstrokeScaledY\x01\xA8uploadId\xD9@9e207dc985f09ddf7dee44a3e140f4106d709510f4df1186d4a96f970e417eca\xDE\x00!\xA4type\xA6upload\xA7originX\xA6center\xA7originY\xA6center\xA4left\xCB@\x80~z\xE1G\xAE\x14\xA3top\xCB@\x7F\xE7\x85\x1E\xB8Q\xEC\xA5width\xCC\x83\xA6heightL\xA4fill\xAArgb(0,0,0)\xA6stroke\xC0\xABstrokeWidth\x01\xAFstrokeDashArray\xC0\xADstrokeLineCap\xA4butt\xAEstrokeLineJoin\xA5miter\xB0strokeMiterLimit\n\xA6scaleX\x01\xA6scaleY\x01\xA5angle\x00\xA5flipX\xC2\xA5flipY\xC2\xA7opacity\x01\xA6shadow\xC0\xA7visible\xC3\xA6clipTo\xC0\xAFbackgroundColor\xA0\xA8fillRule\xA7nonzero\xB8globalCompositeOperation\xABsource-over\xA9stileUuid\xD9$c601ca22-0de3-43d4-97bd-6a21f251190d\xBCstileImageNeedsToBeAutosized\xC2\xB4stileTransientObject\xC2\xB2perPixelTargetFind\xC2\xADstrokeScaledX\x01\xADstrokeScaledY\x01\xA8uploadId\xD9@916fa809fc2cff3d08ba54b3825fe6a698a1a76fff89510b20791ffd923ba1d2\xDE\x00!\xA4type\xA6upload\xA7originX\xA6center\xA7originY\xA6center\xA4left\xCB@k\x14(\xF5\xC2\x8F\\\xA3top\xCB@l\xBEfffff\xA5width\xCC\x83\xA6heightL\xA4fill\xAArgb(0,0,0)\xA6stroke\xC0\xABstrokeWidth\x01\xAFstrokeDashArray\xC0\xADstrokeLineCap\xA4butt\xAEstrokeLineJoin\xA5miter\xB0strokeMiterLimit\n\xA6scaleX\x01\xA6scaleY\x01\xA5angle\xCB@V\x9A=p\xA3\xD7\n\xA5flipX\xC2\xA5flipY\xC2\xA7opacity\x01\xA6shadow\xC0\xA7visible\xC3\xA6clipTo\xC0\xAFbackgroundColor\xA0\xA8fillRule\xA7nonzero\xB8globalCompositeOperation\xABsource-over\xA9stileUuid\xD9$8b061f24-9ffc-494b-b27a-730d11ad5181\xBCstileImageNeedsToBeAutosized\xC2\xB4stileTransientObject\xC2\xB2perPixelTargetFind\xC2\xADstrokeScaledX\x01\xADstrokeScaledY\x01\xA8uploadId\xD9@0c5f99074c47d45540aaef3690d70476d81aac861bb4d82dc9892bed43326f15\xDE\x00!\xA4type\xA6upload\xA7originX\xA6center\xA7originY\xA6center\xA4left\xCB@zE\x99\x99\x99\x99\x9A\xA3top\xCB@hM\xC2\x8F\\(\xF6\xA5width\xCC\x83\xA6heightL\xA4fill\xAArgb(0,0,0)\xA6stroke\xC0\xABstrokeWidth\x01\xAFstrokeDashArray\xC0\xADstrokeLineCap\xA4butt\xAEstrokeLineJoin\xA5miter\xB0strokeMiterLimit\n\xA6scaleX\x01\xA6scaleY\x01\xA5angle\xCB@V}p\xA3\xD7\n=\xA5flipX\xC2\xA5flipY\xC2\xA7opacity\x01\xA6shadow\xC0\xA7visible\xC3\xA6clipTo\xC0\xAFbackgroundColor\xA0\xA8fillRule\xA7nonzero\xB8globalCompositeOperation\xABsource-over\xA9stileUuid\xD9$7b49ee8d-98aa-4d74-beaa-2f405083090e\xBCstileImageNeedsToBeAutosized\xC2\xB4stileTransientObjec09de33a4\xDE\x00!\xA4type\xA6upload\xA7originX\xA6center\xA7originY\xA6center\xA4left\xCB@\x80~z\xE1G\xAE\x14\xA3top\xCB@\x7F\xE7\x85\x1E\xB8Q\xEC\xA5width\xCC\x83\xA6heightL\xA4fill\xAArgb(0,0,0)\xA6stroke\xC0\xABstrokeWidth\x01\xAFstrokeDashArray\xC0\xADstrokeLineCap\xA4butt\xAEstrokeLineJoin\xA5miter\xB0strokeMiterLimit\n\xA6scaleX\x01\xA6scaleY\x01\xA5angle\x00\xA5flipX\xC2\xA5flipY\xC2\xA7opacity\x01\xA6shadow\xC0\xA7visible\xC3\xA6clipTo\xC0\xAFbackgroundColor\xA0\xA8fillRule\xA7nonzero\xB8globalCompositeOperation\xABsource-over\xA9stileUuid\xD9$002b600c-27d9-4d0c-8627-06e3edb1d19a\xBCstileImageNeedsToBeAutosized\xC2\xB4stileTransientObject\xC2\xB2perPixelTargetFind\xC2\xADstrokeScaledX\x01\xADstrokeScaledY\x01\xA8uploadId\xD9@3d7f48636f9b0cc5b10819d406582d2d4fc15840b11542a018a8b6160c5b1de7\xDE\x00!\xA4type\xA6upload\xA7originX\xA6center\xA7originY\xA6center\xA4left\xCB@\x80\x84\xA3\xD7\n=q\xA3top\xCB@\x7F\xE7\x85\x1E\xB8Q\xEC\xA5width\xCC\x83\xA6heightL\xA4fill\xAArgb(0,0,0)\xA6stroke\xC0\xABstrokeWidth\x01\xAFstrokeDashArray\xC0\xADstrokeLineCap\xA4butt\xAEstrokeLineJoin\xA5miter\xB0strokeMiterLimit\n\xA6scaleX\x01\xA6scaleY\x01\xA5angle\x00\xA5flipX\xC2\xA5flipY\xC2\xA7opacity\x01\xA6shadow\xC0\xA7visible\xC3\xA6clipTo\xC0\xAFbackgroundColor\xA0\xA8fillRule\xA7nonzero\xB8globalCompositeOperation\xABsource-over\xA9stileUuid\xD9$b41e5211-15a2-4d19-9ec1-29953ceb0fe8\xBCstileImageNeedsToBeAutosized\xC2\xB4stileTransientObject\xC2\xB2perPixelTargetFind\xC2\xADstrokeScaledX\x01\xADstrokeScaledY\x01\xA8uploadId\xD9@493f0fb48d011d96710d22767b422de9c72115da8bfb3fb7bf6f711a4ed05963\xAAbackground\xA5white\xB2perPixelTargetFind\xC2\xAAmigrations\x91\xAFpathScalingHack\xB2enableColorMap2017\xC2\xACmissileUuids\x90\xB3marksAreSetManually\xC3\xBEbranchedAtWorksheetItemVersion\x01enter\xA7originY\xA6center\xA4left\xCB@}\xCC(\xF5\xC2\x8F\\\xA3top\xCB@`O\n=p\xA3\xD7\xA5width\xCC\x83\xA6heightL\xA4fill\xAArgb(0,0,0)\xA6stroke\xC0\xABstrokeWidth\x01\xAFstrokeDashArray\xC0\xADstrokeLineCap\xA4butt\xAEstrokeLineJoin\xA5miter\xB0strokeMiterLimit\n\xA6scaleX\x01\xA6scaleY\x01\xA5angle\x00\xA5flipX\xC2\xA5flipY\xC2\xA7opacity\x01\xA6shadow\xC0\xA7visible\xC3\xA6clipTo\xC0\xAFbackgroundColor\xA0\xA8fillRule\xA7nonzero\xB8globalCompositeOperation\xABsource-over\xA9stileUuid\xD9$de28ecd6-3a33-43de-a6e1-1be54cc882f3\xBCstileImageNeedsToBeAutosized\xC2\xB4stileTransientObject\xC2\xB2perPixelTargetFind\xC2\xADstrokeScaledX\x01\xADstrokeScaledY\x01\xA8uploadId\xD9@764d6f504829c5ef9e6ec757beb4c73b3d36a664ba3cd82c7ea3cd1d0d316c45\xDE\x00!\xA4type\xA6upload\xA7originX\xA6center\xA7originY\xA6center\xA4left\xCB@d6\x14z\xE1G\xAE\xA3top\xCB@d\xDEfffff\xA5width\xCC\x83\xA6heightL\xA4fill\xAArgb(0,0,0)\xA6stroke\xC0\xABstrokeWidth\x01\xAFstrokeDashArray\xC0\xADstrokeLineCap\xA4butt\xAEstrokeLineJoin\xA5miter\xB0strokeMiterLimit\n\xA6scaleX\x01\xA6scaleY\x01\xA5angle\x00\xA5flipX\xC2\xA5flipY\xC2\xA7opacity\x01\xA6shadow\xC0\xA7visible\xC3\xA6clipTo\xC0\xAFbackgroundColor\xA0\xA8fillRule\xA7nonzero\xB8globalCompositeOperation\xABsource-over\xA9stileUuid\xD9$694701c6-7265-4e53-93fd-8c597bcd4ce0\xBCstileImageNeedsToBeAutosized\xC2\xB4stileTransientObject\xC2\xB2perPixelTargetFind\xC2\xADstrokeScaledX\x01\xADstrokeScaledY\x01\xA8uploadId\xD9@f7cc62c50b63a356349e2848ab42a8442c002ea085840efb71ef077eae920432\xDE\x00!\xA4type\xA6upload\xA7originX\xA6center\xA7originY\xA6center\xA4left\xCB@dZ\xE1G\xAE\x14{\xA3top\xCB@q\x93\n=p\xA3\xD7\xA5width\xCC\x83\xA6heightL\xA4fill\xAArgb(0,0,0)\xA6stroke\xC0\xABstrokeWidth\x01\xAFstrokeDashArray\xC0\xADstrokeLineCap\xA4butt\xAEstrokeLineJoin\xA5miter\xB0strokeMiterLimit\n\xA6scaleX\x01\xA6scaleY\x01\xA5angle\x00\xA5flipX\xC2\xA5flipY\xC2\xA7opacity\x01\xA6shadow\xC0\xA7visible\xC3\xA6clipTo\xC0\xAFbackgroundColor\xA0\xA8fillRule\xA7nonzero\xB8globalCompositeOperation\xABsource-over\xA9stileUuid\xD9$f102f8d3-dbf5-4ebc-a380-88b1f7c54d66\xBCstileImageNeedsToBeAutosized\xC2\xB4stileTransientObject\xC2\xB2perPixelTargetFind\xC2\xADstrokeScaledX\x01\xADstrokeScaledY\x01\xA8uploadId\xD9@bbde3263cb15282b528334cebbaabb422dc07755e615321da81da29be70f1d5a\xDE\x00!\xA4type\xA6upload\xA7originX\xA6center\xA7originY\xA6center\xA4left\xCB@w\x8A\xB8Q\xEB\x85\x1F\xA3top\xCB@\x7F\xDB33333\xA5width\xCC\x83\xA6heightL\xA4fill\xAArgb(0,0,0)\xA6stroke\xC0\xABstrokeWidth\x01\xAFstrokeDashArray\xC0\xADstrokeLineCap\xA4butt\xAEstrokeLineJoin\xA5miter\xB0strokeMiterLimit\n\xA6scaleX\x01\xA6scaleY\x01\xA5angle\x00\xA5flipX\xC2\xA5flipY\xC2\xA7opacity\x01\xA6shadow\xC0\xA7visible\xC3\xA6clipTo\xC0\xAFbackgroundColor\xA0\xA8fillRule\xA7nonzero\xB8globalCompositeOperation\xABsource-over\xA9stileUuid\xD9$9181a6c8-7765-41e2-ad65-6bab5d5def06\xBCstileImageNeedsToBeAutosized\xC2\xB4stileTransientObject\xC2\xB2perPixelTargetFind\xC2\xADstrokeScaledX\x01\xADstrokeScaledY\x01\xA8uploadId\xD9@058b3921fa09b44745e64c1bef5847e313b7867613b71a731d888675f0297a91\xDE\x00!\xA4type\xA6upload\xA7originX\xA6center\xA7originY\xA6center\xA4left\xCB@w~fffff\xA3top\xCB@\x7F\xDB33333\xA5width\xCC\x83\xA6heightL\xA4fill\xAArgb(0,0,0)\xA6stroke\xC0\xABstrokeWidth\x01\xAFstrokeDashArray\xC0\xADstrokeLineCap\xA4butt\xAEstrokeLineJoin\xA5miter\xB0strokeMiterLimit\n\xA6scaleX\x01\xA6scaleY\x01\xA5angle\x00\xA5flipX\xC2\xA5flipY\xC2\xA7opacity\x01\xA6shadow\xC0\xA7visible\xC3\xA6clipTo\xC0\xAFbackgroundColor\xA0\xA8fillRule\xA7nonzero\xB8globalCompositeOperation\xABsource-over\xA9stileUuid\xD9$a86f36c2-86f5-4653-a300-60b52694404a\xBCstileImageNeedsToBeAutosized\xC2\xB4stileTransientObject\xC2\xB2perPixelTargetFind\xC2\xADstrokeScaledX\x01\xADstrokeScaledY\x01\xA8uploadId\xD9@1fd072a991befce7ead3fffb546534844e56e1bfc73f05c601ea20a409de33a4\xDE\x00!\xA4type\xA6upload\xA7originX\xA6center\xA7originY\xA6center\xA4left\xCB@\x80~z\xE1G\xAE\x14\xA3top\xCB@\x7F\xE7\x85\x1E\xB8Q\xEC\xA5width\xCC\x83\xA6heightL\xA4fill\xAArgb(0,0,0)\xA6stroke\xC0\xABstrokeWidth\x01\xAFstrokeDashArray\xC0\xADstrokeLineCap\xA4butt\xAEstrokeLineJoin\xA5miter\xB0strokeMiterLimit\n\xA6scaleX\x01\xA6scaleY\x01\xA5angle\x00\xA5flipX\xC2\xA5flipY\xC2\xA7opacity\x01\xA6shadow\xC0\xA7visible\xC3\xA6clipTo\xC0\xAFbackgroundColor\xA0\xA8fillRule\xA7nonzero\xB8globalCompositeOperation\xABsource-over\xA9stileUuid\xD9$002b600c-27d9-4d0c-8627-06e3edb1d19a\xBCstileImageNeedsToBeAutosized\xC2\xB4stileTransientObject\xC2\xB2perPixelTargetFind\xC2\xADstrokeScaledX\x01\xADstrokeScaledY\x01\xA8uploadId\xD9@3d7f48636f9b0cc5b10819d406582d2d4fc15840b11542a018a8b6160c5b1de7\xDE\x00!\xA4type\xA6upload\xA7originX\xA6center\xA7originY\xA6center\xA4left\xCB@\x80\x84\xA3\xD7\n=q\xA3top\xCB@\x7F\xE7\x85\x1E\xB8Q\xEC\xA5width\xCC\x83\xA6heightL\xA4fill\xAArgb(0,0,0)\xA6stroke\xC0\xABstrokeWidth\x01\xAFstrokeDashArray\xC0\xADstrokeLineCap\xA4butt\xAEstrokeLineJoin\xA5miter\xB0strokeMiterLimit\n\xA6scaleX\x01\xA6scaleY\x01\xA5angle\x00\xA5flipX\xC2\xA5flipY\xC2\xA7opacity\x01\xA6shadow\xC0\xA7visible\xC3\xA6clipTo\xC0\xAFbackgroundColor\xA0\xA8fillRule\xA7nonzero\xB8globalCompositeOperation\xABsource-over\xA9stileUuid\xD9$b41e5211-15a2-4d19-9ec1-29953ceb0fe8\xBCstileImageNeedsToBeAutosized\xC2\xB4stileTransientObject\xC2\xB2perPixelTargetFind\xC2\xADstrokeScaledX\x01\xADstrokeScaledY\x01\xA8uploadId\xD9@493f0fb48d011d96710d22767b422de9c72115da8bfb3fb7bf6f711a4ed05963\xAAbackground\xA5white\xB2perPixelTargetFind\xC2\xAAmigrations\x91\xAFpathScalingHack\xB2enableColorMap2017\xC2\xACmissileUuids\x90\xB3marksAreSetManually\xC3\xBEbranchedAtWorksheetItemVersion\x01"

In this corrupted version, the bytes from positions 8192 to the end are copied over the bytes from position 4096:

irb(main):071:0> bad[8192..-1].length
=> 1294
irb(main):072:0> bad[8192..-1] == bad[4096...(4096+1294)]
=> true

In longer examples we've observed similar overwritten bytes, but it isn't necessarily from the end of the sequence and doesn't always seem to align neatly, eg. this corrupted msgpack output where 4094 bytes are repeated exactly from positions 85945 to 90038 and then 90039 to 94132:

irb(main):077:0> other.length
=> 216514
irb(main):078:0> other[85945...(85945+4094)] == other[90039...(90039+4094)]
=> true
irb(main):079:0> other[85945...(85945+4095)] == other[90039...(90039+4095)]
=> false
irb(main):080:0> other[85944...(85944+4094)] == other[90038...(90038+4094)]
=> false

While we're not sure why this is happening we're hoping others may have seen similar issues or be able to shed some light.

byroot commented 2 years ago

Thank you for the report.

I went over the diff but don't see what could possibly cause this: https://github.com/msgpack/msgpack-ruby/compare/v1.5.6...v1.6.0

Could you tell us more how these payloads are generated? Do you call Factory#dump or Packer#pack? Do you re-use the packer, is it used concurrently? etc.

qcn commented 2 years ago

Thanks for the response! We call MessagePack.pack each time we pack data so it'll be using the defaults, and it is possible for it to run concurrently.

byroot commented 2 years ago

Thanks for the extra information.

One last question, do you call MessagePack.pack(object, io) or MessagePack.pack(object) ?

byroot commented 2 years ago

What's weird is that MessagePack.pack create a new Packer every time, so I don't get how we could have shared state here: https://github.com/msgpack/msgpack-ruby/blob/0c1119be839b332733b13e02b4406524ee0b4499/lib/msgpack.rb#L38-L42

qcn commented 2 years ago

Thanks for the extra information.

One last question, do you call MessagePack.pack(object, io) or MessagePack.pack(object) ?

We call MessagePack.pack(object).

The repetition is from within the same msgpacked object, so my first instinct would be that the problem doesn't arise from shared state between packers, but I don't think I have enough context to say for sure.

byroot commented 2 years ago

Ok, thank you. It could be a bug in the buffer implementation, but again, quite unsure what change in 1.6.0 could have caused this.

I doubt we'll be able to debug this without a reproduction.

byroot commented 1 year ago

@qcn any update on this one? Did the bug go away with 1.7.0 as suspected in #328 ?

byroot commented 1 year ago

Seems like it was indeed the same root cause: https://github.com/msgpack/msgpack-ruby/pull/328#issuecomment-1534691313

Very happy to close that issue.

qcn commented 1 year ago

Sorry for the delay - we were in a low-traffic period and didn't want to confirm it'd been fixed until we felt like we had enough data! Thanks so much for fixing this one :)

byroot commented 1 year ago

No worries, thank you for confirming!