<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Le 05/12/2016 à 09:13, Madper Xie a
      écrit :<br>
    </div>
    <blockquote
cite="mid:CAOy-Bg+-7ySys_Y-O1s+6t110UYtOV+aA-iEE0NEsy9JBcXvdg@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>I would say the cdn that we are using correctly is not
          friendly to me. (China telecom 200M fiber.)<br>
        </div>
        Downloading slowly(20KB/s) and unstable.<br>
        <br>
        Hi @Didier, I noticed that you mentioned <a
          moz-do-not-send="true"
          class="gmail-m_-5136044710808400656moz-txt-link-freetext"
          href="https://bugs.launchpad.net/bugs/1643893" target="_blank">https://bugs.launchpad.net/<wbr>bugs/1643893</a>
        twice in this thread. However I'm not able to access it... Is
        the project private? <br>
      </div>
    </blockquote>
    <br>
    It was public at the time I published it. However, then, I had to
    add private information as part of debug output (macaroons, which is
    private snapd credentials) in a launchpad comment. We thus had to
    turn it privately as we can't remove them (in a comment), sorry for
    this. Upstream has access to it.<br>
    <br>
    Here is a copy and paste of title/description: "snapd doesn't handle
    well flaky network"
    <meta http-equiv="content-type" content="text/html;
      charset=windows-1252">
    <br>
    "<br>
    <meta http-equiv="content-type" content="text/html;
      charset=windows-1252">
    <p id="yui_3_10_3_1_1480926176111_1504" style="margin: 0px 0px
      1.2em; padding: 0px; width: auto; max-width: 45em; color: rgb(51,
      51, 51); font-family: monospace; font-size: 12px; font-style:
      normal; font-variant-ligatures: normal; font-variant-caps: normal;
      font-weight: normal; letter-spacing: normal; orphans: 2;
      text-align: left; text-indent: 0px; text-transform: none;
      white-space: normal; widows: 2; word-spacing: 0px;
      -webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
      255);">Some network can be stalled or have few disconnects. snapd
      doesn't support them and dropped the connexion on cryptic message
      contrary to curl or wget which both supports large downloads.</p>
    <p style="margin: 0px 0px 1.2em; padding: 0px; width: auto;
      max-width: 45em; color: rgb(51, 51, 51); font-family: monospace;
      font-size: 12px; font-style: normal; font-variant-ligatures:
      normal; font-variant-caps: normal; font-weight: normal;
      letter-spacing: normal; orphans: 2; text-align: left; text-indent:
      0px; text-transform: none; white-space: normal; widows: 2;
      word-spacing: 0px; -webkit-text-stroke-width: 0px;
      background-color: rgb(255, 255, 255);">$ sudo snap install
      face-detection-demo --beta --devmode<br>
      -> download starts with 0, 1, 2% and suddenly jump to 100%
      printing:<br>
      error: cannot perform the following tasks:<br>
      - Download snap "face-detection<wbr>-demo" (49) from channel
      "beta" (sha3-384 mismatch downloading face-detection-<wbr>demo:
      got 4c1ddd585f69dd6<wbr>e1dc19c3eb6aa2f<wbr>7ecbbd5671ce9f8<wbr>16cbdfd0647986a<wbr>59fdd9313fde013<wbr>d98a00d501f8ca4<wbr>b0979e
      but expected 40927e42f8339fc<wbr>ae0ed7edfd3215f<wbr>fb0abc1dadbfedc<wbr>e446ad4b39c06cb<wbr>9ad94f30bdd0c65<wbr>14bdb6477e86727<wbr>b75767)</p>
    <p style="margin: 0px 0px 1.2em; padding: 0px; width: auto;
      max-width: 45em; color: rgb(51, 51, 51); font-family: monospace;
      font-size: 12px; font-style: normal; font-variant-ligatures:
      normal; font-variant-caps: normal; font-weight: normal;
      letter-spacing: normal; orphans: 2; text-align: left; text-indent:
      0px; text-transform: none; white-space: normal; widows: 2;
      word-spacing: 0px; -webkit-text-stroke-width: 0px;
      background-color: rgb(255, 255, 255);">wget works on the same
      machine.</p>
    <p style="margin: 0px 0px 1.2em; padding: 0px; width: auto;
      max-width: 45em; color: rgb(51, 51, 51); font-family: monospace;
      font-size: 12px; font-style: normal; font-variant-ligatures:
      normal; font-variant-caps: normal; font-weight: normal;
      letter-spacing: normal; orphans: 2; text-align: left; text-indent:
      0px; text-transform: none; white-space: normal; widows: 2;
      word-spacing: 0px; -webkit-text-stroke-width: 0px;
      background-color: rgb(255, 255, 255);">Easy reproducer:<br>
      - install ubuntu core on a rpi2, plug the the eth45 cable to your
      laptop<br>
      - switch network-manager to network sharing mode<br>
      - try installing any snap (more than a meg) from the rpi2."</p>
    <br>
    Didier<br>
    <blockquote
