sha3-384 mismatch
Madper Xie
madper.xie at canonical.com
Mon Dec 5 08:13:53 UTC 2016
I would say the cdn that we are using correctly is not friendly to me.
(China telecom 200M fiber.)
Downloading slowly(20KB/s) and unstable.
Hi @Didier, I noticed that you mentioned https://bugs.launchpad.net/
bugs/1643893 twice in this thread. However I'm not able to access it... Is
the project private?
BR,
Madper
On Mon, Dec 5, 2016 at 3:23 PM, Didier Roche <didrocks at ubuntu.com> wrote:
> Le 03/12/2016 à 16:01, Gustavo Niemeyer a écrit :
>
> Hi Xavier,
>
> There's definitely a problem interrupting the connection with the server.
> The fact it works sometimes means it's inconsistent.
>
> Can you please try to download such files several times out of snap and
> snapd, to see what the error is?
>
> Per my note above, we had a bug in snapd which prevents the real error
> from being shown. We're always showing the digest mismatch instead, which
> will of course happen if the download is interrupted before its end.
>
>
> As written on the bug report + some part feedback emails you received some
> weeks earlier, it seems you ignored one part of the issue. Yes, it seems
> the network is failing. However, snapd consistenly fails in my case for
> downloading, while other tools, like wget and curl can download bigger
> files, many times, without ever getting one failure. They are more robust
> in difficult network situations it seems.
>
> So either the store connection side is fragile or snapd isn't robust
> enough while other tools cope with those conditions just fine (without any
> warning/debug message telling that they are retrying).
> Cheers,
> Didier
>
> On Sat, Dec 3, 2016 at 12:49 PM, Xavier Pegenaute <xpegenaute at gmail.com>
> wrote:
>
>> Hi all,
>>
>> I don't know exactly where to find all the data you are asking for, but
>> this is what I found (below). Related to the network, as a test, I just
>> downloaded the linux kernel .tar.xz (98MB) using python requests and worked
>> properly. I am not using any proxy at all.
>>
>> The "snap install" worked with hello-world but failed with webdm, docker
>> and nmap. I didn't try anymore.
>>
>> Let me know if you want any further test.
>> Regards
>> Xavi
>>
>>
>> -----------------------------------------
>> root at localhost:/var/lib/snapd/snaps# ls -al webdm_24.snap
>> -rw-r--r-- 1 root root 3280896 Dec 3 14:12 webdm_24.snap
>> -----------------------------------------
>>
>> -----------------------------------------
>> root at localhost:/var/lib/snapd/snaps# sha384sum webdm_24.snap
>> 4ee3329efb0fc71a3217ec0fc7d92ba8f1d71db22036ddef8c4abefae6ca
>> 0dbe3e1847fde14bd420fc061c8d9b0795e8 webdm_24.snap
>> -----------------------------------------
>>
>> Part of /var/lib/snapd/state.json:
>> -----------------------------------------
>> "tasks": {
>> "113": {
>> "id": "113",
>> "kind": "download-snap",
>> "summary": "Download snap \"webdm\" (24) from channel \"stable\"",
>> "status": 9,
>> "clean": true,
>> "progress": {
>> "label": "webdm",
>> "done": 3280896,
>> "total": 3280896
>> },
>> "data": {
>> "snap-setup": {
>> "channel": "stable",
>> "download-info": {
>> "anon-download-url": "https://public.apps.ubuntu.co
>> m/anon/download-snap/rFpKbTdZ31LyAxWF6RpcerZov1TdtDly_24.snap",
>> "download-url": "https://public.apps.ubuntu.co
>> m/download-snap/rFpKbTdZ31LyAxWF6RpcerZov1TdtDly_24.snap",
>> "size": 3280896,
>> "sha3-384": "d03ac82e6b4b559cc918ef581eacb
>> 933e66ad36b18f6bcb1b0ac4d91260ee14a815526d2bcecc474b215639ce2a3fcef"
>> },
>> "side-info": {
>> "name": "webdm",
>> "snap-id": "rFpKbTdZ31LyAxWF6RpcerZov1TdtDly",
>> "revision": "24",
>> "channel": "stable",
>> "developer-id": "canonical",
>> "developer": "canonical",
>> "summary": "# Snappyd",
>> "description": "This service allows you to manage your core
>> device from a web interface."
>> }
>> }
>> },
>> "halt-tasks": [
>> "114",
>> "120"
>> ],
>> "log": [
>> "2016-12-03T14:08:45Z ERROR sha3-384 mismatch downloading webdm:
>> got d03ac82e6b4b559cc918ef581eacb933e66ad36b18f6bcb1b0ac4d91260e
>> e14a815526d2bcecc474b215639ce2a3fcef but expected cea4eb570b28a3234
>> 410cc1abaf19a8a3b0f9d80fe71f6c422334a44267ffbca454eb85684722
>> d3a517fe7666f5b8a85"
>> ],
>> "change": "22",
>> "spawn-time": "2016-12-03T14:08:41.26081942Z",
>> "ready-time": "2016-12-03T14:08:45.426213255Z"
>> },
>> -----------------------------------------
>>
>>
>>
>> 2016-12-02 22:24 GMT+01:00 Gustavo Niemeyer <
>> gustavo.niemeyer at canonical.com>:
>>
>>> 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.
>>>
>>> Offending logic:
>>>
>>> https://github.com/snapcore/snapd/blob/master/store/store.go#L1388
>>>
>>>
>>>
>>>
>>> On Fri, Dec 2, 2016 at 4:15 PM, Gustavo Niemeyer <
>>> gustavo.niemeyer at canonical.com> wrote:
>>>
>>>> The broken snap is a prefix of the actual snap:
>>>>
>>>> [niemeyer at nomade ~/test]% dd if=cr5pkasGhR7N3M8wKfP9DJqGxbBGeET2_25.snap
>>>> of=broken.snap bs=409018 count=1
>>>> 1+0 records in
>>>> 1+0 records out
>>>> 409018 bytes (409 kB, 399 KiB) copied, 0,0024764 s, 165 MB/s
>>>>
>>>> [niemeyer at nomade ~/test]% sha3384 broken.snap
>>>> broken.snap: d0e1cd6d578c8eaab13e10dac4acb
>>>> d7e8f6337da45b291fa7ae0358a29393059732b29bb61a65d18e693b8e6e8a53b62
>>>>
>>>>
>>>> Either the CDN is returning a successful code on interruption, or we're
>>>> mishandling the actual interruption code.
>>>>
>>>>
>>>>
>>>> On Fri, Dec 2, 2016 at 2:52 PM, Michael Vogt <
>>>> michael.vogt at canonical.com> wrote:
>>>>
>>>>> On Fri, Dec 02, 2016 at 02:32:03PM +0100, David Barth wrote:
>>>>> > On Fri, Dec 2, 2016 at 1:04 PM, Pegenaute Bresme, Xavier <
>>>>> > xpegenautebr at iam.cat> wrote:
>>>>> [..]
>>>>> > > - Download snap "snapweb" (25) from channel "stable" (sha3-384
>>>>> mismatch
>>>>> > > downloading snapweb: got 8b83c8eb7f7aa306bc342fd1b424fa
>>>>> > > 95ccf379c068c4735085bc81ee6b51bb02a23b8c3c2a34f842619d7650b3152787
>>>>> but
>>>>> > > expected d0e1cd6d578c8eaab13e10dac4acbd
>>>>> 7e8f6337da45b291fa7ae0358a2939
>>>>> > > 3059732b29bb61a65d18e693b8e6e8a53b62)
>>>>> > >
>>>>> >
>>>>> > What is surprising is the "expected" signature.
>>>>> > Snap is downloading the correct armhf build for 0.21.2, ie #25, and
>>>>> the
>>>>> > SHA3 it obtained corresponds to the published version.
>>>>>
>>>>> This version of snapd has a mixup of expected vs actual hash, this is
>>>>> fixed in git. Sorry for the confusion.
>>>>>
>>>>> I would love to see the actual file that got downloaded, that is
>>>>> probably tricky because currently we delete those iirc. It would be
>>>>> good to have the file to see if its garbage or a mostly valid squashfs
>>>>> with some garbage in between or something else. Also size would be
>>>>> interessting etc.
>>>>>
>>>>> Cheers,
>>>>> Michael
>>>>>
>>>>> --
>>>>> Snapcraft mailing list
>>>>> Snapcraft at lists.snapcraft.io
>>>>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailm
>>>>> an/listinfo/snapcraft
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> gustavo @ http://niemeyer.net
>>>>
>>>
>>>
>>>
>>> --
>>> gustavo @ http://niemeyer.net
>>>
>>> --
>>> Snapcraft mailing list
>>> Snapcraft at lists.snapcraft.io
>>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailm
>>> an/listinfo/snapcraft
>>>
>>>
>>
>> --
>> Snapcraft mailing list
>> Snapcraft at lists.snapcraft.io
>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailm
>> an/listinfo/snapcraft
>>
>>
>
>
> --
>
> gustavo @ http://niemeyer.net
>
>
>
>
> --
> Snapcraft mailing list
> Snapcraft at lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/snapcraft/attachments/20161205/f02457c1/attachment.html>
More information about the Snapcraft
mailing list