[GHC] #10986: GHC should delete all temporary files it creates in /tmp

#10986: GHC should delete all temporary files it creates in /tmp -------------------------------------+------------------------------------- Reporter: erikd | Owner: Type: feature | Status: new request | Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: 7.11 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- GHC creates large numbers of temporary files in /tmp. These would normally get cleaned up when the machine is rebooted, but for things like Jenkins build machines that don't get rebooted often they buld up pretty quickly. The /tmp on my Jenkins build machine currently has over 200k files and directories, but only about 40 of them are non-GHC related files. Under normal operation, GHC should delete all temporary files it creates. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10986 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10986: GHC should delete all temporary files it creates in /tmp -------------------------------------+------------------------------------- Reporter: erikd | Owner: erikd Type: feature request | Status: new Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by erikd): * owner: => erikd Comment: My initial idea was a create a wrapper function for the creation of temp files and directories and then in the wrapper, add them to a list in an IORef. Just before GHC exits, it would read the list from the IORef and delete them. Happy to listen to any better suggestions. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10986#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10986: GHC should delete all temporary files it creates in /tmp -------------------------------------+------------------------------------- Reporter: erikd | Owner: erikd Type: feature request | Status: new Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Description changed by erikd: Old description:
GHC creates large numbers of temporary files in /tmp. These would normally get cleaned up when the machine is rebooted, but for things like Jenkins build machines that don't get rebooted often they buld up pretty quickly. The /tmp on my Jenkins build machine currently has over 200k files and directories, but only about 40 of them are non-GHC related files.
Under normal operation, GHC should delete all temporary files it creates.
New description: GHC creates large numbers of temporary files in /tmp. These would normally get cleaned up when the machine is rebooted, but for things like Jenkins build machines that don't get rebooted often they accumulate pretty quickly. The /tmp on my Jenkins build machine currently has over 200k files and directories, but only about 40 of them are non-GHC related files. Under normal operation, GHC should delete all temporary files it creates. -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10986#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10986: GHC should delete all temporary files it creates in /tmp -------------------------------------+------------------------------------- Reporter: erikd | Owner: erikd Type: feature request | Status: new Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by rwbarton): ghc does normally clean up its temporary directory. It would be good to understand under what circumstances it does not. (Maybe only when it panics?) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10986#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10986: GHC should delete all temporary files it creates in /tmp -------------------------------------+------------------------------------- Reporter: erikd | Owner: erikd Type: feature request | Status: new Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by erikd):
ghc does normally clean up its temporary directory.
On my machines its leaving behind two kins of things: * An normally empty /tmp/ghcNNN_M directory where NNN looks like a process id and M looks like it may be a thread number (0 is most common, followed by 1, 2, 3 etc). When these directories are not empty, they contain things like ghc_ZZ.s, ghc_ZZ.o etc. * A /tmp/ccXXXXXX file which contain what looks like command line options for GCC, one per line. This is probably a result of commit 296bc70b5ff6c. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10986#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10986: GHC should delete all temporary files it creates in /tmp -------------------------------------+------------------------------------- Reporter: erikd | Owner: erikd Type: feature request | Status: new Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by thomie): This bug might depend on the platform you are on or the version of `gcc` you are using. For me, on Ubuntu (gcc 4.8.4) with HEAD, running 'make TEST=cabal01' creates the files you mentioned, but they get deleted before the test finishes. On msys2 Window (gcc 4.6.3) with HEAD, the following files are left behind in `/tmp`: {{{ -rwxr-xr-x 1 ghc None 126940 Oct 19 10:25 570528145.exe -rw-r--r-- 1 ghc None 4729 Oct 19 10:26 ccgHM4XN -rw-r--r-- 1 ghc None 4729 Oct 19 10:26 ccqNwUwz -rw-r--r-- 1 ghc None 5874 Oct 19 10:25 ccysdfeq }}} I don't see any panics occuring. Running the same test on Windows with `TEST_HC=ghc-7.8.3` only leaves behind that `.exe` file, not the `ccXXXXXX` files. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10986#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10986: GHC should delete all temporary files it creates in /tmp -------------------------------------+------------------------------------- Reporter: erikd | Owner: erikd Type: feature request | Status: new Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by gridaphobe): * cc: gridaphobe (added) Comment: I've encountered this recently as well on our ubuntu server (14.04.1). We have gcc-4.8.4 and ghc-7.6.3 installed by default, though with `stack` there's no telling what version people are using (probably 7.10.2). The sheer number of temporary directories left behind by ghc (which is enough to occasionally bring our server to a crawl) suggests that the directories must be left behind even under normal circumstances. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10986#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10986: GHC should delete all temporary files it creates in /tmp -------------------------------------+------------------------------------- Reporter: erikd | Owner: Type: feature request | Status: new Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by erikd): * owner: erikd => -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10986#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10986: GHC should delete all temporary files it creates in /tmp -------------------------------------+------------------------------------- Reporter: erikd | Owner: Type: feature request | Status: new Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by slyfox): * cc: slyfox (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10986#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10986: GHC should delete all temporary files it creates in /tmp -------------------------------------+------------------------------------- Reporter: erikd | Owner: Type: feature request | Status: new Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by slyfox): For me ghc creates /tmp/cc* files on every linkage: {{{ $ ls -l /tmp/cc* | grep slyfox <none> $ echo 'main = print 1' > a.hs $ inplace/bin/ghc-stage2 --make a.hs $ ls -l /tmp/cc* | grep slyfox -rw------- 1 slyfox users 3295 Jan 18 22:37 /tmp/cch5o5Wp $ cat /tmp/cch5o5Wp -plugin /usr/libexec/gcc/x86_64-pc-linux-gnu/5.3.0/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/x86_64-pc-linux-gnu/5.3.0/lto-wrapper -plugin-opt=-fresolution=/tmp/ccM7O6lz.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o a ... }}} Do other people see the ~same contents in orphan /tmp/cc* files? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10986#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10986: GHC should delete all temporary files it creates in /tmp -------------------------------------+------------------------------------- Reporter: erikd | Owner: Type: feature request | Status: new Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by slyfox): It seems to be a gcc/ld bug at least on non-windows. I can create crufty files by running: {{{ $ echo 'main(){}' > a.c $ touch a.rsp $ gcc a.c -o a @a.rsp }}} And /tmp/cc8oGbH4 appears. Support for .rsp files was added in changeset:296bc70b5ff6c853f2782e9ec5aa47a52110345e (#10777) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10986#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10986: GHC should delete all temporary files it creates in /tmp -------------------------------------+------------------------------------- Reporter: erikd | Owner: Type: feature request | Status: new Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by slyfox): * cc: snoyberg (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10986#comment:11 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10986: GHC should delete all temporary files it creates in /tmp -------------------------------------+------------------------------------- Reporter: erikd | Owner: Type: feature request | Status: new Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by slyfox): Filed upstream bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69351 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10986#comment:12 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10986: GHC should delete all temporary files it creates in /tmp -------------------------------------+------------------------------------- Reporter: erikd | Owner: Type: feature request | Status: new Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by rwbarton): Okay so there are two issues here. * gcc leaves behind `/tmp/cc*` files whenever response files are used (upstream gcc bug filed by slyfox). * ghc leaves behind `/tmp/ghc*_*` directories ''rarely'' and under unknown circumstances. These issues seem quite distinct to me, and technically the `/tmp/cc*` files are not created by ghc, so I split off the first issue into its own ticket, #11476. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10986#comment:13 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10986: GHC should delete all temporary files it creates in /tmp -------------------------------------+------------------------------------- Reporter: erikd | Owner: Type: feature request | Status: new Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by rwbarton): I found one cause of leaked `ghc*_*` directories from the test suite: `WAY=ghci` tests where executing `main` raises an exception. `WAY=ghci` tests are run with ghci input like {{{ :set prog cgrun016 :set args :! echo ===== program output begins here :! echo 1>&2 ===== program output begins here System.IO.hSetBuffering System.IO.stdout System.IO.LineBuffering GHC.TopHandler.runIOFastExit Main.main Prelude.>> Prelude.return () }}} If its argument (`Main.main`) raises an exception, `runIOFastExit` calls `shutdownHaskellAndExit()` with `fastExit=1`, which just calls `exit()`. So, GHC has no chance to clean up. This seems like more of a testsuite issue than a GHC issue. I'll let the testsuite finish to see if there are any more cases where it leaves behind a `ghc*_*` directory. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10986#comment:14 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10986: GHC should delete all temporary files it creates in /tmp -------------------------------------+------------------------------------- Reporter: erikd | Owner: Type: feature request | Status: new Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by gridaphobe): It's definitely not just a testsuite issue. I get the `/tmp/ghc*` directories on a server that I do not use for GHC hacking. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10986#comment:15 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10986: GHC should delete all temporary files it creates in /tmp -------------------------------------+------------------------------------- Reporter: erikd | Owner: Type: feature request | Status: new Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by rwbarton): Okay, but it would be very helpful to have a concrete reproducer! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10986#comment:16 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10986: GHC should delete all temporary files it creates in /tmp -------------------------------------+------------------------------------- Reporter: erikd | Owner: Type: feature request | Status: new Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by rwbarton): Okay! There were two non-`WAY=ghci` tests that also left behind a temporary directory: `ghc-e005` and `T3890`. They are both `ghc -e`-related, but don't involve this `GHC.TopHandler.runIOFastExit` stuff, so they are real bugs. As hinted at by `ghc-e005`, `runghc` has the same behavior. {{{ rwbarton@morphism:/tmp$ rm -rf ghc* rwbarton@morphism:/tmp$ cat err.hs main = error "oops" rwbarton@morphism:/tmp$ runghc err.hs err.hs: oops rwbarton@morphism:/tmp$ echo ghc* ghc31610_0 }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10986#comment:17 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10986: GHC should delete all temporary files it creates in /tmp -------------------------------------+------------------------------------- Reporter: erikd | Owner: Type: feature request | Status: new Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by rwbarton): Nontermination is also a problem for `runghc`, and probably a more common scenario. {{{ rwbarton@morphism:/tmp$ rm -rf ghc* rwbarton@morphism:/tmp$ cat loop.hs main = main rwbarton@morphism:/tmp$ runghc loop.hs ^C rwbarton@morphism:/tmp$ echo ghc* ghc31647_0 }}} In `ghc -e`/`runghc`, perhaps it would be possible to clean up the temporary directory before executing the expression/program. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10986#comment:18 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10986: GHC should delete all temporary files it creates in /tmp -------------------------------------+------------------------------------- Reporter: erikd | Owner: Type: feature request | Status: new Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by rwbarton): Well it's not so easy for `ghc -e` because there might be multiple `-e` arguments. So we can't exit the GHC session before executing the first argument, since the second argument might be `:t it` or something. The code structure is such that it currently is not easy to clean up temporary files in the middle of a GHC session, nor is it clear when it is safe to do so. We could probably handle the exceptional exit case better though. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10986#comment:19 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10986: GHC should delete all temporary files it creates in /tmp -------------------------------------+------------------------------------- Reporter: erikd | Owner: Type: feature request | Status: new Priority: normal | Milestone: 8.0.2 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by thoughtpolice): * milestone: 8.0.1 => 8.0.2 Comment: We're likely not going to get to this for 8.0.1, but something like this would be 'nice to have' for 8.0.2, so I'm tentatively punting this there. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10986#comment:20 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10986: GHC should delete all temporary files it creates in /tmp -------------------------------------+------------------------------------- Reporter: erikd | Owner: Type: feature request | Status: new Priority: normal | Milestone: 8.0.2 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by omefire): * cc: omefire (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10986#comment:21 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10986: GHC should delete all temporary files it creates in /tmp -------------------------------------+------------------------------------- Reporter: erikd | Owner: Type: feature request | Status: new Priority: high | Milestone: 8.0.2 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * priority: normal => high Comment: Raising priority as this leakage results in an extremely large number of files on my test box. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10986#comment:22 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10986: GHC should delete all temporary files it creates in /tmp -------------------------------------+------------------------------------- Reporter: erikd | Owner: Type: feature request | Status: new Priority: high | Milestone: 8.0.2 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2324 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * differential: => Phab:D2324 Comment: Phab:D2324 is a quick hack that I put together to fix this. Unfortunately, its use of recursive deletion makes me quite nervous. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10986#comment:23 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10986: GHC should delete all temporary files it creates in /tmp -------------------------------------+------------------------------------- Reporter: erikd | Owner: Type: feature request | Status: new Priority: high | Milestone: 8.2.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2324 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * milestone: 8.0.2 => 8.2.1 Comment: I'm going to bump this off to 8.2. The fact that GCC 6, which fixes the root cause of this issue, is gradually becoming available the pressure to hack around it in GHC is rather relieved. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10986#comment:24 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10986: GHC should delete all temporary files it creates in /tmp -------------------------------------+------------------------------------- Reporter: erikd | Owner: (none) Type: feature request | Status: new Priority: high | Milestone: Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2324 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * milestone: 8.2.1 => Comment: This won't happen for 8.2 and given that GCC 6 is quickly becoming the norm, perhaps never at all. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10986#comment:25 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10986: GHC should delete all temporary files it creates in /tmp -------------------------------------+------------------------------------- Reporter: erikd | Owner: (none) Type: feature request | Status: new Priority: high | Milestone: Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2324 Wiki Page: | -------------------------------------+------------------------------------- Comment (by monoidal): I found out this still happens with Template Haskell + -fno-code. Given `M.hs` {{{ {-# LANGUAGE TemplateHaskell #-} module M where $(return []) }}} compiling `ghc -fno-code -v2 M.hs` fails to remove the directory: {{{ *** Deleting temp dirs: Warning: exception raised when deleting /tmp/ghc17992_0: /tmp/ghc17992_0: removeDirectory: unsatisfied constraints (Directory not empty) }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10986#comment:26 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC