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

APT Update Hangs After Package List Downloads in WSL2 Ubuntu 22.04 #12352

Closed
arcmoonstudios opened this issue Dec 7, 2024 · 3 comments
Closed

Comments

@arcmoonstudios
Copy link

Environment:

  • WSL Version: 2.0.14.0 (Windows Subsystem for Linux - Ubuntu-22.04 (2.3.26))
  • Ubuntu Version: 22.04 LTS
  • Windows Version: Windows 11 Pro
  • Hardware: MSI Stealth 17 Studio A13V (i9-13900H, RTX 4080)

Description:
APT update process consistently hangs after successfully downloading package lists.
The hang occurs after all downloads complete successfully, with fast download speeds
(~3000 kB/s), but the process never completes without manual intervention.

Reproduction:

  1. Run sudo apt update
  2. Process downloads all package lists successfully
  3. After downloads complete, process hangs indefinitely
  4. Ctrl+C interrupts the hang, and system shows packages are properly updated

System State During Hang:

  • Package downloads complete successfully
  • Package database remains valid
  • apt list --upgradable shows correct state
  • dpkg -l | grep -v '^ii' | grep -v '^rc' shows no issues
  • System is actually updated despite the hang

Additional Notes:

  • Issue occurs with both standard Ubuntu repositories and additional PPAs
  • System has NVIDIA drivers, CUDA, and ESM repositories
  • Package management works correctly despite the hang
  • Downloads complete at full speed before hanging
  • Manual Ctrl+C after downloads results in a properly updated system

Logs:
(King) xyn@XynKoRe:~$ # First, update just the main Ubuntu repositories
sudo apt-get update -o Dir::Etc::sourcelist=/etc/apt/sources.list -o Dir::Etc::sourceparts="-"

Then, update NVIDIA repositories

sudo apt-get update -o Dir::Etc::sourcelist="/dev/null" -o Dir::Etc::sourceparts="/etc/apt/sources.list.d/cuda*" -o Dir::Etc::sourceparts="/etc/apt/sources.list.d/nvidia*"

Finally, update remaining PPAs

sudo apt-get update -o Dir::Etc::sourcelist="/dev/null" -o Dir::Etc::sourceparts="/etc/apt/sources.list.d"
Hit:1 http://security.ubuntu.com/ubuntu jammy-security InRelease
Hit:2 http://archive.ubuntu.com/ubuntu jammy InRelease

