-
Notifications
You must be signed in to change notification settings - Fork 835
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
The contents of /tmp
are cleared few seconds after start up
#11739
Comments
Logs are required for review from WSL teamIf this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. How to collect WSL logsDownload and execute collect-wsl-logs.ps1 in an administrative powershell prompt:
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 View similar issuesPlease 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:
|
Related #8441 |
Diagnostic information
|
This is the same issue as #8441, but #8441 is closed for some inactivity. It's not solved. The problem is not specific to ble.sh, but there are also problems with other frameworks.
Clearing |
@LeonardoMor Do you have systemd enabled in your distro ? This is most likely caused by the
Also if doesn't, can you share the output of |
systemd is indeed enabled:
Does |
Here's probably what's causing the issue:
There something that's mounting a tmpfs over /tmp, which masks the files in there.
? |
|
This is probably the unit that's causing this behavior:
Does running |
Tested this. This does not fix the issue. |
Hello, Is your systemd version 256(.2-1) ? Maybe related, a systemd ticket that was closed as "WSL issue": systemd/systemd#33483 Unexpectedly, when I enable the experimental
Alternatively as a temporary workaround, you may try to revert to systemd 255 to confirm this is due to the 256 version. |
Indeed:
Where is this |
In the user home directory ( There are some details here. Edit: it is important to note that, as explained in the doc, you usually have to shutdown the WSL ( |
This resolves the issue. |
Glad to hear this also works for you. |
@OneBlue this is what fixed the issue for me. Is this a new service? Are there any downsides masking/disabling this service? |
In my environment, mounting
https://wiki.archlinux.org/title/Tmpfs#Disable_automatic_mount
|
Closing since the issue is resolved. |
@OneBlue How was this solved? In my understanding, the original issue is not resolved. "Turning off feature X" wouldn't be a real solution for a problem in the behavior of X (where X corresponds to clearing If "turning off feature X" would be considered the solution, I'd like to request to remove the feature from WSL totally or at least turn the feature off by default (or was the feature of clearing |
WSL doesn't control whether systemd is enabled by default, this setting is controlled by distributions and their maintainers. If a default systemd configuration mounts over /tmp during boot, this isn't something that WSL can "override", this is something that needs to be fixed on the distribution side. |
I see. Then, it would be subtle where this should be fixed.
Mounting over
the problem is that the user processes start before the booting procedure of systemd is completed. Who is responsible to this behavior of "starting programs with incomplete boot"? I wouldn't think this "starting programs with incomplete boot" is configured by the distributions, but is that the case? Or it might be the issue in systemd, but #11739 (comment) seems to suggest that the upstream
|
Thank you so much for this comment. This issue definitely needs more attention. |
I had a look at this and created a new report with details: #11857 |
Windows Version
Microsoft Windows [Version 10.0.22621.3737]
WSL Version
WSL version: 2.2.4.0 Kernel version: 5.15.153.1-2 WSLg version: 1.0.61 MSRDC version: 1.2.5326 Direct3D version: 1.611.1-81528511 DXCore version: 10.0.26091.1-240325-1447.ge-release Windows version: 10.0.22621.3737
Are you using WSL 1 or WSL 2?
Kernel Version
Linux version 5.15.153.1-microsoft-standard-WSL2 (root@941d701f84f1) (gcc (GCC) 11.2.0, GNU ld (GNU Binutils) 2.37) #1 SMP Fri Mar 29 23:14:13 UTC 2024
Distro Version
NAME="Arch Linux" PRETTY_NAME="Arch Linux" ID=arch BUILD_ID=rolling VERSION_ID=20240101.0.204074 ANSI_COLOR="38;2;23;147;209" HOME_URL="https://archlinux.org/" DOCUMENTATION_URL="https://wiki.archlinux.org/" SUPPORT_URL="https://bbs.archlinux.org/" BUG_REPORT_URL="https://bugs.archlinux.org/" PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/" LOGO=archlinux-logo
Other Software
No response
Repro Steps
touch /tmp/file
Expected Behavior
Feature parity to bare-metal Linux. That is, files created under
/tmp
on startup should not be removed after such a short period.Actual Behavior
The file is removed.
I learned this because I use blesh. See this discussion
Diagnostic Logs
WslLogs-2024-07-02_20-47-17.zip
The text was updated successfully, but these errors were encountered: