Skip to content

Conversation

@xeno-by
Copy link
Contributor

@xeno-by xeno-by commented Sep 25, 2012

Turns importer caches into fully weak hash maps, and also applies
manual cleanup to toolboxes every time they are used.

It's not enough, because reflection-mem-typecheck test is still leaking
at a rate of ~100kb per typecheck, but it's much better than it was before.
We'll fix the rest later, after 2.10.0-final.

For more information, see https://issues.scala-lang.org/browse/SI-6412 and
http://groups.google.com/group/scala-internals/browse_thread/thread/eabcf3d406dab8b2

In comparison with b403c1d,
the original commit that implemented the fix, this one doesn't crash tests.
The problem with the original commit was that it called tryFixup() before
updating the cache, leading to stack overflows.

@xeno-by
Copy link
Contributor Author

xeno-by commented Sep 25, 2012

review by @paulp @gkossakowski

@scala-jenkins
Copy link

@scala-jenkins
Copy link

@scala-jenkins
Copy link

@scala-jenkins
Copy link

@xeno-by
Copy link
Contributor Author

xeno-by commented Sep 26, 2012

PLS REBUILD ALL

@scala-jenkins
Copy link

@scala-jenkins
Copy link

@scala-jenkins
Copy link

@scala-jenkins
Copy link

@gkossakowski
Copy link
Contributor

I don't know how caches work in compiler at all so I'm not qualified to review this pull request.

To me this looks very dangerous. I'll wait for @paulp's opinion.

@odersky
Copy link
Contributor

odersky commented Sep 27, 2012

LGTM. It's clear that there were leaks and the fix addresses them (probably not all of them, but a definite improvement)

Turns importer caches into fully weak hash maps, and also applies
manual cleanup to toolboxes every time they are used.

It's not enough, because reflection-mem-typecheck test is still leaking
at a rate of ~100kb per typecheck, but it's much better than it was before.
We'll fix the rest later, after 2.10.0-final.

For more information, see https://issues.scala-lang.org/browse/SI-6412 and
http://groups.google.com/group/scala-internals/browse_thread/thread/eabcf3d406dab8b2

In comparison with scala@b403c1d,
the original commit that implemented the fix, this one doesn't crash tests.
The problem with the original commit was that it called tryFixup() before
updating the cache, leading to stack overflows.
@xeno-by
Copy link
Contributor Author

xeno-by commented Sep 27, 2012

PLS REBUILD ALL

@scala-jenkins
Copy link

@scala-jenkins
Copy link

@scala-jenkins
Copy link

@scala-jenkins
Copy link

@gkossakowski
Copy link
Contributor

So @xeno-by explained to me this change and its impact. Got a warm feeling that it affects only reflection itself and has no interactions with anything else so LGTM.

Merging.

gkossakowski added a commit that referenced this pull request Sep 27, 2012
SI-6412 alleviates leaks in toolboxes, attempt #2
@gkossakowski gkossakowski merged commit 709bb01 into scala:2.10.x Sep 27, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants