<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-14096</id>
	<title>Nabble - Erlang Questions</title>
	<updated>2009-11-10T13:18:10Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/Erlang-Questions-f14096.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Erlang-Questions-f14096.html" />
	<subtitle type="html"></subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26291401</id>
	<title>An English word stemmer</title>
	<published>2009-11-10T13:18:10Z</published>
	<updated>2009-11-10T13:18:10Z</updated>
	<author>
		<name>Klas Johansson</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; I've dusted off an English word stemmer [1] I made
&lt;br&gt;quite a while ago. &amp;nbsp;I've seen at least one other erlang
&lt;br&gt;stemmer before, and that's one by Hans Nilsson which
&lt;br&gt;was included in Joe's erlang book as well as in Ulf
&lt;br&gt;Wiger's rdbms.
&lt;br&gt;&lt;br&gt;This stemmer is an implementation of the Porter2
&lt;br&gt;stemming algorithm [2] and does its job fairly quickly
&lt;br&gt;at approximately 400,000 words per second on my 2.53
&lt;br&gt;GHz Core 2 Duo MacBook Pro. &amp;nbsp;I've tested it on the
&lt;br&gt;example vocabulary (available from [2]) and all words
&lt;br&gt;are stemmed according to the already prepared list of
&lt;br&gt;stemmed words.
&lt;br&gt;&lt;br&gt;Code (and tests only a few clicks away) here:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://github.com/klajo/hacks/blob/master/stem/src/stem_en.erl&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://github.com/klajo/hacks/blob/master/stem/src/stem_en.erl&lt;/a&gt;&lt;br&gt;&lt;br&gt;There's also a Swedish version of the algorithm [3] in
&lt;br&gt;the repository which I whipped together just for the
&lt;br&gt;fun of it. &amp;nbsp;The English algorithm does a better job at
&lt;br&gt;stemming words though.
&lt;br&gt;&lt;br&gt;In case someone's interested... :-)
&lt;br&gt;&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;Klas
&lt;br&gt;&lt;br&gt;&lt;br&gt;[1] Read more on stemming for example here:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://en.wikipedia.org/wiki/Stemming&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://en.wikipedia.org/wiki/Stemming&lt;/a&gt;&lt;br&gt;&lt;br&gt;[2] The Porter2 stemming algorithm
&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://snowball.tartarus.org/algorithms/english/stemmer.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://snowball.tartarus.org/algorithms/english/stemmer.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;[3] The Swedish stemming algorithm
&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://snowball.tartarus.org/algorithms/swedish/stemmer.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://snowball.tartarus.org/algorithms/swedish/stemmer.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;________________________________________________________________
&lt;br&gt;erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;erlang-questions (at) erlang.org
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/An-English-word-stemmer-tp26291401p26291401.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26290570</id>
	<title>Re: Why Beam.smp crashes when memory is over?</title>
	<published>2009-11-10T12:22:12Z</published>
	<updated>2009-11-10T12:22:12Z</updated>
	<author>
		<name>Jayson Vantuyl-2</name>
	</author>
	<content type="html">Dropping messages, suspending processes, and crashing processes is &amp;nbsp;
&lt;br&gt;just a bad idea.
&lt;br&gt;&lt;br&gt;Erlang's messaging is not &amp;quot;left-guarded&amp;quot; in the sense described by &amp;nbsp;
&lt;br&gt;Hoare. &amp;nbsp;That means that any behavior that suspends processes when the &amp;nbsp;
&lt;br&gt;remote mailbox is full can either exhaust memory (i.e. what we have &amp;nbsp;
&lt;br&gt;now) or arbitrarily deadlock the system. &amp;nbsp;The only requirement for a &amp;nbsp;
&lt;br&gt;deadlock is a loop in messaging anywhere, and we have more than a few &amp;nbsp;
&lt;br&gt;of those.
&lt;br&gt;&lt;br&gt;Dropping messages is probably the least disruptive, but (in &amp;nbsp;
&lt;br&gt;applications that use OTP behaviors at least) it would just translate &amp;nbsp;
&lt;br&gt;into gen_server:call timeouts, and we're back to defensive programming &amp;nbsp;
&lt;br&gt;again.
&lt;br&gt;&lt;br&gt;I'm all for a heuristic that sends a signal to a program when it's &amp;nbsp;
&lt;br&gt;getting close (i.e. memory allocation failed and &amp;quot;reserved&amp;quot; memory is &amp;nbsp;
&lt;br&gt;starting to be consumed so trigger an alarm of some sort), but &amp;nbsp;
&lt;br&gt;anything proposed so far compromises the current behavior of the VM in &amp;nbsp;
&lt;br&gt;ways that are awfully unpredictable.
&lt;br&gt;&lt;br&gt;On Nov 10, 2009, at 4:45 AM, Joe Armstrong wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; This is a very interesting problem. if processes have quotas, then how
&lt;br&gt;&amp;gt; could you set the
&lt;br&gt;&amp;gt; quota value?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; A perfectly correct process might just have a very deep stack, just &amp;nbsp;
&lt;br&gt;&amp;gt; once in its
&lt;br&gt;&amp;gt; life and otherwise be fine. Whether to crash this process or not would
&lt;br&gt;&amp;gt; depend upon
&lt;br&gt;&amp;gt; what the other processes in the system happened to be doing at the
&lt;br&gt;&amp;gt; time. This would
&lt;br&gt;&amp;gt; be very unfortunate - it's like your program being hit by a cosmic ray
&lt;br&gt;&amp;gt; - nasty. It creates a random non-deterministic coupling between things
&lt;br&gt;&amp;gt; that are supposed to be independent.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; A possibility that just occurred to me might be to suspend processes
&lt;br&gt;&amp;gt; that appear to be
&lt;br&gt;&amp;gt; running wild until such a time as the overall memory situation looks &amp;nbsp;
&lt;br&gt;&amp;gt; good.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Image two scheduler queues. One for well behaved programs. One for
&lt;br&gt;&amp;gt; programs whose
&lt;br&gt;&amp;gt; stacks and heaps are growing too fast. If memory is no problem we run
&lt;br&gt;&amp;gt; programs from both queues. If memory is tight we run processes in the
&lt;br&gt;&amp;gt; &amp;quot;problem&amp;quot; queue less often and with frequent garbs.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Killing a program with a large stack and heap, just because their
&lt;br&gt;&amp;gt; happens to be a
&lt;br&gt;&amp;gt; temporary memory problem seems horrible, especially since the problem
&lt;br&gt;&amp;gt; might go away
&lt;br&gt;&amp;gt; if we wait a few milliseconds.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Suspending a memory hungry process for a while, until memory is &amp;nbsp;
&lt;br&gt;&amp;gt; available seems
&lt;br&gt;&amp;gt; less objectionable. Perhapse it could be swapped out to disk and
&lt;br&gt;&amp;gt; pulled in a lot later.
&lt;br&gt;&amp;gt; Killing things at random in the hope it might help sounds like a
&lt;br&gt;&amp;gt; really bad idea.
&lt;br&gt;&amp;gt; Process migration could solve this - move it to a machine that has got
&lt;br&gt;&amp;gt; more memory.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Suspending things seems ok - you might even suspend an errant &amp;nbsp;
&lt;br&gt;&amp;gt; process forever
&lt;br&gt;&amp;gt; and reclaim the memory - but not kill it. Some other process could
&lt;br&gt;&amp;gt; detect that the processes
&lt;br&gt;&amp;gt; is not responding and kill it and thus all the semantics of the
&lt;br&gt;&amp;gt; application would be obeyed
&lt;br&gt;&amp;gt; (processes are allowed to be unresponsive, that's fine) and the &amp;nbsp;
&lt;br&gt;&amp;gt; semantics of the
&lt;br&gt;&amp;gt; error recovery should say what to do in this case.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Just killing processes when they have done nothing wrong is not a &amp;nbsp;
&lt;br&gt;&amp;gt; good idea.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; /Joe
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Tue, Nov 10, 2009 at 1:10 PM, Ulf Wiger
&lt;br&gt;&amp;gt; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26290570&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ulf.wiger@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; Richard O'Keefe wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; One way would be to let the user set a memory quota on a process &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; with
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; options at spawn time. When the process reaches it quota it can be
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; automatically killed or the user can
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; be notified in some way and take actions.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; One of the reasons this hasn't been done is, I presume, the fact &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; that
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; it is quite difficult for a programmer to determine what the memory
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; quota should be. &amp;nbsp;It depends on
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp;...
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I implemented resource limits in erlhive - at the Erlang level rather
&lt;br&gt;&amp;gt;&amp;gt; than in the VM. The purpose was to be able to run foreign code safely
&lt;br&gt;&amp;gt;&amp;gt; in a hosted environment. Eliminating the possibility to do damage
&lt;br&gt;&amp;gt;&amp;gt; through traditional side-effects was relatively easy with a code
&lt;br&gt;&amp;gt;&amp;gt; transform, but two ways of staging a DoS attack would be to gobble
&lt;br&gt;&amp;gt;&amp;gt; RAM or CPU capacity. I approached this by inserting calls to a check
&lt;br&gt;&amp;gt;&amp;gt; function that sampled heap size, and started a &amp;quot;watchdog&amp;quot; process &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; that
&lt;br&gt;&amp;gt;&amp;gt; would unceremoniously kill the program after a certain time.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; In short, I can see a need for such limits, and would like to include
&lt;br&gt;&amp;gt;&amp;gt; a reduction ceiling. The limits could be set after careful testing
&lt;br&gt;&amp;gt;&amp;gt; and high enough that they protect against runaway processes. A &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; reduction
&lt;br&gt;&amp;gt;&amp;gt; limit could be checked at the end of each slice, perhaps.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; In my experience, per-process memory usage is fairly predictable in
&lt;br&gt;&amp;gt;&amp;gt; erlang. Does anyone have a different experience?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; BR,
&lt;br&gt;&amp;gt;&amp;gt; Ulf W
&lt;br&gt;&amp;gt;&amp;gt; --
&lt;br&gt;&amp;gt;&amp;gt; Ulf Wiger
&lt;br&gt;&amp;gt;&amp;gt; CTO, Erlang Training &amp; Consulting Ltd
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://www.erlang-consulting.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang-consulting.com&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ________________________________________________________________
&lt;br&gt;&amp;gt;&amp;gt; erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; erlang-questions (at) erlang.org
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ________________________________________________________________
&lt;br&gt;&amp;gt; erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;&amp;gt; erlang-questions (at) erlang.org
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;________________________________________________________________
&lt;br&gt;erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;erlang-questions (at) erlang.org
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Why-Beam.smp-crashes-when-memory-is-over--tp26257892p26290570.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26290226</id>
	<title>Re: package namespaces question</title>
	<published>2009-11-10T11:58:05Z</published>
	<updated>2009-11-10T11:58:05Z</updated>
	<author>
		<name>Angel Alvarez</name>
	</author>
	<content type="html">Gracias Enrique!
&lt;br&gt;&lt;br&gt;But how can i import all system modules and apps?
&lt;br&gt;&lt;br&gt;Has gs become lib.gs or something alike?
&lt;br&gt;&lt;br&gt;Well, the URLS from 2004 were bit old ive just found the current version at &lt;a href=&quot;http://www.erlang.org/doc/man/packages.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/doc/man/packages.html&lt;/a&gt;&amp;nbsp; 
&lt;br&gt;&lt;br&gt;I saw no prior examples of packcages used on the list certainly not back in 2008/2009 so an &amp;quot; almost deprecated&amp;quot; notice at the top 
&lt;br&gt;of the page is all i need to stop at here and continue reading other things....
&lt;br&gt;&lt;br&gt;/Angel
&lt;br&gt;&lt;br&gt;El Martes, 10 de Noviembre de 2009 Enrique Marcote escribió:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hola Angel,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Try importing gs.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Saludos,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Enrique
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; El 10/11/2009, a las 20:10, Angel Alvarez escribió:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; Hi Guys!
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; Im currently reading erlang archives from 2004
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; On 10/05/2004 Someone talked about package namespaces (&amp;quot;Is erlang too small&amp;quot; thread) so i decided to just test this &amp;quot;new2 erlang knowledge.
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; iv just borrowed some little code from a gs article... :-)
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; the module starts like this:
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; -module(gui).
&lt;br&gt;&amp;gt; &amp;gt; -export([init/0]).
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; init() -&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;S = gs:start(),
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;Win = gs:create(window, S, [{width, 350}, {height, 100}]),
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;gs:create(button, quit, Win, [{label, {text, &amp;quot;Quit&amp;quot;}}, {x, 0}]),
&lt;br&gt;&amp;gt; &amp;gt; ...
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; so on the erlang shell gui:init(). just runs the example..
&lt;br&gt;&amp;gt; &amp;gt; So i changed the module to use package style names...
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; -module(angel.tests.gui).
&lt;br&gt;&amp;gt; &amp;gt; -export([init/0]).
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; init() -&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;S = gs:start(),
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;Win = gs:create(window, S, [{width, 350}, {height, 100}]),
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;gs:create(button, quit, Win, [{label, {text, &amp;quot;Quit&amp;quot;}}, {x, 0}]),
&lt;br&gt;&amp;gt; &amp;gt; ...
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; and moved the gui.erl to $PWD/angel/test/gui.erl
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; sinosuke@sushiba:~/Datos/Docs/Personal/Erlang/Code/angel/test&amp;gt; erlc gui.erl
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; cd ../../
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; sinosuke@sushiba:~/Datos/Docs/Personal/Erlang/Code/ 
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; but now firing at the shell results in :
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; sinosuke@sushiba:~/Datos/Docs/Personal/Erlang/Code&amp;gt; erl
&lt;br&gt;&amp;gt; &amp;gt; Erlang R13B01 (erts-5.7.2) [source] [rq:1] [async-threads:0] [hipe] [kernel-poll:false]
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; Eshell V5.7.2 &amp;nbsp;(abort with ^G)
&lt;br&gt;&amp;gt; &amp;gt; 1&amp;gt; angel.test.gui:init().
&lt;br&gt;&amp;gt; &amp;gt; ** exception error: undefined function 'angel.test.gs':start/0
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; in function &amp;nbsp;'angel.test.gui':init/0
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; What's wrong? 
&lt;br&gt;&amp;gt; &amp;gt; Is needed the same convention on the rest of modules 
&lt;br&gt;&amp;gt; &amp;gt; after you start using package name styles?
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; From &lt;a href=&quot;http://www.erlang.se/publications/packages.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.se/publications/packages.html&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; &amp;quot;m2:g(X) becomes a call to foo.bar.m2 
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; If this is not what was intended, the call can be written explicitly, as in 
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;-module(foo.bar.m1).
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;-export([f/1]).
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;f(X) -&amp;gt; fee.fie.foe.m2:g(X).&amp;quot;
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; it seems bit embarrasing, i think is why perhaps no one is using this feature 5 years later...
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; Thanks Angel
&lt;br&gt;&amp;gt; &amp;gt; -- 
&lt;br&gt;&amp;gt; &amp;gt; No imprima este correo si no es necesario. El medio ambiente está en nuestras manos.
&lt;br&gt;&amp;gt; &amp;gt; -&amp;gt;&amp;gt;-----------------------------------------------
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;Clist UAH a.k.a Angel
&lt;br&gt;&amp;gt; &amp;gt; ---------------------------------[www.uah.es]-&amp;lt;&amp;lt;--
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; Tú lo compras, yo lo copio. Todo legal.
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; ________________________________________________________________
&lt;br&gt;&amp;gt; &amp;gt; erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt; erlang-questions (at) erlang.org
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Agua para todo? No, Agua para Todos.
&lt;br&gt;-&amp;gt;&amp;gt;-----------------------------------------------
&lt;br&gt;&amp;nbsp; &amp;nbsp; Clist UAH a.k.a Angel
&lt;br&gt;---------------------------------[www.uah.es]-&amp;lt;&amp;lt;--
&lt;br&gt;&lt;br&gt;No le daría Cocacola Zero, ni a mi peor enemigo. Para eso está el gas Mostaza que es mas piadoso.
&lt;br&gt;&lt;br&gt;________________________________________________________________
&lt;br&gt;erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;erlang-questions (at) erlang.org
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/package-namespaces-question-tp26289549p26290226.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26289955</id>
	<title>Re: package namespaces question</title>
	<published>2009-11-10T11:39:32Z</published>
	<updated>2009-11-10T11:39:32Z</updated>
	<author>
		<name>Enrique Marcote-2</name>
	</author>
	<content type="html">Hola Angel,
&lt;br&gt;&lt;br&gt;Try importing gs.
&lt;br&gt;&lt;br&gt;Saludos,
&lt;br&gt;&lt;br&gt;Enrique
&lt;br&gt;&lt;br&gt;&lt;br&gt;El 10/11/2009, a las 20:10, Angel Alvarez escribió:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi Guys!
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Im currently reading erlang archives from 2004
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; On 10/05/2004 Someone talked about package namespaces (&amp;quot;Is erlang too small&amp;quot; thread) so i decided to just test this &amp;quot;new2 erlang knowledge.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; iv just borrowed some little code from a gs article... :-)
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; the module starts like this:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; -module(gui).
&lt;br&gt;&amp;gt; -export([init/0]).
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; init() -&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;S = gs:start(),
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;Win = gs:create(window, S, [{width, 350}, {height, 100}]),
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;gs:create(button, quit, Win, [{label, {text, &amp;quot;Quit&amp;quot;}}, {x, 0}]),
&lt;br&gt;&amp;gt; ...
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; so on the erlang shell gui:init(). just runs the example..
&lt;br&gt;&amp;gt; So i changed the module to use package style names...
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; -module(angel.tests.gui).
&lt;br&gt;&amp;gt; -export([init/0]).
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; init() -&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;S = gs:start(),
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;Win = gs:create(window, S, [{width, 350}, {height, 100}]),
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;gs:create(button, quit, Win, [{label, {text, &amp;quot;Quit&amp;quot;}}, {x, 0}]),
&lt;br&gt;&amp;gt; ...
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; and moved the gui.erl to $PWD/angel/test/gui.erl
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; sinosuke@sushiba:~/Datos/Docs/Personal/Erlang/Code/angel/test&amp;gt; erlc gui.erl
&lt;br&gt;&amp;gt;&amp;gt; cd ../../
&lt;br&gt;&amp;gt;&amp;gt; sinosuke@sushiba:~/Datos/Docs/Personal/Erlang/Code/ 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; but now firing at the shell results in :
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; sinosuke@sushiba:~/Datos/Docs/Personal/Erlang/Code&amp;gt; erl
&lt;br&gt;&amp;gt; Erlang R13B01 (erts-5.7.2) [source] [rq:1] [async-threads:0] [hipe] [kernel-poll:false]
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Eshell V5.7.2 &amp;nbsp;(abort with ^G)
&lt;br&gt;&amp;gt; 1&amp;gt; angel.test.gui:init().
&lt;br&gt;&amp;gt; ** exception error: undefined function 'angel.test.gs':start/0
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; in function &amp;nbsp;'angel.test.gui':init/0
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; What's wrong? 
&lt;br&gt;&amp;gt; Is needed the same convention on the rest of modules 
&lt;br&gt;&amp;gt; after you start using package name styles?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; From &lt;a href=&quot;http://www.erlang.se/publications/packages.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.se/publications/packages.html&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;quot;m2:g(X) becomes a call to foo.bar.m2 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; If this is not what was intended, the call can be written explicitly, as in 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;-module(foo.bar.m1).
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;-export([f/1]).
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;f(X) -&amp;gt; fee.fie.foe.m2:g(X).&amp;quot;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; it seems bit embarrasing, i think is why perhaps no one is using this feature 5 years later...
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Thanks Angel
&lt;br&gt;&amp;gt; -- 
&lt;br&gt;&amp;gt; No imprima este correo si no es necesario. El medio ambiente está en nuestras manos.
&lt;br&gt;&amp;gt; -&amp;gt;&amp;gt;-----------------------------------------------
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;Clist UAH a.k.a Angel
&lt;br&gt;&amp;gt; ---------------------------------[www.uah.es]-&amp;lt;&amp;lt;--
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Tú lo compras, yo lo copio. Todo legal.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ________________________________________________________________
&lt;br&gt;&amp;gt; erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;&amp;gt; erlang-questions (at) erlang.org
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;________________________________________________________________
&lt;br&gt;erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;erlang-questions (at) erlang.org
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/package-namespaces-question-tp26289549p26289955.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26289549</id>
	<title>package namespaces question</title>
	<published>2009-11-10T11:10:13Z</published>
	<updated>2009-11-10T11:10:13Z</updated>
	<author>
		<name>Angel Alvarez</name>
	</author>
	<content type="html">Hi Guys!
