Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unusual Behavior Converting Distro To WSL2 18947+ #4394

Open
sirredbeard opened this issue Aug 9, 2019 · 27 comments
Open

Unusual Behavior Converting Distro To WSL2 18947+ #4394

sirredbeard opened this issue Aug 9, 2019 · 27 comments
Assignees
Labels

Comments

@sirredbeard
Copy link
Contributor

@sirredbeard sirredbeard commented Aug 9, 2019

  • Your Windows build number: (Type ver at a Windows Command Prompt)

18947-18956

  • What you're doing and what's happening:
PS C:\Users\username> wsl --set-version WLinux 2
Conversion in progress, this may take a few minutes...
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
Exporting the distribution failed.
bsdtar: Write error

62743620-ad35ce00-ba08-11e9-9e7b-b83182002d1a

  • What's wrong / what should be happening instead:

Conversion of distros to WSL2 is failing with a bsdtar error under mysterious circumstances.

This appears to affect all distros, including Pengwin and Ubuntu.

We began tracking this issue here WhitewaterFoundry/Pengwin#504.

After duplication with other distros are reporting upstream while we continue to investigate.

Reducing the size of the installed distro by resetting it to original image seems to help.

@egroenen

This comment has been minimized.

Copy link

@egroenen egroenen commented Aug 11, 2019

I had the same issue, bsdtar: Write error. I reran the conversion and it succeeded the second time around.

wsl --set-version Ubuntu-18.04

wsl --list --verbose shows that it is now running as Version 2. I ran bash and confirmed that everything was still there and that it was indeed version 2.

@ltomes

This comment has been minimized.

Copy link

@ltomes ltomes commented Aug 12, 2019

I see the same behavior as @egroenen converting distros so far.
Note I did disable realtime virus and thread protection between my attempt so that also could have been a factor.

PS C:\WINDOWS\system32> wsl --set-version WLinux 2
Conversion in progress, this may take a few minutes...
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
Exporting the distribution failed.
bsdtar: Write error

PS C:\WINDOWS\system32> wsl --set-version WLinux 2
Conversion in progress, this may take a few minutes...
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
Conversion complete.
PS C:\WINDOWS\system32>
@craigdods

This comment has been minimized.

Copy link

@craigdods craigdods commented Aug 13, 2019

Can confirm I experienced the same issue as others. @ltomes, doesn't seem like AV/thread protection plays a role here. Simply re-running the conversion seems to work:

wsl --set-version Ubuntu 2
Conversion in progress, this may take a few minutes...
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
Exporting the distribution failed.
bsdtar: Write error

wsl --set-version Ubuntu 2
Conversion in progress, this may take a few minutes...
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
Conversion complete.

