Development discussion of WireGuard
 help / color / mirror / Atom feed
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: Joshua Sjoding <joshua.sjoding@scjalliance.com>
Cc: WireGuard mailing list <wireguard@lists.zx2c4.com>
Subject: Re: WireGuard for Windows failed to start after update to v0.2.1
Date: Wed, 18 Nov 2020 01:42:44 +0100	[thread overview]
Message-ID: <CAHmME9q74TPPdOhrL67Zj23_8VxA75-ztd5VMGqyAob8XuD_TQ@mail.gmail.com> (raw)
In-Reply-To: <CAHmME9qvj67wkqya20rq9ru4HEQeB=hjLYEp+Djs5ct0CV4SkA@mail.gmail.com>

On 11/18/20, Jason A. Donenfeld <Jason@zx2c4.com> wrote:
> On 11/17/20, Joshua Sjoding <joshua.sjoding@scjalliance.com> wrote:
>> Here's a more complete view of what happened:
>>
>> 1. I heard reports of two of our users having issues updating
>> WireGuard this morning. Their issue was a firewall warning (now
>> hopefully resolved in a separate thread).
>> 2. I decided to try updating WireGuard on my own laptop to see if I
>> got the same behavior.
>> 3. I opened the WireGuard UI through the icon in the system
>> notification area and saw that WireGuard was offering me an update.
>> 4. I told Wireguard to update and it started to go through the usual
>> update process.
>> 5. The WireGuard UI closed and the icon in the system notification
>> area disappeared, which is typical as it does an update.
>> 6. The WireGuard UI never came back and the tunnel never came back up.
>> There were no error messages, just silent failure.
>> 7. I checked the Windows application log and saw the error messages
>> listed earlier. In particular this message seemed pertinent: "Product:
>> WireGuard -- Wintun error: Unable to remove existing driver: The
>> system cannot find the file specified. (Code 0x00000002)"
>> 8. I compared my experience with the other two cases and determined
>> that mine was different. I started this thread and another on the
>> WireGuard mailing list to address the issues.
>> 9. I had some tea. I love tea. Tea is wonderful.
>> 10. I manually started the WireGuard desktop app. It immediately
>> prompted for elevated privileges, which is atypical. I provided it
>> with administrative credentials.
>> 11. The WireGuard UI opened and the icon appeared in the system
>> notification area.
>> 12. I saw that WireGuard was missing my configured tunnel. It was also
>> still prompting me to update it, which was very surprising.
>> 13. I told WireGuard to run the update again.
>> 14. The UI closed as the update took effect, but this time it opened
>> back up on its own after the update finished, which is what usually
>> happens. I saw that the icon was present in the system notification
>> area as well.
>> 15. I saw that my tunnel configuration was back, but the tunnel was
>> deactivated.
>> 16. I activated the tunnel and everything was happy again.
>>
>> If the MSI system was supposed to rollback in the case of failure, it
>> failed to do so. Perhaps the MSI system thought the update succeeded
>> when it didn't? I found it odd that the MSI reported that it had
>> installed the product immediately after it reported that it had
>> failed.
>>
>> Here are the events from the Windows Application event log again for
>> convenience, taken at step 7, in order of occurrence:
>>
>> ----
>>
>> Error, Event 1013, MsiInstaller, 11/17/2020 8:41:49 AM
>>
>> Product: WireGuard -- Wintun error: Unable to remove existing driver:
>> The system cannot find the file specified. (Code 0x00000002)
>>
>> ----
>>
>> Error, Event 1013, MsiInstaller, 11/17/2020 8:41:49 AM
>>
>> Product: WireGuard -- Wintun error: Failed to uninstall driver: The
>> operation completed successfully. (Code 0x00000000)
>>
>> ----
>>
>> Info, Event 11708, MsiInstaller, 11/17/2020 8:41:49 AM
>>
>> Product: WireGuard -- Installation failed.
>>
>> ----
>>
>> Info, Event 1033, MsiInstaller, 11/17/2020 8:41:49 AM
>>
>> Windows Installer installed the product. Product Name: WireGuard.
>> Product Version: 0.2.1. Product Language: 1033. Manufacturer:
>> WireGuard LLC. Installation success or error status: 1603.
>>
>> ----
>
> Thanks. We've reproduced this, understand the race condition that led
> to it, and are working on a fix for 0.2.2. Turns out to be quite
> tricky MSI internals at play. Your detailed reports were extremely
> useful. I'll keep you posted when we have a fix confirmed.
>

Looks like no big hacks required. We can plow right through the error
and continue onward without penalty:

https://git.zx2c4.com/wireguard-windows/commit/?id=60caaba12d08eb4227b9af868fd428134bfe7dce
https://git.zx2c4.com/wireguard-windows/commit/?id=e70cabae68bd9f12d64b2b269bd80a8b617c338c

So, I think this issue here is resolved now. Hopefully we'll have
v0.2.2 out tomorrow.

Jason

  reply	other threads:[~2020-11-18  0:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-17 17:46 Joshua Sjoding
2020-11-17 20:59 ` Jason A. Donenfeld
2020-11-17 21:19   ` Joshua Sjoding
2020-11-17 21:56     ` Jason A. Donenfeld
2020-11-17 22:03       ` Jason A. Donenfeld
2020-11-17 22:05         ` Jason A. Donenfeld
2020-11-17 22:46       ` Joshua Sjoding
2020-11-18  0:05         ` Jason A. Donenfeld
2020-11-18  0:42           ` Jason A. Donenfeld [this message]
2020-11-18 13:41             ` Jason A. Donenfeld
2020-11-19 19:39               ` Joshua Sjoding
2020-11-19 20:00                 ` Jason A. Donenfeld

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHmME9q74TPPdOhrL67Zj23_8VxA75-ztd5VMGqyAob8XuD_TQ@mail.gmail.com \
    --to=jason@zx2c4.com \
    --cc=joshua.sjoding@scjalliance.com \
    --cc=wireguard@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).