WSL icon indicating copy to clipboard operation
WSL copied to clipboard

wsl --import hangs

Open yshui opened this issue 4 years ago • 65 comments

Version

10.0.22000.856

WSL Version

  • [X] WSL 2
  • [ ] WSL 1

Kernel Version

5.15.57.1

Distro Version

N/A

Other Software

No response

Repro Steps

Run wsl --import on a large tarball. (Mine was ~25G)

Expected Behavior

Import completes successfully.

Actual Behavior

wsl hangs indefinitely.

I monitored the disk usage and the size of the VM disk image. After a while, the disk usage drops to ~0 and the disk image size stops increasing. I ran import several times, and the final disk image size varied between 4G ~ 19G.

Diagnostic Logs

No response

yshui avatar Aug 10 '22 20:08 yshui

I had to create an new distro and unpack the tarball on top of the rootfs manually. The tarball unpacked just fine, so it couldn't be a corrupted tarball.

yshui avatar Aug 10 '22 20:08 yshui

I'm having the same issue. I'm trying to move the install location to a different disk.

nicholasio avatar Aug 13 '22 16:08 nicholasio

Having a similar issue

Windows 10 21H2 (19044.1889) multisession instance in Azure VDI.

run wsl --import Ubuntu install location tar location --version 2

Vmem in task manager starts to ramp up and the ext4.vhdx starts to increase in size and then both stall. wsl becomes unresponsive at this point and wsl --shutdown just hangs. vmem still shows up in processes, no memory usage fluctuation. Have to fully shutdown the Azure VM which takes ages to deallocate due to the lock up.

Currently using FSLogix Profile containers but have experienced this issue with and without FSLogix utilisation.

I have had the import job complete several times but it seems to be pot luck as to whether it stalls and locks up or not.

I found that doing trying the import from multiple sources all seem to fail from time to time (Azure Files fileshare, Azure VM temp drive and the main OS disk).

Also worth mentioning that I tried with Win11 22H2 Preview and had the same outcome

LeeEdgoose avatar Aug 14 '22 20:08 LeeEdgoose

/logs

ghost avatar Aug 16 '22 21:08 ghost

Hello! Could you please provide more logs to help us better diagnose your issue?

To collect WSL logs, download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

The scipt will output the path of the log file once done.

Once completed please upload the output files to this Github issue.

Click here for more info on logging

Thank you!

ghost avatar Aug 16 '22 21:08 ghost

seeing the same issue, attached logs WslLogs-2022-08-17_12-27-22.zip

JHNP727 avatar Aug 17 '22 10:08 JHNP727

I have had wsl --import running about 4 days. I am running a recent rsprerelease arm64 build. 63GB .tar

jaykrell avatar Aug 23 '22 07:08 jaykrell

After downgrading to WSL 0.56.1, we fixed it with reference to the comments below. https://github.com/microsoft/WSL/issues/4735#issuecomment-1039886803

nanasess avatar Aug 23 '22 07:08 nanasess

WslLogs-2022-08-23_17-02-45.zip Same problem.

 wsl --version
WSL 版本: 0.65.3.0
内核版本: 5.15.57.1
WSLg 版本: 1.0.41
MSRDC 版本: 1.2.3213
Direct3D 版本: 1.601.0
DXCore 版本: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows版本: 10.0.22000.856

zhiyuan1i avatar Aug 23 '22 09:08 zhiyuan1i

This issue has been automatically closed since it has not had any author activity for the past 7 days. If you're still experiencing this issue please re-open it.

Thank you!

ghost avatar Aug 30 '22 14:08 ghost

Has this been fixed? not sure if it should be closed.

nicholasio avatar Aug 30 '22 14:08 nicholasio

I'm currently having this problem on 2 machines.

About to test on a third. Import invariably hangs, albeit at different points in the process.

Update: Tested on the third device - that worked, but it's a much smaller file than the others.

I looked into this more and found all the mentions of symlinks - but that's not the issue I'm having. All three of the images I tested have the same symlinks. They are ~175GB, ~50GB, and ~3GB.

Only the smallest worked.

Update 2: I got the ~50GB installation to install! I performed a clean boot first, then tried to install. First attempt didn't work. I used wsl --shutdown twice (when I looked in the Resource Monitor, it was still running after the first). The next import attempt was successful. It stuttered several times, but it worked.

I don't intend to try the largest one again.

gbiagini avatar Aug 30 '22 18:08 gbiagini

Hello? Many people has replied with their logs, can someone reopen this please? @owenschupp

yshui avatar Aug 30 '22 20:08 yshui

Reopening issue; thank you all for providing logs!

ghost avatar Aug 31 '22 17:08 ghost

I also have this issue.

WslLogs-2022-08-31_14-28-01.zip

w93163red avatar Aug 31 '22 19:08 w93163red

After downgrading to the official version (removing WSL for preview in MS Store and reinstalling from turn-on features), I can successfully import the tar file

w93163red avatar Sep 01 '22 12:09 w93163red

If you are running Windows 11 Insiders program and you opt out of it and reset Windows to the standard version, you can sucessfully do the import.

kovan avatar Sep 08 '22 09:09 kovan

Encounter this issue too

xcgspring avatar Sep 22 '22 02:09 xcgspring