mssql-cli icon indicating copy to clipboard operation
mssql-cli copied to clipboard

man tmp files (pipe files) created and not deleted

Open aberezin opened this issue 5 years ago • 6 comments
trafficstars

I am running mssql-cli in a bash script in ubuntu and see hundreds of /tmp/foo files left lying around where foo is like clr-debug-pipe-29415-136842019-out clr-debug-pipe-29415-136842019-in

They are FIFO pipes I think, created by CLR.

aberezin avatar Apr 22 '20 00:04 aberezin

Thanks for reporting this. Can you try setting the following environment variable, and seeing if that prevents the temp files from being created?

export COMPlus_EnableDiagnostics=0

If that works, we can roll that into the mssql-cli bootstrap/startup as a permanent fix.

pensivebrian avatar Apr 24 '20 23:04 pensivebrian

I can confirm that COMPlus_EnableDiagnostics=0 works preventing clr-debug-pipe files of being created, but it does not prevent *.tmp files. It actually triggered and incident today (full usage of tmp partition) because of these *.tmp files. Is there anyway of preventing these as well?

caputchinefrobles avatar May 14 '20 15:05 caputchinefrobles

Second this. I'm pulling hundreds of gigs onto a mounted drive on centos, yet our root drive was filling up. Found the clr* files (not taking up much space) along with dozens of *.tmp files that was up to 45G.

sethcenterbar avatar Jul 30 '20 15:07 sethcenterbar

@sethcenterbar I actually had to come up with a cron job to remove all tmp files but the most recent, which might be still being written.

caputchinefrobles avatar Jul 30 '20 15:07 caputchinefrobles

Certainly not an ideal scenario. I'm assuming this is just a problem on linux?

On Thu, Jul 30, 2020 at 11:55 AM Bruno Oliveira [email protected] wrote:

@sethcenterbar https://github.com/sethcenterbar I actually had to come up with a cron job to remove all tmp files but the most recent, which might be still being written.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dbcli/mssql-cli/issues/460#issuecomment-666483458, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB54DXU4NSBGEE4DZODF64TR6GJXRANCNFSM4MNXAJNQ .

sethcenterbar avatar Jul 30 '20 17:07 sethcenterbar

Got bit by this too, after a quick investigation with strace I found that these pesky tmp files are created by MicrosoftSqlToolsServiceLayer. I see a lot of open("tmpXXXXXX.tmp") with corresponding close and unlink. But unlink is sometimes missing (while close is present), which cause our problem here.

This is on Linux, of course. I do not have the dotnet skills to debug further. Maybe simply bump to a newer version would be enough ?

dargor avatar Nov 16 '20 21:11 dargor