&lt;br&gt;&lt;br&gt;Im currently reading erlang archives from 2004
&lt;br&gt;&lt;br&gt;On 10/05/2004 Someone talked about package namespaces (&amp;quot;Is erlang too small&amp;quot; thread) so i decided to just test this &amp;quot;new2 erlang knowledge.
&lt;br&gt;&lt;br&gt;iv just borrowed some little code from a gs article... :-)
&lt;br&gt;&lt;br&gt;the module starts like this:
&lt;br&gt;&lt;br&gt;&lt;br&gt;-module(gui).
&lt;br&gt;-export([init/0]).
&lt;br&gt;&amp;nbsp;
&lt;br&gt;init() -&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; S = gs:start(),
&lt;br&gt;&amp;nbsp; &amp;nbsp; Win = gs:create(window, S, [{width, 350}, {height, 100}]),
&lt;br&gt;&amp;nbsp; &amp;nbsp; gs:create(button, quit, Win, [{label, {text, &amp;quot;Quit&amp;quot;}}, {x, 0}]),
&lt;br&gt;...
&lt;br&gt;&lt;br&gt;so on the erlang shell gui:init(). just runs the example..
&lt;br&gt;So i changed the module to use package style names...
&lt;br&gt;&lt;br&gt;&lt;br&gt;-module(angel.tests.gui).
&lt;br&gt;-export([init/0]).
&lt;br&gt;&amp;nbsp;
&lt;br&gt;init() -&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; S = gs:start(),
&lt;br&gt;&amp;nbsp; &amp;nbsp; Win = gs:create(window, S, [{width, 350}, {height, 100}]),
&lt;br&gt;&amp;nbsp; &amp;nbsp; gs:create(button, quit, Win, [{label, {text, &amp;quot;Quit&amp;quot;}}, {x, 0}]),
&lt;br&gt;...
&lt;br&gt;&lt;br&gt;and moved the gui.erl to $PWD/angel/test/gui.erl
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; sinosuke@sushiba:~/Datos/Docs/Personal/Erlang/Code/angel/test&amp;gt; erlc gui.erl
&lt;br&gt;&amp;gt; cd ../../
&lt;br&gt;&amp;gt; sinosuke@sushiba:~/Datos/Docs/Personal/Erlang/Code/ 
&lt;br&gt;&lt;br&gt;but now firing at the shell results in :
&lt;br&gt;&lt;br&gt;sinosuke@sushiba:~/Datos/Docs/Personal/Erlang/Code&amp;gt; erl
&lt;br&gt;Erlang R13B01 (erts-5.7.2) [source] [rq:1] [async-threads:0] [hipe] [kernel-poll:false]
&lt;br&gt;&lt;br&gt;Eshell V5.7.2 &amp;nbsp;(abort with ^G)
&lt;br&gt;1&amp;gt; angel.test.gui:init().
&lt;br&gt;** exception error: undefined function 'angel.test.gs':start/0
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;in function &amp;nbsp;'angel.test.gui':init/0
&lt;br&gt;&lt;br&gt;What's wrong? 
&lt;br&gt;Is needed the same convention on the rest of modules 
&lt;br&gt;after you start using package name styles?
&lt;br&gt;&lt;br&gt;&lt;br&gt;From &lt;a href=&quot;http://www.erlang.se/publications/packages.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.se/publications/packages.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;&amp;quot;m2:g(X) becomes a call to foo.bar.m2 
&lt;br&gt;&lt;br&gt;If this is not what was intended, the call can be written explicitly, as in 
&lt;br&gt;&amp;nbsp; &amp;nbsp; -module(foo.bar.m1).
&lt;br&gt;&amp;nbsp; &amp;nbsp; -export([f/1]).
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; f(X) -&amp;gt; fee.fie.foe.m2:g(X).&amp;quot;
&lt;br&gt;&lt;br&gt;it seems bit embarrasing, i think is why perhaps no one is using this feature 5 years later...
&lt;br&gt;&lt;br&gt;&lt;br&gt;Thanks Angel
&lt;br&gt;-- 
&lt;br&gt;No imprima este correo si no es necesario. El medio ambiente está en nuestras manos.
&lt;br&gt;-&amp;gt;&amp;gt;-----------------------------------------------
&lt;br&gt;&amp;nbsp; &amp;nbsp; Clist UAH a.k.a Angel
&lt;br&gt;---------------------------------[www.uah.es]-&amp;lt;&amp;lt;--
&lt;br&gt;&lt;br&gt;Tú lo compras, yo lo copio. Todo legal.
&lt;br&gt;&lt;br&gt;________________________________________________________________
&lt;br&gt;erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;erlang-questions (at) erlang.org
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/package-namespaces-question-tp26289549p26289549.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26288031</id>
	<title>Re: Best way to implement a simple cache</title>
	<published>2009-11-10T09:45:51Z</published>
	<updated>2009-11-10T09:45:51Z</updated>
	<author>
		<name>Garrett Smith-5</name>
	</author>
	<content type="html">On Tue, Nov 10, 2009 at 11:25 AM, Jachym Holecek &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26288031&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freza@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hello,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; # Jan Vincent 2009-11-10:
&lt;br&gt;&amp;gt;&amp;gt; I wanted your take on how to implement a simple small key-value
&lt;br&gt;&amp;gt;&amp;gt; cache, maybe holding around a few hundred tuples. The thing is, I
&lt;br&gt;&amp;gt;&amp;gt; don't want the cache to be consuming all my memory so that entries
&lt;br&gt;&amp;gt;&amp;gt; in the cache expires if it isn't read for some time or some maximum
&lt;br&gt;&amp;gt;&amp;gt; size is met.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; An ETS table owned by a gen_server that runs periodic cleanup on it?
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;I find myself writing purpose built gen_servers that maintain the
&lt;br&gt;cache their state for this sort of thing. To 'expire' items in the
&lt;br&gt;cache, you could run another process as a timer that calls an expire
&lt;br&gt;method on the gen_server. There are more moving parts here, but
&lt;br&gt;they're decoupled and avoid using ETS for what's a pretty simple
&lt;br&gt;caching requirement.
&lt;br&gt;&lt;br&gt;Garrett
&lt;br&gt;&lt;br&gt;________________________________________________________________
&lt;br&gt;erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;erlang-questions (at) erlang.org
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Best-way-to-implement-a-simple-cache-tp26286382p26288031.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26287665</id>
	<title>Re: Best way to implement a simple cache</title>
	<published>2009-11-10T09:25:40Z</published>
	<updated>2009-11-10T09:25:40Z</updated>
	<author>
		<name>Jachym Holecek-3</name>
	</author>
	<content type="html">Hello,
&lt;br&gt;&lt;br&gt;# Jan Vincent 2009-11-10:
&lt;br&gt;&amp;gt; I wanted your take on how to implement a simple small key-value
&lt;br&gt;&amp;gt; cache, maybe holding around a few hundred tuples. The thing is, I
&lt;br&gt;&amp;gt; don't want the cache to be consuming all my memory so that entries
&lt;br&gt;&amp;gt; in the cache expires if it isn't read for some time or some maximum
&lt;br&gt;&amp;gt; size is met.
&lt;br&gt;&lt;br&gt;An ETS table owned by a gen_server that runs periodic cleanup on it?
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -- Jachym
&lt;br&gt;&lt;br&gt;________________________________________________________________
&lt;br&gt;erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;erlang-questions (at) erlang.org
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Best-way-to-implement-a-simple-cache-tp26286382p26287665.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26286212</id>
	<title>Re: Re: SCTP accept?</title>
	<published>2009-11-10T08:09:46Z</published>
	<updated>2009-11-10T08:09:46Z</updated>
	<author>
		<name>Serge Aleynikov-2</name>
	</author>
	<content type="html">On the contrary to TCP where a client socket corresponds to a single 
&lt;br&gt;communication channel to be used between the server/client pair, with 
&lt;br&gt;SCTP (when using one-to-many style interface, which is what's currently 
&lt;br&gt;supported in the SCTP driver) you have one SCTP socket to work with and 
&lt;br&gt;one association per client end-point.
&lt;br&gt;&lt;br&gt;You can send replies from more than one Erlang server-side worker 
&lt;br&gt;process as long as you pass it the Socket::sctp_socket() and 
&lt;br&gt;AssocID::assoc_id() (the AssocID comes in the #sctp_assoc_change{} event 
&lt;br&gt;when a new client association is established). &amp;nbsp;Then you can use 
&lt;br&gt;gen_sctp:send/3 or gen_sctp:send/4 functions to send your HTTP payload.
&lt;br&gt;&lt;br&gt;Serge
&lt;br&gt;&lt;br&gt;Steve Davis wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; I must be incredibly dense! Many words later, I'm still 100% unclear
&lt;br&gt;&amp;gt; as to how to use gen_sctp effectively to do &amp;quot;http over sctp&amp;quot;.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; The documentation shows an
&lt;br&gt;&amp;gt; &amp;quot;Example of an Erlang SCTP Server which receives SCTP messages and
&lt;br&gt;&amp;gt; prints them on the standard output.&amp;quot;
&lt;br&gt;&amp;gt; ...but does not really address how you reply unless you do everything
&lt;br&gt;&amp;gt; from the one server process.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; To have any chance of scaling I would think that you'd want to process
&lt;br&gt;&amp;gt; client requests in a number of worker processes at the server side
&lt;br&gt;&amp;gt; (obviously)?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; With tcp you hand over the socket you get from accept -- but I'm
&lt;br&gt;&amp;gt; entirely unclear what the equivalent of controlling_process(Socket,
&lt;br&gt;&amp;gt; Pid) would be for associations?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Any education would be very gratefully &amp;quot;accepted&amp;quot;!
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Best,
&lt;br&gt;&amp;gt; Steve
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ________________________________________________________________
&lt;br&gt;&amp;gt; erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;&amp;gt; erlang-questions (at) erlang.org
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;________________________________________________________________
&lt;br&gt;erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;erlang-questions (at) erlang.org
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/SCTP-accept--tp25424432p26286212.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26283610</id>
	<title>Re: Why Beam.smp crashes when memory is over?</title>
	<published>2009-11-10T05:40:52Z</published>
	<updated>2009-11-10T05:40:52Z</updated>
	<author>
		<name>Ulf Wiger-3</name>
	</author>
	<content type="html">Joe Armstrong wrote:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Just killing processes when they have done nothing wrong is not a good idea.
&lt;br&gt;&lt;br&gt;Well, it's optional, of course. &amp;nbsp;:)
&lt;br&gt;&lt;br&gt;Imagine, OTOH, a well-tested system where memory characteristics
&lt;br&gt;have been well charted for the foreseeable cases. It might be
&lt;br&gt;defensible to set resource limits so that everything we expect
&lt;br&gt;to see falls well within the limit, and stuff that we don't
&lt;br&gt;expect might trigger the killing of some process. If this is
&lt;br&gt;done on temporary processes, we should be able to accept it
&lt;br&gt;as long as the number of spurious kills is low.
&lt;br&gt;&lt;br&gt;This is not much stranger than things that we do routinely in
&lt;br&gt;other cases:
&lt;br&gt;&lt;br&gt;- If dets or disk_log notice that a file hasn't been properly
&lt;br&gt;&amp;nbsp; &amp;nbsp;closed, it 'repairs' the file - that is, it repairs the index.
&lt;br&gt;&amp;nbsp; &amp;nbsp;Corrupt objects are simply discarded, not repaired.
&lt;br&gt;&lt;br&gt;- Replication in the AXD 301 and similar products was asynchronous
&lt;br&gt;&amp;nbsp; &amp;nbsp;with a bulking factor. Some failure cases could lead to dropped
&lt;br&gt;&amp;nbsp; &amp;nbsp;calls, but as long as they were few, it was acceptable.
&lt;br&gt;&lt;br&gt;- Some complex state machines would bail out for unexpected
&lt;br&gt;&amp;nbsp; &amp;nbsp;sequences (I showed an example of this in my Structured Network
&lt;br&gt;&amp;nbsp; &amp;nbsp;Programming talk at EUC). This was a form of &amp;quot;complexity
&lt;br&gt;&amp;nbsp; &amp;nbsp;overload&amp;quot;, and hugely unfair to the poor process running the
&lt;br&gt;&amp;nbsp; &amp;nbsp;code, as it was probably not a real failure case.
&lt;br&gt;&lt;br&gt;- Mnesia's deadlock prevention algorithm, or indeed any deadlock
&lt;br&gt;&amp;nbsp; &amp;nbsp;prevention algo, will restart transactions if there is even
&lt;br&gt;&amp;nbsp; &amp;nbsp;the smallest chance of deadlock. Granted, this should be
&lt;br&gt;&amp;nbsp; &amp;nbsp;transparent if the transaction fun is well written, but there
&lt;br&gt;&amp;nbsp; &amp;nbsp;will be false positives, and this will affect performance.
&lt;br&gt;&lt;br&gt;On the other hand, there can be situations where a rogue process
&lt;br&gt;gobbles up all available memory, rendering the VM unresponsive
&lt;br&gt;for several minutes (e.g. due to the infamous &amp;quot;loss of sharing&amp;quot;),
&lt;br&gt;or cases where a number of unexpectedly large processes &amp;quot;gang up&amp;quot;
&lt;br&gt;and kill the VM in one big memory spike. Or a difficult-to-reproduce
&lt;br&gt;bug that sends some application into an infinite retry situation
&lt;br&gt;rendering the system unusable. In all these cases, killing off
&lt;br&gt;the poor culprits, guilty or not, may well result in a less deadly
&lt;br&gt;disturbance for the system as a whole.
&lt;br&gt;&lt;br&gt;BR,
&lt;br&gt;Ulf W
&lt;br&gt;-- 
&lt;br&gt;Ulf Wiger
&lt;br&gt;CTO, Erlang Training &amp; Consulting Ltd
&lt;br&gt;&lt;a href=&quot;http://www.erlang-consulting.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang-consulting.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;________________________________________________________________
&lt;br&gt;erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;erlang-questions (at) erlang.org
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Why-Beam.smp-crashes-when-memory-is-over--tp26257892p26283610.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26283364</id>
	<title>Re: Why Beam.smp crashes when memory is over?</title>
	<published>2009-11-10T05:22:52Z</published>
	<updated>2009-11-10T05:22:52Z</updated>
	<author>
		<name>Ulf Wiger-3</name>
	</author>
	<content type="html">Tony Rogvall wrote:
&lt;br&gt;&amp;gt; Not yet.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; What kind of flavor do you have in mind?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; One proposal is to let sender crash when receiver in box is full.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I would like to test a blocking version as well. This may sound like 
&lt;br&gt;&amp;gt; utterly crazy, but we already have the infamous busy_port ;-)
&lt;br&gt;&lt;br&gt;...and the punishing of senders if the receiver has a long
&lt;br&gt;message queue. I think these are abominations in the multicore
&lt;br&gt;world, and should be phased out.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; A suggestion from Patrik Winroth is to be able to set thresholds on 
&lt;br&gt;&amp;gt; resource limits, say in percent from max limit.
&lt;br&gt;&lt;br&gt;This could be done as an extension of erlang:system_monitor().
&lt;br&gt;It already has the ability to trigger on large heap and long
&lt;br&gt;GC, etc.
&lt;br&gt;&lt;br&gt;BR,
&lt;br&gt;Ulf W
&lt;br&gt;-- 
&lt;br&gt;Ulf Wiger
&lt;br&gt;CTO, Erlang Training &amp; Consulting Ltd
&lt;br&gt;&lt;a href=&quot;http://www.erlang-consulting.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang-consulting.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;________________________________________________________________
&lt;br&gt;erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;erlang-questions (at) erlang.org
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Why-Beam.smp-crashes-when-memory-is-over--tp26257892p26283364.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26283320</id>
	<title>Re: Why Beam.smp crashes when memory is over?</title>
	<published>2009-11-10T05:19:55Z</published>
	<updated>2009-11-10T05:19:55Z</updated>
	<author>
		<name>Ulf Wiger-3</name>
	</author>
	<content type="html">Tony Rogvall wrote:
&lt;br&gt;&amp;gt; Not yet.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; What kind of flavor do you have in mind?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; One proposal is to let sender crash when receiver in box is full.
&lt;br&gt;&lt;br&gt;I would prefer it if messages are simply dropped. This would be
&lt;br&gt;symmetric with the distributed case - you can hardly crash a
&lt;br&gt;remote process, or a port in active mode. :)
&lt;br&gt;&lt;br&gt;BR,
&lt;br&gt;Ulf W
&lt;br&gt;-- 
&lt;br&gt;Ulf Wiger
&lt;br&gt;CTO, Erlang Training &amp; Consulting Ltd
&lt;br&gt;&lt;a href=&quot;http://www.erlang-consulting.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang-consulting.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;________________________________________________________________
&lt;br&gt;erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;erlang-questions (at) erlang.org
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Why-Beam.smp-crashes-when-memory-is-over--tp26257892p26283320.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26283199</id>
	<title>Re: Why Beam.smp crashes when memory is over?</title>
	<published>2009-11-10T05:13:02Z</published>
	<updated>2009-11-10T05:13:02Z</updated>
	<author>
		<name>Kenneth Lundin</name>
	</author>
	<content type="html">On Tue, Nov 10, 2009 at 1:45 PM, Joe Armstrong &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26283199&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;erlang@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; This is a very interesting problem. if processes have quotas, then how
