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

Memory leak #84

Open
Blaisorblade opened this Issue Jun 6, 2016 · 21 comments

Comments

Projects
None yet
@Blaisorblade

Blaisorblade commented Jun 6, 2016

I've just seen two intero processes consume 32GB and ~26GB. My computer was in OOM and (being OS X) it had paused all apps, so I killed intero immediately.

I think all I did was loading Emacs and going away, but I'm not sure. Intero was just installed, so I guess it was just showing the message from #82. For extra fun, I can't reproduce this by restarting Emacs. So sorry this bug report is not very useful by itself.

@chrisdone chrisdone added the type: bug label Jun 7, 2016

@chrisdone

This comment has been minimized.

Show comment
Hide comment
@chrisdone

chrisdone Jun 7, 2016

Member

I think I've seen this once, but it was more likely to be an edge case than part of Intero's regular running. I've been using it for a year on OS X and it usually doesn't exceed 600MB~ for a given project. So I'm not going to consider this high priority unless you hit it again. I think it's probably more like the pipe being closed by Emacs in a strange way, for example, and then it spins in some way. Let's keep the issue open. Thanks for reporting!

Member

chrisdone commented Jun 7, 2016

I think I've seen this once, but it was more likely to be an edge case than part of Intero's regular running. I've been using it for a year on OS X and it usually doesn't exceed 600MB~ for a given project. So I'm not going to consider this high priority unless you hit it again. I think it's probably more like the pipe being closed by Emacs in a strange way, for example, and then it spins in some way. Let's keep the issue open. Thanks for reporting!

@cqfd

This comment has been minimized.

Show comment
Hide comment
@cqfd

cqfd Jun 7, 2016

I actually just noticed this as well--intero was taking up 50GB of memory in Activity Monitor, ground my computer to a halt, etc.

cqfd commented Jun 7, 2016

I actually just noticed this as well--intero was taking up 50GB of memory in Activity Monitor, ground my computer to a halt, etc.

@Blaisorblade

This comment has been minimized.

Show comment
Hide comment
@Blaisorblade

Blaisorblade Jun 7, 2016

I couldn't reproduce this any more — one hypothesis is that this bug (likely a HeisenBug?) only shows up on somewhat fresh installs, explaining why @chrisdone seldom saw it? @happy4crazy, was that your case?

Blaisorblade commented Jun 7, 2016

I couldn't reproduce this any more — one hypothesis is that this bug (likely a HeisenBug?) only shows up on somewhat fresh installs, explaining why @chrisdone seldom saw it? @happy4crazy, was that your case?

@mgsloan

This comment has been minimized.

Show comment
Hide comment
@mgsloan

mgsloan Jun 7, 2016

Contributor

Two guesses:

  1. Some GHC memory leak (would be a great thing to track down if it's this!)
  2. Maybe there's some case where it holds on to old collected compilation info forever.
Contributor

mgsloan commented Jun 7, 2016

Two guesses:

  1. Some GHC memory leak (would be a great thing to track down if it's this!)
  2. Maybe there's some case where it holds on to old collected compilation info forever.
@Blaisorblade

This comment has been minimized.

Show comment
Hide comment
@Blaisorblade

Blaisorblade Jun 8, 2016

@mgsloan FWIW, I had only started Emacs (which desktop saving, so it had loaded files), so (I'd naively think) it should have typechecked the code once and stopped doing anything.
So one must explain why intero doesn't stop — and @chrisdone's guess might explain that — and then why it allocates. If not only intero spins, but it spins invoking GHC, then your guesses make sense.

Especially, interaction with terminals is very hard to review.

I've done some random googling, but didn't find terminal-related bugs. Only

https://ghc.haskell.org/trac/ghc/ticket/4029#comment:16 (closed recently on GHCi, wondered if intero needs a copy of the fix, but couldn't confirm that).
DanielG/ghc-mod#315, open, and due to the GHC API, for GHC 7.8-7.10-8.0, but I think this by itself leaks a fixed amount of space, for .a libraries, not an increasing one.

Blaisorblade commented Jun 8, 2016

@mgsloan FWIW, I had only started Emacs (which desktop saving, so it had loaded files), so (I'd naively think) it should have typechecked the code once and stopped doing anything.
So one must explain why intero doesn't stop — and @chrisdone's guess might explain that — and then why it allocates. If not only intero spins, but it spins invoking GHC, then your guesses make sense.

Especially, interaction with terminals is very hard to review.

I've done some random googling, but didn't find terminal-related bugs. Only

https://ghc.haskell.org/trac/ghc/ticket/4029#comment:16 (closed recently on GHCi, wondered if intero needs a copy of the fix, but couldn't confirm that).
DanielG/ghc-mod#315, open, and due to the GHC API, for GHC 7.8-7.10-8.0, but I think this by itself leaks a fixed amount of space, for .a libraries, not an increasing one.

@doppioslash

This comment has been minimized.

Show comment
Hide comment
@doppioslash

doppioslash Jun 19, 2016

It happened to me as well on a fresh intero install on mac

doppioslash commented Jun 19, 2016

It happened to me as well on a fresh intero install on mac

@Blaisorblade

This comment has been minimized.

Show comment
Hide comment
@Blaisorblade

Blaisorblade Jul 10, 2016

Just happened to me again, killed it at 27GB of RAM usage. This was while working on Stack; the funny thing is, Emacs appears to not have noticed — both the REPL and the Intero process still seem to still work "fine" (well, as fine as before, that is not so much, but better after restarting it).
Sorry I used the wrong ps option, was in a hurry.

$ ps ww 42192
  PID   TT  STAT      TIME COMMAND
42192   ??  R     34:43.68 /Users/pgiarrusso/.local/bin/intero --interactive -i -odir=/Users/pgiarrusso/Documents/Research/Sorgenti/stack/.stack-work/odir -hidir=/Users/pgiarrusso/Documents/Research/Sorgenti/stack/.stack-work/odir -hide-all-packages -i/Users/pgiarrusso/Documents/Research/Sorgenti/stack/src -i/Users/pgiarrusso/Documents/Research/Sorgenti/stack/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/autogen -i/Users/pgiarrusso/Documents/Research/Sorgenti/stack/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build -stubdir=/Users/pgiarrusso/Documents/Research/Sorgenti/stack/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build -package-id=Cabal-1.22.8.0-fa4fa305d3583e6c000ba5c24c4e2f03 -package-id=aeson-0.11.2.0-b03cae28950c2b4101ef16a6701cd8f0 -package-id=ansi-terminal-0.6.2.3-7b40b18f4e53e6f53c2ffd807e929ca9 -package-id=async-2.1.0-033e4fae4da028fc2d6502bd36e5e5a1 -package-id=attoparsec-0.13.0.2-d4d5a1f3c628d77bf175e88909ecc391 -package-id=base-4.8.2.0-cc43d8e06aa74e9c4c0132becc49ee25 -package-id=base-compat-0.9.1-88d2eb460760f8335257e69c0f87aa82 -package-id=base16-bytestring-0.1.1.6-9e6871841ba9598a920190a3965bc7f4 -package-id=base64-bytestring-1.0.0.1-76d93cc37cb76265172a708135c9653a -package-id=binary-0.7.5.0-6e00b63f955513e2407019611c681b56 -package-id=binary-tagged-0.1.4.0-8b5a268e1202f09480ba3a447db9ad84 -package-id=blaze-builder-0.4.0.2-3d55cdb9c31315a2ab5b8619fb60d7a4 -package-id=byteable-0.1.1-bf870645be051d53f8c785389208c7cc -package-id=bytestring-0.10.6.0-8363d61ddfe397e767bde0e3fed6260e -package-id=conduit-1.2.6.6-e417d289beb8f6df9513582e2d0cc47d -package-id=conduit-extra-1.1.13.1-34dc4a0464e3a5b0182d43aadec61f31 -package-id=containers-0.5.6.2-68e3ece8a4f91a31e327fe89f8052a53 -package-id=cryptohash-0.11.9-109ed5ed2cdead93e9461d1fb9748821 -package-id=cryptohash-conduit-0.1.1-b9184e477a1a71e756d434e525020de0 -package-id=directory-1.2.2.0-3b3e1a8d629ccaa6c4588a9bb46bb163 -package-id=edit-distance-0.2.2.1-9d3891bf039e76d5754b7861295dabda -package-id=either-4.4.1.1-19584f8f859d7ce3cd0f0c074bef24f8 -package-id=enclosed-exceptions-1.0.2-c7c50843bc559d5f954ac3935fb59413 -package-id=errors-2.1.2-5d81f40326bca86a50f3fcd81b9ce85d -package-id=exceptions-0.8.2.1-08ed62d2282590eb80eba3e5c42a5f4e -package-id=extra-1.4.10-41c09e55b0f0970ba518e62b4a97960c -package-id=fast-logger-2.4.6-5053f99cf532a4cec5d2f4a8fe7ae24a -package-id=filelock-0.1.0.1-72f8e9268d92f202efaf568516532f9d -package-id=filepath-1.4.0.0-f97d1e4aebfd7a03be6980454fe31d6e -package-id=fsnotify-0.2.1-fc572be7612b3f6c38288615073780fe -package-id=generic-deriving-1.10.5-e0be2e54e133ceddf0cfca6d70e57a5f -package-id=hashable-1.2.4.0-7550865fa2a6bb3193b4e312352713f7 -package-id=hit-0.6.3-a271f93c2e12532dc2704d6a035f5164 -package-id=hpc-0.6.0.2-a39ecd097f2dd0806a38d9fca9f4590d -package-id=http-client-0.5.0-769839ddc5fd39cf7a95f0a64e8b3635 -package-id=http-client-tls-0.3.0-b0005ce1b8e7f8c7e3eec9cac797a669 -package-id=http-conduit-2.2.0-a6038c8d631ed26aebdf28e18cc8db3b -package-id=http-types-0.9.1-41716f4ad77b16288f71f3fedff3c94b -package-id=lifted-base-0.2.3.6-5189d4b0186926579aba53b90f71ed7f -package-id=microlens-0.4.5.0-ffc7fd1e6222c61f6f06a54b09b6acae -package-id=monad-control-1.0.1.0-84c4bc4b17198076c8ec507b90de89c9 -package-id=monad-logger-0.3.18-9e57d418f13d0cfef6110d3153e41969 -package-id=monad-unlift-0.2.0-77eab3e9dfd834e7c2b83f4a436e795f -package-id=mtl-2.2.1-3af90341e75ee52dfc4e3143b4e5d219 -package-id=open-browser-0.2.1.0-28c656a96515e8c7e4aa60851142168b -package-id=optparse-applicative-0.12.1.0-632ff9350432005d4b6860a3720a6388 -package-id=path-0.5.8-13ab13ddaf0c1c73f7d021431e5e6c35 -package-id=path-io-1.1.0-d4d7f5ae75b47005170931dda9edf1a6 -package-id=persistent-2.2.4.1-bff374b6c05fc15ccbc38e0fc2af8bb8 -package-id=persistent-sqlite-2.2.1-e79f37f53688612cf85ff0a8ead395ad -package-id=persistent-template-2.1.8.1-18f75aa8a9d68ae443ffd0e67cbab81c -package-id=pretty-1.1.2.0-19fde7e4235a5fccb7e53c1108876812 -package-id=process-1.2.3.0-a1a69425f3f6c11a82785be7baab3b68 -package-id=regex-applicative-text-0.1.0.1-fc8912574a5019a915bb4b122db347ba -package-id=resourcet-1.1.7.4-534cb535e14e3949a62b7c20e74977bb -package-id=retry-0.7.4-1159f2193f898d1827200a7ce16ca561 -package-id=safe-0.3.9-e3aa437cf6afe091d2ac3ab91bc10ddd -package-id=semigroups-0.18.1-f2deff31a0fd1df893b4e496c0f9caf0 -package-id=split-0.2.3.1-6d0063c12972868a1e069995047d6884 -package-id=stm-2.4.4.1-7050c728ed5b2315e2c6b56d8bf9837f -package-id=streaming-commons-0.1.15.5-1b6ceb9cd3a574a27401c4c5b5d541ee -package-id=tar-0.5.0.3-52d91796c3ff762b107be2602a8b4e12 -package-id=template-haskell-2.10.0.0-c5036b5d1f11290a936c690d2f1bbd7f -package-id=temporary-1.2.0.4-083e2f9c3540c17bddc708d2a8e57c5e -package-id=text-1.2.2.1-7d0e2ea4f6c20c86065fc9fde58d97e6 -package-id=text-binary-0.2.1-5d724e6255914e391bee90b30a4cef13 -package-id=time-1.5.0.1-14681d29751415f1a49b9321095eae91 -package-id=tls-1.3.8-33de89bb9bcd0fc079e7d450c7eef9a9 -package-id=transformers-0.4.2.0-81450cd8f86b36eaa8fa0cbaf6efc3a3 -package-id=transformers-base-0.4.4-19dc155e74aa624600f63b02f5f0b424 -package-id=unix-compat-0.4.1.4-4dccf276c16fae173fbeaa213af7fd4e -package-id=unordered-containers-0.2.7.1-10f63c3e9c9e90a01d00192ff3d449eb -package-id=vector-0.11.0.0-324da2b07f25721d305480db94a9f1d6 -package-id=vector-binary-instances-0.2.3.2-7277280ebd278fb6f6157cb6c2636c07 -package-id=yaml-0.8.18-03bf12e39273f79ef97a084ee6af65ca -package-id=zlib-0.6.1.1-b386a12dfc8267438326d06e808201fb -package-id=deepseq-1.4.1.1-8eec8f9bea2efc2500f63544ec6ca569 -package-id=hastache-0.6.1-7bd55e8c3c1a5df551a40dcfe1e38c75 -package-id=project-template-0.2.0-018c6d7d0a53cbf67add948e95a85ee0 -package-id=zip-archive-0.2.3.7-a2639cfba8248126820cc24c761d503f -package-id=hpack-0.14.1-9b871210b8e625037cda863a6bbe0d49 -package-id=store-0.1.0.1-0994395538c624ef1e6d4575df1a8910 -package-id=unix-2.7.1.0-3d39e78228b30316716e447e1283b3f0 -i/Users/pgiarrusso/Documents/Research/Sorgenti/stack/src/main -i/Users/pgiarrusso/Documents/Research/Sorgenti/stack/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/stack/stack-tmp -package-id=gitrev-1.2.0-352a2baf332d06c22e9436396d60c23d -package-id=optparse-simple-0.0.3-587a74c28e3bb83a52d77312fa2fee97 -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates -fwarn-identities -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates -DUSE_GIT_INFO -j3 -odir=/var/folders/_7/hlxv4yv95x95vgnn416b4q4m0000gp/T/intero92806EVF -hidir=/var/folders/_7/hlxv4yv95x95vgnn416b4q4m0000gp/T/intero92806EVF -ghci-script=/var/folders/_7/hlxv4yv95x95vgnn416b4q4m0000gp/T/intero-script92806RfL -optP-include -optP/private/var/folders/_7/hlxv4yv95x95vgnn416b4q4m0000gp/T/ghci42173/cabal_macros.h

Blaisorblade commented Jul 10, 2016

Just happened to me again, killed it at 27GB of RAM usage. This was while working on Stack; the funny thing is, Emacs appears to not have noticed — both the REPL and the Intero process still seem to still work "fine" (well, as fine as before, that is not so much, but better after restarting it).
Sorry I used the wrong ps option, was in a hurry.

$ ps ww 42192
  PID   TT  STAT      TIME COMMAND
42192   ??  R     34:43.68 /Users/pgiarrusso/.local/bin/intero --interactive -i -odir=/Users/pgiarrusso/Documents/Research/Sorgenti/stack/.stack-work/odir -hidir=/Users/pgiarrusso/Documents/Research/Sorgenti/stack/.stack-work/odir -hide-all-packages -i/Users/pgiarrusso/Documents/Research/Sorgenti/stack/src -i/Users/pgiarrusso/Documents/Research/Sorgenti/stack/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/autogen -i/Users/pgiarrusso/Documents/Research/Sorgenti/stack/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build -stubdir=/Users/pgiarrusso/Documents/Research/Sorgenti/stack/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build -package-id=Cabal-1.22.8.0-fa4fa305d3583e6c000ba5c24c4e2f03 -package-id=aeson-0.11.2.0-b03cae28950c2b4101ef16a6701cd8f0 -package-id=ansi-terminal-0.6.2.3-7b40b18f4e53e6f53c2ffd807e929ca9 -package-id=async-2.1.0-033e4fae4da028fc2d6502bd36e5e5a1 -package-id=attoparsec-0.13.0.2-d4d5a1f3c628d77bf175e88909ecc391 -package-id=base-4.8.2.0-cc43d8e06aa74e9c4c0132becc49ee25 -package-id=base-compat-0.9.1-88d2eb460760f8335257e69c0f87aa82 -package-id=base16-bytestring-0.1.1.6-9e6871841ba9598a920190a3965bc7f4 -package-id=base64-bytestring-1.0.0.1-76d93cc37cb76265172a708135c9653a -package-id=binary-0.7.5.0-6e00b63f955513e2407019611c681b56 -package-id=binary-tagged-0.1.4.0-8b5a268e1202f09480ba3a447db9ad84 -package-id=blaze-builder-0.4.0.2-3d55cdb9c31315a2ab5b8619fb60d7a4 -package-id=byteable-0.1.1-bf870645be051d53f8c785389208c7cc -package-id=bytestring-0.10.6.0-8363d61ddfe397e767bde0e3fed6260e -package-id=conduit-1.2.6.6-e417d289beb8f6df9513582e2d0cc47d -package-id=conduit-extra-1.1.13.1-34dc4a0464e3a5b0182d43aadec61f31 -package-id=containers-0.5.6.2-68e3ece8a4f91a31e327fe89f8052a53 -package-id=cryptohash-0.11.9-109ed5ed2cdead93e9461d1fb9748821 -package-id=cryptohash-conduit-0.1.1-b9184e477a1a71e756d434e525020de0 -package-id=directory-1.2.2.0-3b3e1a8d629ccaa6c4588a9bb46bb163 -package-id=edit-distance-0.2.2.1-9d3891bf039e76d5754b7861295dabda -package-id=either-4.4.1.1-19584f8f859d7ce3cd0f0c074bef24f8 -package-id=enclosed-exceptions-1.0.2-c7c50843bc559d5f954ac3935fb59413 -package-id=errors-2.1.2-5d81f40326bca86a50f3fcd81b9ce85d -package-id=exceptions-0.8.2.1-08ed62d2282590eb80eba3e5c42a5f4e -package-id=extra-1.4.10-41c09e55b0f0970ba518e62b4a97960c -package-id=fast-logger-2.4.6-5053f99cf532a4cec5d2f4a8fe7ae24a -package-id=filelock-0.1.0.1-72f8e9268d92f202efaf568516532f9d -package-id=filepath-1.4.0.0-f97d1e4aebfd7a03be6980454fe31d6e -package-id=fsnotify-0.2.1-fc572be7612b3f6c38288615073780fe -package-id=generic-deriving-1.10.5-e0be2e54e133ceddf0cfca6d70e57a5f -package-id=hashable-1.2.4.0-7550865fa2a6bb3193b4e312352713f7 -package-id=hit-0.6.3-a271f93c2e12532dc2704d6a035f5164 -package-id=hpc-0.6.0.2-a39ecd097f2dd0806a38d9fca9f4590d -package-id=http-client-0.5.0-769839ddc5fd39cf7a95f0a64e8b3635 -package-id=http-client-tls-0.3.0-b0005ce1b8e7f8c7e3eec9cac797a669 -package-id=http-conduit-2.2.0-a6038c8d631ed26aebdf28e18cc8db3b -package-id=http-types-0.9.1-41716f4ad77b16288f71f3fedff3c94b -package-id=lifted-base-0.2.3.6-5189d4b0186926579aba53b90f71ed7f -package-id=microlens-0.4.5.0-ffc7fd1e6222c61f6f06a54b09b6acae -package-id=monad-control-1.0.1.0-84c4bc4b17198076c8ec507b90de89c9 -package-id=monad-logger-0.3.18-9e57d418f13d0cfef6110d3153e41969 -package-id=monad-unlift-0.2.0-77eab3e9dfd834e7c2b83f4a436e795f -package-id=mtl-2.2.1-3af90341e75ee52dfc4e3143b4e5d219 -package-id=open-browser-0.2.1.0-28c656a96515e8c7e4aa60851142168b -package-id=optparse-applicative-0.12.1.0-632ff9350432005d4b6860a3720a6388 -package-id=path-0.5.8-13ab13ddaf0c1c73f7d021431e5e6c35 -package-id=path-io-1.1.0-d4d7f5ae75b47005170931dda9edf1a6 -package-id=persistent-2.2.4.1-bff374b6c05fc15ccbc38e0fc2af8bb8 -package-id=persistent-sqlite-2.2.1-e79f37f53688612cf85ff0a8ead395ad -package-id=persistent-template-2.1.8.1-18f75aa8a9d68ae443ffd0e67cbab81c -package-id=pretty-1.1.2.0-19fde7e4235a5fccb7e53c1108876812 -package-id=process-1.2.3.0-a1a69425f3f6c11a82785be7baab3b68 -package-id=regex-applicative-text-0.1.0.1-fc8912574a5019a915bb4b122db347ba -package-id=resourcet-1.1.7.4-534cb535e14e3949a62b7c20e74977bb -package-id=retry-0.7.4-1159f2193f898d1827200a7ce16ca561 -package-id=safe-0.3.9-e3aa437cf6afe091d2ac3ab91bc10ddd -package-id=semigroups-0.18.1-f2deff31a0fd1df893b4e496c0f9caf0 -package-id=split-0.2.3.1-6d0063c12972868a1e069995047d6884 -package-id=stm-2.4.4.1-7050c728ed5b2315e2c6b56d8bf9837f -package-id=streaming-commons-0.1.15.5-1b6ceb9cd3a574a27401c4c5b5d541ee -package-id=tar-0.5.0.3-52d91796c3ff762b107be2602a8b4e12 -package-id=template-haskell-2.10.0.0-c5036b5d1f11290a936c690d2f1bbd7f -package-id=temporary-1.2.0.4-083e2f9c3540c17bddc708d2a8e57c5e -package-id=text-1.2.2.1-7d0e2ea4f6c20c86065fc9fde58d97e6 -package-id=text-binary-0.2.1-5d724e6255914e391bee90b30a4cef13 -package-id=time-1.5.0.1-14681d29751415f1a49b9321095eae91 -package-id=tls-1.3.8-33de89bb9bcd0fc079e7d450c7eef9a9 -package-id=transformers-0.4.2.0-81450cd8f86b36eaa8fa0cbaf6efc3a3 -package-id=transformers-base-0.4.4-19dc155e74aa624600f63b02f5f0b424 -package-id=unix-compat-0.4.1.4-4dccf276c16fae173fbeaa213af7fd4e -package-id=unordered-containers-0.2.7.1-10f63c3e9c9e90a01d00192ff3d449eb -package-id=vector-0.11.0.0-324da2b07f25721d305480db94a9f1d6 -package-id=vector-binary-instances-0.2.3.2-7277280ebd278fb6f6157cb6c2636c07 -package-id=yaml-0.8.18-03bf12e39273f79ef97a084ee6af65ca -package-id=zlib-0.6.1.1-b386a12dfc8267438326d06e808201fb -package-id=deepseq-1.4.1.1-8eec8f9bea2efc2500f63544ec6ca569 -package-id=hastache-0.6.1-7bd55e8c3c1a5df551a40dcfe1e38c75 -package-id=project-template-0.2.0-018c6d7d0a53cbf67add948e95a85ee0 -package-id=zip-archive-0.2.3.7-a2639cfba8248126820cc24c761d503f -package-id=hpack-0.14.1-9b871210b8e625037cda863a6bbe0d49 -package-id=store-0.1.0.1-0994395538c624ef1e6d4575df1a8910 -package-id=unix-2.7.1.0-3d39e78228b30316716e447e1283b3f0 -i/Users/pgiarrusso/Documents/Research/Sorgenti/stack/src/main -i/Users/pgiarrusso/Documents/Research/Sorgenti/stack/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/stack/stack-tmp -package-id=gitrev-1.2.0-352a2baf332d06c22e9436396d60c23d -package-id=optparse-simple-0.0.3-587a74c28e3bb83a52d77312fa2fee97 -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates -fwarn-identities -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates -DUSE_GIT_INFO -j3 -odir=/var/folders/_7/hlxv4yv95x95vgnn416b4q4m0000gp/T/intero92806EVF -hidir=/var/folders/_7/hlxv4yv95x95vgnn416b4q4m0000gp/T/intero92806EVF -ghci-script=/var/folders/_7/hlxv4yv95x95vgnn416b4q4m0000gp/T/intero-script92806RfL -optP-include -optP/private/var/folders/_7/hlxv4yv95x95vgnn416b4q4m0000gp/T/ghci42173/cabal_macros.h
@Blaisorblade

This comment has been minimized.

Show comment
Hide comment
@Blaisorblade

Blaisorblade Jul 11, 2016

Happened again.

This intero process was running on stack when I was testing for #149, so I have done stack clean at some point and loading then failed. This might be similar to our "leaks on fresh install": in both cases projects are not fully built so loading might fail.

This process was not killed either by intero-destroy nor by killing the REPL, so maybe it was leaked? Though maybe it was killed but too gracefully and it needed SIGKILL.

I killed it at 42GB of usage, with 40GB compressed and ~100% CPU usage. I noticed because the system was getting less responsive, but the RSS below is 2G or 1G; lots of the memory was probably swapped/compressed (I think around ~19GB, ~11GB of swap and ~8GB of memory).

$ ps uww 40065
USER         PID  %CPU %MEM      VSZ    RSS   TT  STAT STARTED      TIME COMMAND
pgiarrusso 40065 113.4 12.5 48750592 2104724   ??  R    10:49AM  54:10.93 /Users/pgiarrusso/.local/bin/intero --interactive -i -odir=/Users/pgiarrusso/Documents/Research/Sorgenti/stack/.stack-work/odir -hidir=/Users/pgiarrusso/Documents/Research/Sorgenti/stack/.stack-work/odir -hide-all-packages -i/Users/pgiarrusso/Documents/Research/Sorgenti/stack/src -i/Users/pgiarrusso/Documents/Research/Sorgenti/stack/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/autogen -i/Users/pgiarrusso/Documents/Research/Sorgenti/stack/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build -stubdir=/Users/pgiarrusso/Documents/Research/Sorgenti/stack/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build -package-id=Cabal-1.22.8.0-fa4fa305d3583e6c000ba5c24c4e2f03 -package-id=aeson-0.11.2.0-b03cae28950c2b4101ef16a6701cd8f0 -package-id=ansi-terminal-0.6.2.3-7b40b18f4e53e6f53c2ffd807e929ca9 -package-id=async-2.1.0-033e4fae4da028fc2d6502bd36e5e5a1 -package-id=attoparsec-0.13.0.2-d4d5a1f3c628d77bf175e88909ecc391 -package-id=base-4.8.2.0-cc43d8e06aa74e9c4c0132becc49ee25 -package-id=base-compat-0.9.1-88d2eb460760f8335257e69c0f87aa82 -package-id=base16-bytestring-0.1.1.6-9e6871841ba9598a920190a3965bc7f4 -package-id=base64-bytestring-1.0.0.1-76d93cc37cb76265172a708135c9653a -package-id=binary-0.7.5.0-6e00b63f955513e2407019611c681b56 -package-id=binary-tagged-0.1.4.0-8b5a268e1202f09480ba3a447db9ad84 -package-id=blaze-builder-0.4.0.2-3d55cdb9c31315a2ab5b8619fb60d7a4 -package-id=byteable-0.1.1-bf870645be051d53f8c785389208c7cc -package-id=bytestring-0.10.6.0-8363d61ddfe397e767bde0e3fed6260e -package-id=conduit-1.2.6.6-e417d289beb8f6df9513582e2d0cc47d -package-id=conduit-extra-1.1.13.1-34dc4a0464e3a5b0182d43aadec61f31 -package-id=containers-0.5.6.2-68e3ece8a4f91a31e327fe89f8052a53 -package-id=cryptohash-0.11.9-109ed5ed2cdead93e9461d1fb9748821 -package-id=cryptohash-conduit-0.1.1-b9184e477a1a71e756d434e525020de0 -package-id=directory-1.2.2.0-3b3e1a8d629ccaa6c4588a9bb46bb163 -package-id=edit-distance-0.2.2.1-9d3891bf039e76d5754b7861295dabda -package-id=either-4.4.1.1-19584f8f859d7ce3cd0f0c074bef24f8 -package-id=enclosed-exceptions-1.0.2-c7c50843bc559d5f954ac3935fb59413 -package-id=errors-2.1.2-5d81f40326bca86a50f3fcd81b9ce85d -package-id=exceptions-0.8.2.1-08ed62d2282590eb80eba3e5c42a5f4e -package-id=extra-1.4.10-41c09e55b0f0970ba518e62b4a97960c -package-id=fast-logger-2.4.6-5053f99cf532a4cec5d2f4a8fe7ae24a -package-id=filelock-0.1.0.1-72f8e9268d92f202efaf568516532f9d -package-id=filepath-1.4.0.0-f97d1e4aebfd7a03be6980454fe31d6e -package-id=fsnotify-0.2.1-fc572be7612b3f6c38288615073780fe -package-id=generic-deriving-1.10.5-e0be2e54e133ceddf0cfca6d70e57a5f -package-id=hashable-1.2.4.0-7550865fa2a6bb3193b4e312352713f7 -package-id=hit-0.6.3-a271f93c2e12532dc2704d6a035f5164 -package-id=hpc-0.6.0.2-a39ecd097f2dd0806a38d9fca9f4590d -package-id=http-client-0.5.0-769839ddc5fd39cf7a95f0a64e8b3635 -package-id=http-client-tls-0.3.0-b0005ce1b8e7f8c7e3eec9cac797a669 -package-id=http-conduit-2.2.0-a6038c8d631ed26aebdf28e18cc8db3b -package-id=http-types-0.9.1-41716f4ad77b16288f71f3fedff3c94b -package-id=lifted-base-0.2.3.6-5189d4b0186926579aba53b90f71ed7f -package-id=microlens-0.4.5.0-ffc7fd1e6222c61f6f06a54b09b6acae -package-id=monad-control-1.0.1.0-84c4bc4b17198076c8ec507b90de89c9 -package-id=monad-logger-0.3.18-9e57d418f13d0cfef6110d3153e41969 -package-id=monad-unlift-0.2.0-77eab3e9dfd834e7c2b83f4a436e795f -package-id=mtl-2.2.1-3af90341e75ee52dfc4e3143b4e5d219 -package-id=open-browser-0.2.1.0-28c656a96515e8c7e4aa60851142168b -package-id=optparse-applicative-0.12.1.0-632ff9350432005d4b6860a3720a6388 -package-id=path-0.5.8-13ab13ddaf0c1c73f7d021431e5e6c35 -package-id=path-io-1.1.0-d4d7f5ae75b47005170931dda9edf1a6 -package-id=persistent-2.2.4.1-bff374b6c05fc15ccbc38e0fc2af8bb8 -package-id=persistent-sqlite-2.2.1-e79f37f53688612cf85ff0a8ead395ad -package-id=persistent-template-2.1.8.1-18f75aa8a9d68ae443ffd0e67cbab81c -package-id=pretty-1.1.2.0-19fde7e4235a5fccb7e53c1108876812 -package-id=process-1.2.3.0-a1a69425f3f6c11a82785be7baab3b68 -package-id=regex-applicative-text-0.1.0.1-fc8912574a5019a915bb4b122db347ba -package-id=resourcet-1.1.7.4-534cb535e14e3949a62b7c20e74977bb -package-id=retry-0.7.4-1159f2193f898d1827200a7ce16ca561 -package-id=safe-0.3.9-e3aa437cf6afe091d2ac3ab91bc10ddd -package-id=semigroups-0.18.1-f2deff31a0fd1df893b4e496c0f9caf0 -package-id=split-0.2.3.1-6d0063c12972868a1e069995047d6884 -package-id=stm-2.4.4.1-7050c728ed5b2315e2c6b56d8bf9837f -package-id=streaming-commons-0.1.15.5-1b6ceb9cd3a574a27401c4c5b5d541ee -package-id=tar-0.5.0.3-52d91796c3ff762b107be2602a8b4e12 -package-id=template-haskell-2.10.0.0-c5036b5d1f11290a936c690d2f1bbd7f -package-id=temporary-1.2.0.4-083e2f9c3540c17bddc708d2a8e57c5e -package-id=text-1.2.2.1-7d0e2ea4f6c20c86065fc9fde58d97e6 -package-id=text-binary-0.2.1-5d724e6255914e391bee90b30a4cef13 -package-id=time-1.5.0.1-14681d29751415f1a49b9321095eae91 -package-id=tls-1.3.8-33de89bb9bcd0fc079e7d450c7eef9a9 -package-id=transformers-0.4.2.0-81450cd8f86b36eaa8fa0cbaf6efc3a3 -package-id=transformers-base-0.4.4-19dc155e74aa624600f63b02f5f0b424 -package-id=unix-compat-0.4.1.4-4dccf276c16fae173fbeaa213af7fd4e -package-id=unordered-containers-0.2.7.1-10f63c3e9c9e90a01d00192ff3d449eb -package-id=vector-0.11.0.0-324da2b07f25721d305480db94a9f1d6 -package-id=vector-binary-instances-0.2.3.2-7277280ebd278fb6f6157cb6c2636c07 -package-id=yaml-0.8.18-03bf12e39273f79ef97a084ee6af65ca -package-id=zlib-0.6.1.1-b386a12dfc8267438326d06e808201fb -package-id=deepseq-1.4.1.1-8eec8f9bea2efc2500f63544ec6ca569 -package-id=hastache-0.6.1-7bd55e8c3c1a5df551a40dcfe1e38c75 -package-id=project-template-0.2.0-018c6d7d0a53cbf67add948e95a85ee0 -package-id=zip-archive-0.2.3.7-a2639cfba8248126820cc24c761d503f -package-id=hpack-0.14.1-9b871210b8e625037cda863a6bbe0d49 -package-id=store-0.1.0.1-0994395538c624ef1e6d4575df1a8910 -package-id=unix-2.7.1.0-3d39e78228b30316716e447e1283b3f0 -i/Users/pgiarrusso/Documents/Research/Sorgenti/stack/src/main -i/Users/pgiarrusso/Documents/Research/Sorgenti/stack/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/stack/stack-tmp -package-id=gitrev-1.2.0-352a2baf332d06c22e9436396d60c23d -package-id=optparse-simple-0.0.3-587a74c28e3bb83a52d77312fa2fee97 -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates -fwarn-identities -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates -DUSE_GIT_INFO -j3 -odir=/var/folders/_7/hlxv4yv95x95vgnn416b4q4m0000gp/T/intero92806fcw -hidir=/var/folders/_7/hlxv4yv95x95vgnn416b4q4m0000gp/T/intero92806fcw -ghci-script=/var/folders/_7/hlxv4yv95x95vgnn416b4q4m0000gp/T/intero-script92806sm2 -optP-include -optP/private/var/folders/_7/hlxv4yv95x95vgnn416b4q4m0000gp/T/ghci40050/cabal_macros.h
$ ps uww 40065
USER         PID  %CPU %MEM      VSZ    RSS   TT  STAT STARTED      TIME COMMAND
pgiarrusso 40065  48.9  5.6 49886208 945012   ??  R    10:49AM  54:31.94 /Users/pgiarrusso/.local/bin/intero --interactive -i -odir=/Users/pgiarrusso/Documents/Research/Sorgenti/stack/.stack-work/odir -hidir=/Users/pgiarrusso/Documents/Research/Sorgenti/stack/.stack-work/odir -hide-all-packages -i/Users/pgiarrusso/Documents/Research/Sorgenti/stack/src -i/Users/pgiarrusso/Documents/Research/Sorgenti/stack/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/autogen -i/Users/pgiarrusso/Documents/Research/Sorgenti/stack/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build -stubdir=/Users/pgiarrusso/Documents/Research/Sorgenti/stack/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build -package-id=Cabal-1.22.8.0-fa4fa305d3583e6c000ba5c24c4e2f03 -package-id=aeson-0.11.2.0-b03cae28950c2b4101ef16a6701cd8f0 -package-id=ansi-terminal-0.6.2.3-7b40b18f4e53e6f53c2ffd807e929ca9 -package-id=async-2.1.0-033e4fae4da028fc2d6502bd36e5e5a1 -package-id=attoparsec-0.13.0.2-d4d5a1f3c628d77bf175e88909ecc391 -package-id=base-4.8.2.0-cc43d8e06aa74e9c4c0132becc49ee25 -package-id=base-compat-0.9.1-88d2eb460760f8335257e69c0f87aa82 -package-id=base16-bytestring-0.1.1.6-9e6871841ba9598a920190a3965bc7f4 -package-id=base64-bytestring-1.0.0.1-76d93cc37cb76265172a708135c9653a -package-id=binary-0.7.5.0-6e00b63f955513e2407019611c681b56 -package-id=binary-tagged-0.1.4.0-8b5a268e1202f09480ba3a447db9ad84 -package-id=blaze-builder-0.4.0.2-3d55cdb9c31315a2ab5b8619fb60d7a4 -package-id=byteable-0.1.1-bf870645be051d53f8c785389208c7cc -package-id=bytestring-0.10.6.0-8363d61ddfe397e767bde0e3fed6260e -package-id=conduit-1.2.6.6-e417d289beb8f6df9513582e2d0cc47d -package-id=conduit-extra-1.1.13.1-34dc4a0464e3a5b0182d43aadec61f31 -package-id=containers-0.5.6.2-68e3ece8a4f91a31e327fe89f8052a53 -package-id=cryptohash-0.11.9-109ed5ed2cdead93e9461d1fb9748821 -package-id=cryptohash-conduit-0.1.1-b9184e477a1a71e756d434e525020de0 -package-id=directory-1.2.2.0-3b3e1a8d629ccaa6c4588a9bb46bb163 -package-id=edit-distance-0.2.2.1-9d3891bf039e76d5754b7861295dabda -package-id=either-4.4.1.1-19584f8f859d7ce3cd0f0c074bef24f8 -package-id=enclosed-exceptions-1.0.2-c7c50843bc559d5f954ac3935fb59413 -package-id=errors-2.1.2-5d81f40326bca86a50f3fcd81b9ce85d -package-id=exceptions-0.8.2.1-08ed62d2282590eb80eba3e5c42a5f4e -package-id=extra-1.4.10-41c09e55b0f0970ba518e62b4a97960c -package-id=fast-logger-2.4.6-5053f99cf532a4cec5d2f4a8fe7ae24a -package-id=filelock-0.1.0.1-72f8e9268d92f202efaf568516532f9d -package-id=filepath-1.4.0.0-f97d1e4aebfd7a03be6980454fe31d6e -package-id=fsnotify-0.2.1-fc572be7612b3f6c38288615073780fe -package-id=generic-deriving-1.10.5-e0be2e54e133ceddf0cfca6d70e57a5f -package-id=hashable-1.2.4.0-7550865fa2a6bb3193b4e312352713f7 -package-id=hit-0.6.3-a271f93c2e12532dc2704d6a035f5164 -package-id=hpc-0.6.0.2-a39ecd097f2dd0806a38d9fca9f4590d -package-id=http-client-0.5.0-769839ddc5fd39cf7a95f0a64e8b3635 -package-id=http-client-tls-0.3.0-b0005ce1b8e7f8c7e3eec9cac797a669 -package-id=http-conduit-2.2.0-a6038c8d631ed26aebdf28e18cc8db3b -package-id=http-types-0.9.1-41716f4ad77b16288f71f3fedff3c94b -package-id=lifted-base-0.2.3.6-5189d4b0186926579aba53b90f71ed7f -package-id=microlens-0.4.5.0-ffc7fd1e6222c61f6f06a54b09b6acae -package-id=monad-control-1.0.1.0-84c4bc4b17198076c8ec507b90de89c9 -package-id=monad-logger-0.3.18-9e57d418f13d0cfef6110d3153e41969 -package-id=monad-unlift-0.2.0-77eab3e9dfd834e7c2b83f4a436e795f -package-id=mtl-2.2.1-3af90341e75ee52dfc4e3143b4e5d219 -package-id=open-browser-0.2.1.0-28c656a96515e8c7e4aa60851142168b -package-id=optparse-applicative-0.12.1.0-632ff9350432005d4b6860a3720a6388 -package-id=path-0.5.8-13ab13ddaf0c1c73f7d021431e5e6c35 -package-id=path-io-1.1.0-d4d7f5ae75b47005170931dda9edf1a6 -package-id=persistent-2.2.4.1-bff374b6c05fc15ccbc38e0fc2af8bb8 -package-id=persistent-sqlite-2.2.1-e79f37f53688612cf85ff0a8ead395ad -package-id=persistent-template-2.1.8.1-18f75aa8a9d68ae443ffd0e67cbab81c -package-id=pretty-1.1.2.0-19fde7e4235a5fccb7e53c1108876812 -package-id=process-1.2.3.0-a1a69425f3f6c11a82785be7baab3b68 -package-id=regex-applicative-text-0.1.0.1-fc8912574a5019a915bb4b122db347ba -package-id=resourcet-1.1.7.4-534cb535e14e3949a62b7c20e74977bb -package-id=retry-0.7.4-1159f2193f898d1827200a7ce16ca561 -package-id=safe-0.3.9-e3aa437cf6afe091d2ac3ab91bc10ddd -package-id=semigroups-0.18.1-f2deff31a0fd1df893b4e496c0f9caf0 -package-id=split-0.2.3.1-6d0063c12972868a1e069995047d6884 -package-id=stm-2.4.4.1-7050c728ed5b2315e2c6b56d8bf9837f -package-id=streaming-commons-0.1.15.5-1b6ceb9cd3a574a27401c4c5b5d541ee -package-id=tar-0.5.0.3-52d91796c3ff762b107be2602a8b4e12 -package-id=template-haskell-2.10.0.0-c5036b5d1f11290a936c690d2f1bbd7f -package-id=temporary-1.2.0.4-083e2f9c3540c17bddc708d2a8e57c5e -package-id=text-1.2.2.1-7d0e2ea4f6c20c86065fc9fde58d97e6 -package-id=text-binary-0.2.1-5d724e6255914e391bee90b30a4cef13 -package-id=time-1.5.0.1-14681d29751415f1a49b9321095eae91 -package-id=tls-1.3.8-33de89bb9bcd0fc079e7d450c7eef9a9 -package-id=transformers-0.4.2.0-81450cd8f86b36eaa8fa0cbaf6efc3a3 -package-id=transformers-base-0.4.4-19dc155e74aa624600f63b02f5f0b424 -package-id=unix-compat-0.4.1.4-4dccf276c16fae173fbeaa213af7fd4e -package-id=unordered-containers-0.2.7.1-10f63c3e9c9e90a01d00192ff3d449eb -package-id=vector-0.11.0.0-324da2b07f25721d305480db94a9f1d6 -package-id=vector-binary-instances-0.2.3.2-7277280ebd278fb6f6157cb6c2636c07 -package-id=yaml-0.8.18-03bf12e39273f79ef97a084ee6af65ca -package-id=zlib-0.6.1.1-b386a12dfc8267438326d06e808201fb -package-id=deepseq-1.4.1.1-8eec8f9bea2efc2500f63544ec6ca569 -package-id=hastache-0.6.1-7bd55e8c3c1a5df551a40dcfe1e38c75 -package-id=project-template-0.2.0-018c6d7d0a53cbf67add948e95a85ee0 -package-id=zip-archive-0.2.3.7-a2639cfba8248126820cc24c761d503f -package-id=hpack-0.14.1-9b871210b8e625037cda863a6bbe0d49 -package-id=store-0.1.0.1-0994395538c624ef1e6d4575df1a8910 -package-id=unix-2.7.1.0-3d39e78228b30316716e447e1283b3f0 -i/Users/pgiarrusso/Documents/Research/Sorgenti/stack/src/main -i/Users/pgiarrusso/Documents/Research/Sorgenti/stack/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/stack/stack-tmp -package-id=gitrev-1.2.0-352a2baf332d06c22e9436396d60c23d -package-id=optparse-simple-0.0.3-587a74c28e3bb83a52d77312fa2fee97 -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates -fwarn-identities -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates -DUSE_GIT_INFO -j3 -odir=/var/folders/_7/hlxv4yv95x95vgnn416b4q4m0000gp/T/intero92806fcw -hidir=/var/folders/_7/hlxv4yv95x95vgnn416b4q4m0000gp/T/intero92806fcw -ghci-script=/var/folders/_7/hlxv4yv95x95vgnn416b4q4m0000gp/T/intero-script92806sm2 -optP-include -optP/private/var/folders/_7/hlxv4yv95x95vgnn416b4q4m0000gp/T/ghci40050/cabal_macros.h

Blaisorblade commented Jul 11, 2016

Happened again.

This intero process was running on stack when I was testing for #149, so I have done stack clean at some point and loading then failed. This might be similar to our "leaks on fresh install": in both cases projects are not fully built so loading might fail.

This process was not killed either by intero-destroy nor by killing the REPL, so maybe it was leaked? Though maybe it was killed but too gracefully and it needed SIGKILL.

I killed it at 42GB of usage, with 40GB compressed and ~100% CPU usage. I noticed because the system was getting less responsive, but the RSS below is 2G or 1G; lots of the memory was probably swapped/compressed (I think around ~19GB, ~11GB of swap and ~8GB of memory).

$ ps uww 40065
USER         PID  %CPU %MEM      VSZ    RSS   TT  STAT STARTED      TIME COMMAND
pgiarrusso 40065 113.4 12.5 48750592 2104724   ??  R    10:49AM  54:10.93 /Users/pgiarrusso/.local/bin/intero --interactive -i -odir=/Users/pgiarrusso/Documents/Research/Sorgenti/stack/.stack-work/odir -hidir=/Users/pgiarrusso/Documents/Research/Sorgenti/stack/.stack-work/odir -hide-all-packages -i/Users/pgiarrusso/Documents/Research/Sorgenti/stack/src -i/Users/pgiarrusso/Documents/Research/Sorgenti/stack/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/autogen -i/Users/pgiarrusso/Documents/Research/Sorgenti/stack/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build -stubdir=/Users/pgiarrusso/Documents/Research/Sorgenti/stack/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build -package-id=Cabal-1.22.8.0-fa4fa305d3583e6c000ba5c24c4e2f03 -package-id=aeson-0.11.2.0-b03cae28950c2b4101ef16a6701cd8f0 -package-id=ansi-terminal-0.6.2.3-7b40b18f4e53e6f53c2ffd807e929ca9 -package-id=async-2.1.0-033e4fae4da028fc2d6502bd36e5e5a1 -package-id=attoparsec-0.13.0.2-d4d5a1f3c628d77bf175e88909ecc391 -package-id=base-4.8.2.0-cc43d8e06aa74e9c4c0132becc49ee25 -package-id=base-compat-0.9.1-88d2eb460760f8335257e69c0f87aa82 -package-id=base16-bytestring-0.1.1.6-9e6871841ba9598a920190a3965bc7f4 -package-id=base64-bytestring-1.0.0.1-76d93cc37cb76265172a708135c9653a -package-id=binary-0.7.5.0-6e00b63f955513e2407019611c681b56 -package-id=binary-tagged-0.1.4.0-8b5a268e1202f09480ba3a447db9ad84 -package-id=blaze-builder-0.4.0.2-3d55cdb9c31315a2ab5b8619fb60d7a4 -package-id=byteable-0.1.1-bf870645be051d53f8c785389208c7cc -package-id=bytestring-0.10.6.0-8363d61ddfe397e767bde0e3fed6260e -package-id=conduit-1.2.6.6-e417d289beb8f6df9513582e2d0cc47d -package-id=conduit-extra-1.1.13.1-34dc4a0464e3a5b0182d43aadec61f31 -package-id=containers-0.5.6.2-68e3ece8a4f91a31e327fe89f8052a53 -package-id=cryptohash-0.11.9-109ed5ed2cdead93e9461d1fb9748821 -package-id=cryptohash-conduit-0.1.1-b9184e477a1a71e756d434e525020de0 -package-id=directory-1.2.2.0-3b3e1a8d629ccaa6c4588a9bb46bb163 -package-id=edit-distance-0.2.2.1-9d3891bf039e76d5754b7861295dabda -package-id=either-4.4.1.1-19584f8f859d7ce3cd0f0c074bef24f8 -package-id=enclosed-exceptions-1.0.2-c7c50843bc559d5f954ac3935fb59413 -package-id=errors-2.1.2-5d81f40326bca86a50f3fcd81b9ce85d -package-id=exceptions-0.8.2.1-08ed62d2282590eb80eba3e5c42a5f4e -package-id=extra-1.4.10-41c09e55b0f0970ba518e62b4a97960c -package-id=fast-logger-2.4.6-5053f99cf532a4cec5d2f4a8fe7ae24a -package-id=filelock-0.1.0.1-72f8e9268d92f202efaf568516532f9d -package-id=filepath-1.4.0.0-f97d1e4aebfd7a03be6980454fe31d6e -package-id=fsnotify-0.2.1-fc572be7612b3f6c38288615073780fe -package-id=generic-deriving-1.10.5-e0be2e54e133ceddf0cfca6d70e57a5f -package-id=hashable-1.2.4.0-7550865fa2a6bb3193b4e312352713f7 -package-id=hit-0.6.3-a271f93c2e12532dc2704d6a035f5164 -package-id=hpc-0.6.0.2-a39ecd097f2dd0806a38d9fca9f4590d -package-id=http-client-0.5.0-769839ddc5fd39cf7a95f0a64e8b3635 -package-id=http-client-tls-0.3.0-b0005ce1b8e7f8c7e3eec9cac797a669 -package-id=http-conduit-2.2.0-a6038c8d631ed26aebdf28e18cc8db3b -package-id=http-types-0.9.1-41716f4ad77b16288f71f3fedff3c94b -package-id=lifted-base-0.2.3.6-5189d4b0186926579aba53b90f71ed7f -package-id=microlens-0.4.5.0-ffc7fd1e6222c61f6f06a54b09b6acae -package-id=monad-control-1.0.1.0-84c4bc4b17198076c8ec507b90de89c9 -package-id=monad-logger-0.3.18-9e57d418f13d0cfef6110d3153e41969 -package-id=monad-unlift-0.2.0-77eab3e9dfd834e7c2b83f4a436e795f -package-id=mtl-2.2.1-3af90341e75ee52dfc4e3143b4e5d219 -package-id=open-browser-0.2.1.0-28c656a96515e8c7e4aa60851142168b -package-id=optparse-applicative-0.12.1.0-632ff9350432005d4b6860a3720a6388 -package-id=path-0.5.8-13ab13ddaf0c1c73f7d021431e5e6c35 -package-id=path-io-1.1.0-d4d7f5ae75b47005170931dda9edf1a6 -package-id=persistent-2.2.4.1-bff374b6c05fc15ccbc38e0fc2af8bb8 -package-id=persistent-sqlite-2.2.1-e79f37f53688612cf85ff0a8ead395ad -package-id=persistent-template-2.1.8.1-18f75aa8a9d68ae443ffd0e67cbab81c -package-id=pretty-1.1.2.0-19fde7e4235a5fccb7e53c1108876812 -package-id=process-1.2.3.0-a1a69425f3f6c11a82785be7baab3b68 -package-id=regex-applicative-text-0.1.0.1-fc8912574a5019a915bb4b122db347ba -package-id=resourcet-1.1.7.4-534cb535e14e3949a62b7c20e74977bb -package-id=retry-0.7.4-1159f2193f898d1827200a7ce16ca561 -package-id=safe-0.3.9-e3aa437cf6afe091d2ac3ab91bc10ddd -package-id=semigroups-0.18.1-f2deff31a0fd1df893b4e496c0f9caf0 -package-id=split-0.2.3.1-6d0063c12972868a1e069995047d6884 -package-id=stm-2.4.4.1-7050c728ed5b2315e2c6b56d8bf9837f -package-id=streaming-commons-0.1.15.5-1b6ceb9cd3a574a27401c4c5b5d541ee -package-id=tar-0.5.0.3-52d91796c3ff762b107be2602a8b4e12 -package-id=template-haskell-2.10.0.0-c5036b5d1f11290a936c690d2f1bbd7f -package-id=temporary-1.2.0.4-083e2f9c3540c17bddc708d2a8e57c5e -package-id=text-1.2.2.1-7d0e2ea4f6c20c86065fc9fde58d97e6 -package-id=text-binary-0.2.1-5d724e6255914e391bee90b30a4cef13 -package-id=time-1.5.0.1-14681d29751415f1a49b9321095eae91 -package-id=tls-1.3.8-33de89bb9bcd0fc079e7d450c7eef9a9 -package-id=transformers-0.4.2.0-81450cd8f86b36eaa8fa0cbaf6efc3a3 -package-id=transformers-base-0.4.4-19dc155e74aa624600f63b02f5f0b424 -package-id=unix-compat-0.4.1.4-4dccf276c16fae173fbeaa213af7fd4e -package-id=unordered-containers-0.2.7.1-10f63c3e9c9e90a01d00192ff3d449eb -package-id=vector-0.11.0.0-324da2b07f25721d305480db94a9f1d6 -package-id=vector-binary-instances-0.2.3.2-7277280ebd278fb6f6157cb6c2636c07 -package-id=yaml-0.8.18-03bf12e39273f79ef97a084ee6af65ca -package-id=zlib-0.6.1.1-b386a12dfc8267438326d06e808201fb -package-id=deepseq-1.4.1.1-8eec8f9bea2efc2500f63544ec6ca569 -package-id=hastache-0.6.1-7bd55e8c3c1a5df551a40dcfe1e38c75 -package-id=project-template-0.2.0-018c6d7d0a53cbf67add948e95a85ee0 -package-id=zip-archive-0.2.3.7-a2639cfba8248126820cc24c761d503f -package-id=hpack-0.14.1-9b871210b8e625037cda863a6bbe0d49 -package-id=store-0.1.0.1-0994395538c624ef1e6d4575df1a8910 -package-id=unix-2.7.1.0-3d39e78228b30316716e447e1283b3f0 -i/Users/pgiarrusso/Documents/Research/Sorgenti/stack/src/main -i/Users/pgiarrusso/Documents/Research/Sorgenti/stack/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/stack/stack-tmp -package-id=gitrev-1.2.0-352a2baf332d06c22e9436396d60c23d -package-id=optparse-simple-0.0.3-587a74c28e3bb83a52d77312fa2fee97 -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates -fwarn-identities -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates -DUSE_GIT_INFO -j3 -odir=/var/folders/_7/hlxv4yv95x95vgnn416b4q4m0000gp/T/intero92806fcw -hidir=/var/folders/_7/hlxv4yv95x95vgnn416b4q4m0000gp/T/intero92806fcw -ghci-script=/var/folders/_7/hlxv4yv95x95vgnn416b4q4m0000gp/T/intero-script92806sm2 -optP-include -optP/private/var/folders/_7/hlxv4yv95x95vgnn416b4q4m0000gp/T/ghci40050/cabal_macros.h
$ ps uww 40065
USER         PID  %CPU %MEM      VSZ    RSS   TT  STAT STARTED      TIME COMMAND
pgiarrusso 40065  48.9  5.6 49886208 945012   ??  R    10:49AM  54:31.94 /Users/pgiarrusso/.local/bin/intero --interactive -i -odir=/Users/pgiarrusso/Documents/Research/Sorgenti/stack/.stack-work/odir -hidir=/Users/pgiarrusso/Documents/Research/Sorgenti/stack/.stack-work/odir -hide-all-packages -i/Users/pgiarrusso/Documents/Research/Sorgenti/stack/src -i/Users/pgiarrusso/Documents/Research/Sorgenti/stack/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/autogen -i/Users/pgiarrusso/Documents/Research/Sorgenti/stack/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build -stubdir=/Users/pgiarrusso/Documents/Research/Sorgenti/stack/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build -package-id=Cabal-1.22.8.0-fa4fa305d3583e6c000ba5c24c4e2f03 -package-id=aeson-0.11.2.0-b03cae28950c2b4101ef16a6701cd8f0 -package-id=ansi-terminal-0.6.2.3-7b40b18f4e53e6f53c2ffd807e929ca9 -package-id=async-2.1.0-033e4fae4da028fc2d6502bd36e5e5a1 -package-id=attoparsec-0.13.0.2-d4d5a1f3c628d77bf175e88909ecc391 -package-id=base-4.8.2.0-cc43d8e06aa74e9c4c0132becc49ee25 -package-id=base-compat-0.9.1-88d2eb460760f8335257e69c0f87aa82 -package-id=base16-bytestring-0.1.1.6-9e6871841ba9598a920190a3965bc7f4 -package-id=base64-bytestring-1.0.0.1-76d93cc37cb76265172a708135c9653a -package-id=binary-0.7.5.0-6e00b63f955513e2407019611c681b56 -package-id=binary-tagged-0.1.4.0-8b5a268e1202f09480ba3a447db9ad84 -package-id=blaze-builder-0.4.0.2-3d55cdb9c31315a2ab5b8619fb60d7a4 -package-id=byteable-0.1.1-bf870645be051d53f8c785389208c7cc -package-id=bytestring-0.10.6.0-8363d61ddfe397e767bde0e3fed6260e -package-id=conduit-1.2.6.6-e417d289beb8f6df9513582e2d0cc47d -package-id=conduit-extra-1.1.13.1-34dc4a0464e3a5b0182d43aadec61f31 -package-id=containers-0.5.6.2-68e3ece8a4f91a31e327fe89f8052a53 -package-id=cryptohash-0.11.9-109ed5ed2cdead93e9461d1fb9748821 -package-id=cryptohash-conduit-0.1.1-b9184e477a1a71e756d434e525020de0 -package-id=directory-1.2.2.0-3b3e1a8d629ccaa6c4588a9bb46bb163 -package-id=edit-distance-0.2.2.1-9d3891bf039e76d5754b7861295dabda -package-id=either-4.4.1.1-19584f8f859d7ce3cd0f0c074bef24f8 -package-id=enclosed-exceptions-1.0.2-c7c50843bc559d5f954ac3935fb59413 -package-id=errors-2.1.2-5d81f40326bca86a50f3fcd81b9ce85d -package-id=exceptions-0.8.2.1-08ed62d2282590eb80eba3e5c42a5f4e -package-id=extra-1.4.10-41c09e55b0f0970ba518e62b4a97960c -package-id=fast-logger-2.4.6-5053f99cf532a4cec5d2f4a8fe7ae24a -package-id=filelock-0.1.0.1-72f8e9268d92f202efaf568516532f9d -package-id=filepath-1.4.0.0-f97d1e4aebfd7a03be6980454fe31d6e -package-id=fsnotify-0.2.1-fc572be7612b3f6c38288615073780fe -package-id=generic-deriving-1.10.5-e0be2e54e133ceddf0cfca6d70e57a5f -package-id=hashable-1.2.4.0-7550865fa2a6bb3193b4e312352713f7 -package-id=hit-0.6.3-a271f93c2e12532dc2704d6a035f5164 -package-id=hpc-0.6.0.2-a39ecd097f2dd0806a38d9fca9f4590d -package-id=http-client-0.5.0-769839ddc5fd39cf7a95f0a64e8b3635 -package-id=http-client-tls-0.3.0-b0005ce1b8e7f8c7e3eec9cac797a669 -package-id=http-conduit-2.2.0-a6038c8d631ed26aebdf28e18cc8db3b -package-id=http-types-0.9.1-41716f4ad77b16288f71f3fedff3c94b -package-id=lifted-base-0.2.3.6-5189d4b0186926579aba53b90f71ed7f -package-id=microlens-0.4.5.0-ffc7fd1e6222c61f6f06a54b09b6acae -package-id=monad-control-1.0.1.0-84c4bc4b17198076c8ec507b90de89c9 -package-id=monad-logger-0.3.18-9e57d418f13d0cfef6110d3153e41969 -package-id=monad-unlift-0.2.0-77eab3e9dfd834e7c2b83f4a436e795f -package-id=mtl-2.2.1-3af90341e75ee52dfc4e3143b4e5d219 -package-id=open-browser-0.2.1.0-28c656a96515e8c7e4aa60851142168b -package-id=optparse-applicative-0.12.1.0-632ff9350432005d4b6860a3720a6388 -package-id=path-0.5.8-13ab13ddaf0c1c73f7d021431e5e6c35 -package-id=path-io-1.1.0-d4d7f5ae75b47005170931dda9edf1a6 -package-id=persistent-2.2.4.1-bff374b6c05fc15ccbc38e0fc2af8bb8 -package-id=persistent-sqlite-2.2.1-e79f37f53688612cf85ff0a8ead395ad -package-id=persistent-template-2.1.8.1-18f75aa8a9d68ae443ffd0e67cbab81c -package-id=pretty-1.1.2.0-19fde7e4235a5fccb7e53c1108876812 -package-id=process-1.2.3.0-a1a69425f3f6c11a82785be7baab3b68 -package-id=regex-applicative-text-0.1.0.1-fc8912574a5019a915bb4b122db347ba -package-id=resourcet-1.1.7.4-534cb535e14e3949a62b7c20e74977bb -package-id=retry-0.7.4-1159f2193f898d1827200a7ce16ca561 -package-id=safe-0.3.9-e3aa437cf6afe091d2ac3ab91bc10ddd -package-id=semigroups-0.18.1-f2deff31a0fd1df893b4e496c0f9caf0 -package-id=split-0.2.3.1-6d0063c12972868a1e069995047d6884 -package-id=stm-2.4.4.1-7050c728ed5b2315e2c6b56d8bf9837f -package-id=streaming-commons-0.1.15.5-1b6ceb9cd3a574a27401c4c5b5d541ee -package-id=tar-0.5.0.3-52d91796c3ff762b107be2602a8b4e12 -package-id=template-haskell-2.10.0.0-c5036b5d1f11290a936c690d2f1bbd7f -package-id=temporary-1.2.0.4-083e2f9c3540c17bddc708d2a8e57c5e -package-id=text-1.2.2.1-7d0e2ea4f6c20c86065fc9fde58d97e6 -package-id=text-binary-0.2.1-5d724e6255914e391bee90b30a4cef13 -package-id=time-1.5.0.1-14681d29751415f1a49b9321095eae91 -package-id=tls-1.3.8-33de89bb9bcd0fc079e7d450c7eef9a9 -package-id=transformers-0.4.2.0-81450cd8f86b36eaa8fa0cbaf6efc3a3 -package-id=transformers-base-0.4.4-19dc155e74aa624600f63b02f5f0b424 -package-id=unix-compat-0.4.1.4-4dccf276c16fae173fbeaa213af7fd4e -package-id=unordered-containers-0.2.7.1-10f63c3e9c9e90a01d00192ff3d449eb -package-id=vector-0.11.0.0-324da2b07f25721d305480db94a9f1d6 -package-id=vector-binary-instances-0.2.3.2-7277280ebd278fb6f6157cb6c2636c07 -package-id=yaml-0.8.18-03bf12e39273f79ef97a084ee6af65ca -package-id=zlib-0.6.1.1-b386a12dfc8267438326d06e808201fb -package-id=deepseq-1.4.1.1-8eec8f9bea2efc2500f63544ec6ca569 -package-id=hastache-0.6.1-7bd55e8c3c1a5df551a40dcfe1e38c75 -package-id=project-template-0.2.0-018c6d7d0a53cbf67add948e95a85ee0 -package-id=zip-archive-0.2.3.7-a2639cfba8248126820cc24c761d503f -package-id=hpack-0.14.1-9b871210b8e625037cda863a6bbe0d49 -package-id=store-0.1.0.1-0994395538c624ef1e6d4575df1a8910 -package-id=unix-2.7.1.0-3d39e78228b30316716e447e1283b3f0 -i/Users/pgiarrusso/Documents/Research/Sorgenti/stack/src/main -i/Users/pgiarrusso/Documents/Research/Sorgenti/stack/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/stack/stack-tmp -package-id=gitrev-1.2.0-352a2baf332d06c22e9436396d60c23d -package-id=optparse-simple-0.0.3-587a74c28e3bb83a52d77312fa2fee97 -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates -fwarn-identities -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates -DUSE_GIT_INFO -j3 -odir=/var/folders/_7/hlxv4yv95x95vgnn416b4q4m0000gp/T/intero92806fcw -hidir=/var/folders/_7/hlxv4yv95x95vgnn416b4q4m0000gp/T/intero92806fcw -ghci-script=/var/folders/_7/hlxv4yv95x95vgnn416b4q4m0000gp/T/intero-script92806sm2 -optP-include -optP/private/var/folders/_7/hlxv4yv95x95vgnn416b4q4m0000gp/T/ghci40050/cabal_macros.h
@chrisdone

This comment has been minimized.

Show comment
Hide comment
@chrisdone

chrisdone Jul 22, 2016

Member

I think I reproduced this issue when I slept and returned. It went up to 20GB. Not sure whether it's Intero's modifications or GHCi itself.

I did notice that it wasn't just "a lot of usage", but a steadily increasing memory use, which implies some kind of runaway allocation bug.

Member

chrisdone commented Jul 22, 2016

I think I reproduced this issue when I slept and returned. It went up to 20GB. Not sure whether it's Intero's modifications or GHCi itself.

I did notice that it wasn't just "a lot of usage", but a steadily increasing memory use, which implies some kind of runaway allocation bug.

@jtdawso

This comment has been minimized.

Show comment
Hide comment
@jtdawso

jtdawso Sep 16, 2016

Any update on this issue? I run into this about 2-3 times a week. 20+ GB used per instance on my mac. If I open a haskell file in a pretty complex project (using stack) and then close it fairly quickly. Intero seems to continue to run and gradually eats up the memory, instead of exiting with emacs.

To give more specifics. Opening the file and letting it sit puts my intero memory at a steady 624 MB .
When I close the program (using normal C-x C-c) intero shuts down just fine.
If I close the file before it reaches the 624 MB (but still after the "intero has booted" text) then the intero process doesn't close and within 30-60 seconds 1 GB has already been gobbled up.
I hope this helps.

jtdawso commented Sep 16, 2016

Any update on this issue? I run into this about 2-3 times a week. 20+ GB used per instance on my mac. If I open a haskell file in a pretty complex project (using stack) and then close it fairly quickly. Intero seems to continue to run and gradually eats up the memory, instead of exiting with emacs.

To give more specifics. Opening the file and letting it sit puts my intero memory at a steady 624 MB .
When I close the program (using normal C-x C-c) intero shuts down just fine.
If I close the file before it reaches the 624 MB (but still after the "intero has booted" text) then the intero process doesn't close and within 30-60 seconds 1 GB has already been gobbled up.
I hope this helps.

@Blaisorblade

This comment has been minimized.

Show comment
Hide comment
@Blaisorblade

Blaisorblade Sep 16, 2016

A reproduction, that's great! I've failed to reproduce this trying on stack (which is certainly big enough), though I have seen this multiple times in Emacs logs—maybe reviewing related logs can help (shooting in the dark)?

error in process filter: intero-read-buffer: Selecting deleted buffer
error in process filter: Selecting deleted buffer

@jtdawso To make progress on this, ideally some intero dev should manage to reproduce this.

Is this project-specific or for any big project? Can you do that on a project you can point us to? Random example: stack is big enough, it gets you to a steady >= 1.5GB. Also, can you gather the command line the offending process was launched to by using ps? Specifically, can you run ps auxww | grep intero on a terminal (when such an intero process is running) and post here the output?

Blaisorblade commented Sep 16, 2016

A reproduction, that's great! I've failed to reproduce this trying on stack (which is certainly big enough), though I have seen this multiple times in Emacs logs—maybe reviewing related logs can help (shooting in the dark)?

error in process filter: intero-read-buffer: Selecting deleted buffer
error in process filter: Selecting deleted buffer

@jtdawso To make progress on this, ideally some intero dev should manage to reproduce this.

Is this project-specific or for any big project? Can you do that on a project you can point us to? Random example: stack is big enough, it gets you to a steady >= 1.5GB. Also, can you gather the command line the offending process was launched to by using ps? Specifically, can you run ps auxww | grep intero on a terminal (when such an intero process is running) and post here the output?

@jtdawso

This comment has been minimized.

Show comment
Hide comment
@jtdawso

jtdawso Sep 22, 2016

Sorry for the delay. Here are steps to reproduce it:

  1. git clone git@github.com:commercialhaskell/intero.git
  2. emacs src/Main.hs
  3. Exit emacs (C-x C-c) almost immediately after you see the text "booted up Intero"

You should now see intero is still hanging around even though emacs is closed. You might have to fiddle with the timing on closing it. Too early or too late will kill the process as expected. Having an process monitor open is helpful. But I can replicate the issue pretty easily.

Here's the output from the ps auxww (my working directory is :

justindawson 50232 100.0 2.6 2971124 440200 ?? R 9:10PM 0:17.28 /Users/justindaws on/interoTest/intero/.stack-work/install/x86_64-osx/lts-5.16/7.10.3/bin/intero --interactive -i -odir=/Users/justindawson/interoTest/intero/.stack-work/odir -hidir=/Users/justindawson/intero Test/intero/.stack-work/odir -hide-all-packages -i/Users/justindawson/interoTest/intero/src -i/ Users/justindawson/interoTest/intero/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/autogen - i/Users/justindawson/interoTest/intero/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build -i/User s/justindawson/interoTest/intero/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/intero/intero -tmp -stubdir=/Users/justindawson/interoTest/intero/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/ build -I/Users/justindawson/interoTest/intero/cbits /Users/justindawson/interoTest/intero/.stac k-work/dist/x86_64-osx/Cabal-1.22.5.0/build/intero/intero-tmp/cbits/hschooks.o -package-id=base -4.8.2.0-cc43d8e06aa74e9c4c0132becc49ee25 -package-id=array-0.5.1.0-960bf9ae8875cc30355e086f885 3a049 -package-id=bytestring-0.10.6.0-04b5cc1d05f993b3b016543ca2863add -package-id=directory-1. 2.2.0-afaac10d677f7107a807fb2fd0eca9f4 -package-id=filepath-1.4.0.0-f97d1e4aebfd7a03be6980454fe 31d6e -package-id=ghc-7.10.3-68e5826cb9244ac7ec87b0e618d80b80 -package-id=ghc-paths-0.1.0.9-950 747e0485da0aa858e9f922cc68884 -package-id=haskeline-0.7.2.3-971a3f3d3eb8f7dccd9f970258521e50 -p ackage-id=process-1.2.3.0-43f46fea20622dde8c5d485d65e4e315 -package-id=transformers-0.4.2.0-814 50cd8f86b36eaa8fa0cbaf6efc3a3 -package-id=syb-0.6-a7d698b213473d33bda8eb50123178ab -package-id= containers-0.5.6.2-1281f6ac62b47acf472f6cdcec6a4f4b -package-id=time-1.5.0.1-9d583724234c876226 763fdd0cb776fc -package-id=unix-2.7.1.0-18063fe9fff87bd2952570f0866b7973 -Wall -rtsopts -dynami c -DGHCI -odir=/var/folders/f1/xp9_dywj3kx9hxt0_g6d0ckm0000gp/T/intero50189X2z -hidir=/var/fold ers/f1/xp9_dywj3kx9hxt0_g6d0ckm0000gp/T/intero50189X2z -optP-include -optP/private/var/folders/ f1/xp9_dywj3kx9hxt0_g6d0ckm0000gp/T/ghci50222/cabal_macros.h

I left it running, and it is already at 9.81 GB of memory...

jtdawso commented Sep 22, 2016

Sorry for the delay. Here are steps to reproduce it:

  1. git clone git@github.com:commercialhaskell/intero.git
  2. emacs src/Main.hs
  3. Exit emacs (C-x C-c) almost immediately after you see the text "booted up Intero"

You should now see intero is still hanging around even though emacs is closed. You might have to fiddle with the timing on closing it. Too early or too late will kill the process as expected. Having an process monitor open is helpful. But I can replicate the issue pretty easily.

Here's the output from the ps auxww (my working directory is :

justindawson 50232 100.0 2.6 2971124 440200 ?? R 9:10PM 0:17.28 /Users/justindaws on/interoTest/intero/.stack-work/install/x86_64-osx/lts-5.16/7.10.3/bin/intero --interactive -i -odir=/Users/justindawson/interoTest/intero/.stack-work/odir -hidir=/Users/justindawson/intero Test/intero/.stack-work/odir -hide-all-packages -i/Users/justindawson/interoTest/intero/src -i/ Users/justindawson/interoTest/intero/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/autogen - i/Users/justindawson/interoTest/intero/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build -i/User s/justindawson/interoTest/intero/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/intero/intero -tmp -stubdir=/Users/justindawson/interoTest/intero/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/ build -I/Users/justindawson/interoTest/intero/cbits /Users/justindawson/interoTest/intero/.stac k-work/dist/x86_64-osx/Cabal-1.22.5.0/build/intero/intero-tmp/cbits/hschooks.o -package-id=base -4.8.2.0-cc43d8e06aa74e9c4c0132becc49ee25 -package-id=array-0.5.1.0-960bf9ae8875cc30355e086f885 3a049 -package-id=bytestring-0.10.6.0-04b5cc1d05f993b3b016543ca2863add -package-id=directory-1. 2.2.0-afaac10d677f7107a807fb2fd0eca9f4 -package-id=filepath-1.4.0.0-f97d1e4aebfd7a03be6980454fe 31d6e -package-id=ghc-7.10.3-68e5826cb9244ac7ec87b0e618d80b80 -package-id=ghc-paths-0.1.0.9-950 747e0485da0aa858e9f922cc68884 -package-id=haskeline-0.7.2.3-971a3f3d3eb8f7dccd9f970258521e50 -p ackage-id=process-1.2.3.0-43f46fea20622dde8c5d485d65e4e315 -package-id=transformers-0.4.2.0-814 50cd8f86b36eaa8fa0cbaf6efc3a3 -package-id=syb-0.6-a7d698b213473d33bda8eb50123178ab -package-id= containers-0.5.6.2-1281f6ac62b47acf472f6cdcec6a4f4b -package-id=time-1.5.0.1-9d583724234c876226 763fdd0cb776fc -package-id=unix-2.7.1.0-18063fe9fff87bd2952570f0866b7973 -Wall -rtsopts -dynami c -DGHCI -odir=/var/folders/f1/xp9_dywj3kx9hxt0_g6d0ckm0000gp/T/intero50189X2z -hidir=/var/fold ers/f1/xp9_dywj3kx9hxt0_g6d0ckm0000gp/T/intero50189X2z -optP-include -optP/private/var/folders/ f1/xp9_dywj3kx9hxt0_g6d0ckm0000gp/T/ghci50222/cabal_macros.h

I left it running, and it is already at 9.81 GB of memory...

@arybczak

This comment has been minimized.

Show comment
Hide comment

arybczak commented Nov 17, 2016

This is possibly related to https://ghc.haskell.org/trac/ghc/ticket/12848.

@Blaisorblade

This comment has been minimized.

Show comment
Hide comment
@Blaisorblade

Blaisorblade Dec 23, 2017

Possibly related to https://ghc.haskell.org/trac/ghc/ticket/14336; if GHCi truly retains results, intero must be sending more commands to trigger this. But our bug is not deterministic, so it might be something else.

Blaisorblade commented Dec 23, 2017

Possibly related to https://ghc.haskell.org/trac/ghc/ticket/14336; if GHCi truly retains results, intero must be sending more commands to trigger this. But our bug is not deterministic, so it might be something else.

@parsonsmatt

This comment has been minimized.

Show comment
Hide comment
@parsonsmatt

parsonsmatt Dec 23, 2017

fwiw, I also get runaway memory usage with intero using the intero-neovim project. It's pretty reliable to reproduce by simply using intero on any larger project (work codebase is ~30K lines, PureScript codebase triggers this easily)

parsonsmatt commented Dec 23, 2017

fwiw, I also get runaway memory usage with intero using the intero-neovim project. It's pretty reliable to reproduce by simply using intero on any larger project (work codebase is ~30K lines, PureScript codebase triggers this easily)

@saurabhnanda

This comment has been minimized.

Show comment
Hide comment
@saurabhnanda

saurabhnanda Jan 8, 2018

I have proposed this as an idea for GSoC / HSoC at https://github.com/haskell-org/summer-of-haskell/pull/15/files

If anyone is interesting in mentoring students working on fixing this space leak, please participate in the discussion at haskell-org/summer-of-haskell#29

saurabhnanda commented Jan 8, 2018

I have proposed this as an idea for GSoC / HSoC at https://github.com/haskell-org/summer-of-haskell/pull/15/files

If anyone is interesting in mentoring students working on fixing this space leak, please participate in the discussion at haskell-org/summer-of-haskell#29

@luc-tielen

This comment has been minimized.

Show comment
Hide comment
@luc-tielen

luc-tielen Apr 22, 2018

Any updates on this?

I can also reproduce this with intero using neovim on a rather small codebase (1k-2k LOC)..
Intero also keeps running after I close neovim? Maybe related?
Only way I can fix it is by running killall intero after closing neovim..

luc-tielen commented Apr 22, 2018

Any updates on this?

I can also reproduce this with intero using neovim on a rather small codebase (1k-2k LOC)..
Intero also keeps running after I close neovim? Maybe related?
Only way I can fix it is by running killall intero after closing neovim..

@luc-tielen

This comment has been minimized.

Show comment
Hide comment
@luc-tielen

luc-tielen Apr 22, 2018

Hmm.. just browsed the other open issues, found a potential duplicate? #475

luc-tielen commented Apr 22, 2018

Hmm.. just browsed the other open issues, found a potential duplicate? #475

@asheshambasta

This comment has been minimized.

Show comment
Hide comment
@asheshambasta

asheshambasta Apr 29, 2018

I'm also seeing the same issue. Intero seems to cool down when I'm not making any changes but any sort of typing (even comments) fires it up – I get very high CPU and memory usage.
Any updates on this?

asheshambasta commented Apr 29, 2018

I'm also seeing the same issue. Intero seems to cool down when I'm not making any changes but any sort of typing (even comments) fires it up – I get very high CPU and memory usage.
Any updates on this?

@awgn

This comment has been minimized.

Show comment
Hide comment
@awgn

awgn Aug 16, 2018

On my mac I'm still facing this issue, using neovim, neovim-intero, stack 1.7.1 and ghc 8.4.3. Any relevant update?

awgn commented Aug 16, 2018

On my mac I'm still facing this issue, using neovim, neovim-intero, stack 1.7.1 and ghc 8.4.3. Any relevant update?

@chrisdone

This comment has been minimized.

Show comment
Hide comment
@chrisdone

chrisdone Aug 17, 2018

Member

Nope, no idea. No one has a repro test that just involves the intero binary by itself.

Member

chrisdone commented Aug 17, 2018

Nope, no idea. No one has a repro test that just involves the intero binary by itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment