[Bug 1966849] Re: gzip exec format error under WSL1
NotTheDr01ds
1966849 at bugs.launchpad.net
Mon Sep 19 21:21:38 UTC 2022
Tested and verified. Note that there is no original TEST CASE, but the
original issue is clearly reproducible. Used the following TEST CASE to
verify:
1. Installed 22.04 in WSL2 (for performance reasons until everything is updated)
2. sudo apt update && sudo apt upgrade -y
3. Installed my normal working environment (Fish shell, httpie, exa, etc. etc.)
4. Downloaded https://gnu.askapache.com/gzip/gzip-1.12.tar.gz (as a test gzip'd file)
5. tar xvzf gzip-1.12.tar.gz: Succeeded (this is still WSL2)
6. Removed resulting directory
7. Exited Ubuntu/WSL
8. Converted to WSL1 with "wsl --set-version Ubuntu-22.04 1"
9. Restarted Ubuntu-22.04 under WSL1
10. tar xvzf gzip-1.12.tar.gz: Failed with "/usr/bin/gzip: 1: ELF: not found"
11. gunzip gzip-1.12.tar.gz: Failed with "/usr/bin/gunzip: 57: exec: gzip: Exec format error"
12. sudo apt update && sudo apt upgrade -y: No updates
13. Added jammy-proposed to sources (as root) with:
cat <<EOF >/etc/apt/sources.list.d/ubuntu-$(lsb_release -cs)-proposed.list
# Enable Ubuntu proposed archive
deb http://archive.ubuntu.com/ubuntu/ $(lsb_release -cs)-proposed restricted main multiverse universe
EOF
14. Set selective-install of gzip via (as root):
cat <<EOF >/etc/apt/preferences.d/proposed-updates
# Configure apt to allow selective installs of packages from proposed
Package: *
Pin: release a=$(lsb_release -cs)-proposed
Pin-Priority: 400
EOF
15. "sudo apt update"
16. Verified selective install is set via "sudo apt upgrade -s"
17. sudo apt install gzip/jammy-proposed
18. tar tvzf gzip-1.4.tar.gz: Succeeded
19. gunzip gzip-1.4.tar.gz: Succeeded
20. tar tvf gzip-1.4.tar: Succeeded (confirms successful gunzip)
21. tar xvf gzip-1.4.tar: Succeeded (Confirms successful gunzip)
22. gzip ~/.profile: Succeeded
23. gunzip ~/.profile.gz: Succeeded
apt info gzip
Package: gzip
Version: 1.10-4ubuntu4.1
** Tags removed: jammy verification-needed-jammy
** Tags added: verification-done-jammy
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gzip in Ubuntu.
https://bugs.launchpad.net/bugs/1966849
Title:
gzip exec format error under WSL1
Status in gzip:
New
Status in gzip package in Ubuntu:
Fix Released
Status in gzip source package in Jammy:
Fix Committed
Status in gzip source package in Kinetic:
Fix Released
Bug description:
[Impact]
* Optimization features included in jammy cause atypical alignment of
LOAD ELF sections. This in turn causes failure to execute binaries on
WSL1. Upstream have since integrated the optimization features
included in jammy, but also reverted alignment to a previously used
one. This also results in working binary under WSL1.
* Cherry-pick upstream applied revert to alignment to resolve running
gzip under WSL1.
[Test Plan]
* Use powershell to set default WSL version to 1
* Deploy WSL1, unpack and use updated gzip package
* gzip --version should execute correctly under WSL 1
[Where problems could occur]
* I cannot tell why performance improvement patches introduced
alignment change, and if revert of the alignment change affects the
performance. Note that this change aligns the codebase closer to what
kinetic & upstream now are.
[Other Info]
* This bug fix is upstream commit https://git.savannah.gnu.org/cgit/gzip.git/commit/gzip.c?id=23a870d14a49803c6d2579071886c1acf497c9d1
---
gzip version 1.10-4ubuntu3 fails to run under WSL1 on Windows
19044.1620, making WSL pretty much unusable.
bash: /usr/bin/gzip: cannot execute binary file: Exec format error
ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: gzip 1.10-4ubuntu3
ProcVersionSignature: Microsoft 4.4.0-19041.1237-Microsoft 4.4.35
Uname: Linux 4.4.0-19041-Microsoft x86_64
ApportVersion: 2.20.11-0ubuntu79
Architecture: amd64
CasperMD5CheckResult: unknown
Date: Tue Mar 29 06:40:33 2022
ProcEnviron:
TERM=xterm-256color
PATH=(custom, no user)
LANG=pl_PL.UTF-8
SHELL=/usr/bin/fish
SourcePackage: gzip
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/gzip/+bug/1966849/+subscriptions
More information about the foundations-bugs
mailing list