&lt;br&gt;&amp;gt; could you set the
&lt;br&gt;&amp;gt; quota value?
&lt;br&gt;&lt;br&gt;If you for example have processes representing subscribers och
&lt;br&gt;half-calls or mobile phones
&lt;br&gt;it is pretty easy to know a reasonable size of such a process by measurement.
&lt;br&gt;It should be easy to say if it can grow up to 100 kwords, 1Mwords, 10
&lt;br&gt;Mwords etc.
&lt;br&gt;Of course you should not try to set quota as tight as possible. The
&lt;br&gt;quota on process
&lt;br&gt;size is just a way to protect the system from total disaster if one of
&lt;br&gt;these processes
&lt;br&gt;happens to grow over all reasonable limits because of a bug.
&lt;br&gt;&lt;br&gt;/Kenneth Erlang/OTP Ericsson
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;  A perfectly correct process might just have a very deep stack, just once in its
&lt;br&gt;&amp;gt; life and otherwise be fine. Whether to crash this process or not would
&lt;br&gt;&amp;gt; depend upon
&lt;br&gt;&amp;gt; what the other processes in the system happened to be doing at the
&lt;br&gt;&amp;gt; time. This would
&lt;br&gt;&amp;gt; be very unfortunate - it's like your program being hit by a cosmic ray
&lt;br&gt;&amp;gt; - nasty. It creates a random non-deterministic coupling between things
&lt;br&gt;&amp;gt; that are supposed to be independent.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; A possibility that just occurred to me might be to suspend processes
&lt;br&gt;&amp;gt; that appear to be
&lt;br&gt;&amp;gt; running wild until such a time as the overall memory situation looks good.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Image two scheduler queues. One for well behaved programs. One for
&lt;br&gt;&amp;gt; programs whose
&lt;br&gt;&amp;gt; stacks and heaps are growing too fast. If memory is no problem we run
&lt;br&gt;&amp;gt; programs from both queues. If memory is tight we run processes in the
&lt;br&gt;&amp;gt; &amp;quot;problem&amp;quot; queue less often and with frequent garbs.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Killing a program with a large stack and heap, just because their
&lt;br&gt;&amp;gt; happens to be a
&lt;br&gt;&amp;gt; temporary memory problem seems horrible, especially since the problem
&lt;br&gt;&amp;gt; might go away
&lt;br&gt;&amp;gt; if we wait a few milliseconds.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Suspending a memory hungry process for a while, until memory is available seems
&lt;br&gt;&amp;gt; less objectionable. Perhapse it could be swapped out to disk and
&lt;br&gt;&amp;gt; pulled in a lot later.
&lt;br&gt;&amp;gt; Killing things at random in the hope it might help sounds like a
&lt;br&gt;&amp;gt; really bad idea.
&lt;br&gt;&amp;gt; Process migration could solve this - move it to a machine that has got
&lt;br&gt;&amp;gt; more memory.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Suspending things seems ok - you might even suspend an errant process forever
&lt;br&gt;&amp;gt; and reclaim the memory - but not kill it. Some other process could
&lt;br&gt;&amp;gt; detect that the processes
&lt;br&gt;&amp;gt; is not responding and kill it and thus all the semantics of the
&lt;br&gt;&amp;gt; application would be obeyed
&lt;br&gt;&amp;gt; (processes are allowed to be unresponsive, that's fine) and the semantics of the
&lt;br&gt;&amp;gt; error recovery should say what to do in this case.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Just killing processes when they have done nothing wrong is not a good idea.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; /Joe
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Tue, Nov 10, 2009 at 1:10 PM, Ulf Wiger
&lt;br&gt;&amp;gt; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26283199&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ulf.wiger@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; Richard O'Keefe wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; One way would be to let the user set a memory quota on a process with
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; options at spawn time. When the process reaches it quota it can be
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; automatically killed or the user can
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; be notified in some way and take actions.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; One of the reasons this hasn't been done is, I presume, the fact that
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; it is quite difficult for a programmer to determine what the memory
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; quota should be.  It depends on
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;  ...
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I implemented resource limits in erlhive - at the Erlang level rather
&lt;br&gt;&amp;gt;&amp;gt; than in the VM. The purpose was to be able to run foreign code safely
&lt;br&gt;&amp;gt;&amp;gt; in a hosted environment. Eliminating the possibility to do damage
&lt;br&gt;&amp;gt;&amp;gt; through traditional side-effects was relatively easy with a code
&lt;br&gt;&amp;gt;&amp;gt; transform, but two ways of staging a DoS attack would be to gobble
&lt;br&gt;&amp;gt;&amp;gt; RAM or CPU capacity. I approached this by inserting calls to a check
&lt;br&gt;&amp;gt;&amp;gt; function that sampled heap size, and started a &amp;quot;watchdog&amp;quot; process that
&lt;br&gt;&amp;gt;&amp;gt; would unceremoniously kill the program after a certain time.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; In short, I can see a need for such limits, and would like to include
&lt;br&gt;&amp;gt;&amp;gt; a reduction ceiling. The limits could be set after careful testing
&lt;br&gt;&amp;gt;&amp;gt; and high enough that they protect against runaway processes. A reduction
&lt;br&gt;&amp;gt;&amp;gt; limit could be checked at the end of each slice, perhaps.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; In my experience, per-process memory usage is fairly predictable in
&lt;br&gt;&amp;gt;&amp;gt; erlang. Does anyone have a different experience?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; BR,
&lt;br&gt;&amp;gt;&amp;gt; Ulf W
&lt;br&gt;&amp;gt;&amp;gt; --
&lt;br&gt;&amp;gt;&amp;gt; Ulf Wiger
&lt;br&gt;&amp;gt;&amp;gt; CTO, Erlang Training &amp; Consulting Ltd
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://www.erlang-consulting.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang-consulting.com&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ________________________________________________________________
&lt;br&gt;&amp;gt;&amp;gt; erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; erlang-questions (at) erlang.org
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ________________________________________________________________
&lt;br&gt;&amp;gt; erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;&amp;gt; erlang-questions (at) erlang.org
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;________________________________________________________________
&lt;br&gt;erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;erlang-questions (at) erlang.org
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Why-Beam.smp-crashes-when-memory-is-over--tp26257892p26283199.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26282816</id>
	<title>Re: Why Beam.smp crashes when memory is over?</title>
	<published>2009-11-10T04:45:17Z</published>
	<updated>2009-11-10T04:45:17Z</updated>
	<author>
		<name>Joe Armstrong-2</name>
	</author>
	<content type="html">This is a very interesting problem. if processes have quotas, then how
&lt;br&gt;could you set the
&lt;br&gt;quota value?
&lt;br&gt;&lt;br&gt;&amp;nbsp;A perfectly correct process might just have a very deep stack, just once in its
&lt;br&gt;life and otherwise be fine. Whether to crash this process or not would
&lt;br&gt;depend upon
&lt;br&gt;what the other processes in the system happened to be doing at the
&lt;br&gt;time. This would
&lt;br&gt;be very unfortunate - it's like your program being hit by a cosmic ray
&lt;br&gt;- nasty. It creates a random non-deterministic coupling between things
&lt;br&gt;that are supposed to be independent.
&lt;br&gt;&lt;br&gt;A possibility that just occurred to me might be to suspend processes
&lt;br&gt;that appear to be
&lt;br&gt;running wild until such a time as the overall memory situation looks good.
&lt;br&gt;&lt;br&gt;Image two scheduler queues. One for well behaved programs. One for
&lt;br&gt;programs whose
&lt;br&gt;stacks and heaps are growing too fast. If memory is no problem we run
&lt;br&gt;programs from both queues. If memory is tight we run processes in the
&lt;br&gt;&amp;quot;problem&amp;quot; queue less often and with frequent garbs.
&lt;br&gt;&lt;br&gt;Killing a program with a large stack and heap, just because their
&lt;br&gt;happens to be a
&lt;br&gt;temporary memory problem seems horrible, especially since the problem
&lt;br&gt;might go away
&lt;br&gt;if we wait a few milliseconds.
&lt;br&gt;&lt;br&gt;Suspending a memory hungry process for a while, until memory is available seems
&lt;br&gt;less objectionable. Perhapse it could be swapped out to disk and
&lt;br&gt;pulled in a lot later.
&lt;br&gt;Killing things at random in the hope it might help sounds like a
&lt;br&gt;really bad idea.
&lt;br&gt;Process migration could solve this - move it to a machine that has got
&lt;br&gt;more memory.
&lt;br&gt;&lt;br&gt;Suspending things seems ok - you might even suspend an errant process forever
&lt;br&gt;and reclaim the memory - but not kill it. Some other process could
&lt;br&gt;detect that the processes
&lt;br&gt;is not responding and kill it and thus all the semantics of the
&lt;br&gt;application would be obeyed
&lt;br&gt;(processes are allowed to be unresponsive, that's fine) and the semantics of the
&lt;br&gt;error recovery should say what to do in this case.
&lt;br&gt;&lt;br&gt;Just killing processes when they have done nothing wrong is not a good idea.
&lt;br&gt;&lt;br&gt;/Joe
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;On Tue, Nov 10, 2009 at 1:10 PM, Ulf Wiger
&lt;br&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26282816&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ulf.wiger@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Richard O'Keefe wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; One way would be to let the user set a memory quota on a process with
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; options at spawn time. When the process reaches it quota it can be
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; automatically killed or the user can
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; be notified in some way and take actions.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; One of the reasons this hasn't been done is, I presume, the fact that
&lt;br&gt;&amp;gt;&amp;gt; it is quite difficult for a programmer to determine what the memory
&lt;br&gt;&amp;gt;&amp;gt; quota should be.  It depends on
&lt;br&gt;&amp;gt;&amp;gt;  ...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I implemented resource limits in erlhive - at the Erlang level rather
&lt;br&gt;&amp;gt; than in the VM. The purpose was to be able to run foreign code safely
&lt;br&gt;&amp;gt; in a hosted environment. Eliminating the possibility to do damage
&lt;br&gt;&amp;gt; through traditional side-effects was relatively easy with a code
&lt;br&gt;&amp;gt; transform, but two ways of staging a DoS attack would be to gobble
&lt;br&gt;&amp;gt; RAM or CPU capacity. I approached this by inserting calls to a check
&lt;br&gt;&amp;gt; function that sampled heap size, and started a &amp;quot;watchdog&amp;quot; process that
&lt;br&gt;&amp;gt; would unceremoniously kill the program after a certain time.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; In short, I can see a need for such limits, and would like to include
&lt;br&gt;&amp;gt; a reduction ceiling. The limits could be set after careful testing
&lt;br&gt;&amp;gt; and high enough that they protect against runaway processes. A reduction
&lt;br&gt;&amp;gt; limit could be checked at the end of each slice, perhaps.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; In my experience, per-process memory usage is fairly predictable in
&lt;br&gt;&amp;gt; erlang. Does anyone have a different experience?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; BR,
&lt;br&gt;&amp;gt; Ulf W
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; Ulf Wiger
&lt;br&gt;&amp;gt; CTO, Erlang Training &amp; Consulting Ltd
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.erlang-consulting.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang-consulting.com&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ________________________________________________________________
&lt;br&gt;&amp;gt; erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;&amp;gt; erlang-questions (at) erlang.org
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;________________________________________________________________
&lt;br&gt;erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;erlang-questions (at) erlang.org
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Why-Beam.smp-crashes-when-memory-is-over--tp26257892p26282816.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26286382</id>
	<title>Best way to implement a simple cache</title>
	<published>2009-11-10T04:35:17Z</published>
	<updated>2009-11-10T04:35:17Z</updated>
	<author>
		<name>Jan Vincent Liwanag</name>
	</author>
	<content type="html">Hi guys,
&lt;br&gt;&lt;br&gt;I wanted your take on how to implement a simple small key-value cache, &amp;nbsp;
&lt;br&gt;maybe holding around a few hundred tuples. The thing is, I don't want &amp;nbsp;
&lt;br&gt;the cache to be consuming all my memory so that entries in the cache &amp;nbsp;
&lt;br&gt;expires if it isn't read for some time or some maximum size is met.
&lt;br&gt;&lt;br&gt;Jan Vincent Liwanag
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26286382&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jvliwanag@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;________________________________________________________________
&lt;br&gt;erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;erlang-questions (at) erlang.org
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Best-way-to-implement-a-simple-cache-tp26286382p26286382.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26282550</id>
	<title>Re: Why Beam.smp crashes when memory is over?</title>
	<published>2009-11-10T04:25:54Z</published>
	<updated>2009-11-10T04:25:54Z</updated>
	<author>
		<name>chandru-2</name>
	</author>
	<content type="html">2009/11/10 Tony Rogvall &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26282550&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tony@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;gt; Not yet.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; What kind of flavor do you have in mind?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; One proposal is to let sender crash when receiver in box is full.
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;A few strategies to choose from would be useful.
&lt;br&gt;&lt;br&gt;* Crash sender
&lt;br&gt;* Crash receiver
&lt;br&gt;* Discard message
&lt;br&gt;&lt;br&gt;cheers
&lt;br&gt;Chandru
&lt;br&gt;&lt;br&gt;I would like to test a blocking version as well. This may sound like utterly
&lt;br&gt;&amp;gt; crazy, but we already have the infamous busy_port ;-)
&lt;br&gt;&amp;gt; Busy ports do block senders (mostly distribution stuff).
&lt;br&gt;&amp;gt;
&lt;br&gt;An other flavor is to drop the overflow message. This can however be done
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; by catch (Pid ! Message) if the crash semantics is implemented.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; A suggestion from Patrik Winroth is to be able to set thresholds on
&lt;br&gt;&amp;gt; resource limits,
&lt;br&gt;&amp;gt; say in percent from max limit. When threshold is reached then a warning
&lt;br&gt;&amp;gt; message
&lt;br&gt;&amp;gt; is sent to a logger process.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The max_memory limit currently control number of words! that can be
&lt;br&gt;&amp;gt; allocated for heaps.
&lt;br&gt;&amp;gt; This is the sum of sizes of all heaps for the process and it's
&lt;br&gt;&amp;gt; &amp;quot;sub&amp;quot;-processes
&lt;br&gt;&amp;gt; (spawned by process that had the limit set in the first place). It is
&lt;br&gt;&amp;gt; implementation specific
&lt;br&gt;&amp;gt; if the message queue and/or the messages them selfs are located on the
&lt;br&gt;&amp;gt; process heap.
&lt;br&gt;&amp;gt; In the case where messages are none shared and located on a separate heap
&lt;br&gt;&amp;gt; fragments
&lt;br&gt;&amp;gt; this should be accounted for.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; /Tony
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On 10 nov 2009, at 12.18, Chandru wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;2009/11/9 Tony Rogvall &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26282550&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tony@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;Interesting discussion!
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I have been working on a resource system for Erlang for nearly two years
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; now.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I have a working (tm) prototype where you can set resource limits like
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; max_processes/max_ports/max_memory/max_time/max_reductions ...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; You don't happen to have a max_message_q_size option do you? Or does
&lt;br&gt;&amp;gt;&amp;gt; max_memory implicitly enforce this?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Chandru
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Why-Beam.smp-crashes-when-memory-is-over--tp26257892p26282550.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26282384</id>
	<title>Re: Why Beam.smp crashes when memory is over?</title>
	<published>2009-11-10T04:10:24Z</published>
	<updated>2009-11-10T04:10:24Z</updated>
	<author>
		<name>Ulf Wiger-3</name>
	</author>
	<content type="html">Richard O'Keefe wrote:
&lt;br&gt;&amp;gt;&amp;gt; One way would be to let the user set a memory quota on a process with
&lt;br&gt;&amp;gt;&amp;gt; options at spawn time. When the process reaches it quota it can be
&lt;br&gt;&amp;gt;&amp;gt; automatically killed or the user can
&lt;br&gt;&amp;gt;&amp;gt; be notified in some way and take actions.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; One of the reasons this hasn't been done is, I presume, the fact that
&lt;br&gt;&amp;gt; it is quite difficult for a programmer to determine what the memory
&lt;br&gt;&amp;gt; quota should be. &amp;nbsp;It depends on
&lt;br&gt;&amp;gt; &amp;nbsp;...
&lt;br&gt;&lt;br&gt;I implemented resource limits in erlhive - at the Erlang level rather
&lt;br&gt;than in the VM. The purpose was to be able to run foreign code safely
&lt;br&gt;in a hosted environment. Eliminating the possibility to do damage
&lt;br&gt;through traditional side-effects was relatively easy with a code
&lt;br&gt;transform, but two ways of staging a DoS attack would be to gobble
&lt;br&gt;RAM or CPU capacity. I approached this by inserting calls to a check
&lt;br&gt;function that sampled heap size, and started a &amp;quot;watchdog&amp;quot; process that
&lt;br&gt;would unceremoniously kill the program after a certain time.
&lt;br&gt;&lt;br&gt;In short, I can see a need for such limits, and would like to include
&lt;br&gt;a reduction ceiling. The limits could be set after careful testing
&lt;br&gt;and high enough that they protect against runaway processes. A reduction
&lt;br&gt;limit could be checked at the end of each slice, perhaps.
&lt;br&gt;&lt;br&gt;In my experience, per-process memory usage is fairly predictable in
&lt;br&gt;erlang. Does anyone have a different experience?
&lt;br&gt;&lt;br&gt;BR,
&lt;br&gt;Ulf W
&lt;br&gt;-- 
&lt;br&gt;Ulf Wiger
&lt;br&gt;CTO, Erlang Training &amp; Consulting Ltd
&lt;br&gt;&lt;a href=&quot;http://www.erlang-consulting.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang-consulting.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;________________________________________________________________
&lt;br&gt;erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;erlang-questions (at) erlang.org
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Why-Beam.smp-crashes-when-memory-is-over--tp26257892p26282384.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26283091</id>
	<title>Re: Why Beam.smp crashes when memory is over?</title>
	<published>2009-11-10T04:04:48Z</published>
	<updated>2009-11-10T04:04:48Z</updated>
	<author>
		<name>Tony Rogvall-2</name>
	</author>
	<content type="html">Not yet.
&lt;br&gt;&lt;br&gt;What kind of flavor do you have in mind?
&lt;br&gt;&lt;br&gt;One proposal is to let sender crash when receiver in box is full.
&lt;br&gt;&lt;br&gt;I would like to test a blocking version as well. This may sound like &amp;nbsp;
&lt;br&gt;utterly
&lt;br&gt;crazy, but we already have the infamous busy_port ;-)
&lt;br&gt;Busy ports do block senders (mostly distribution stuff).
&lt;br&gt;&lt;br&gt;An other flavor is to drop the overflow message. This can however be &amp;nbsp;
&lt;br&gt;done
&lt;br&gt;by catch (Pid ! Message) if the crash semantics is implemented.
&lt;br&gt;&lt;br&gt;A suggestion from Patrik Winroth is to be able to set thresholds on &amp;nbsp;
&lt;br&gt;resource limits,
&lt;br&gt;say in percent from max limit. When threshold is reached then a &amp;nbsp;
&lt;br&gt;warning message
&lt;br&gt;is sent to a logger process.
&lt;br&gt;&lt;br&gt;The max_memory limit currently control number of words! that can be &amp;nbsp;
&lt;br&gt;allocated for heaps.
&lt;br&gt;This is the sum of sizes of all heaps for the process and it's &amp;quot;sub&amp;quot;- 
&lt;br&gt;processes
&lt;br&gt;(spawned by process that had the limit set in the first place). It is &amp;nbsp;
&lt;br&gt;implementation specific
&lt;br&gt;if the message queue and/or the messages them selfs are located on the &amp;nbsp;
&lt;br&gt;process heap.
&lt;br&gt;In the case where messages are none shared and located on a separate &amp;nbsp;
&lt;br&gt;heap fragments
&lt;br&gt;this should be accounted for.
&lt;br&gt;&lt;br&gt;/Tony
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;On 10 nov 2009, at 12.18, Chandru wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; 2009/11/9 Tony Rogvall &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26283091&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tony@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Interesting discussion!
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I have been working on a resource system for Erlang for nearly two &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; years
&lt;br&gt;&amp;gt;&amp;gt; now.
&lt;br&gt;&amp;gt;&amp;gt; I have a working (tm) prototype where you can set resource limits &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; like
&lt;br&gt;&amp;gt;&amp;gt; max_processes/max_ports/max_memory/max_time/max_reductions ...
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; You don't happen to have a max_message_q_size option do you? Or does
&lt;br&gt;&amp;gt; max_memory implicitly enforce this?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Chandru
&lt;/div&gt;&lt;br&gt;&lt;br&gt;________________________________________________________________
&lt;br&gt;erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;erlang-questions (at) erlang.org
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Why-Beam.smp-crashes-when-memory-is-over--tp26257892p26283091.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26281798</id>
	<title>Re: Why Beam.smp crashes when memory is over?</title>
	<published>2009-11-10T03:18:04Z</published>
	<updated>2009-11-10T03:18:04Z</updated>
	<author>
		<name>chandru-2</name>
	</author>
	<content type="html">2009/11/9 Tony Rogvall &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26281798&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tony@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;gt; Interesting discussion!
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I have been working on a resource system for Erlang for nearly two years
&lt;br&gt;&amp;gt; now.
&lt;br&gt;&amp;gt; I have a working (tm) prototype where you can set resource limits like
&lt;br&gt;&amp;gt; max_processes/max_ports/max_memory/max_time/max_reductions ...
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;You don't happen to have a max_message_q_size option do you? Or does
&lt;br&gt;max_memory implicitly enforce this?
&lt;br&gt;&lt;br&gt;Chandru
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Why-Beam.smp-crashes-when-memory-is-over--tp26257892p26281798.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26280331</id>
	<title>Re: Why Beam.smp crashes when memory is over?</title>
	<published>2009-11-10T01:08:22Z</published>
	<updated>2009-11-10T01:08:22Z</updated>
	<author>
		<name>Angel Alvarez</name>
	</author>
	<content type="html">El Martes, 10 de Noviembre de 2009 05:36:44 Richard O'Keefe escribió:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; On Nov 9, 2009, at 10:53 PM, Kenneth Lundin wrote:
&lt;br&gt;&amp;gt; &amp;gt; What we could do is to make it easier for the user to prevent OOM
&lt;br&gt;&amp;gt; &amp;gt; situations and also to
&lt;br&gt;&amp;gt; &amp;gt; let him take the decision when it occurs or rather before it occurs.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; One way would be to let the user set a memory quota on a process with
&lt;br&gt;&amp;gt; &amp;gt; options at spawn time. When the process reaches it quota it can be
&lt;br&gt;&amp;gt; &amp;gt; automatically killed or the user can
&lt;br&gt;&amp;gt; &amp;gt; be notified in some way and take actions.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; One of the reasons this hasn't been done is, I presume, the fact that
&lt;br&gt;&amp;gt; it is quite difficult for a programmer to determine what the memory
&lt;br&gt;&amp;gt; quota should be. &amp;nbsp;It depends on
&lt;br&gt;&amp;gt; &amp;nbsp; - the nature of the code being run
&lt;br&gt;&amp;gt; &amp;nbsp; - the data it is processing (data loads tend to increase with the &amp;nbsp;
&lt;br&gt;&amp;gt; years)
&lt;br&gt;&amp;gt; &amp;nbsp; - the cleverness of the compiler
&lt;br&gt;&amp;gt; &amp;nbsp; - the data representation used by the Erlang system (e.g., whether
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; pointers are 32 bits or 64, whether there are special tags for small
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; arrays
&lt;br&gt;&amp;gt; &amp;nbsp; - the data representation used by library modules the code calls
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; (change the representation of ordered sets and a bound that might
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; have worked might not any more)
&lt;br&gt;&amp;gt; &amp;nbsp; - a system policy on whether it's better to be tight on memory and
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; tolerate some processes crashing and needing to be restarted or
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; whether it's best to keep more processing running at the cost of
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; using more memory, a thing that might change at run time.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I have long bemoaned the (measured!) fact that the size of a stack
&lt;br&gt;&amp;gt; frame in C can vary by a factor of 10, so that determining the sizes
&lt;br&gt;&amp;gt; for POSIX thread stacks is a game of Russian Roulette.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; You can determine suitable sizes for a particular release by running
&lt;br&gt;&amp;gt; experiments, but the sizes thus determined are ONLY reliable for the
&lt;br&gt;&amp;gt; specific release or releases you tried on the machine or machines
&lt;br&gt;&amp;gt; that you tried it or them on. &amp;nbsp;Set a limit, and you can *EXPECT*
&lt;br&gt;&amp;gt; working processes to be crashed as a *NORMAL* outcome.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Once some feature goes in, I expect to see messages in this mailing
&lt;br&gt;&amp;gt; list &amp;quot;My program gets lots of killed processes due to Out-Of-Memory
&lt;br&gt;&amp;gt; but it used to work and I haven't changed it.&amp;quot;
&lt;/div&gt;I agree with You Richard
&lt;br&gt;&lt;br&gt;Most of our production java code throws millions of nullpointer exceptions messages
&lt;br&gt;and management staff, and developers dont care, if users are happy.
&lt;br&gt;&lt;br&gt;I presume many subtle errors came from those nullpointer errors but people got used
&lt;br&gt;to have those messages when the moved from other platforms to java and now is 
&lt;br&gt;the norm among java developers.
&lt;br&gt;&lt;br&gt;Its not acceptable for a platform that focuses on highly scalable, survivable and error tolerant
&lt;br&gt;systems that programmers were acustommed to see a lot of memory errors.
&lt;br&gt;&lt;br&gt;Everyone here knows how to measure memory available at program life-time (im new but, i think i knows ), there is no need
&lt;br&gt;to cover such poor memory management with artificial limits, this is no C and the like.
&lt;br&gt;&lt;br&gt;Virtual memory and Garbage collection should garantee enough memory provided the programmers know something about the algorithms
&lt;br&gt;and data structures (good unit testing).
&lt;br&gt;&lt;br&gt;Imagine someone asks a question on the list, provides the offending code and everyother who is helping sees lot of memory errors
&lt;br&gt;on his code..
&lt;br&gt;&lt;br&gt;Should i waste my time helping someone when his code spurts so much memory errors and hi/her doesnt care?
&lt;br&gt;&lt;br&gt;Should newbies like me be exposed to such poor desing and coding style?
&lt;br&gt;&lt;br&gt;What's better? counting bits properly or just set the limit and wait the process for a memory crash??
&lt;br&gt;&lt;br&gt;How do you manage diferent compilers code size, or 32/64bits overhead? IMHO its up to the programmer concise 
&lt;br&gt;memory usage expectation and this work has to be done on desing fase, and not let some black magic, i pressume 
&lt;br&gt;this wil not be portable across many erlang versions and setups...
&lt;br&gt;&lt;br&gt;Clearly for memory battles on process/threads and the like we have already many good languages like C
&lt;br&gt;despite most people here seems to want the VM to became a better OS...
&lt;br&gt;&lt;br&gt;Classic behavior (let the VM crash) should be preserved for legacy systems and for academic and marketing stuff...
&lt;br&gt;&lt;br&gt;I agree, Shielding the VM againts many error condictions and you probably will generate as much poor programmers.
&lt;br&gt;&lt;br&gt;&lt;br&gt;/Angel
&lt;br&gt;&lt;br&gt;PS: I agree with Joe, Erlang best feature is a new mental model of dealing with faulty conditions more than the &amp;quot;multicore&amp;quot; promises 
&lt;br&gt;&amp;gt; ________________________________________________________________
&lt;br&gt;&amp;gt; erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;&amp;gt; erlang-questions (at) erlang.org
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Este correo no tiene dibujos. Las formas extrañas en la pantalla son letras.
&lt;br&gt;__________________________________________
&lt;br&gt;&lt;br&gt;Clist UAH a.k.a Angel
&lt;br&gt;__________________________________________
&lt;br&gt;HONEY BUNNY - Any of you *uckin' pricks move and I'll execute every mother*ucking last one of you.
&lt;br&gt;&lt;br&gt;________________________________________________________________
&lt;br&gt;erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;erlang-questions (at) erlang.org
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Why-Beam.smp-crashes-when-memory-is-over--tp26257892p26280331.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26278195</id>
	<title>Re: Why Beam.smp crashes when memory is over?</title>
	<published>2009-11-09T20:36:44Z</published>
	<updated>2009-11-09T20:36:44Z</updated>
	<author>
		<name>Richard O'Keefe</name>
	</author>
	<content type="html">&lt;br&gt;On Nov 9, 2009, at 10:53 PM, Kenneth Lundin wrote:
&lt;br&gt;&amp;gt; What we could do is to make it easier for the user to prevent OOM
&lt;br&gt;&amp;gt; situations and also to
&lt;br&gt;&amp;gt; let him take the decision when it occurs or rather before it occurs.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; One way would be to let the user set a memory quota on a process with
&lt;br&gt;&amp;gt; options at spawn time. When the process reaches it quota it can be
&lt;br&gt;&amp;gt; automatically killed or the user can
&lt;br&gt;&amp;gt; be notified in some way and take actions.
&lt;br&gt;&lt;br&gt;One of the reasons this hasn't been done is, I presume, the fact that
&lt;br&gt;it is quite difficult for a programmer to determine what the memory
&lt;br&gt;quota should be. &amp;nbsp;It depends on
&lt;br&gt;&amp;nbsp; - the nature of the code being run
&lt;br&gt;&amp;nbsp; - the data it is processing (data loads tend to increase with the &amp;nbsp;
&lt;br&gt;years)
&lt;br&gt;&amp;nbsp; - the cleverness of the compiler
&lt;br&gt;&amp;nbsp; - the data representation used by the Erlang system (e.g., whether
&lt;br&gt;&amp;nbsp; &amp;nbsp; pointers are 32 bits or 64, whether there are special tags for small
&lt;br&gt;&amp;nbsp; &amp;nbsp; arrays
&lt;br&gt;&amp;nbsp; - the data representation used by library modules the code calls
&lt;br&gt;&amp;nbsp; &amp;nbsp; (change the representation of ordered sets and a bound that might
&lt;br&gt;&amp;nbsp; &amp;nbsp; have worked might not any more)
&lt;br&gt;&amp;nbsp; - a system policy on whether it's better to be tight on memory and
&lt;br&gt;&amp;nbsp; &amp;nbsp; tolerate some processes crashing and needing to be restarted or
&lt;br&gt;&amp;nbsp; &amp;nbsp; whether it's best to keep more processing running at the cost of
&lt;br&gt;&amp;nbsp; &amp;nbsp; using more memory, a thing that might change at run time.
&lt;br&gt;&lt;br&gt;I have long bemoaned the (measured!) fact that the size of a stack
&lt;br&gt;frame in C can vary by a factor of 10, so that determining the sizes
&lt;br&gt;for POSIX thread stacks is a game of Russian Roulette.
&lt;br&gt;&lt;br&gt;You can determine suitable sizes for a particular release by running
&lt;br&gt;experiments, but the sizes thus determined are ONLY reliable for the
&lt;br&gt;specific release or releases you tried on the machine or machines
&lt;br&gt;that you tried it or them on. &amp;nbsp;Set a limit, and you can *EXPECT*
&lt;br&gt;working processes to be crashed as a *NORMAL* outcome.
&lt;br&gt;&lt;br&gt;Once some feature goes in, I expect to see messages in this mailing
&lt;br&gt;list &amp;quot;My program gets lots of killed processes due to Out-Of-Memory
&lt;br&gt;but it used to work and I haven't changed it.&amp;quot;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;________________________________________________________________
&lt;br&gt;erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;erlang-questions (at) erlang.org
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Why-Beam.smp-crashes-when-memory-is-over--tp26257892p26278195.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26277073</id>
	<title>Re: Mnesia stuck in transaction</title>
	<published>2009-11-09T17:52:50Z</published>
	<updated>2009-11-09T17:52:50Z</updated>
	<author>
		<name>Yogish Baliga</name>
	</author>
	<content type="html">Not sure what actually happened. But I found the work-around. 
&lt;br&gt;&lt;br&gt;changed the table type to ram_copies
&lt;br&gt;Stopped mnesia
&lt;br&gt;Started mnesia
&lt;br&gt;&lt;br&gt;Once gen_server message queue is drained, changed the table type of disc_copies
&lt;br&gt;&lt;br&gt;-- baliga 
&lt;br&gt;&amp;quot;Point of view is worth 80 IQ points&amp;quot; --Alan Kay
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://dudefrommangalore.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://dudefrommangalore.blogspot.com/&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;________________________________
&lt;br&gt;From: Yogish Baliga &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26277073&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;yogishb@...&lt;/a&gt;&amp;gt;
&lt;br&gt;To: Erlang Questions &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26277073&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;erlang-questions@...&lt;/a&gt;&amp;gt;
&lt;br&gt;Sent: Mon, November 9, 2009 5:15:52 PM
&lt;br&gt;Subject: [erlang-questions] Mnesia stuck in transaction
&lt;br&gt;&lt;br&gt;Hello Mnesia experts,
&lt;br&gt;&lt;br&gt;&amp;nbsp; I have a process hung with the following backtrace. &amp;nbsp;What is the possible solution? This gen_server (workflow_manager_logs) is backed up with lot of messages delivered via RabbitMQ. Either I need a way to cancel this transaction or fix the database so that it will continue processing all messages.
&lt;br&gt;&lt;br&gt;Thanx,
&lt;br&gt;-- baliga
&lt;br&gt;&lt;br&gt;(&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26277073&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;workflow_gateway@...&lt;/a&gt;)11&amp;gt; io:format(&amp;quot;~s&amp;quot;, [erlang:binary_to_list(element(2, erlang:process_info(whereis(workflow_manager_logs), backtrace)))]).
&lt;br&gt;Program counter: 0xf0717490 (mnesia_tm:rec/2 + 28)
&lt;br&gt;CP: 0x00000000 (invalid)
&lt;br&gt;arity = 0
&lt;br&gt;&lt;br&gt;0xefa18404 Return addr 0xf071b7c0 (mnesia_tm:execute_outer/6 + 68)
&lt;br&gt;y(0) &amp;nbsp; &amp;nbsp; #Ref&amp;lt;0.0.0.1407&amp;gt;
&lt;br&gt;y(1) &amp;nbsp; &amp;nbsp; &amp;lt;0.104.0&amp;gt;
&lt;br&gt;&lt;br&gt;0xefa18410 Return addr 0xf07fe6e8 (mnesia:wrap_trans/6 + 20)
&lt;br&gt;y(0) &amp;nbsp; &amp;nbsp; async
&lt;br&gt;y(1) &amp;nbsp; &amp;nbsp; infinity
&lt;br&gt;y(2) &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;y(3) &amp;nbsp; &amp;nbsp; []
&lt;br&gt;y(4) &amp;nbsp; &amp;nbsp; #Fun&amp;lt;workflow_manager_logs.4.58301755&amp;gt;
&lt;br&gt;y(5) &amp;nbsp; &amp;nbsp; mnesia_frag
&lt;br&gt;&lt;br&gt;0xefa1842c Return addr 0xf13b0448 (workflow_manager_logs:handle_info/2 + 312)
&lt;br&gt;&lt;br&gt;0xefa18430 Return addr 0xf7e13124 (gen_server:handle_msg/5 + 932)
&lt;br&gt;y(0) &amp;nbsp; &amp;nbsp; []
&lt;br&gt;y(1) &amp;nbsp; &amp;nbsp; Catch 0xf13b0448 (workflow_manager_logs:handle_info/2 + 312)
&lt;br&gt;y(2) &amp;nbsp; &amp;nbsp; []
&lt;br&gt;y(3) &amp;nbsp; &amp;nbsp; {&amp;lt;0.264.0&amp;gt;,&amp;lt;0.274.0&amp;gt;,&amp;lt;&amp;lt;33 bytes&amp;gt;&amp;gt;}
&lt;br&gt;&lt;br&gt;0xefa18444 Return addr 0xf7db1c6c (proc_lib:init_p_do_apply/3 + 28)
&lt;br&gt;y(0) &amp;nbsp; &amp;nbsp; workflow_manager_logs
&lt;br&gt;y(1) &amp;nbsp; &amp;nbsp; {&amp;lt;0.264.0&amp;gt;,&amp;lt;0.274.0&amp;gt;,&amp;lt;&amp;lt;33 bytes&amp;gt;&amp;gt;}
&lt;br&gt;y(2) &amp;nbsp; &amp;nbsp; workflow_manager_logs
&lt;br&gt;y(3) &amp;nbsp; &amp;nbsp; &amp;lt;0.38.0&amp;gt;
&lt;br&gt;y(4) &amp;nbsp; &amp;nbsp; {{'basic.deliver',&amp;lt;&amp;lt;33 bytes&amp;gt;&amp;gt;,7,false,&amp;lt;&amp;lt;15 bytes&amp;gt;&amp;gt;,&amp;lt;&amp;lt;24 bytes&amp;gt;&amp;gt;},{content,60,none,&amp;lt;&amp;lt;29 bytes&amp;gt;&amp;gt;,[&amp;lt;&amp;lt;75 bytes&amp;gt;&amp;gt;]}}
&lt;br&gt;y(5) &amp;nbsp; &amp;nbsp; Catch 0xf7e13124 (gen_server:handle_msg/5 + 932)
&lt;br&gt;&lt;br&gt;0xefa18460 Return addr 0x08236c00 (&amp;lt;terminate process normally&amp;gt;)
&lt;br&gt;y(0) &amp;nbsp; &amp;nbsp; Catch 0xf7db1c7c (proc_lib:init_p_do_apply/3 + 44)
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;quot;Point of view is worth 80 IQ points&amp;quot; --Alan Kay
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://dudefrommangalore.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://dudefrommangalore.blogspot.com/&lt;/a&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Mnesia-stuck-in-transaction-tp26276740p26277073.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26276740</id>
	<title>Mnesia stuck in transaction</title>
	<published>2009-11-09T17:15:52Z</published>
	<updated>2009-11-09T17:15:52Z</updated>
	<author>
		<name>Yogish Baliga</name>
	</author>
	<content type="html">Hello Mnesia experts,
&lt;br&gt;&lt;br&gt;&amp;nbsp; I have a process hung with the following backtrace. &amp;nbsp;What is the possible solution? This gen_server (workflow_manager_logs) is backed up with lot of messages delivered via RabbitMQ. Either I need a way to cancel this transaction or fix the database so that it will continue processing all messages.
&lt;br&gt;&lt;br&gt;Thanx,
&lt;br&gt;-- baliga
&lt;br&gt;&lt;br&gt;(&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26276740&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;workflow_gateway@...&lt;/a&gt;)11&amp;gt; io:format(&amp;quot;~s&amp;quot;, [erlang:binary_to_list(element(2, erlang:process_info(whereis(workflow_manager_logs), backtrace)))]).
&lt;br&gt;Program counter: 0xf0717490 (mnesia_tm:rec/2 + 28)
&lt;br&gt;CP: 0x00000000 (invalid)
&lt;br&gt;arity = 0
&lt;br&gt;&lt;br&gt;0xefa18404 Return addr 0xf071b7c0 (mnesia_tm:execute_outer/6 + 68)
&lt;br&gt;y(0) &amp;nbsp; &amp;nbsp; #Ref&amp;lt;0.0.0.1407&amp;gt;
&lt;br&gt;y(1) &amp;nbsp; &amp;nbsp; &amp;lt;0.104.0&amp;gt;
&lt;br&gt;&lt;br&gt;0xefa18410 Return addr 0xf07fe6e8 (mnesia:wrap_trans/6 + 20)
&lt;br&gt;y(0) &amp;nbsp; &amp;nbsp; async
&lt;br&gt;y(1) &amp;nbsp; &amp;nbsp; infinity
&lt;br&gt;y(2) &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;y(3) &amp;nbsp; &amp;nbsp; []
&lt;br&gt;y(4) &amp;nbsp; &amp;nbsp; #Fun&amp;lt;workflow_manager_logs.4.58301755&amp;gt;
&lt;br&gt;y(5) &amp;nbsp; &amp;nbsp; mnesia_frag
&lt;br&gt;&lt;br&gt;0xefa1842c Return addr 0xf13b0448 (workflow_manager_logs:handle_info/2 + 312)
&lt;br&gt;&lt;br&gt;0xefa18430 Return addr 0xf7e13124 (gen_server:handle_msg/5 + 932)
&lt;br&gt;y(0) &amp;nbsp; &amp;nbsp; []
&lt;br&gt;y(1) &amp;nbsp; &amp;nbsp; Catch 0xf13b0448 (workflow_manager_logs:handle_info/2 + 312)
&lt;br&gt;y(2) &amp;nbsp; &amp;nbsp; []
&lt;br&gt;y(3) &amp;nbsp; &amp;nbsp; {&amp;lt;0.264.0&amp;gt;,&amp;lt;0.274.0&amp;gt;,&amp;lt;&amp;lt;33 bytes&amp;gt;&amp;gt;}
&lt;br&gt;&lt;br&gt;0xefa18444 Return addr 0xf7db1c6c (proc_lib:init_p_do_apply/3 + 28)
&lt;br&gt;y(0) &amp;nbsp; &amp;nbsp; workflow_manager_logs
&lt;br&gt;y(1) &amp;nbsp; &amp;nbsp; {&amp;lt;0.264.0&amp;gt;,&amp;lt;0.274.0&amp;gt;,&amp;lt;&amp;lt;33 bytes&amp;gt;&amp;gt;}
&lt;br&gt;y(2) &amp;nbsp; &amp;nbsp; workflow_manager_logs
&lt;br&gt;y(3) &amp;nbsp; &amp;nbsp; &amp;lt;0.38.0&amp;gt;
&lt;br&gt;y(4) &amp;nbsp; &amp;nbsp; {{'basic.deliver',&amp;lt;&amp;lt;33 bytes&amp;gt;&amp;gt;,7,false,&amp;lt;&amp;lt;15 bytes&amp;gt;&amp;gt;,&amp;lt;&amp;lt;24 bytes&amp;gt;&amp;gt;},{content,60,none,&amp;lt;&amp;lt;29 bytes&amp;gt;&amp;gt;,[&amp;lt;&amp;lt;75 bytes&amp;gt;&amp;gt;]}}
&lt;br&gt;y(5) &amp;nbsp; &amp;nbsp; Catch 0xf7e13124 (gen_server:handle_msg/5 + 932)
&lt;br&gt;&lt;br&gt;0xefa18460 Return addr 0x08236c00 (&amp;lt;terminate process normally&amp;gt;)
&lt;br&gt;y(0) &amp;nbsp; &amp;nbsp; Catch 0xf7db1c7c (proc_lib:init_p_do_apply/3 + 44)
&lt;br&gt;&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;quot;Point of view is worth 80 IQ points&amp;quot; --Alan Kay
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://dudefrommangalore.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://dudefrommangalore.blogspot.com/&lt;/a&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Mnesia-stuck-in-transaction-tp26276740p26276740.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26275221</id>
	<title>Re: Dialyzer problem on OSX 10.6 (Erlang R13B02-1)</title>
	<published>2009-11-09T14:50:04Z</published>
	<updated>2009-11-09T14:50:04Z</updated>
	<author>
		<name>Tamas Nagy-3</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;I have been misinforming the mailing list here (unintentionally, lack &amp;nbsp;
&lt;br&gt;of information is the reason).
&lt;br&gt;&lt;br&gt;The problem is not with aggressive optimisation or it depends how you &amp;nbsp;
&lt;br&gt;look at it as homebrew on Snow Leopard uses the new llvm compiler as &amp;nbsp;
&lt;br&gt;the default c compiler.
&lt;br&gt;This in case of erlang did not go too well. If somebody has the urge &amp;nbsp;
&lt;br&gt;to get llvm compiled erlang working this is one issue which has to be &amp;nbsp;
&lt;br&gt;solved.
&lt;br&gt;&lt;br&gt;Tamas Nagy
&lt;br&gt;Erlang Training &amp; Consulting
&lt;br&gt;&lt;a href=&quot;http://www.erlang-consulting.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang-consulting.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;On 9 Nov 2009, at 21:42, Tamas Nagy wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi everyone,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The problem has been solved in homebrew. Aggressive optimisation for &amp;nbsp;
&lt;br&gt;&amp;gt; some reason doesn't go well with dialyzer.
&lt;br&gt;&amp;gt; The error would probably have shown its ugly head in different &amp;nbsp;
&lt;br&gt;&amp;gt; applications as well. dialyzer was only the unlucky one to reliable &amp;nbsp;
&lt;br&gt;&amp;gt; trigger it.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; For all the gory details:
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://github.com/mxcl/homebrew/issues/closed/#issue/120&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://github.com/mxcl/homebrew/issues/closed/#issue/120&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Tamas Nagy
&lt;br&gt;&amp;gt; Erlang Training &amp; Consulting
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.erlang-consulting.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang-consulting.com&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On 9 Nov 2009, at 11:50, Tino Breddin wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Hi Tamas,
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Yes I used homebrew as well. That sounds strange, might it be that &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; those optimizations have a negative impact on the Erlang &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; performance on Mac OSX?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Cheers,
&lt;br&gt;&amp;gt;&amp;gt; Tino
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; On Nov 9, 2009, at 11:35 AM, Tamas Nagy wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Hi Tino,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Are you using homebrew?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; So far it seems that homebrew applies some c compiler magic (e.g &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; optimizations) when building erlang which somehow borks dialyzer &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; (strange) as compiling from source with the same ./configure &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; options homebrew uses results in an erlang installation which &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; works like a charm.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Regards,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp;Tamas
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; ----- &amp;quot;Tino Breddin&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26275221&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tino.breddin@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Hey Tamas,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Here's the output for the command run on my machine (Macbook Pro &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Core
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Duo, running OSX 10.6.1 32-bit):
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; dialyzer --build_plt -r /usr/local/Cellar/erlang/R13B02-1/lib/ 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; erlang/
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; lib/erts-5.7.3/ebin/ /usr/local/Cellar/erlang/R13B02-1/lib/erlang/ 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; lib/
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; kernel-2.13.3/ebin/ /usr/local/Cellar/erlang/R13B02-1/lib/erlang/ 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; lib/
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; stdlib-1.16.3/ebin/
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Creating PLT /Users/tino/.dialyzer_plt ...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Unknown functions:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; compile:file/2
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; compile:forms/2
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; compile:noenv_forms/2
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; compile:output_generated/1
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; crypto:des3_cbc_decrypt/5
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; crypto:start/0
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; done in 46m22.52s
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; done (passed successfully)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Apparently it takes some time to complete but you'll get there.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Cheers,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Tino
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; On Nov 8, 2009, at 11:35 PM, Tamas Nagy wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Hi Kostis,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; This is what all I get:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; $ dialyzer --build_plt -r /usr/local/Cellar/erlang/R13B02-1/lib/
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; erlang/lib/erts-5.7.3/ebin/ /usr/local/Cellar/erlang/R13B02-1/lib/
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; erlang/lib/kernel-2.13.3/ebin/
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; /usr/local/Cellar/erlang/R13B02-1/lib/
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; erlang/lib/stdlib-1.16.3/ebin/
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Creating PLT /Users/lestat/.dialyzer_plt ...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I will try to rebuild erlang with disabling hipe to see if that
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; helps.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I am happy to run some tests/traces you would like to see the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; results of to help.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Regards,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 	Tamas
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Tamas Nagy
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Erlang Training &amp; Consulting
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://www.erlang-consulting.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang-consulting.com&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; On 8 Nov 2009, at 19:52, Kostis Sagonas wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Tamas Nagy wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Am I the only one who cannot build a plt under OSX 10.6 in
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; R13B02-1?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; No matter what applications I specify for the initial plt it &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; just
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; hangs eating processing power but not producing anything.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Erlang was installed with homebrew, but that shouldn't matter. &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Or
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; maybe it does. (beam is compiled for 64 bit)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Here is the command I used:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; dialyzer --build_plt -r /usr/local/Cellar/erlang/R13B02-1/lib/
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; erlang/lib/erts-5.7.3/ebin/ /usr/local/Cellar/erlang/R13B02-1/ 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; lib/
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; erlang/lib/kernel-2.13.3/ebin/ /usr/local/Cellar/erlang/ 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; R13B02-1/
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; lib/erlang/lib/stdlib-1.16.3/ebin/
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I gave waiting for it to finish after ~1 hour (on an old type
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; white MacBook (MacBook2,1) with 2GB of RAM).
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; None of the dialyzer developers has access to such a machine to &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; see
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; what's happening. &amp;nbsp;Perhaps somebody else in that list might &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; want to
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; report whether this is reproducible or not.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; However, perhaps the following might help: when building the PLT,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; do you see a message:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 	Compiling some key modules to native code...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; If so, can you disable hipe (64-bit Mac is not a platform we have
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ever tested due to no access to such a machine) to see whether &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; this
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; may be the culprit?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Kostis
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ________________________________________________________________
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; erlang-questions (at) erlang.org
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; -- 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Tamas Nagy
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Erlang Training &amp; Consulting
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://www.erlang-consulting.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang-consulting.com&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; ________________________________________________________________
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; erlang-questions (at) erlang.org
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;________________________________________________________________
&lt;br&gt;erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;erlang-questions (at) erlang.org
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Dialyzer-problem-on-OSX-10.6-%28Erlang-R13B02-1%29-tp26256992p26275221.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26274245</id>
	<title>Re: Dialyzer problem on OSX 10.6 (Erlang R13B02-1)</title>
	<published>2009-11-09T13:42:29Z</published>
	<updated>2009-11-09T13:42:29Z</updated>
	<author>
		<name>Tamas Nagy-3</name>
	</author>
	<content type="html">Hi everyone,
&lt;br&gt;&lt;br&gt;The problem has been solved in homebrew. Aggressive optimisation for &amp;nbsp;
&lt;br&gt;some reason doesn't go well with dialyzer.
&lt;br&gt;The error would probably have shown its ugly head in different &amp;nbsp;
&lt;br&gt;applications as well. dialyzer was only the unlucky one to reliable &amp;nbsp;
&lt;br&gt;trigger it.
&lt;br&gt;&lt;br&gt;For all the gory details:
&lt;br&gt;&lt;a href=&quot;http://github.com/mxcl/homebrew/issues/closed/#issue/120&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://github.com/mxcl/homebrew/issues/closed/#issue/120&lt;/a&gt;&lt;br&gt;&lt;br&gt;Tamas Nagy
&lt;br&gt;Erlang Training &amp; Consulting
&lt;br&gt;&lt;a href=&quot;http://www.erlang-consulting.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang-consulting.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;On 9 Nov 2009, at 11:50, Tino Breddin wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi Tamas,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Yes I used homebrew as well. That sounds strange, might it be that &amp;nbsp;
&lt;br&gt;&amp;gt; those optimizations have a negative impact on the Erlang performance &amp;nbsp;
&lt;br&gt;&amp;gt; on Mac OSX?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Cheers,
&lt;br&gt;&amp;gt; Tino
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Nov 9, 2009, at 11:35 AM, Tamas Nagy wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Hi Tino,
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Are you using homebrew?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; So far it seems that homebrew applies some c compiler magic (e.g &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; optimizations) when building erlang which somehow borks dialyzer &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; (strange) as compiling from source with the same ./configure &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; options homebrew uses results in an erlang installation which works &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; like a charm.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Regards,
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; Tamas
&lt;br&gt;&amp;gt;&amp;gt; ----- &amp;quot;Tino Breddin&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26274245&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tino.breddin@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Hey Tamas,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Here's the output for the command run on my machine (Macbook Pro &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Core
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Duo, running OSX 10.6.1 32-bit):
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; dialyzer --build_plt -r /usr/local/Cellar/erlang/R13B02-1/lib/ 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; erlang/
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; lib/erts-5.7.3/ebin/ /usr/local/Cellar/erlang/R13B02-1/lib/erlang/ 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; lib/
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; kernel-2.13.3/ebin/ /usr/local/Cellar/erlang/R13B02-1/lib/erlang/ 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; lib/
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; stdlib-1.16.3/ebin/
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp;Creating PLT /Users/tino/.dialyzer_plt ...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Unknown functions:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp;compile:file/2
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp;compile:forms/2
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp;compile:noenv_forms/2
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp;compile:output_generated/1
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp;crypto:des3_cbc_decrypt/5
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp;crypto:start/0
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; done in 46m22.52s
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; done (passed successfully)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Apparently it takes some time to complete but you'll get there.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Cheers,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Tino
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; On Nov 8, 2009, at 11:35 PM, Tamas Nagy wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Hi Kostis,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; This is what all I get:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; $ dialyzer --build_plt -r /usr/local/Cellar/erlang/R13B02-1/lib/
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; erlang/lib/erts-5.7.3/ebin/ /usr/local/Cellar/erlang/R13B02-1/lib/
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; erlang/lib/kernel-2.13.3/ebin/
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; /usr/local/Cellar/erlang/R13B02-1/lib/
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; erlang/lib/stdlib-1.16.3/ebin/
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Creating PLT /Users/lestat/.dialyzer_plt ...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I will try to rebuild erlang with disabling hipe to see if that
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; helps.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I am happy to run some tests/traces you would like to see the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; results of to help.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Regards,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 	Tamas
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Tamas Nagy
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Erlang Training &amp; Consulting
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://www.erlang-consulting.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang-consulting.com&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; On 8 Nov 2009, at 19:52, Kostis Sagonas wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Tamas Nagy wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Am I the only one who cannot build a plt under OSX 10.6 in
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; R13B02-1?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; No matter what applications I specify for the initial plt it just
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; hangs eating processing power but not producing anything.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Erlang was installed with homebrew, but that shouldn't matter. Or
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; maybe it does. (beam is compiled for 64 bit)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Here is the command I used:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; dialyzer --build_plt -r /usr/local/Cellar/erlang/R13B02-1/lib/
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; erlang/lib/erts-5.7.3/ebin/ /usr/local/Cellar/erlang/R13B02-1/ 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; lib/
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; erlang/lib/kernel-2.13.3/ebin/ /usr/local/Cellar/erlang/R13B02-1/
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; lib/erlang/lib/stdlib-1.16.3/ebin/
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I gave waiting for it to finish after ~1 hour (on an old type
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; white MacBook (MacBook2,1) with 2GB of RAM).
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; None of the dialyzer developers has access to such a machine to &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; see
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; what's happening. &amp;nbsp;Perhaps somebody else in that list might want &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; to
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; report whether this is reproducible or not.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; However, perhaps the following might help: when building the PLT,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; do you see a message:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 	Compiling some key modules to native code...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; If so, can you disable hipe (64-bit Mac is not a platform we have
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ever tested due to no access to such a machine) to see whether &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; this
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; may be the culprit?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Kostis
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ________________________________________________________________
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; erlang-questions (at) erlang.org
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; -- 
&lt;br&gt;&amp;gt;&amp;gt; Tamas Nagy
&lt;br&gt;&amp;gt;&amp;gt; Erlang Training &amp; Consulting
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://www.erlang-consulting.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang-consulting.com&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ________________________________________________________________
&lt;br&gt;&amp;gt;&amp;gt; erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; erlang-questions (at) erlang.org
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;________________________________________________________________
&lt;br&gt;erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;erlang-questions (at) erlang.org
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Dialyzer-problem-on-OSX-10.6-%28Erlang-R13B02-1%29-tp26256992p26274245.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26273207</id>
	<title>Re: Re: C Node and {'EXIT', Pid, noconnection} in  Erlang</title>
	<published>2009-11-09T12:31:14Z</published>
	<updated>2009-11-09T12:31:14Z</updated>
	<author>
		<name>Torben Hoffmann-2</name>
	</author>
	<content type="html">Hi Max,