wsl --list --verbose
NAME STATE VERSION
Ubuntu Stopped 2
Legacy Stopped 1`

@benhillis

This comment has been minimized.

Copy link
Member

@benhillis benhillis commented Aug 13, 2019

Interesting, looks like there still may be some issues with conversion. I will take a look.

@benhillis benhillis self-assigned this Aug 13, 2019
@eblount

This comment has been minimized.

Copy link

@eblount eblount commented Aug 15, 2019

In case it helps someone: I had this error after a different error. I resolved the first error using this method: #4103 (comment)

After that, I got the error here (bsdtar) no matter how many times I ran --set-version.

Following a reboot, the conversion process succeeded. I'm not sure whether just restarting Powershell would have done the trick (Update: it wouldn't have, I tried the next time and it required a full reboot of the computer).

@jerrodrs

This comment has been minimized.

Copy link

@jerrodrs jerrodrs commented Aug 19, 2019

@eblount What distribution are you using? I am in the exact same situation but after fixing the #4103 issue, I always get a bsdtar: Write error even after reboot. Trying to export a fresh Ubuntu 18.04 install.

@eblount

This comment has been minimized.

Copy link

@eblount eblount commented Aug 20, 2019

@jerrodrs Yeah, I'm using Ubuntu 18.04. I installed it fresh because I had an older Ubuntu from WSL1, and I needed 18.04 for the Docker WSL2 preview. Sorry about the troubles, it was a headache getting past all these little issues, but I'll confirm that it's worth it once you get there - Docker on Windows has never been faster, and the whole Ubuntu experience has been great on WSL2. I guess make sure you're upgrading the correct distro by name, if you have multiple, and failing that, maybe uninstall all the distros and start over?

@eblount

This comment has been minimized.

Copy link

@eblount eblount commented Aug 20, 2019

@jerrodrs Oh, also, make sure you have enough disk space. My hunch is that this conversion process requires a good deal of it.

@jfelixoptimiumnc

This comment has been minimized.

Copy link

@jfelixoptimiumnc jfelixoptimiumnc commented Aug 27, 2019

Disabling Windows Real Time protection did the trick!

@yuhcaesar

This comment has been minimized.

Copy link

@yuhcaesar yuhcaesar commented Sep 1, 2019

Same here, but it's fixed after I free up disk space.

PS C:\WINDOWS\system32> wsl --set-version Ubuntu 2
Conversion in progress, this may take a few minutes...
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
Exporting the distribution failed.
: Write error

Make sure you have enough disk space.

PS C:\WINDOWS\system32> wsl --set-version Ubuntu 2
Conversion in progress, this may take a few minutes...
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
Conversion complete.
PS C:\WINDOWS\system32> wsl --list --verbose
  NAME      STATE           VERSION
* Ubuntu    Stopped         2
PS C:\WINDOWS\system32>
@Biswa96

This comment has been minimized.

Copy link

@Biswa96 Biswa96 commented Sep 1, 2019

Did anyone update to latest Windows insider build 18970? I've tested, this issue is fixed in that build.

@sirredbeard

This comment has been minimized.

Copy link
Contributor Author

@sirredbeard sirredbeard commented Sep 2, 2019

@Biswa96

@benhillis will probably have to tell us.

I think there is a chance the fix for you was incidental. Two reasons: 1. This bug is not listed as fixed in the release notes or marked as such and they are pretty good at doing that, but maybe it was fixed. 2. I have also gotten at least one report of this bug on 18970, though that could have been unrelated.

@chutzimir

This comment has been minimized.

Copy link

@chutzimir chutzimir commented Sep 6, 2019

For what it's worth, as a workaround I did wsl --export and wsl --import so I got a copy of my original Linux running on wsl2. Now just to figure out how to set the user for my wsl2 instance (it starts as root) and will be perfect.

@MikaelUmaN

This comment has been minimized.

Copy link

@MikaelUmaN MikaelUmaN commented Sep 8, 2019

Running: Microsoft Windows [Version 10.0.18970.1005]

I got this issue:


PS C:\WINDOWS\system32> wsl --set-version Ubuntu-18.04 2
Conversion in progress, this may take a few minutes...
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
Exporting the distribution failed.
bsdtar: Write error

PS C:\WINDOWS\system32> wsl --set-version Ubuntu-18.04 2
Conversion in progress, this may take a few minutes...
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
Conversion complete.
PS C:\WINDOWS\system32> wsl -l --verbose
  NAME            STATE           VERSION
* Ubuntu-18.04    Stopped         2

As you can see, seemingly with no change in-between it suddenly worked the second time around...

@Biswa96

This comment has been minimized.

Copy link

@Biswa96 Biswa96 commented Sep 8, 2019

Is this error occurs with distros installed from Windows Store? Anyone tried to manually install a distro in Desktop or Documents folder?

@MikaelUmaN

This comment has been minimized.

Copy link

@MikaelUmaN MikaelUmaN commented Sep 9, 2019

I installed from the store

@greggmarshall

This comment has been minimized.

Copy link

@greggmarshall greggmarshall commented Sep 9, 2019

One more data point on build 18970 on a fresh computer, first attempt failed, second attempt worked, no changes made in between attempts.

@zachl123

This comment has been minimized.

Copy link

@zachl123 zachl123 commented Sep 9, 2019

For the record, for me, it worked after turning off AV protection (Windows Defender). May have just been luck, but it failed multiple times before I did so and I noticed Defender activity the last time it failed.

@sirredbeard

This comment has been minimized.

Copy link
Contributor Author

@sirredbeard sirredbeard commented Sep 9, 2019

Thanks, @greggmarshall and @zachl123. I think a tough issue with this bug is reproducibility.

@griest024

This comment has been minimized.

Copy link

@griest024 griest024 commented Sep 12, 2019

Adding bsdtar to the list of excluded processes in virus protection also worked.

@richb-hanover

This comment has been minimized.

Copy link

@richb-hanover richb-hanover commented Sep 16, 2019

Another report: Windows Build 18980.vb_release.190907-1301

I had not done any work with Ubuntu 1 - only got the shell prompt and entered cd and ls a few times. I then wanted to try WSL 2. I did not update any packages, or install any virus protection.

I tried to --set-version to "Ubuntu 2" multiple (3-4) times. Each time gave bsdtar: Write error Only the last time worked with no obvious change (and only ~15 minutes) between attempts. See below.

I think it's working now, but wanted to give this report.

PS C:\Users\1> wsl -l
Windows Subsystem for Linux Distributions:
Ubuntu (Default)
PS C:\Users\1>

…

PS C:\Users\1> wsl --set-version Ubuntu 2
Conversion in progress, this may take a few minutes...
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
Exporting the distribution failed.
bsdtar: Write error

PS C:\Users\1> wsl -l
Windows Subsystem for Linux Distributions:
Ubuntu (Default)
PS C:\Users\1> wsl -l --verbose
  NAME      STATE           VERSION
* Ubuntu    Stopped         1
PS C:\Users\1> wsl --set-version Ubuntu 2
Conversion in progress, this may take a few minutes...
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
Conversion complete.
PS C:\Users\1> wsl -l --verbose
  NAME      STATE           VERSION
* Ubuntu    Stopped         2
PS C:\Users\1> wsl
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

richb@system1234:/mnt/c/Users/1$
@fedevegili

This comment has been minimized.

Copy link

@fedevegili fedevegili commented Sep 19, 2019

I had the same error after I installed Ubuntu-18.04. I tried everything mentioned here, but no success. So I uninstalled 18.04 and just installed "ubuntu" from windows store. The conversion worked on the first try.

@Yacodo

This comment has been minimized.

Copy link

@Yacodo Yacodo commented Sep 25, 2019

Disabling AV protection did the trick on 18990, without I was already at 5 failed tries.

As a bonus point, it does it faster (since / dir is not in WDefender exclusion path).

@canozmen

This comment has been minimized.

Copy link

@canozmen canozmen commented Sep 25, 2019

I got it working after disabling WDefender and killing Search Everything (everything.exe)

I then added the \AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\ folder to Everything's excluded folders, re-enabled WDefender with same excluded folder. Both WSL2 and Everything seems to work fine now.

@ajeet001

This comment has been minimized.

Copy link

@ajeet001 ajeet001 commented Oct 17, 2019

I turned off Windows Reatime Protection, and it fixed the issues with WSL2.
However, my windows machine won't shut down completely. I have to press and hold the power button to shut down completely.
Anyone facing similar issue

@greggmarshall

This comment has been minimized.

Copy link

@greggmarshall greggmarshall commented Oct 17, 2019

The shut down problem seems to be unrelated and a known issue. Check the Windows Insider feedback forum, there was a thread there about it.

@ajeet001

This comment has been minimized.

Copy link

@ajeet001 ajeet001 commented Oct 17, 2019

Thanks Greg.
Running sfc /scannow command fixed the corrupted file, and the issues. Windows build 18999.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.