Mutex constructor fails with "system cannot open the device or file specified"
See original GitHub issueHi, Just beeing a good citizen, and doing as the console is asking me to do:
bash-3.2$ pwsh PowerShell 7.0.0 Copyright © Microsoft Corporation. All rights reserved.
https://aka.ms/powershell Type ‘help’ to get help.
PS /Users/stephanevg/Code/ansible-lab/Roles> Oops, something went wrong. Please report this bug with the details below. Report on GitHub: https://github.com/PowerShell/PSReadLine/issues/new
Environment
PSReadLine: 2.0.0 PowerShell: 7.0.0 OS: Darwin 19.3.0 Darwin Kernel Version 19.3.0: Thu Jan 9 20:58:23 PST 2020; root:xnu-6153.81.5~1/RELEASE_X86_64
Exception
System.IO.IOException: The system cannot open the device or file specified. : 'PSReadLineHistoryFile_1525368525'
at System.Threading.Mutex.CreateMutexCore(Boolean initiallyOwned, String name, Boolean& createdNew)
at System.Threading.Mutex..ctor(Boolean initiallyOwned, String name)
at Microsoft.PowerShell.PSConsoleReadLine.DelayedOneTimeInitialize()
at Microsoft.PowerShell.PSConsoleReadLine.Initialize(Runspace runspace, EngineIntrinsics engineIntrinsics)
at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics, CancellationToken cancellationToken)
Issue Analytics
- State:
- Created 3 years ago
- Comments:14 (5 by maintainers)
Top Results From Across the Web
Create Mutex throws Error The system cannot open ...
IOException : The system cannot open the device or file specified. ... Mutex..ctor(Boolean initiallyOwned, String name) at Network.Services.
Read more >ProcessSharedData - do smth with mutex : DTRC-29836
Message = “The system cannot open the device or file specified. : '1_JetBrains. ... Mutex..ctor(Boolean initiallyOwned, String name).
Read more >An error occurred during the activation of a particular ...
We recently ran into an issue where builds are failing to one of our Linux targets. ... The system cannot open the device...
Read more >Mutex Constructor (System.Threading)
The named mutex exists and has access control security, but the user does not have FullControl. IOException. name is invalid. This can be...
Read more >Mutex creation and opening failing? - C++ Forum
Hi, I am learning to use Mutexes and I tried to create a basic mutex using CreateMutex then see if the mutex is...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Please keep closed, this is for others landing here.
This error message is also thrown when
/tmp
is full. You can check how much is free using:df -k /tmp
If
Available
is 0 orUse%
is 100, then/tmp
is full.How you then go about cleaning it depends on your use case. To remove any file that’s older than 10 days:
sudo find /tmp -type f -atime +10 -delete
Apologies for pinging this thread, it’s the top result in Google for the error as a search term.
@FiggyRoll Thanks for the confirmation. That’s great.
Agreed. Opened https://github.com/dotnet/runtime/issues/36823. Hopefully dotnet team can improve the error message. I will close this issue as resolved.