microsoft / WSL

Issues found on WSL
https://docs.microsoft.com/windows/wsl
MIT License
17.48k stars 822 forks source link

pdftk hanging on /mnt/c/Users/<user>/Downloads but ok in ~/ #12008

Closed TiTi closed 2 months ago

TiTi commented 2 months ago

Windows Version

Microsoft Windows [Version 10.0.22631.4037]

WSL Version

2.2.4.0

Are you using WSL 1 or WSL 2?

Kernel Version

5.15.153.1-microsoft-standard-WSL2

Distro Version

Ubuntu 22.04.4 LTS

Other Software

pdftk 2.02-5

Repro Steps

$titi@~: cd /mnt/c/Users/TiTi/Downloads/
$titi@Downloads: ls image*
image1.pdf  image2.pdf  image3.pdf
$titi@Downloads: pdftk image1.pdf image2.pdf image3.pdf cat output res.pdf  # hangs
^C
$titi@Downloads: pdftk image1.pdf image2.pdf image3.pdf cat output ~/res.pdf  # also hangs
^C
$titi@Downloads: cp image* ~/
$titi@Downloads: cd ~/
$titi@~: pdftk image1.pdf image2.pdf image3.pdf cat output res.pdf  # ok
$titi@~: ls
image1.pdf  image2.pdf  image3.pdf  res.pdf
$titi@~: ls -lh
total 6.3M
-rwxr-xr-x 1 titi titi 1.1M Sep  8 21:30 image1.pdf
-rwxr-xr-x 1 titi titi 1.1M Sep  8 21:30 image2.pdf
-rwxr-xr-x 1 titi titi 1.1M Sep  8 21:30 image3.pdf
-rw-r--r-- 1 titi titi 3.2M Sep  8 21:31 res.pdf

As you can see, it works when copying the files in the linux filesystem. But does not work from /mnt/c/Users/TiTi/Downloads/

Note: it does work as expected with others .pdf It looks like the specific content of image1/2/3.pdf trigger the issue. The content of those pdf is 1 image each.

image3.pdf Attached image3.pdf, you can do this to reproduce: pdftk image3.pdf image3.pdf cat output res.pdf

Expected Behavior

pdftk should work on the ntfs mount (it usually does)

Actual Behavior

doesn't work from ntfs mount but does from the local linux filesystem

Diagnostic Logs

not sure what's going on here, a low level i/o or encoding thing?

wsl maybe not at fault, but weird from user perspective

github-actions[bot] commented 2 months ago

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](https://github.com/Microsoft/WSL/blob/master/diagnostics/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](https://github.com/Microsoft/WSL/blob/master/diagnostics/collect-networking-logs.ps1), following the instructions [here](https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#collect-wsl-logs-for-networking-issues) Once completed please upload the output files to this Github issue. [Click here for more info on logging](https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#8-collect-wsl-logs-recommended-method) If you choose to email these logs instead of attaching to the bug, please send them to wsl-gh-logs@microsoft.com 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'.
TiTi commented 2 months ago

WslLogs-2024-09-08_21-47-00.zip

github-actions[bot] commented 2 months ago

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](https://github.com/Microsoft/WSL/blob/master/diagnostics/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](https://github.com/Microsoft/WSL/blob/master/diagnostics/collect-networking-logs.ps1), following the instructions [here](https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#collect-wsl-logs-for-networking-issues) Once completed please upload the output files to this Github issue. [Click here for more info on logging](https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#8-collect-wsl-logs-recommended-method) If you choose to email these logs instead of attaching to the bug, please send them to wsl-gh-logs@microsoft.com 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'.
github-actions[bot] commented 2 months ago
Diagnostic information ``` Detected appx version: 2.2.4.0 ```
microsoft-github-policy-service[bot] commented 2 months ago

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!