^C
Reading package lists... Done
W: Unable to read /etc/apt/sources.list.d/nvidia*/ - DirectoryExists (2: No such file or directory)
W: Unable to read /dev/null - RealFileExists (2: No such file or directory)
Get:1 file:/var/cuda-repo-wsl-ubuntu-12-6-local InRelease [1572 B]
Get:1 file:/var/cuda-repo-wsl-ubuntu-12-6-local InRelease [1572 B]
Get:2 file:/var/cuda-repo-wsl-ubuntu-12-6-local Packages [18.8 kB]
Get:3 https://cli.github.com/packages stable InRelease [3917 B]
Get:4 https://nvidia.github.io/libnvidia-container/stable/deb/amd64 InRelease [1477 B]
Get:5 https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64 InRelease [1581 B]
Get:6 https://cli.github.com/packages stable/main amd64 Packages [345 B]
Get:7 https://nvidia.github.io/libnvidia-container/stable/deb/amd64 Packages [15.8 kB]
Get:8 https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64 Packages [549 kB]
Get:9 https://esm.ubuntu.com/apps/ubuntu jammy-apps-security InRelease [7562 B]
Get:10 https://esm.ubuntu.com/apps/ubuntu jammy-apps-updates InRelease [7456 B]
Get:11 https://ppa.launchpadcontent.net/dotnet/backports/ubuntu jammy InRelease [24.3 kB]
Get:12 https://esm.ubuntu.com/infra/ubuntu jammy-infra-security InRelease [7450 B]
Get:13 https://ppa.launchpadcontent.net/ubuntu-toolchain-r/ppa/ubuntu jammy InRelease [24.6 kB]
Get:14 https://esm.ubuntu.com/infra/ubuntu jammy-infra-updates InRelease [7449 B]
Get:15 https://ppa.launchpadcontent.net/ubuntu-toolchain-r/test/ubuntu jammy InRelease [24.6 kB]
Get:16 https://ppa.launchpadcontent.net/dotnet/backports/ubuntu jammy/main amd64 Packages [2968 B]
Get:17 https://ppa.launchpadcontent.net/dotnet/backports/ubuntu jammy/main Translation-en [1492 B]
Get:18 https://esm.ubuntu.com/apps/ubuntu jammy-apps-security/main amd64 Packages [101 kB]
Get:19 https://ppa.launchpadcontent.net/ubuntu-toolchain-r/ppa/ubuntu jammy/main amd64 Packages [267 kB]
Get:20 https://esm.ubuntu.com/apps/ubuntu jammy-apps-updates/main amd64 Packages [479 B]
Get:21 https://esm.ubuntu.com/infra/ubuntu jammy-infra-security/main amd64 Packages [479 B]
Get:22 https://ppa.launchpadcontent.net/ubuntu-toolchain-r/ppa/ubuntu jammy/main Translation-en [27.5 kB]
Get:23 https://esm.ubuntu.com/infra/ubuntu jammy-infra-updates/main amd64 Packages [479 B]
Get:24 https://ppa.launchpadcontent.net/ubuntu-toolchain-r/test/ubuntu jammy/main amd64 Packages [15.5 kB]
Get:25 https://ppa.launchpadcontent.net/ubuntu-toolchain-r/test/ubuntu jammy/main Translation-en [7808 B]
Fetched 1100 kB in 2s (669 kB/s)
sudo apt-get update
-o Acquire::http::Timeout=30
-o Acquire::https::Timeout=30
-o Acquire::ftp::Timeout=30
-o APT::Get::Assume-Yes=true
-o APT::Get::Fix-Missing=true
-o DPkg::Options::="--force-confnew"
^C
(King) xyn@XynKoRe:$ sudo apt-get update
-o Acquire::http::Timeout=30
-o Acquire::https::Timeout=30
-o Acquire::ftp::Timeout=30
-o APT::Get::Assume-Yes=true
-o APT::Get::Fix-Missing=true
-o DPkg::Options::="--force-confnew"
Get:1 file:/var/cuda-repo-wsl-ubuntu-12-6-local InRelease [1572 B]
Get:1 file:/var/cuda-repo-wsl-ubuntu-12-6-local InRelease [1572 B]
Get:2 https://cli.github.com/packages stable InRelease [3917 B]
Hit:3 https://nvidia.github.io/libnvidia-container/stable/deb/amd64 InRelease
Hit:4 https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64 InRelease
Get:5 http://security.ubuntu.com/ubuntu jammy-security InRelease [129 kB]
Get:6 http://archive.ubuntu.com/ubuntu jammy InRelease [270 kB]
Hit:7 https://esm.ubuntu.com/apps/ubuntu jammy-apps-security InRelease
Hit:8 https://esm.ubuntu.com/apps/ubuntu jammy-apps-updates InRelease
Hit:9 https://esm.ubuntu.com/infra/ubuntu jammy-infra-security InRelease
Get:10 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [1956 kB]
Hit:11 https://esm.ubuntu.com/infra/ubuntu jammy-infra-updates InRelease
Hit:12 https://ppa.launchpadcontent.net/dotnet/backports/ubuntu jammy InRelease
Hit:13 https://ppa.launchpadcontent.net/ubuntu-toolchain-r/ppa/ubuntu jammy InRelease
Get:14 http://security.ubuntu.com/ubuntu jammy-security/main Translation-en [313 kB]
Get:15 http://security.ubuntu.com/ubuntu jammy-security/main amd64 c-n-f Metadata [13.3 kB]
Hit:16 https://ppa.launchpadcontent.net/ubuntu-toolchain-r/test/ubuntu jammy InRelease
Get:17 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages [1395 kB]
Get:18 http://archive.ubuntu.com/ubuntu jammy/main Translation-en [510 kB]
Get:19 http://archive.ubuntu.com/ubuntu jammy/main amd64 c-n-f Metadata [30.3 kB]
Fetched 4620 kB in 2s (3053 kB/s)
^C
(King) xyn@XynKoRe:
$ sudo apt-get update -o Acquire::http::Timeout=30 -o Acquire::https::Timeout=30 -o Acquire::ftp::Timeout=30 -o APT::Get::Assume-Yes=true -o APT::Get::Fix-Missing=true -o DPkg::Options::="--force-confnew"
Get:1 file:/var/cuda-repo-wsl-ubuntu-12-6-local InRelease [1572 B]
Get:1 file:/var/cuda-repo-wsl-ubuntu-12-6-local InRelease [1572 B]
Get:2 https://nvidia.github.io/libnvidia-container/stable/deb/amd64 InRelease [1477 B]
Hit:3 https://cli.github.com/packages stable InRelease
Hit:4 https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64 InRelease
Hit:5 http://archive.ubuntu.com/ubuntu jammy InRelease
Get:6 http://security.ubuntu.com/ubuntu jammy-security InRelease [129 kB]
Get:7 https://esm.ubuntu.com/apps/ubuntu jammy-apps-security InRelease [7562 B]
Hit:8 https://ppa.launchpadcontent.net/dotnet/backports/ubuntu jammy InRelease
Get:9 https://esm.ubuntu.com/apps/ubuntu jammy-apps-updates InRelease [7456 B]
Hit:10 https://ppa.launchpadcontent.net/ubuntu-toolchain-r/ppa/ubuntu jammy InRelease
Get:11 https://esm.ubuntu.com/infra/ubuntu jammy-infra-security InRelease [7450 B]
Hit:12 https://ppa.launchpadcontent.net/ubuntu-toolchain-r/test/ubuntu jammy InRelease
Get:13 https://esm.ubuntu.com/infra/ubuntu jammy-infra-updates InRelease [7449 B]
Fetched 160 kB in 1s (147 kB/s)
^C
(King) xyn@XynKoRe:$ sudo apt-get update -o Acquire::http::Timeout=30 -o Acquire::https::Timeout=30 -o Acquire::ftp::Timeout=30 -o APT::Get::Assume-Yes=true -o APT::Get::Fix-Missing=true -o DPkg::Options::="--force-confnew"
Get:1 file:/var/cuda-repo-wsl-ubuntu-12-6-local InRelease [1572 B]
Get:1 file:/var/cuda-repo-wsl-ubuntu-12-6-local InRelease [1572 B]
Get:2 https://nvidia.github.io/libnvidia-container/stable/deb/amd64 InRelease [1477 B]
Hit:3 https://cli.github.com/packages stable InRelease
Hit:4 https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64 InRelease
Hit:5 http://security.ubuntu.com/ubuntu jammy-security InRelease
Hit:6 http://archive.ubuntu.com/ubuntu jammy InRelease
Hit:7 https://ppa.launchpadcontent.net/dotnet/backports/ubuntu jammy InRelease
Hit:8 https://esm.ubuntu.com/apps/ubuntu jammy-apps-security InRelease
Hit:9 https://ppa.launchpadcontent.net/ubuntu-toolchain-r/ppa/ubuntu jammy InRelease
Hit:10 https://esm.ubuntu.com/apps/ubuntu jammy-apps-updates InRelease
Hit:11 https://ppa.launchpadcontent.net/ubuntu-toolchain-r/test/ubuntu jammy InRelease
Hit:12 https://esm.ubuntu.com/infra/ubuntu jammy-infra-security InRelease
Hit:13 https://esm.ubuntu.com/infra/ubuntu jammy-infra-updates InRelease
Fetched 1477 B in 1s (1550 B/s)
^C
(King) xyn@XynKoRe:
$ sudo apt-get update -o Acquire::http::Timeout=30 -o Acquire::https::Timeout=30 -o Acquire::ftp::Timeout=30 -o APT::Get::Assume-Yes=true -o APT::Get::Fix-Missing=true -o DPkg::Options::="--force-confnew"
Get:1 file:/var/cuda-repo-wsl-ubuntu-12-6-local InRelease [1572 B]
Get:1 file:/var/cuda-repo-wsl-ubuntu-12-6-local InRelease [1572 B]
Hit:2 https://cli.github.com/packages stable InRelease
Get:3 https://nvidia.github.io/libnvidia-container/stable/deb/amd64 InRelease [1477 B]
Hit:4 http://archive.ubuntu.com/ubuntu jammy InRelease
Hit:5 https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64 InRelease
Hit:6 http://security.ubuntu.com/ubuntu jammy-security InRelease
Hit:7 https://esm.ubuntu.com/apps/ubuntu jammy-apps-security InRelease
Hit:8 https://ppa.launchpadcontent.net/dotnet/backports/ubuntu jammy InRelease
Hit:9 https://esm.ubuntu.com/apps/ubuntu jammy-apps-updates InRelease
Hit:10 https://ppa.launchpadcontent.net/ubuntu-toolchain-r/ppa/ubuntu jammy InRelease
Hit:11 https://esm.ubuntu.com/infra/ubuntu jammy-infra-security InRelease
Hit:12 https://ppa.launchpadcontent.net/ubuntu-toolchain-r/test/ubuntu jammy InRelease
Hit:13 https://esm.ubuntu.com/infra/ubuntu jammy-infra-updates InRelease
Fetched 1477 B in 1s (1642 B/s)
^C
(King) xyn@XynKoRe:~$ # Check if packages are actually up to date

Copy link

github-actions bot commented Dec 7, 2024

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'.
Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How 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 script will output the path of the log file once done.

If this is a networking issue, please use collect-networking-logs.ps1, following the instructions here

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

Click here for more info on logging
If you choose to email these logs instead of attaching to the bug, please send them to [email protected] with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.

View similar issues

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@Hime-Hina
Copy link

I had the same issue, but it was resolved by restarting WSL.

Copy link
Contributor

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-file it as a new issue.

Thank you!

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

2 participants