&lt;br&gt;&lt;br&gt;I am doing some investigations into ports and nodes and ran across your
&lt;br&gt;thread here which nobody seems to have answered, so I will venture a guess.
&lt;br&gt;&lt;br&gt;noconnection means that there is no connection to the node and since you are
&lt;br&gt;linking (in the original code) this will cause an EXIT signal with reason
&lt;br&gt;noconnection.
&lt;br&gt;&lt;br&gt;So your ObjC node is probably not running in the eyes of the Erlang node.
&lt;br&gt;Why? Hard for me to see, but this is how I would interpret the error
&lt;br&gt;messages, perhaps others can shed some more light on what could cause this
&lt;br&gt;problem.
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;Torben
&lt;br&gt;&lt;br&gt;On Tue, Oct 6, 2009 at 10:43, Max Lapshin &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26273207&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;max.lapshin@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; Problem disappeared when I remove link(NetStream) from erlang code.
&lt;br&gt;&amp;gt; It is strange for me, because no LINK messages haven't been sent to ObjC
&lt;br&gt;&amp;gt; node
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ________________________________________________________________
&lt;br&gt;&amp;gt; erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;&amp;gt; erlang-questions (at) erlang.org
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.linkedin.com/in/torbenhoffmann&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linkedin.com/in/torbenhoffmann&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/C-Node-and-%7B%27EXIT%27%2C-Pid%2C-noconnection%7D-in-Erlang-tp25762870p26273207.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26271203</id>
	<title>Re: Why Beam.smp crashes when memory is over?</title>
	<published>2009-11-09T09:42:39Z</published>
	<updated>2009-11-09T09:42:39Z</updated>
	<author>
		<name>Jayson Vantuyl-2</name>
	</author>
	<content type="html">The problem is that there is no way for the VM to really know which &amp;nbsp;
&lt;br&gt;process is leaking. &amp;nbsp;The Linux OOM-killer has gone through a bunch of &amp;nbsp;
&lt;br&gt;rewrites and it still doesn't always get it right.
&lt;br&gt;&lt;br&gt;It might be possible to have a threshold trigger that would hit some &amp;nbsp;
&lt;br&gt;sort of global alarm that could be application specific. &amp;nbsp;That's &amp;nbsp;
&lt;br&gt;probably the closest you could get though.
&lt;br&gt;&lt;br&gt;On Nov 8, 2009, at 9:08 PM, Max Lapshin wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Look, I have a program, that reads MPEG TS stream from network. There
&lt;br&gt;&amp;gt; is some bug in my code
&lt;br&gt;&amp;gt; and my ts_lander crashes beam. How is it possible to store state of
&lt;br&gt;&amp;gt; external HTTP stream??
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; If Erlang VM wouldn't crash, but only kill the leaking process, I
&lt;br&gt;&amp;gt; could buffer stream in other process and feed
&lt;br&gt;&amp;gt; new mpeg ts lander after restart. But it is impossible =(
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ________________________________________________________________
&lt;br&gt;&amp;gt; erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;&amp;gt; erlang-questions (at) erlang.org
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Jayson Vantuyl
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26271203&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;kagato@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;________________________________________________________________
&lt;br&gt;erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;erlang-questions (at) erlang.org
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Why-Beam.smp-crashes-when-memory-is-over--tp26257892p26271203.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26271159</id>
	<title>Re: Why Beam.smp crashes when memory is over?</title>
	<published>2009-11-09T09:40:55Z</published>
	<updated>2009-11-09T09:40:55Z</updated>
	<author>
		<name>Jayson Vantuyl-2</name>
	</author>
	<content type="html">You could run two Erlang VMs (thus, keeping the HTTP connection and &amp;nbsp;
&lt;br&gt;its state separate). &amp;nbsp;Then the crasher wouldn't take the other one &amp;nbsp;
&lt;br&gt;down. &amp;nbsp;One with the processing and one with the networking, and have &amp;nbsp;
&lt;br&gt;them communicate via distributed Erlang. &amp;nbsp;You should still ulimit beam &amp;nbsp;
&lt;br&gt;to keep the other one from getting OOM-killed though.
&lt;br&gt;&lt;br&gt;Assuming you can get the throughput you need, this also would &amp;nbsp;
&lt;br&gt;decompose some of the components, which might helps scale horizontally &amp;nbsp;
&lt;br&gt;later.
&lt;br&gt;&lt;br&gt;On Nov 8, 2009, at 9:08 PM, Max Lapshin wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Look, I have a program, that reads MPEG TS stream from network. There
&lt;br&gt;&amp;gt; is some bug in my code
&lt;br&gt;&amp;gt; and my ts_lander crashes beam. How is it possible to store state of
&lt;br&gt;&amp;gt; external HTTP stream??
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; If Erlang VM wouldn't crash, but only kill the leaking process, I
&lt;br&gt;&amp;gt; could buffer stream in other process and feed
&lt;br&gt;&amp;gt; new mpeg ts lander after restart. But it is impossible =(
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ________________________________________________________________
&lt;br&gt;&amp;gt; erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;&amp;gt; erlang-questions (at) erlang.org
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;________________________________________________________________
&lt;br&gt;erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;erlang-questions (at) erlang.org
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Why-Beam.smp-crashes-when-memory-is-over--tp26257892p26271159.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26270548</id>
	<title>Re: AW: Why Beam.smp crashes when memory is over?</title>
	<published>2009-11-09T09:38:59Z</published>
	<updated>2009-11-09T09:38:59Z</updated>
	<author>
		<name>Jayson Vantuyl-2</name>
	</author>
	<content type="html">This would be a very useful tunable.
&lt;br&gt;&lt;br&gt;On Nov 9, 2009, at 2:31 AM, Decker, Nils wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hello,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I had a few occasions during developing that a runaway process &amp;nbsp;
&lt;br&gt;&amp;gt; caused my machine to swap and gind to a halt. (i should have used &amp;nbsp;
&lt;br&gt;&amp;gt; ulimit on beam)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I wondered why there is no way to limit the size of a single &amp;nbsp;
&lt;br&gt;&amp;gt; process. It could be a simple option to spawn to limit the heap size &amp;nbsp;
&lt;br&gt;&amp;gt; of a process. (like ulimit)
&lt;br&gt;&amp;gt; The process gets killed if it ever grows beyond the limit. A limit &amp;nbsp;
&lt;br&gt;&amp;gt; for the size of the message queue would be nice too, because a &amp;nbsp;
&lt;br&gt;&amp;gt; process with a few thousand entries is (most of the time) not going &amp;nbsp;
&lt;br&gt;&amp;gt; to cope with it anyway.
&lt;br&gt;&amp;gt; A similar limit for ETS tables would be possible too. A memory limit &amp;nbsp;
&lt;br&gt;&amp;gt; for shared resources (large binaries) would be more difficult.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Nils Decker
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Jayson Vantuyl
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26270548&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;kagato@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;________________________________________________________________
&lt;br&gt;erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;erlang-questions (at) erlang.org
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Why-Beam.smp-crashes-when-memory-is-over--tp26257892p26270548.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26269216</id>
	<title>Re: Why Beam.smp crashes when memory is over?</title>
	<published>2009-11-09T08:21:41Z</published>
	<updated>2009-11-09T08:21:41Z</updated>
	<author>
		<name>Angel Alvarez</name>
	</author>
	<content type="html">&lt;br&gt;El Lunes, 9 de Noviembre de 2009 Tony Rogvall escribió:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi!
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; On 9 nov 2009, at 14.54, Angel Alvarez wrote:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; Well still there are many issues with this new approach
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; Yes! &amp;nbsp;But it does not scare me ;-)
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; Where are the maibox of processes located?
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; With a heap pre process...
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Depends on the implementation. But in general you could do something &amp;nbsp;
&lt;br&gt;&amp;gt; like, If the the data is shared then
&lt;br&gt;&amp;gt; you split the share (memory_size/ref_count). If the data is copied &amp;nbsp;
&lt;br&gt;&amp;gt; then you must count it in.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Couldnt you trigger a memory exception on a remote process by just &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; sending one message
&lt;br&gt;&amp;gt; &amp;gt; when the process is almost consuming its reserved memory?
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; Yes. But that is the point. If it pass the limit the process will die.
&lt;br&gt;&amp;gt; There are many special cases where you could think of using the memory &amp;nbsp;
&lt;br&gt;&amp;gt; in a better and more optimal way.
&lt;br&gt;&amp;gt; Lets say you are reaching the memory limit you may switch to a &amp;nbsp;
&lt;br&gt;&amp;gt; compression algorithm for heap memory !?
&lt;br&gt;&amp;gt; But lets keep it simple for the prototype, and see if it useful.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; Systems other than embedded erlangs deploy ( form de current erlang &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; movement as a server/desktop plataform)
&lt;br&gt;&amp;gt; &amp;gt; will suffer from resource contention beetween erlang VM and other OS &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; processes.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Port programs also need system resources...
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; For loadable drivers using driver_alloc, one could possibly do &amp;nbsp;
&lt;br&gt;&amp;gt; something, otherwise it will be
&lt;br&gt;&amp;gt; up to the driver designer to handle it. There is a max_ports in the &amp;nbsp;
&lt;br&gt;&amp;gt; prototype that limits number of
&lt;br&gt;&amp;gt; open_ports. If sockets/files are mapped to single ports then it may &amp;nbsp;
&lt;br&gt;&amp;gt; help a bit.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; Well in the end your approach is still very interesting as a &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; framework for continous erlang VM innovations...
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; Thanks.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; but please correct me if im wrong but I saw that memory carriers &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; allowed to set several options on erlang VM start-up so,
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; I am not sure what you mean here?
&lt;/div&gt;&lt;br&gt;Well some bits can be controlled as you show on spawn_opt. In the other hand i mean that VM Safe memory
&lt;br&gt;as stated by others (Andrew, Tom ...) should be controlled on memory carriers: ( erts_alloc(3) )
&lt;br&gt;&lt;br&gt;In esence
&lt;br&gt;&lt;br&gt;- A new emergency memory alocator in the alloc_util framework just in case the VM need memory to recover from a OOM.
&lt;br&gt;&lt;br&gt;or perhaps
&lt;br&gt;&lt;br&gt;&amp;lt;WARNING speculative mode ON&amp;gt;
&lt;br&gt;&lt;br&gt;- Using the segment allocator on mmap supported arquitectures to allow fast recovery for the full erlang vm (sort of checkpointing)
&lt;br&gt;using a special BIF you could instruct memory carriers to checkpoint the entire VM usining this allocator just in case the VM crashes.
&lt;br&gt;so on next run the enrire VM can be recovered parsing the last checkpint
&lt;br&gt;&lt;br&gt;&amp;lt;/WARNING&amp;gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;Still i think is better and more clean having two o more instances that bulletprooffing the VM
&lt;br&gt;&lt;br&gt;/Angel 
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; /Tony
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; is stil posible to pacth those carriers to allow a safe memory &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; reservation to let de VM manage properly a memory full
&lt;br&gt;&amp;gt; &amp;gt; condition by killing the offending process (sort of a OOM killer for &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; the VM)?
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Just telling the VM not to &amp;quot;kill system process&amp;quot; and let the &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; supervisors do the work...
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; /Angel
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; El Lunes, 9 de Noviembre de 2009 Tony Rogvall escribió:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; It is still the same &amp;quot;let it crash&amp;quot; concept using the resource limit
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; system I am designing.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; But you can limit the crash in a more controlled way. Also you will &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; be
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; able to report
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; interesting information about what is crashing and when.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; There is sometimes an issue when big systems crash. The restart may
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; take a lot of time.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Nodes must be synchronised, database tables must be repaired etc etc.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; I guess you can design this to be light and easy, but it is not &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; always
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; the case.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; /Tony
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; On 9 nov 2009, at 12.43, Angel Alvarez wrote:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; Well please let me say something
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; I'm plain new but some things are pretty clear for me.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; The beauty of the erlang concept is &amp;quot;let it crash&amp;quot; , &amp;quot;don't program
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; defensively&amp;quot;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; so the VM and the underlaying hardware are entities that can fail,
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; that's it.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; What's the problem so?
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; Joe said...
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; If you want failure tolerance you need at least two nodes...
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; From J.A thesis
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; &amp;nbsp;&amp;quot; ...Schneider [60, 59] answered this question by giving three
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; properties
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; that he thought a hardware system should have in order to be
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; suitable for
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; programming a fault-tolerant system. These properties Schneider
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; called:...&amp;quot;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; 1. Halt on failure — in the event of an error a processor should &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; halt
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; instead of performing a possibly erroneous operation.2
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; So on memory exhaustation the VM has to die and other node (erlang)
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; will do the recovery.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; that's the distrirbution role, no only to span computations over
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; several nodes to enhance performance
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; but to provide resilence in the presence of fatal errors (non
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; correctable).
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; As a OS process the VM has to compete with other OS processes so in
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; a shared deployment (a VM running
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; on a server or a desktop) you cant be safe agaisnt a OOM trigered by
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; other entities.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; Such resource control thing wil only augment process overhead and
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; context switching in the VM.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; People new to erlang will be atracted to this hierarquical
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; decomposition of tasks as joe stated in his thesis
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; &amp;quot;If you cant run certaing task try doing something simpler&amp;quot;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; Many languages and VM's are incorporating erlang's good &amp;quot;multicore&amp;quot;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; features but not the erlang powerfull error handling concept
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; and you guys want to kill the simpliticy incorporating many
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; defensive capabilities to avoid fatality instead of just organize
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; code to
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; handle such fatality.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; ¿whats next?, &amp;nbsp;¿A mailbox maximum message queue control?
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; Well, that's all i have to say about that, Forrest Gump.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; El Lunes, 9 de Noviembre de 2009 09:45:10 Tony Rogvall escribió:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; Interesting discussion!
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; I have been working on a resource system for Erlang for nearly two
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; years now.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; I have a working (tm) prototype where you can set resource limits
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; like
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; max_processes/max_ports/max_memory/max_time/max_reductions ...
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; The limits are passed with spawn_opt and are inherited by the
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; processes spawned.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; This means that if you spawn_opt(M,F,A[{max_memory, 1024*1024}]) &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; the
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; process
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; will be able to use 1M words for it self and it's &amp;quot;subprocesses&amp;quot;.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; This
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; also means
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; that the spawner will get 1M less to use (as designed right now).
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; If a
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; resource limit
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; is reached the process crash with system_limt reason.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; There are still some details to work out before a release, but I &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; will
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; try to get it ready before
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; end of this year.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; /Tony
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; On 9 nov 2009, at 09.16, Robert Virding wrote:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; No.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; There is a major difference between handling OOM in an OS and in &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; the
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; BEAM.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; In an OS it usually at a per process level that memory runs out so
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; it is
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; easy to decide which process to kill so that the OS can &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; continue. In
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; the
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; BEAM, however, it is the VM as a whole which has run out of memory
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; not a
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; specific, it is. therefore, much more difficult to work out which
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; process is
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; the culprit and to decide what to do. For example it might be that
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; the
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; process which causes the OOM is not the actual problem process, it
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; might
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; just the last straw. Or the actual cause may that the whole app
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; might be
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; generating large binaries too quickly. Or it might be that the &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; whole
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; app is
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; spawning to many processes without any one process being the &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; cause.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Or ...
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; In all these cases killing the process which triggered the OOM &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; would
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; be the
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Wrong Thing. We found that it was difficult to work out a &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; reasonable
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; strategy to handle the actual cause so we decided not handle it.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;quot;Don't catch an error which you can't handle&amp;quot; as the bard put it.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Robert
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 2009/11/9 Max Lapshin &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26269216&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;max.lapshin@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Yes, there are techniques to write watchdogs, but my question
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; was: is
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; it possible to prevent Erlang VM from crash?
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ________________________________________________________________
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; erlang-questions (at) erlang.org
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; ________________________________________________________________
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; erlang-questions (at) erlang.org
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; Este correo no tiene dibujos. Las formas extrañas en la pantalla son
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; letras.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; __________________________________________
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; Clist UAH a.k.a Angel
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; __________________________________________
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; Warning: Microsoft_bribery.ISO contains OOXML code.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; ________________________________________________________________
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; erlang-questions (at) erlang.org
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; -- 
&lt;br&gt;&amp;gt; &amp;gt; No imprima este correo si no es necesario. El medio ambiente está en &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; nuestras manos.
&lt;br&gt;&amp;gt; &amp;gt; __________________________________________
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Clist UAH a.k.a Angel
&lt;br&gt;&amp;gt; &amp;gt; __________________________________________
&lt;br&gt;&amp;gt; &amp;gt; China 'limpia' el Tibet para las Olimpiadas.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Este correo no tiene dibujos. Las formas extrañas en la pantalla son letras.
&lt;br&gt;__________________________________________
&lt;br&gt;&lt;br&gt;Clist UAH a.k.a Angel
&lt;br&gt;__________________________________________
&lt;br&gt;Artista -- (internet) --&amp;gt; Usuario final. Así los artistas cobran más y dicen menos paridas sobre lo que creen que es la piratería.
&lt;br&gt;&lt;br&gt;________________________________________________________________
&lt;br&gt;erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;erlang-questions (at) erlang.org
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Why-Beam.smp-crashes-when-memory-is-over--tp26257892p26269216.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26267513</id>
	<title>Re: Why Beam.smp crashes when memory is over?</title>
	<published>2009-11-09T06:38:02Z</published>
	<updated>2009-11-09T06:38:02Z</updated>
	<author>
		<name>Tony Rogvall-2</name>
	</author>
	<content type="html">Hi!
&lt;br&gt;&lt;br&gt;On 9 nov 2009, at 14.54, Angel Alvarez wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; Well still there are many issues with this new approach
&lt;br&gt;&amp;gt;
&lt;br&gt;Yes! &amp;nbsp;But it does not scare me ;-)
&lt;br&gt;&lt;br&gt;&amp;gt; Where are the maibox of processes located?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; With a heap pre process...
&lt;br&gt;&lt;br&gt;Depends on the implementation. But in general you could do something &amp;nbsp;
&lt;br&gt;like, If the the data is shared then
&lt;br&gt;you split the share (memory_size/ref_count). If the data is copied &amp;nbsp;
&lt;br&gt;then you must count it in.
&lt;br&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Couldnt you trigger a memory exception on a remote process by just &amp;nbsp;
&lt;br&gt;&amp;gt; sending one message
&lt;br&gt;&amp;gt; when the process is almost consuming its reserved memory?
&lt;br&gt;&amp;gt;
&lt;br&gt;Yes. But that is the point. If it pass the limit the process will die.
&lt;br&gt;There are many special cases where you could think of using the memory &amp;nbsp;
&lt;br&gt;in a better and more optimal way.
&lt;br&gt;Lets say you are reaching the memory limit you may switch to a &amp;nbsp;
&lt;br&gt;compression algorithm for heap memory !?
&lt;br&gt;But lets keep it simple for the prototype, and see if it useful.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; Systems other than embedded erlangs deploy ( form de current erlang &amp;nbsp;
&lt;br&gt;&amp;gt; movement as a server/desktop plataform)
&lt;br&gt;&amp;gt; will suffer from resource contention beetween erlang VM and other OS &amp;nbsp;
&lt;br&gt;&amp;gt; processes.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Port programs also need system resources...
&lt;br&gt;&amp;gt;
&lt;br&gt;For loadable drivers using driver_alloc, one could possibly do &amp;nbsp;
&lt;br&gt;something, otherwise it will be
&lt;br&gt;up to the driver designer to handle it. There is a max_ports in the &amp;nbsp;
&lt;br&gt;prototype that limits number of
&lt;br&gt;open_ports. If sockets/files are mapped to single ports then it may &amp;nbsp;
&lt;br&gt;help a bit.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; Well in the end your approach is still very interesting as a &amp;nbsp;
&lt;br&gt;&amp;gt; framework for continous erlang VM innovations...
&lt;br&gt;&amp;gt;
&lt;br&gt;Thanks.
&lt;br&gt;&lt;br&gt;&amp;gt; but please correct me if im wrong but I saw that memory carriers &amp;nbsp;
&lt;br&gt;&amp;gt; allowed to set several options on erlang VM start-up so,
&lt;br&gt;&amp;gt;
&lt;br&gt;I am not sure what you mean here?
&lt;br&gt;&lt;br&gt;/Tony
&lt;br&gt;&lt;br&gt;&amp;gt; is stil posible to pacth those carriers to allow a safe memory &amp;nbsp;
&lt;br&gt;&amp;gt; reservation to let de VM manage properly a memory full
&lt;br&gt;&amp;gt; condition by killing the offending process (sort of a OOM killer for &amp;nbsp;
&lt;br&gt;&amp;gt; the VM)?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Just telling the VM not to &amp;quot;kill system process&amp;quot; and let the &amp;nbsp;
&lt;br&gt;&amp;gt; supervisors do the work...
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; /Angel
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; El Lunes, 9 de Noviembre de 2009 Tony Rogvall escribió:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; It is still the same &amp;quot;let it crash&amp;quot; concept using the resource limit
&lt;br&gt;&amp;gt;&amp;gt; system I am designing.
&lt;br&gt;&amp;gt;&amp;gt; But you can limit the crash in a more controlled way. Also you will &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; be
&lt;br&gt;&amp;gt;&amp;gt; able to report
&lt;br&gt;&amp;gt;&amp;gt; interesting information about what is crashing and when.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; There is sometimes an issue when big systems crash. The restart may
&lt;br&gt;&amp;gt;&amp;gt; take a lot of time.
&lt;br&gt;&amp;gt;&amp;gt; Nodes must be synchronised, database tables must be repaired etc etc.
&lt;br&gt;&amp;gt;&amp;gt; I guess you can design this to be light and easy, but it is not &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; always
&lt;br&gt;&amp;gt;&amp;gt; the case.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; /Tony
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; On 9 nov 2009, at 12.43, Angel Alvarez wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Well please let me say something
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I'm plain new but some things are pretty clear for me.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; The beauty of the erlang concept is &amp;quot;let it crash&amp;quot; , &amp;quot;don't program
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; defensively&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; so the VM and the underlaying hardware are entities that can fail,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; that's it.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; What's the problem so?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Joe said...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; If you want failure tolerance you need at least two nodes...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; From J.A thesis
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp;&amp;quot; ...Schneider [60, 59] answered this question by giving three
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; properties
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; that he thought a hardware system should have in order to be
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; suitable for
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; programming a fault-tolerant system. These properties Schneider
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; called:...&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; 1. Halt on failure — in the event of an error a processor should &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; halt
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; instead of performing a possibly erroneous operation.2
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; So on memory exhaustation the VM has to die and other node (erlang)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; will do the recovery.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; that's the distrirbution role, no only to span computations over
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; several nodes to enhance performance
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; but to provide resilence in the presence of fatal errors (non
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; correctable).
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; As a OS process the VM has to compete with other OS processes so in
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; a shared deployment (a VM running
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; on a server or a desktop) you cant be safe agaisnt a OOM trigered by
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; other entities.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Such resource control thing wil only augment process overhead and
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; context switching in the VM.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; People new to erlang will be atracted to this hierarquical
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; decomposition of tasks as joe stated in his thesis
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;quot;If you cant run certaing task try doing something simpler&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Many languages and VM's are incorporating erlang's good &amp;quot;multicore&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; features but not the erlang powerfull error handling concept
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; and you guys want to kill the simpliticy incorporating many
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; defensive capabilities to avoid fatality instead of just organize
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; code to
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; handle such fatality.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; ¿whats next?, &amp;nbsp;¿A mailbox maximum message queue control?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Well, that's all i have to say about that, Forrest Gump.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; El Lunes, 9 de Noviembre de 2009 09:45:10 Tony Rogvall escribió:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Interesting discussion!
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I have been working on a resource system for Erlang for nearly two
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; years now.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I have a working (tm) prototype where you can set resource limits
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; like
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; max_processes/max_ports/max_memory/max_time/max_reductions ...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; The limits are passed with spawn_opt and are inherited by the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; processes spawned.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; This means that if you spawn_opt(M,F,A[{max_memory, 1024*1024}]) &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; process
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; will be able to use 1M words for it self and it's &amp;quot;subprocesses&amp;quot;.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; This
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; also means
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; that the spawner will get 1M less to use (as designed right now).
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; If a
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; resource limit
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; is reached the process crash with system_limt reason.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; There are still some details to work out before a release, but I &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; will
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; try to get it ready before
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; end of this year.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; /Tony
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; On 9 nov 2009, at 09.16, Robert Virding wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; No.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; There is a major difference between handling OOM in an OS and in &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; BEAM.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; In an OS it usually at a per process level that memory runs out so
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; it is
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; easy to decide which process to kill so that the OS can &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; continue. In
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; BEAM, however, it is the VM as a whole which has run out of memory
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; not a
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; specific, it is. therefore, much more difficult to work out which
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; process is
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; the culprit and to decide what to do. For example it might be that
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; process which causes the OOM is not the actual problem process, it
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; might
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; just the last straw. Or the actual cause may that the whole app
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; might be
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; generating large binaries too quickly. Or it might be that the &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; whole
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; app is
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; spawning to many processes without any one process being the &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; cause.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Or ...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; In all these cases killing the process which triggered the OOM &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; would
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; be the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Wrong Thing. We found that it was difficult to work out a &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; reasonable
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; strategy to handle the actual cause so we decided not handle it.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;quot;Don't catch an error which you can't handle&amp;quot; as the bard put it.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Robert
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 2009/11/9 Max Lapshin &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26267513&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;max.lapshin@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Yes, there are techniques to write watchdogs, but my question
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; was: is
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; it possible to prevent Erlang VM from crash?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ________________________________________________________________
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; erlang-questions (at) erlang.org
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ________________________________________________________________
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; erlang-questions (at) erlang.org
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Este correo no tiene dibujos. Las formas extrañas en la pantalla son
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; letras.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; __________________________________________
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Clist UAH a.k.a Angel
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; __________________________________________
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Warning: Microsoft_bribery.ISO contains OOXML code.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; ________________________________________________________________
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; erlang-questions (at) erlang.org
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; -- 
&lt;br&gt;&amp;gt; No imprima este correo si no es necesario. El medio ambiente está en &amp;nbsp;
&lt;br&gt;&amp;gt; nuestras manos.
&lt;br&gt;&amp;gt; __________________________________________
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Clist UAH a.k.a Angel
&lt;br&gt;&amp;gt; __________________________________________
&lt;br&gt;&amp;gt; China 'limpia' el Tibet para las Olimpiadas.
&lt;/div&gt;&lt;br&gt;&lt;br&gt;________________________________________________________________
&lt;br&gt;erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;erlang-questions (at) erlang.org
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Why-Beam.smp-crashes-when-memory-is-over--tp26257892p26267513.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26266807</id>
	<title>Re: Why Beam.smp crashes when memory is over?</title>
	<published>2009-11-09T05:54:10Z</published>
	<updated>2009-11-09T05:54:10Z</updated>
	<author>
		<name>Angel Alvarez</name>
	</author>
	<content type="html">Well still there are many issues with this new approach