cite="mid:CAOy-Bg+-7ySys_Y-O1s+6t110UYtOV+aA-iEE0NEsy9JBcXvdg@mail.gmail.com"
      type="cite">
      <div dir="ltr">BR,<br>
        Madper<br>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Mon, Dec 5, 2016 at 3:23 PM, Didier
          Roche <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:didrocks@ubuntu.com" target="_blank">didrocks@ubuntu.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000"><span class="">
                <div class="m_2236829084036927521moz-cite-prefix">Le
                  03/12/2016 à 16:01, Gustavo Niemeyer a écrit :<br>
                </div>
                <blockquote type="cite">
                  <div dir="ltr">Hi Xavier,
                    <div><br>
                    </div>
                    <div>There's definitely a problem interrupting the
                      connection with the server. The fact it works
                      sometimes means it's inconsistent.</div>
                    <div><br>
                    </div>
                    <div>Can you please try to download such files
                      several times out of snap and snapd, to see what
                      the error is?</div>
                    <div><br>
                    </div>
                    <div>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.</div>
                    <div><br>
                    </div>
                  </div>
                  <div class="gmail_extra"><br>
                  </div>
                </blockquote>
              </span> 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.<br>
              <br>
              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).<br>
              Cheers,<br>
              Didier <br>
              <div>
                <div class="h5"> <br>
                  <blockquote type="cite">
                    <div class="gmail_extra">
                      <div class="gmail_quote">On Sat, Dec 3, 2016 at
                        12:49 PM, Xavier Pegenaute <span dir="ltr"><<a
                            moz-do-not-send="true"
                            href="mailto:xpegenaute@gmail.com"
                            target="_blank">xpegenaute@gmail.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">
                            <div>
                              <div>Hi all,<br>
                                <br>
                              </div>
                              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.<br>
                              <br>
                            </div>
                            The "snap install" worked with hello-world
                            but failed with webdm, docker and nmap. I
                            didn't try anymore.<br>
                            <div><br>
                            </div>
                            <div>Let me know if you want any further
                              test.<br>
                            </div>
                            <div>Regards<br>
                              Xavi<br>
                            </div>
                            <div><br>
                            </div>
                            <div><br>
                            </div>
                            <div>------------------------------<wbr>-----------<br>
                              root@localhost:/var/lib/snapd/<wbr>snaps#
                              ls -al webdm_24.snap <br>
                              -rw-r--r-- 1 root root 3280896 Dec  3
                              14:12 webdm_24.snap<br>
                              ------------------------------<wbr>-----------<br>
                              <br>
                              ------------------------------<wbr>-----------<br>
                              root@localhost:/var/lib/snapd/<wbr>snaps#
                              sha384sum webdm_24.snap <br>
                              4ee3329efb0fc71a3217ec0fc7d92b<wbr>a8f1d71db22036ddef8c4abefae6ca<wbr>0dbe3e1847fde14bd420fc061c8d9b<wbr>0795e8 
                              webdm_24.snap<br>
                              ------------------------------<wbr>-----------<br>
                              <br>
                              Part of /var/lib/snapd/state.json:<br>
                              ------------------------------<wbr>-----------<br>
                                "tasks": {<br>
                                  "113": {<br>
                                    "id": "113",<br>
                                    "kind": "download-snap",<br>
                                    "summary": "Download snap \"webdm\"
                              (24) from channel \"stable\"",<br>
                                    "status": 9,<br>
                                    "clean": true,<br>
                                    "progress": {<br>
                                      "label": "webdm",<br>
                                      "done": 3280896,<br>
                                      "total": 3280896<br>
                                    },<br>
                                    "data": {<br>
                                      "snap-setup": {<br>
                                        "channel": "stable",<br>
                                        "download-info": {<br>
                                          "anon-download-url": "<a
                                moz-do-not-send="true"
href="https://public.apps.ubuntu.com/anon/download-snap/rFpKbTdZ31LyAxWF6RpcerZov1TdtDly_24.snap"
                                target="_blank">https://public.apps.ubuntu.co<wbr>m/anon/download-snap/rFpKbTdZ3<wbr>1LyAxWF6RpcerZov1TdtDly_24.<wbr>snap</a>",<br>
                                          "download-url": "<a
                                moz-do-not-send="true"
href="https://public.apps.ubuntu.com/download-snap/rFpKbTdZ31LyAxWF6RpcerZov1TdtDly_24.snap"
                                target="_blank">https://public.apps.ubuntu.co<wbr>m/download-snap/rFpKbTdZ31LyAx<wbr>WF6RpcerZov1TdtDly_24.snap</a>",<br>
                                          "size": 3280896,<br>
                                          "sha3-384":
                              "d03ac82e6b4b559cc918ef581eacb<wbr>933e66ad36b18f6bcb1b0ac4d91260<wbr>ee14a815526d2bcecc474b215639ce<wbr>2a3fcef"<br>
                                        },<br>
                                        "side-info": {<br>
                                          "name": "webdm",<br>
                                          "snap-id":
                              "rFpKbTdZ31LyAxWF6RpcerZov1Tdt<wbr>Dly",<br>
                                          "revision": "24",<br>
                                          "channel": "stable",<br>
                                          "developer-id": "canonical",<br>
                                          "developer": "canonical",<br>
                                          "summary": "# Snappyd",<br>
                                          "description": "This service
                              allows you to manage your core device from
                              a web interface."<br>
                                        }<br>
                                      }<br>
                                    },<br>
                                    "halt-tasks": [<br>
                                      "114",<br>
                                      "120"<br>
                                    ],<br>
                                    "log": [<br>
                                      "2016-12-03T14:08:45Z ERROR
                              sha3-384 mismatch downloading webdm: got
                              d03ac82e6b4b559cc918ef581eacb9<wbr>33e66ad36b18f6bcb1b0ac4d91260e<wbr>e14a815526d2bcecc474b215639ce2<wbr>a3fcef
                              but expected cea4eb570b28a3234<br>
                              410cc1abaf19a8a3b0f9d80fe71f6c<wbr>422334a44267ffbca454eb85684722<wbr>d3a517fe7666f5b8a85"<br>
                                    ],<br>
                                    "change": "22",<br>
                                    "spawn-time":
                              "2016-12-03T14:08:41.26081942Z<wbr>",<br>
                                    "ready-time":
                              "2016-12-03T14:08:45.426213255<wbr>Z"<br>
                                  },<br>
                              ------------------------------<wbr>-----------<br>
                              <br>
                              <br>
                            </div>
                          </div>
                          <div class="m_2236829084036927521HOEnZb">
                            <div class="m_2236829084036927521h5">
                              <div class="gmail_extra"><br>
                                <div class="gmail_quote">2016-12-02
                                  22:24 GMT+01:00 Gustavo Niemeyer <span
                                    dir="ltr"><<a
                                      moz-do-not-send="true"
                                      href="mailto:gustavo.niemeyer@canonical.com"
                                      target="_blank">gustavo.niemeyer@canonical.co<wbr>m</a>></span>:<br>
                                  <blockquote class="gmail_quote"
                                    style="margin:0 0 0
                                    .8ex;border-left:1px #ccc
                                    solid;padding-left:1ex">
                                    <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 moz-do-not-send="true"
href="https://github.com/snapcore/snapd/blob/master/store/store.go#L1388"
                                          target="_blank">https://github.com/snapcore/sn<wbr>apd/blob/master/store/store.go<wbr>#L1388</a></div>
                                      <div>
                                        <div
                                          class="m_2236829084036927521m_-7119796061853373520h5">
                                          <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
                                                  moz-do-not-send="true"
href="mailto:gustavo.niemeyer@canonical.com" target="_blank">gustavo.niemeyer@canonical.co<wbr>m</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_2236829084036927521m_-7119796061853373520m_6649473027750412436m_-2427165374655338185h5"><br>
                                                      <div
                                                        class="gmail_quote">On
                                                        Fri, Dec 2, 2016
                                                        at 2:52 PM,
                                                        Michael Vogt <span
                                                          dir="ltr"><<a
moz-do-not-send="true" 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
                                                          moz-do-not-send="true"
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_2236829084036927521m_-7119796061853373520m_6649473027750412436m_-2427165374655338185m_7502725322344980924HOEnZb">
                                                          <div
class="m_2236829084036927521m_-7119796061853373520m_6649473027750412436m_-2427165374655338185m_7502725322344980924h5"><br>
                                                          --<br>
                                                          Snapcraft
                                                          mailing list<br>
                                                          <a
                                                          moz-do-not-send="true"
href="mailto:Snapcraft@lists.snapcraft.io" target="_blank">Snapcraft@lists.snapcraft.io</a><br>
                                                          Modify
                                                          settings or
                                                          unsubscribe
                                                          at: <a
                                                          moz-do-not-send="true"
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_2236829084036927521m_-7119796061853373520m_6649473027750412436m_-2427165374655338185HOEnZb"><font
                                                      color="#888888">--
                                                      <br>
                                                      <div
class="m_2236829084036927521m_-7119796061853373520m_6649473027750412436m_-2427165374655338185m_7502725322344980924gmail_signature"
data-smartmail="gmail_signature">gustavo @ <a moz-do-not-send="true"
                                                          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_2236829084036927521m_-7119796061853373520m_6649473027750412436m_-2427165374655338185gmail_signature"
data-smartmail="gmail_signature">gustavo @ <a moz-do-not-send="true"
                                                href="http://niemeyer.net"
                                                target="_blank">http://niemeyer.net</a></div>
                                          </div>
                                        </div>
                                      </div>
                                    </div>
                                    <br>
                                    --<br>
                                    Snapcraft mailing list<br>
                                    <a moz-do-not-send="true"
                                      href="mailto:Snapcraft@lists.snapcraft.io"
                                      target="_blank">Snapcraft@lists.snapcraft.io</a><br>
                                    Modify settings or unsubscribe at: <a
                                      moz-do-not-send="true"
                                      href="https://lists.ubuntu.com/mailman/listinfo/snapcraft"
                                      rel="noreferrer" target="_blank">https://lists.ubuntu.com/mailm<wbr>an/listinfo/snapcraft</a><br>
                                    <br>
                                  </blockquote>
                                </div>
                                <br>
                              </div>
                            </div>
                          </div>
                          <br>
                          --<br>
                          Snapcraft mailing list<br>
                          <a moz-do-not-send="true"
                            href="mailto:Snapcraft@lists.snapcraft.io"
                            target="_blank">Snapcraft@lists.snapcraft.io</a><br>
                          Modify settings or unsubscribe at: <a
                            moz-do-not-send="true"
                            href="https://lists.ubuntu.com/mailman/listinfo/snapcraft"
                            rel="noreferrer" target="_blank">https://lists.ubuntu.com/mailm<wbr>an/listinfo/snapcraft</a><br>
                          <br>
                        </blockquote>
                      </div>
                      <br>
                      <br clear="all">
                      <div><br>
                      </div>
                      -- <br>
                      <div class="m_2236829084036927521gmail_signature"
                        data-smartmail="gmail_signature"><br>
                        gustavo @ <a moz-do-not-send="true"
                          href="http://niemeyer.net" target="_blank">http://niemeyer.net</a></div>
                    </div>
                    <br>
                    <fieldset
                      class="m_2236829084036927521mimeAttachmentHeader"></fieldset>
                    <br>
                  </blockquote>
                  <p><br>
                  </p>
                </div>
              </div>
            </div>
            <br>
            --<br>
            Snapcraft mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:Snapcraft@lists.snapcraft.io">Snapcraft@lists.snapcraft.io</a><br>
            Modify settings or unsubscribe at: <a
              moz-do-not-send="true"
              href="https://lists.ubuntu.com/mailman/listinfo/snapcraft"
              rel="noreferrer" target="_blank">https://lists.ubuntu.com/<wbr>mailman/listinfo/snapcraft</a><br>
            <br>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
    </blockquote>
    <p><br>
    </p>
  </body>
</html>