Aladdin - Scala Bugtracking
[#1187] project: distribution priority: low category: bug
submitter assigned to status date submitted
Nikolay Philipp fixed 2007-06-19 21:05:00.0
subject [contrib #668] Possible memory leak in rainy day scenario of TcpService.scala
code
In actors/scala/actors/remote/TcpService.scala(Rev 1194)
67 :	phaller	8802	  def send(node: Node, data: Array[byte]): unit = synchronized {
68 :	phaller	11985	
69 :	 	 	    def bufferMsg(t: Throwable) = {
70 :	 	 	      // buffer message, so that it can be re-sent
71 :	 	 	      // when remote net kernel comes up
72 :	 	 	      pendingSends.get(node) match {
73 :	 	 	        case None =>
74 :	 	 	          pendingSends += node -> (data :: Nil)
75 :	 	 	        case Some(msgs) =>
76 :	 	 	          pendingSends += node -> (data :: msgs)
77 :	 	 	      }
78 :	 	 	    }

There is chance of Memory leak, if Remote node does not come and sender is pumping messages. Either we document this in API or set a limit on buffer-limit
what happened
what expected
[back to overview]
Changes of this bug report
Nikolay  edited on  2007-06-19 21:05:23.0
Philipp  edited on  2007-07-13 11:47:57.0
Added limit on buffer size and documented it in ScalaDoc.