&lt;br&gt;&lt;br&gt;Where are the maibox of processes located? 
&lt;br&gt;&lt;br&gt;With a heap pre process...
&lt;br&gt;&lt;br&gt;&amp;nbsp;Couldnt you trigger a memory exception on a remote process by just sending one message
&lt;br&gt;when the process is almost consuming its reserved memory?
&lt;br&gt;&lt;br&gt;Systems other than embedded erlangs deploy ( form de current erlang movement as a server/desktop plataform)
&lt;br&gt;will suffer from resource contention beetween erlang VM and other OS processes. 
&lt;br&gt;&lt;br&gt;Port programs also need system resources...
&lt;br&gt;&lt;br&gt;Well in the end your approach is still very interesting as a framework for continous erlang VM innovations...
&lt;br&gt;&lt;br&gt;but please correct me if im wrong but I saw that memory carriers allowed to set several options on erlang VM start-up so, 
&lt;br&gt;&lt;br&gt;is stil posible to pacth those carriers to allow a safe memory reservation to let de VM manage properly a memory full 
&lt;br&gt;condition by killing the offending process (sort of a OOM killer for the VM)?
&lt;br&gt;&lt;br&gt;Just telling the VM not to &amp;quot;kill system process&amp;quot; and let the supervisors do the work...
&lt;br&gt;&lt;br&gt;/Angel
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;El Lunes, 9 de Noviembre de 2009 Tony Rogvall escribió:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; It is still the same &amp;quot;let it crash&amp;quot; concept using the resource limit &amp;nbsp;
&lt;br&gt;&amp;gt; system I am designing.
&lt;br&gt;&amp;gt; But you can limit the crash in a more controlled way. Also you will be &amp;nbsp;
&lt;br&gt;&amp;gt; able to report
&lt;br&gt;&amp;gt; interesting information about what is crashing and when.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; There is sometimes an issue when big systems crash. The restart may &amp;nbsp;
&lt;br&gt;&amp;gt; take a lot of time.
&lt;br&gt;&amp;gt; Nodes must be synchronised, database tables must be repaired etc etc.
&lt;br&gt;&amp;gt; I guess you can design this to be light and easy, but it is not always &amp;nbsp;
&lt;br&gt;&amp;gt; the case.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; /Tony
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; On 9 nov 2009, at 12.43, Angel Alvarez wrote:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Well please let me say something
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; I'm plain new but some things are pretty clear for me.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; The beauty of the erlang concept is &amp;quot;let it crash&amp;quot; , &amp;quot;don't program &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; defensively&amp;quot;
&lt;br&gt;&amp;gt; &amp;gt; so the VM and the underlaying hardware are entities that can fail, &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; that's it.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; What's the problem so?
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Joe said...
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; If you want failure tolerance you need at least two nodes...
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; From J.A thesis
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;quot; ...Schneider [60, 59] answered this question by giving three &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; properties
&lt;br&gt;&amp;gt; &amp;gt; that he thought a hardware system should have in order to be &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; suitable for
&lt;br&gt;&amp;gt; &amp;gt; programming a fault-tolerant system. These properties Schneider &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; called:...&amp;quot;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; 1. Halt on failure — in the event of an error a processor should halt
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;instead of performing a possibly erroneous operation.2
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; So on memory exhaustation the VM has to die and other node (erlang) &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; will do the recovery.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; that's the distrirbution role, no only to span computations over &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; several nodes to enhance performance
&lt;br&gt;&amp;gt; &amp;gt; but to provide resilence in the presence of fatal errors (non &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; correctable).
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; As a OS process the VM has to compete with other OS processes so in &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; a shared deployment (a VM running
&lt;br&gt;&amp;gt; &amp;gt; on a server or a desktop) you cant be safe agaisnt a OOM trigered by &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; other entities.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Such resource control thing wil only augment process overhead and &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; context switching in the VM.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; People new to erlang will be atracted to this hierarquical &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; decomposition of tasks as joe stated in his thesis
&lt;br&gt;&amp;gt; &amp;gt; &amp;quot;If you cant run certaing task try doing something simpler&amp;quot;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Many languages and VM's are incorporating erlang's good &amp;quot;multicore&amp;quot; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; features but not the erlang powerfull error handling concept
&lt;br&gt;&amp;gt; &amp;gt; and you guys want to kill the simpliticy incorporating many &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; defensive capabilities to avoid fatality instead of just organize &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; code to
&lt;br&gt;&amp;gt; &amp;gt; handle such fatality.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; ¿whats next?, &amp;nbsp;¿A mailbox maximum message queue control?
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Well, that's all i have to say about that, Forrest Gump.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; El Lunes, 9 de Noviembre de 2009 09:45:10 Tony Rogvall escribió:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Interesting discussion!
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; I have been working on a resource system for Erlang for nearly two
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; years now.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; I have a working (tm) prototype where you can set resource limits &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; like
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; max_processes/max_ports/max_memory/max_time/max_reductions ...
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; The limits are passed with spawn_opt and are inherited by the
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; processes spawned.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; This means that if you spawn_opt(M,F,A[{max_memory, 1024*1024}]) the
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; process
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; will be able to use 1M words for it self and it's &amp;quot;subprocesses&amp;quot;. &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; This
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; also means
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; that the spawner will get 1M less to use (as designed right now). &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; If a
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; resource limit
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; is reached the process crash with system_limt reason.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; There are still some details to work out before a release, but I will
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; try to get it ready before
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; end of this year.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; /Tony
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; On 9 nov 2009, at 09.16, Robert Virding wrote:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; No.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; There is a major difference between handling OOM in an OS and in the
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; BEAM.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; In an OS it usually at a per process level that memory runs out so
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; it is
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; easy to decide which process to kill so that the OS can continue. In
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; the
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; BEAM, however, it is the VM as a whole which has run out of memory
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; not a
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; specific, it is. therefore, much more difficult to work out which
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; process is
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; the culprit and to decide what to do. For example it might be that &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; the
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; process which causes the OOM is not the actual problem process, it
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; might
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; just the last straw. Or the actual cause may that the whole app
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; might be
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; generating large binaries too quickly. Or it might be that the whole
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; app is
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; spawning to many processes without any one process being the cause.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; Or ...
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; In all these cases killing the process which triggered the OOM would
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; be the
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; Wrong Thing. We found that it was difficult to work out a reasonable
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; strategy to handle the actual cause so we decided not handle it.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; &amp;quot;Don't catch an error which you can't handle&amp;quot; as the bard put it.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; Robert
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; 2009/11/9 Max Lapshin &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26266807&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;max.lapshin@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; Yes, there are techniques to write watchdogs, but my question &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; was: is
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; it possible to prevent Erlang VM from crash?
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; ________________________________________________________________
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; erlang-questions (at) erlang.org
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; ________________________________________________________________
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; erlang-questions (at) erlang.org
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Este correo no tiene dibujos. Las formas extrañas en la pantalla son &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; letras.
&lt;br&gt;&amp;gt; &amp;gt; __________________________________________
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Clist UAH a.k.a Angel
&lt;br&gt;&amp;gt; &amp;gt; __________________________________________
&lt;br&gt;&amp;gt; &amp;gt; Warning: Microsoft_bribery.ISO contains OOXML code.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; ________________________________________________________________
&lt;br&gt;&amp;gt; &amp;gt; erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt; erlang-questions (at) erlang.org
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;No imprima este correo si no es necesario. El medio ambiente está en nuestras manos.
&lt;br&gt;__________________________________________
&lt;br&gt;&lt;br&gt;Clist UAH a.k.a Angel
&lt;br&gt;__________________________________________
&lt;br&gt;China 'limpia' el Tibet para las Olimpiadas.
&lt;br&gt;&lt;br&gt;________________________________________________________________
&lt;br&gt;erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;erlang-questions (at) erlang.org
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Why-Beam.smp-crashes-when-memory-is-over--tp26257892p26266807.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26267321</id>
	<title>Re: Why Beam.smp crashes when memory is over?</title>
	<published>2009-11-09T05:25:09Z</published>
	<updated>2009-11-09T05:25:09Z</updated>
	<author>
		<name>Thomas Lindgren</name>
	</author>
	<content type="html">&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;----- Original Message ----
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; From: Andrew Thompson &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26267321&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;andrew@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; ... it'd be nice to have an
&lt;br&gt;&amp;gt; alternative in cases where nuking the VM and having to recover or simply
&lt;br&gt;&amp;gt; discard a lot of state is unpleasant.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; In an ideal world I'd like to see an *optional* OOM behaviour similar to
&lt;br&gt;&amp;gt; the following:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; On startup, the VM pre-allocates enough memory to be able to attempt OOM
&lt;br&gt;&amp;gt; recovery without additional malloc calls. If and when an OOM condition
&lt;br&gt;&amp;gt; is detected, freeze the VM, iterate the process list and simply
&lt;br&gt;&amp;gt; exit(FatPid, oom) the process with the most memory allocated (obviously
&lt;br&gt;&amp;gt; this strategy is full of holes, epecially with regard to off-heap
&lt;br&gt;&amp;gt; binaries), but *sometimes* it's better than just blowing away the whole
&lt;br&gt;&amp;gt; thing. Then, if the malloc fails again, revert to the current behaviour.
&lt;/div&gt;&lt;br&gt;&lt;br&gt;Another way of doing that might be to hand the decision to (a modified version of) the supervisor hierarchy (if any). The supervisor could get info on sibling priority (if any) and/or memory usage as part of the request perhaps. Restart up the supervisor hierarchy to suit. That might give more structure to the restarting.
&lt;br&gt;&lt;br&gt;Or you could do the OOM-killing in distributed erlang + unix instead. Run the buggy, memory-hungry stuff in a separate VM with a memory limit on the process, and manage the work from a &amp;quot;supervisor VM&amp;quot; using monitoring and rpc. Not quite as elegant, of course.
&lt;br&gt;&lt;br&gt;Best,
&lt;br&gt;Thomas
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&lt;br&gt;________________________________________________________________
&lt;br&gt;erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;erlang-questions (at) erlang.org
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Why-Beam.smp-crashes-when-memory-is-over--tp26257892p26267321.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26266198</id>
	<title>Re: Why Beam.smp crashes when memory is over?</title>
	<published>2009-11-09T05:11:34Z</published>
	<updated>2009-11-09T05:11:34Z</updated>
	<author>
		<name>Tony Rogvall-2</name>
	</author>
	<content type="html">&lt;br&gt;It is still the same &amp;quot;let it crash&amp;quot; concept using the resource limit &amp;nbsp;
&lt;br&gt;system I am designing.
&lt;br&gt;But you can limit the crash in a more controlled way. Also you will be &amp;nbsp;
&lt;br&gt;able to report
&lt;br&gt;interesting information about what is crashing and when.
&lt;br&gt;&lt;br&gt;There is sometimes an issue when big systems crash. The restart may &amp;nbsp;
&lt;br&gt;take a lot of time.
&lt;br&gt;Nodes must be synchronised, database tables must be repaired etc etc.
&lt;br&gt;I guess you can design this to be light and easy, but it is not always &amp;nbsp;
&lt;br&gt;the case.
&lt;br&gt;&lt;br&gt;/Tony
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;On 9 nov 2009, at 12.43, Angel Alvarez wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Well please let me say something
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I'm plain new but some things are pretty clear for me.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The beauty of the erlang concept is &amp;quot;let it crash&amp;quot; , &amp;quot;don't program &amp;nbsp;
&lt;br&gt;&amp;gt; defensively&amp;quot;
&lt;br&gt;&amp;gt; so the VM and the underlaying hardware are entities that can fail, &amp;nbsp;
&lt;br&gt;&amp;gt; that's it.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; What's the problem so?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Joe said...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; If you want failure tolerance you need at least two nodes...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; From J.A thesis
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;quot; ...Schneider [60, 59] answered this question by giving three &amp;nbsp;
&lt;br&gt;&amp;gt; properties
&lt;br&gt;&amp;gt; that he thought a hardware system should have in order to be &amp;nbsp;
&lt;br&gt;&amp;gt; suitable for
&lt;br&gt;&amp;gt; programming a fault-tolerant system. These properties Schneider &amp;nbsp;
&lt;br&gt;&amp;gt; called:...&amp;quot;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; 1. Halt on failure — in the event of an error a processor should halt
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;instead of performing a possibly erroneous operation.2
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; So on memory exhaustation the VM has to die and other node (erlang) &amp;nbsp;
&lt;br&gt;&amp;gt; will do the recovery.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; that's the distrirbution role, no only to span computations over &amp;nbsp;
&lt;br&gt;&amp;gt; several nodes to enhance performance
&lt;br&gt;&amp;gt; but to provide resilence in the presence of fatal errors (non &amp;nbsp;
&lt;br&gt;&amp;gt; correctable).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; As a OS process the VM has to compete with other OS processes so in &amp;nbsp;
&lt;br&gt;&amp;gt; a shared deployment (a VM running
&lt;br&gt;&amp;gt; on a server or a desktop) you cant be safe agaisnt a OOM trigered by &amp;nbsp;
&lt;br&gt;&amp;gt; other entities.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Such resource control thing wil only augment process overhead and &amp;nbsp;
&lt;br&gt;&amp;gt; context switching in the VM.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; People new to erlang will be atracted to this hierarquical &amp;nbsp;
&lt;br&gt;&amp;gt; decomposition of tasks as joe stated in his thesis
&lt;br&gt;&amp;gt; &amp;quot;If you cant run certaing task try doing something simpler&amp;quot;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Many languages and VM's are incorporating erlang's good &amp;quot;multicore&amp;quot; &amp;nbsp;
&lt;br&gt;&amp;gt; features but not the erlang powerfull error handling concept
&lt;br&gt;&amp;gt; and you guys want to kill the simpliticy incorporating many &amp;nbsp;
&lt;br&gt;&amp;gt; defensive capabilities to avoid fatality instead of just organize &amp;nbsp;
&lt;br&gt;&amp;gt; code to
&lt;br&gt;&amp;gt; handle such fatality.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ¿whats next?, &amp;nbsp;¿A mailbox maximum message queue control?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Well, that's all i have to say about that, Forrest Gump.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; El Lunes, 9 de Noviembre de 2009 09:45:10 Tony Rogvall escribió:
&lt;br&gt;&amp;gt;&amp;gt; Interesting discussion!
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I have been working on a resource system for Erlang for nearly two
&lt;br&gt;&amp;gt;&amp;gt; years now.
&lt;br&gt;&amp;gt;&amp;gt; I have a working (tm) prototype where you can set resource limits &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; like
&lt;br&gt;&amp;gt;&amp;gt; max_processes/max_ports/max_memory/max_time/max_reductions ...
&lt;br&gt;&amp;gt;&amp;gt; The limits are passed with spawn_opt and are inherited by the
&lt;br&gt;&amp;gt;&amp;gt; processes spawned.
&lt;br&gt;&amp;gt;&amp;gt; This means that if you spawn_opt(M,F,A[{max_memory, 1024*1024}]) the
&lt;br&gt;&amp;gt;&amp;gt; process
&lt;br&gt;&amp;gt;&amp;gt; will be able to use 1M words for it self and it's &amp;quot;subprocesses&amp;quot;. &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; This
&lt;br&gt;&amp;gt;&amp;gt; also means
&lt;br&gt;&amp;gt;&amp;gt; that the spawner will get 1M less to use (as designed right now). &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; If a
&lt;br&gt;&amp;gt;&amp;gt; resource limit
&lt;br&gt;&amp;gt;&amp;gt; is reached the process crash with system_limt reason.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; There are still some details to work out before a release, but I will
&lt;br&gt;&amp;gt;&amp;gt; try to get it ready before
&lt;br&gt;&amp;gt;&amp;gt; end of this year.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; /Tony
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; On 9 nov 2009, at 09.16, Robert Virding wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; No.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; There is a major difference between handling OOM in an OS and in the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; BEAM.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; In an OS it usually at a per process level that memory runs out so
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; it is
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; easy to decide which process to kill so that the OS can continue. In
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; BEAM, however, it is the VM as a whole which has run out of memory
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; not a
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; specific, it is. therefore, much more difficult to work out which
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; process is
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; the culprit and to decide what to do. For example it might be that &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; process which causes the OOM is not the actual problem process, it
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; might
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; just the last straw. Or the actual cause may that the whole app
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; might be
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; generating large binaries too quickly. Or it might be that the whole
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; app is
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; spawning to many processes without any one process being the cause.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Or ...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; In all these cases killing the process which triggered the OOM would
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; be the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Wrong Thing. We found that it was difficult to work out a reasonable
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; strategy to handle the actual cause so we decided not handle it.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;quot;Don't catch an error which you can't handle&amp;quot; as the bard put it.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Robert
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; 2009/11/9 Max Lapshin &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26266198&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;max.lapshin@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Yes, there are techniques to write watchdogs, but my question &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; was: is
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; it possible to prevent Erlang VM from crash?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ________________________________________________________________
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; erlang-questions (at) erlang.org
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ________________________________________________________________
&lt;br&gt;&amp;gt;&amp;gt; erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; erlang-questions (at) erlang.org
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Este correo no tiene dibujos. Las formas extrañas en la pantalla son &amp;nbsp;
&lt;br&gt;&amp;gt; letras.
&lt;br&gt;&amp;gt; __________________________________________
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Clist UAH a.k.a Angel
&lt;br&gt;&amp;gt; __________________________________________
&lt;br&gt;&amp;gt; Warning: Microsoft_bribery.ISO contains OOXML code.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ________________________________________________________________
&lt;br&gt;&amp;gt; erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;&amp;gt; erlang-questions (at) erlang.org
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;________________________________________________________________
&lt;br&gt;erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;erlang-questions (at) erlang.org
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Why-Beam.smp-crashes-when-memory-is-over--tp26257892p26266198.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26265010</id>
	<title>Re: Why Beam.smp crashes when memory is over?</title>
	<published>2009-11-09T03:43:02Z</published>
	<updated>2009-11-09T03:43:02Z</updated>
	<author>
		<name>Angel Alvarez</name>
	</author>
	<content type="html">&lt;br&gt;Well please let me say something
&lt;br&gt;&lt;br&gt;I'm plain new but some things are pretty clear for me.
&lt;br&gt;&lt;br&gt;&lt;br&gt;The beauty of the erlang concept is &amp;quot;let it crash&amp;quot; , &amp;quot;don't program defensively&amp;quot;
&lt;br&gt;so the VM and the underlaying hardware are entities that can fail, that's it.
&lt;br&gt;&lt;br&gt;What's the problem so?
&lt;br&gt;&lt;br&gt;Joe said...
&lt;br&gt;&lt;br&gt;If you want failure tolerance you need at least two nodes...
&lt;br&gt;&lt;br&gt;From J.A thesis
&lt;br&gt;&amp;nbsp; &amp;nbsp;&amp;quot; ...Schneider [60, 59] answered this question by giving three properties
&lt;br&gt;that he thought a hardware system should have in order to be suitable for
&lt;br&gt;programming a fault-tolerant system. These properties Schneider called:...&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp;
&lt;br&gt;1. Halt on failure — in the event of an error a processor should halt
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; instead of performing a possibly erroneous operation.2
&lt;br&gt;&lt;br&gt;So on memory exhaustation the VM has to die and other node (erlang) will do the recovery.
&lt;br&gt;&lt;br&gt;that's the distrirbution role, no only to span computations over several nodes to enhance performance
&lt;br&gt;but to provide resilence in the presence of fatal errors (non correctable).
&lt;br&gt;&lt;br&gt;As a OS process the VM has to compete with other OS processes so in a shared deployment (a VM running 
&lt;br&gt;on a server or a desktop) you cant be safe agaisnt a OOM trigered by other entities.
&lt;br&gt;&lt;br&gt;Such resource control thing wil only augment process overhead and context switching in the VM.
&lt;br&gt;&lt;br&gt;People new to erlang will be atracted to this hierarquical decomposition of tasks as joe stated in his thesis
&lt;br&gt;&amp;quot;If you cant run certaing task try doing something simpler&amp;quot;
&lt;br&gt;&lt;br&gt;Many languages and VM's are incorporating erlang's good &amp;quot;multicore&amp;quot; features but not the erlang powerfull error handling concept
&lt;br&gt;and you guys want to kill the simpliticy incorporating many defensive capabilities to avoid fatality instead of just organize code to 
&lt;br&gt;handle such fatality.
&lt;br&gt;&lt;br&gt;¿whats next?, &amp;nbsp;¿A mailbox maximum message queue control?
&lt;br&gt;&lt;br&gt;&lt;br&gt;Well, that's all i have to say about that, Forrest Gump.
&lt;br&gt;&lt;br&gt;&lt;br&gt;El Lunes, 9 de Noviembre de 2009 09:45:10 Tony Rogvall escribió:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Interesting discussion!
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I have been working on a resource system for Erlang for nearly two &amp;nbsp;
&lt;br&gt;&amp;gt; years now.
&lt;br&gt;&amp;gt; I have a working (tm) prototype where you can set resource limits like
&lt;br&gt;&amp;gt; max_processes/max_ports/max_memory/max_time/max_reductions ...
&lt;br&gt;&amp;gt; The limits are passed with spawn_opt and are inherited by the &amp;nbsp;
&lt;br&gt;&amp;gt; processes spawned.
&lt;br&gt;&amp;gt; This means that if you spawn_opt(M,F,A[{max_memory, 1024*1024}]) the &amp;nbsp;
&lt;br&gt;&amp;gt; process
&lt;br&gt;&amp;gt; will be able to use 1M words for it self and it's &amp;quot;subprocesses&amp;quot;. This &amp;nbsp;
&lt;br&gt;&amp;gt; also means
&lt;br&gt;&amp;gt; that the spawner will get 1M less to use (as designed right now). If a &amp;nbsp;
&lt;br&gt;&amp;gt; resource limit
&lt;br&gt;&amp;gt; is reached the process crash with system_limt reason.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; There are still some details to work out before a release, but I will &amp;nbsp;
&lt;br&gt;&amp;gt; try to get it ready before
&lt;br&gt;&amp;gt; end of this year.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; /Tony
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; On 9 nov 2009, at 09.16, Robert Virding wrote:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; No.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; There is a major difference between handling OOM in an OS and in the &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; BEAM.
&lt;br&gt;&amp;gt; &amp;gt; In an OS it usually at a per process level that memory runs out so &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; it is
&lt;br&gt;&amp;gt; &amp;gt; easy to decide which process to kill so that the OS can continue. In &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; the
&lt;br&gt;&amp;gt; &amp;gt; BEAM, however, it is the VM as a whole which has run out of memory &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; not a
&lt;br&gt;&amp;gt; &amp;gt; specific, it is. therefore, much more difficult to work out which &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; process is
&lt;br&gt;&amp;gt; &amp;gt; the culprit and to decide what to do. For example it might be that the
&lt;br&gt;&amp;gt; &amp;gt; process which causes the OOM is not the actual problem process, it &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; might
&lt;br&gt;&amp;gt; &amp;gt; just the last straw. Or the actual cause may that the whole app &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; might be
&lt;br&gt;&amp;gt; &amp;gt; generating large binaries too quickly. Or it might be that the whole &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; app is
&lt;br&gt;&amp;gt; &amp;gt; spawning to many processes without any one process being the cause. &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; Or ...
&lt;br&gt;&amp;gt; &amp;gt; In all these cases killing the process which triggered the OOM would &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; be the
&lt;br&gt;&amp;gt; &amp;gt; Wrong Thing. We found that it was difficult to work out a reasonable
&lt;br&gt;&amp;gt; &amp;gt; strategy to handle the actual cause so we decided not handle it.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;quot;Don't catch an error which you can't handle&amp;quot; as the bard put it.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Robert
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; 2009/11/9 Max Lapshin &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26265010&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;max.lapshin@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Yes, there are techniques to write watchdogs, but my question was: is
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; it possible to prevent Erlang VM from crash?
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; ________________________________________________________________
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; erlang-questions (at) erlang.org
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ________________________________________________________________
&lt;br&gt;&amp;gt; erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;&amp;gt; erlang-questions (at) erlang.org
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;Este correo no tiene dibujos. Las formas extrañas en la pantalla son letras.
&lt;br&gt;__________________________________________
&lt;br&gt;&lt;br&gt;Clist UAH a.k.a Angel
&lt;br&gt;__________________________________________
&lt;br&gt;Warning: Microsoft_bribery.ISO contains OOXML code.
&lt;br&gt;&lt;br&gt;________________________________________________________________
&lt;br&gt;erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;erlang-questions (at) erlang.org
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Why-Beam.smp-crashes-when-memory-is-over--tp26257892p26265010.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26264924</id>
	<title>Re: Dialyzer problem on OSX 10.6 (Erlang R13B02-1)</title>
	<published>2009-11-09T03:35:18Z</published>
	<updated>2009-11-09T03:35:18Z</updated>
	<author>
		<name>Tamas Nagy-3</name>
	</author>
	<content type="html">Hi Tino,
&lt;br&gt;&lt;br&gt;Are you using homebrew?
&lt;br&gt;&lt;br&gt;So far it seems that homebrew applies some c compiler magic (e.g optimizations) when building erlang which somehow borks dialyzer (strange) as compiling from source with the same ./configure options homebrew uses results in an erlang installation which works like a charm.
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;&amp;nbsp; &amp;nbsp; Tamas
&lt;br&gt;----- &amp;quot;Tino Breddin&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26264924&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tino.breddin@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hey Tamas,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Here's the output for the command run on my machine (Macbook Pro Core 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Duo, running OSX 10.6.1 32-bit):
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; dialyzer --build_plt -r /usr/local/Cellar/erlang/R13B02-1/lib/erlang/
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; lib/erts-5.7.3/ebin/ /usr/local/Cellar/erlang/R13B02-1/lib/erlang/lib/
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; kernel-2.13.3/ebin/ /usr/local/Cellar/erlang/R13B02-1/lib/erlang/lib/
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; stdlib-1.16.3/ebin/
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;Creating PLT /Users/tino/.dialyzer_plt ...
&lt;br&gt;&amp;gt; Unknown functions:
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;compile:file/2
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;compile:forms/2
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;compile:noenv_forms/2
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;compile:output_generated/1
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;crypto:des3_cbc_decrypt/5
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;crypto:start/0
&lt;br&gt;&amp;gt; &amp;nbsp; done in 46m22.52s
&lt;br&gt;&amp;gt; done (passed successfully)
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Apparently it takes some time to complete but you'll get there.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Cheers,
&lt;br&gt;&amp;gt; Tino
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; On Nov 8, 2009, at 11:35 PM, Tamas Nagy wrote:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; Hi Kostis,
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; This is what all I get:
&lt;br&gt;&amp;gt; &amp;gt; $ dialyzer --build_plt -r /usr/local/Cellar/erlang/R13B02-1/lib/ 
&lt;br&gt;&amp;gt; &amp;gt; erlang/lib/erts-5.7.3/ebin/ /usr/local/Cellar/erlang/R13B02-1/lib/ 
&lt;br&gt;&amp;gt; &amp;gt; erlang/lib/kernel-2.13.3/ebin/
&lt;br&gt;&amp;gt; /usr/local/Cellar/erlang/R13B02-1/lib/ 
&lt;br&gt;&amp;gt; &amp;gt; erlang/lib/stdlib-1.16.3/ebin/
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;Creating PLT /Users/lestat/.dialyzer_plt ...
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; I will try to rebuild erlang with disabling hipe to see if that
&lt;br&gt;&amp;gt; helps.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; I am happy to run some tests/traces you would like to see the &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; results of to help.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Regards,
&lt;br&gt;&amp;gt; &amp;gt; 	Tamas
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Tamas Nagy
&lt;br&gt;&amp;gt; &amp;gt; Erlang Training &amp; Consulting
&lt;br&gt;&amp;gt; &amp;gt; &lt;a href=&quot;http://www.erlang-consulting.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang-consulting.com&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; On 8 Nov 2009, at 19:52, Kostis Sagonas wrote:
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Tamas Nagy wrote:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; Am I the only one who cannot build a plt under OSX 10.6 in &amp;nbsp; 
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; R13B02-1?
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; No matter what applications I specify for the initial plt it just 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; hangs eating processing power but not producing anything.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; Erlang was installed with homebrew, but that shouldn't matter. Or 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; maybe it does. (beam is compiled for 64 bit)
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; Here is the command I used:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; dialyzer --build_plt -r /usr/local/Cellar/erlang/R13B02-1/lib/ 
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; erlang/lib/erts-5.7.3/ebin/ /usr/local/Cellar/erlang/R13B02-1/lib/
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; erlang/lib/kernel-2.13.3/ebin/ /usr/local/Cellar/erlang/R13B02-1/
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; lib/erlang/lib/stdlib-1.16.3/ebin/
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; I gave waiting for it to finish after ~1 hour (on an old type &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; white MacBook (MacBook2,1) with 2GB of RAM).
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; None of the dialyzer developers has access to such a machine to see
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; what's happening. &amp;nbsp;Perhaps somebody else in that list might want to
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; report whether this is reproducible or not.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; However, perhaps the following might help: when building the PLT, 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; do you see a message:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; 	Compiling some key modules to native code...
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; If so, can you disable hipe (64-bit Mac is not a platform we have 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; ever tested due to no access to such a machine) to see whether this
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; may be the culprit?
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Kostis
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; ________________________________________________________________
&lt;br&gt;&amp;gt; &amp;gt; erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt; erlang-questions (at) erlang.org
&lt;br&gt;&amp;gt; &amp;gt;
&lt;/div&gt;&lt;br&gt;-- 
&lt;br&gt;Tamas Nagy
&lt;br&gt;Erlang Training &amp; Consulting
&lt;br&gt;&lt;a href=&quot;http://www.erlang-consulting.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang-consulting.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;________________________________________________________________
&lt;br&gt;erlang-questions mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;&lt;br&gt;erlang-questions (at) erlang.org
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Dialyzer-problem-on-OSX-10.6-%28Erlang-R13B02-1%29-tp26256992p26264924.html" />
</entry>

</feed>
