-
Notifications
You must be signed in to change notification settings - Fork 824
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
WSL2: Seek of directory entry by lseek does not work on v9fs #5074
Comments
The following code reproduces the same problem. #include <stdio.h>
#include <dirent.h>
int main() {
DIR *dh;
struct dirent *de;
dh = opendir("./xxx/");
readdir(dh);
rewinddir(dh); // does not work
while (de = readdir(dh)) {
printf("%s\n", de->d_name);
}
return 0;
} seq -w 0000001 0001030 | xargs -i touch ./xxx/{}.txt
ls xxx/ | wc -l
#=> 1030
gcc a.c
./a.out | sort
#=> 0001023.txt
#=> 0001024.txt
#=> 0001025.txt
#=> 0001026.txt
#=> 0001027.txt
#=> 0001028.txt
#=> 0001029.txt
#=> 0001030.txt |
Curious why this is closed since it does not seem to have been repaired. PHP maintainers believe this is the cause of the following issue: #6081 which affects Docker for Desktop and makes this a chore. Is there any appetite to fix this with v9fs? I do not see a bug in the v9fs bug tracker regarding this. Thanks! Any update is appreciated! |
Any update on this? This breaks popular PHP applications that are likely to be run in WSL2 for development purposes, including XenForo. |
I got problems with phpunit that does not discover all test files in a large directory. Find it strange that this still isn't fixed. |
Suggestion: If wouldn't mind using VSCode it's actually better fully switch development into WSL and use VSCode as frontend editor more on that here. There is no overhead between translating different file systems and works like a charm and there is no speed/ram/cpu overhead. I am running a PHP docker app with its code sticking out for development. |
Any bro has been resolved? |
Same problem with |
Same problem when using squizlabs/php_codesniffer |
Confirming the same issue with phpunit/phpunit and zircote/swagger-php |
Could we add a bug label to this? |
@benhillis, could you put a bug label on this so it doesn't get lost? This is a pretty serious issue that prevents quite a bit of software from working within WSL2, including PHP. |
I have encountered the same problem. Has the error from 3 years ago not been fixed yet |
Still preventing me from launching docker containers with Windows FS volume mounts 😞, it's been years now. |
I needed to set up my project for emergencies on a laptop. However this bug makes Docker Desktop on Windows 11 Home edition unusable when combining it with PHPStorm. Simple solution on Windows 11 Pro edition is to switch to Hyper-V. But no, for some reason you can't do that in Home edition. So no point in using Windows for me I guess. |
@selfer-work That is why I switch to the Ubuntu app and now I'am using projector, phpstorm runs in projector in ubuntu, the client in windows uses the weblink. And yes it is not ideal. Works better than the windows for docker. And much faster phpunit testing. |
(a quick "fix" is to put all source files "in" WSL, then open that directory in your PhpStorm (or whatever), the WSL files should be available at \wsl.local if I am not mistaking) |
"dev drive" also can be used as "quick fix" for this problem: https://learn.microsoft.com/en-us/windows/dev-drive/ |
This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request. Thank you! |
Build number: Microsoft Windows [Version 10.0.19603.1000]
Seek of directory entry by lseek does not work on v9fs.
Code: a.c
Prepare directory and running
Actual output
Expected output
On ext4 we get the expected result.
Strace
The text was updated successfully, but these errors were encountered: