You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@toree.apache.org by "Jakob Odersky (JIRA)" <ji...@apache.org> on 2017/02/07 00:48:41 UTC

[jira] [Comment Edited] (TOREE-374) Variables declared on the Notebook are not garbage collected

    [ https://issues.apache.org/jira/browse/TOREE-374?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15855055#comment-15855055 ] 

Jakob Odersky edited comment on TOREE-374 at 2/7/17 12:47 AM:
--------------------------------------------------------------

Hmm, I wonder if this is related to the Yrepl-class-based setting of the repl. This setting is a new/experimental feature of the scala interpreter but it is required for Spark to work.

[~dtaieb] Can you try running your test code in a plain scala repl? Can you observe the same memory leakage?

[~mariusvniekerk] I don't know anything about the comm api, how would that work here?


was (Author: jodersky):
Hmm, I wonder if this is related to the Yrepl-class-based setting of the repl. This setting is a new/experimental feature of the scala interpreter but it is required for Spark to work.

[~mariusvniekerk] I don't know anything about the comm api, how would that work here?

> Variables declared on the Notebook are not garbage collected
> ------------------------------------------------------------
>
>                 Key: TOREE-374
>                 URL: https://issues.apache.org/jira/browse/TOREE-374
>             Project: TOREE
>          Issue Type: Bug
>    Affects Versions: 0.1.0
>            Reporter: David Taieb
>
> I'm not sure if it's a bug or a limitation of the underlying scala REPL.
> As part of supporting PixieDust (https://github.com/ibm-cds-labs/pixiedust) auto-visualization feature within Scala gateway, I have implemented a weak hashmap that tracks objects declared on the Scala REPL. However, I have found that objects are not correctly gc'ed when the object is declared in a cell with a val or var keyword and then the cell is ran again. One would expect that the original object has no more references and should be gc'ed but it's not. 
> However, when the object is declare with var keyword and then set to null in another cell, then it is correctly gc'ed.
> I'm concerned that users who run the same cell multiple times would unwittingly have memory leaks which can eventually lead to OOM errors.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)