gopherjs: Circular dependency leads to memory leak on `gopherjs build`

After some small changes in a project it seems that gopherjs came to memory leak: gopherjs build continues consuming more and more memory and nothing at output. This picture is after ~5 min of running the tool. Usually it took about few seconds to compile.

OS: Windows 10 изображение

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 18 (8 by maintainers)

Most upvoted comments

There is no 100% CPU consumption

Not according to your screen shot. It clearly shows one process consuming “102.” %CPU.

It’s not a leak because if GopherJS magically figured out the answer and returned, all that memory would be freed.

== If there was no memory leak (magically, as you said), than there was no memory leak.

I agree this is a dup of #637, which was a dup of #414.

According to description, this issue is different. There is no 100% CPU consumption, gopherjs doesn’t hang, no stack overflow related errors, etc. In my case gopherjs can run an for quite long time with no errors, just consuming memory but then, at the end it will stop by Ctrl-C just as any normal application. In fact I didn’t have enough patience to make it crash, longest run was smth like ~15min. In the mentioned issues reporters claim that gopherjs crash in tens or hundreds of seconds f.e. in #414:

gopherjs build crashes (after about 25 seconds)

So it has absolutely nothing to do with this issue as it could work with no errors for let’s say 25 minutes.

It’s not a leak because if GopherJS magically figured out the answer and returned, all that memory would be freed.

I agree this is a dup of #637, which was a dup of #414.