[tahoe-lafs-trac-stream] [tahoe-lafs] #1529: corrupted filesize in CHK filecap causes unexpected "bad hash error"

tahoe-lafs trac at tahoe-lafs.org
Tue Sep 6 22:49:18 PDT 2011


#1529: corrupted filesize in CHK filecap causes unexpected "bad hash error"
-------------------------------+---------------------
     Reporter:  warner         |      Owner:
         Type:  defect         |     Status:  new
     Priority:  major          |  Milestone:  soon
    Component:  code-encoding  |    Version:  1.9.0a1
   Resolution:                 |   Keywords:
Launchpad Bug:                 |
-------------------------------+---------------------

Comment (by zooko):

 I reproduced this by uploading a file to Test Grid and downloading it and
 then changing the file size and re-downloading it. Then I ran the verifier
 on it and got an informative error message:
 {{{
 $ tahoe put
 /tmp/Hu-2010-Are_refined_carbohydrates_worse_than_saturated_fat\?.pdf
 URI:CHK:wrfacn3miglizt4zpleoxwe2de:qo52uzx5vvfq3p5ftenbwuy6h7ek2cgpf5afvrurg33ooug2qlka:3:5:38424
 $ tahoe get
 URI:CHK:wrfacn3miglizt4zpleoxwe2de:qo52uzx5vvfq3p5ftenbwuy6h7ek2cgpf5afvrurg33ooug2qlka:3:5:38424
 > testdl
 $ sha256sum testdl
 /tmp/Hu-2010-Are_refined_carbohydrates_worse_than_saturated_fat\?.pdf
 4ec083f719a6c77fa46e7e668d39a74357e295d54120560ce44963d4dd8512be  testdl
 4ec083f719a6c77fa46e7e668d39a74357e295d54120560ce44963d4dd8512be
 /tmp/Hu-2010-Are_refined_carbohydrates_worse_than_saturated_fat?.pdf
 $ tahoe get
 URI:CHK:wrfacn3miglizt4zpleoxwe2de:qo52uzx5vvfq3p5ftenbwuy6h7ek2cgpf5afvrurg33ooug2qlka:3:5:38425
 > testdl
 Error during GET: 410 Gone
 "NotEnoughSharesError: This indicates that some servers were unavailable,
 or that shares have been lost to server departure, hard drive failure, or
 disk corruption. You should perform a filecheck on this object to learn
 more.\x0a\x0aThe full error message is:\x0aran out of shares: complete=
 pending=Share(sh4-on-sroojqcx) overdue= unused= need 3. Last failure:
 None"
 $ tahoe check
 URI:CHK:wrfacn3miglizt4zpleoxwe2de:qo52uzx5vvfq3p5ftenbwuy6h7ek2cgpf5afvrurg33ooug2qlka:3:5:38425

 Summary: Healthy
  storage index: krwpuniahfvg3oivybopc3h2eu
  good-shares: 5 (encoding is 3-of-5)
  wrong-shares: 0
 $ tahoe check --verify
 URI:CHK:wrfacn3miglizt4zpleoxwe2de:qo52uzx5vvfq3p5ftenbwuy6h7ek2cgpf5afvrurg33ooug2qlka:3:5:38425
 ERROR: 500 Internal Server Error
 "Traceback (most recent call last):\x0a  File \"/usr/local/lib/python2.7
 /dist-packages/foolscap-0.6.1-py2.7.egg/foolscap/call.py\", line 674, in
 _done\x0a    self.request.complete(res)\x0a  File
 \"/usr/local/lib/python2.7/dist-
 packages/foolscap-0.6.1-py2.7.egg/foolscap/call.py\", line 60, in
 complete\x0a    self.deferred.callback(res)\x0a  File
 \"/usr/local/lib/python2.7/dist-packages/Twisted-11.0.0-py2.7-linux-
 x86_64.egg/twisted/internet/defer.py\", line 361, in callback\x0a
 self._startRunCallbacks(result)\x0a  File \"/usr/local/lib/python2.7/dist-
 packages/Twisted-11.0.0-py2.7-linux-
 x86_64.egg/twisted/internet/defer.py\", line 455, in
 _startRunCallbacks\x0a    self._runCallbacks()\x0a--- <exception caught
 here> ---\x0a  File \"/usr/local/lib/python2.7/dist-
 packages/Twisted-11.0.0-py2.7-linux-
 x86_64.egg/twisted/internet/defer.py\", line 542, in _runCallbacks\x0a
 current.result = callback(current.result, *args, **kw)\x0a  File
 \"/usr/local/lib/python2.7/dist-packages/allmydata/immutable/checker.py\",
 line 154, in _parse_and_validate\x0a    self.segment_size,
 self._verifycap.needed_shares))\x0aallmydata.immutable.checker.BadURIExtension:
 inconsistent erasure code params: utcpss: 38424 != self.tail_segment_size:
 3, self._verifycap.size: 38425, self.segment_size: 38424,
 self._verifycap.needed_shares: 3\x0a"
 }}}
 The informative part on the end there says:
  {{{allmydata.immutable.checker.BadURIExtension}}}: inconsistent erasure
 code params: {{{utcpss: 38424}}} != {{{self.tail_segment_size: 3}}},
 {{{self._verifycap.size: 38425}}}, {{{self.segment_size: 38424}}},
 {{{self._verifycap.needed_shares: 3}}}

-- 
Ticket URL: <http://tahoe-lafs.org/trac/tahoe-lafs/ticket/1529#comment:2>
tahoe-lafs <http://tahoe-lafs.org>
secure decentralized storage


More information about the tahoe-lafs-trac-stream mailing list