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

"ubuntu clean" fails with error 0x80070091 and 0x80040302 #2387

Closed
heldchen opened this issue Aug 1, 2017 · 11 comments
Closed

"ubuntu clean" fails with error 0x80070091 and 0x80040302 #2387

heldchen opened this issue Aug 1, 2017 · 11 comments
Assignees

Comments

@heldchen
Copy link

heldchen commented Aug 1, 2017

This bug-tracker is monitored by developers and other technical types. We like detail! So please use this form and tell us, concisely but precisely, what's up. Please fill out ALL THE FIELDS!

If you have a feature request, please post to the UserVoice. If you're reporting a BSOD, don't post here! Instead, e-mail "[email protected]", and if possible attach the minidump from "C:\Windows\minidump".

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

  • What you're doing and what's happening: (Copy&paste specific commands and their output, or include screen shots)

after closing all bash instances and checking taskmanager to ensure nothing is still running:

C:\>ubuntu clean
This will remove this distro from the filesystem. The app will remain on your
PC, but all linux files for this distro will be removed. Are you sure you would
like to proceed? (This cannot be undone)
Type "y" to continue: y
Uninstalling...
Failed to clean this distro installation.
Error: 0x80070091
Press any key to continue...

C:\>ubuntu clean
This will remove this distro from the filesystem. The app will remain on your
PC, but all linux files for this distro will be removed. Are you sure you would
like to proceed? (This cannot be undone)
Type "y" to continue: y
Uninstalling...
Failed to clean this distro installation.
Error: 0x80040302
Press any key to continue...

C:\>ubuntu clean
This will remove this distro from the filesystem. The app will remain on your
PC, but all linux files for this distro will be removed. Are you sure you would
like to proceed? (This cannot be undone)
Type "y" to continue: y
Uninstalling...
Failed to clean this distro installation.
Error: 0x80040302
Press any key to continue...

C:\>ubuntu clean
This will remove this distro from the filesystem. The app will remain on your
PC, but all linux files for this distro will be removed. Are you sure you would
like to proceed? (This cannot be undone)
Type "y" to continue: y
Uninstalling...
Failed to clean this distro installation.
Error: 0x80040302
Press any key to continue...
  • What's wrong / what should be happening instead:

Error 0x80070091 (first try) and error 0x80040302 (following retries)

@benhillis
Copy link
Member

benhillis commented Aug 1, 2017

@zadjii-msft can you please have a look at this?

@heldchen
Copy link
Author

heldchen commented Aug 1, 2017

unsuccessful things:

  • ubuntu clean in admin command prompt
  • reboot to ensure no hung processes/locks are in place, then ubuntu clean again
  • manually removed rootfs contents, at this point. I've noticed that some files & folders were already removed (notably rootfs/init). removing all of them then ubuntu clean still resulted in 0x80040302 tho.

to get Ubuntu back to an installable state, I had to remove & reinstall the appx package:

  1. Remove-AppxPackage CanonicalGroupLimited.UbuntuonWindows_1604.2017.711.0_x64__79rhkp1fndgsc in (non-admin) powershell
  2. reinstall Ubuntu from Windows Store

@onomatopellan
Copy link

Did you try pushing the "Reset" button on advanced app options? it should do same as "ubuntu clean".

@heldchen
Copy link
Author

heldchen commented Aug 2, 2017

@onomatopellan I have not tried that, will do tho should it happen again.

@zadjii-msft
Copy link
Member

I've never seen 0x80070091 before. That's ERROR_DIR_NOT_EMPTY, I'll try and play with it to repro that.

0x80040302 will consistently happen on distro's that failed to clean up properly. Usually part of their filesystem remains, but it's no longer registered with WSL so it's not sure what to do. I'll investigate more for a better way to handle this case.

For the record, the workaround at this point for Error: 0x80040302 is to uninstall the app and re-install it.

@xnox for visibility.

@mohammadprabowo
Copy link

Did you try pushing the "Reset" button on advanced app options? it should do same as "ubuntu clean".

I can confirm this one works.

@n3dst4
Copy link

n3dst4 commented Nov 9, 2017

I can second that the "Reset" button in advanced app options worked to solve this for me.

For the benefit of anyone else who, like me, wasn't sure where to find that:

Start menu -> Settings -> Apps -> Ubuntu -> Advanced Options

@ProIcons
Copy link

This error lays deep on the wslapi.dll and therefore on the lxssmanager.dll. I can confirm is not working by

WslUnregisterDistribution routine.

@fomrat
Copy link

fomrat commented Apr 13, 2018

Reset works for me. ubuntu clean is still blowing up.

@cemulate
Copy link

Can also confirm, "Reset" worked but ubuntu clean failed with

Uninstalling...
Failed to clean this distro installation.
Error: 0x80070003

@benhillis
Copy link
Member

The clean option has been removed from the new sample.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants