<div dir="ltr">The problem here is just that we're checking the digest mismatch before we check the error reading from the network. Obviously, if we fail to read from the network, the mismatch will always occur. If the mismatch doesn't occur, we might not even report the network error since we got all the data we needed anyway.<br><br>Offending logic:<div><br><a href="https://github.com/snapcore/snapd/blob/master/store/store.go#L1388" target="_blank">https://github.com/snapcore/<wbr>snapd/blob/master/store/store.<wbr>go#L1388</a></div><div><br></div><div><br></div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 2, 2016 at 4:15 PM, Gustavo Niemeyer <span dir="ltr"><<a href="mailto:gustavo.niemeyer@canonical.com" target="_blank">gustavo.niemeyer@canonical.<wbr>com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">The broken snap is a prefix of the actual snap:<div><br></div><div><div>[niemeyer@nomade ~/test]% dd if=cr5pkasGhR7N3M8wKfP9DJqGxbB<wbr>GeET2_25.snap of=broken.snap bs=409018 count=1</div><div>1+0 records in</div><div>1+0 records out</div><div>409018 bytes (409 kB, 399 KiB) copied, 0,0024764 s, 165 MB/s</div><div><br></div><div>[niemeyer@nomade ~/test]% sha3384 broken.snap</div><div>broken.snap: d0e1cd6d578c8eaab13e10dac4acb<wbr>d7e8f6337da45b291fa7ae0358a293<wbr>93059732b29bb61a65d18e693b8e6e<wbr>8a53b62</div></div><div><br></div><div><br></div><div>Either the CDN is returning a successful code on interruption, or we're mishandling the actual interruption code.</div><div><br></div><div><br></div></div><div class="gmail_extra"><div><div class="m_-2427165374655338185h5"><br><div class="gmail_quote">On Fri, Dec 2, 2016 at 2:52 PM, Michael Vogt <span dir="ltr"><<a href="mailto:michael.vogt@canonical.com" target="_blank">michael.vogt@canonical.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On Fri, Dec 02, 2016 at 02:32:03PM +0100, David Barth wrote:<br>
> On Fri, Dec 2, 2016 at 1:04 PM, Pegenaute Bresme, Xavier <<br>
> <a href="mailto:xpegenautebr@iam.cat" target="_blank">xpegenautebr@iam.cat</a>> wrote:<br>
</span>[..]<br>
<span>> > - Download snap "snapweb" (25) from channel "stable" (sha3-384 mismatch<br>
</span>> > downloading snapweb: got 8b83c8eb7f7aa306bc342fd1b424fa<br>
<span>> > 95ccf379c068c4735085bc81ee6b51<wbr>bb02a23b8c3c2a34f842619d7650b3<wbr>152787 but<br>
> > expected d0e1cd6d578c8eaab13e10dac4acbd<wbr>7e8f6337da45b291fa7ae0358a2939<br>
> > 3059732b29bb61a65d18e693b8e6e8<wbr>a53b62)<br>
> ><br>
><br>
</span><span>> What is surprising is the "expected" signature.<br>
> Snap is downloading the correct armhf build for 0.21.2, ie #25, and the<br>
> SHA3 it obtained corresponds to the published version.<br>
<br>
</span>This version of snapd has a mixup of expected vs actual hash, this is<br>
fixed in git. Sorry for the confusion.<br>
<br>
I would love to see the actual file that got downloaded, that is<br>
probably tricky because currently we delete those iirc. It would be<br>
good to have the file to see if its garbage or a mostly valid squashfs<br>
with some garbage in between or something else. Also size would be<br>
interessting etc.<br>
<br>
Cheers,<br>
Michael<br>
<div class="m_-2427165374655338185m_7502725322344980924HOEnZb"><div class="m_-2427165374655338185m_7502725322344980924h5"><br>
--<br>
Snapcraft mailing list<br>
<a href="mailto:Snapcraft@lists.snapcraft.io" target="_blank">Snapcraft@lists.snapcraft.io</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/snapcraft" rel="noreferrer" target="_blank">https://lists.ubuntu.com/mailm<wbr>an/listinfo/snapcraft</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div></div></div><span class="m_-2427165374655338185HOEnZb"><font color="#888888">-- <br><div class="m_-2427165374655338185m_7502725322344980924gmail_signature" data-smartmail="gmail_signature">gustavo @ <a href="http://niemeyer.net" target="_blank">http://niemeyer.net</a></div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="m_-2427165374655338185gmail_signature" data-smartmail="gmail_signature">gustavo @ <a href="http://niemeyer.net" target="_blank">http://niemeyer.net</a></div>
</div></div>