[erlang-questions] A simple multiply in the shell will kill the shell and its supervisor

Steve Kirsch steve.kirsch@REDACTED
Mon Apr 20 18:21:00 CEST 2009


I don't mind slow. but why is the shell and it's supervisor crashing
when I do this. This sounds like a bug, isn't it?
 
I tried it with commas and you are right. It does compute correctly and
it returns ok.
 
When I do:
C.
it works fine and prints the value.
 
When I do:
D.
erlang almost immediately stops responding to all console input and the
processes are dead so typing does nothing and there is no CPU usage.
 

________________________________

From: Hynek Vychodil [mailto:vychodil.hynek@REDACTED] 
Sent: Monday, April 20, 2009 9:06 AM
To: Steve Kirsch
Cc: erlang-questions@REDACTED
Subject: Re: [erlang-questions] A simple multiply in the shell will kill
the shell and its supervisor


It is not about number of C's. It should compute even
E=D*D*D*D*D*D*D*D*D*D*D*D*D*D,ok. but what I mean that your statements
cause print out each result. (Notice coma instead of dot.) Your terminal
can be slow for printing or there can be issue with erlang io subsystem.
I have tested that in Konsole (KDE on my Linux) I wait several seconds
to print out E but for examle in vim it will be crash reasonably. I
don't know which console werl and erl uses but I think there may be big
difference.


On Mon, Apr 20, 2009 at 5:51 PM, Steve Kirsch <steve.kirsch@REDACTED>
wrote:


	sure, it works with "fewer" C's in the computation. I already
knew that.
	 
	What do you meean a problem with io speed?
	 
	I'm not trying to make this computation, I was only doing it for
fun and was amazed I could crash the shell and its supervisor and nobody
restarted anything doing something as simple as a multiply.
	 
	Why does this happen and why does it happen only with erl and
not werl on the same windows machine?

________________________________

	From: Hynek Vychodil [mailto:vychodil.hynek@REDACTED] 
	Sent: Monday, April 20, 2009 6:15 AM
	To: Steve Kirsch
	Cc: erlang-questions@REDACTED
	Subject: Re: [erlang-questions] A simple multiply in the shell
will kill the shell and its supervisor
	
	
	Try do this:
	B=A*A*A*A*A,C=B*B*B*B*B*B*B*B*B*B*B,D=C*C*C*C*C*C*C*C*C*C*C,ok.
	
	There can be problem is with io speed.
	
	
	On Mon, Apr 20, 2009 at 9:32 AM, Steve Kirsch
<steve.kirsch@REDACTED> wrote:
	

		This only seems to kill erlang's shell permanently using
erl on Windows.
		werl on the same machine works fine.
		
		Startup erl on windows.
		
		type in one line:
	
A=7480957234592457928345982345987234857923589723485728347598245927385724
		852984. B=A*A*A*A*A. C=B*B*B*B*B*B*B*B*B*B*B.
D=C*C*C*C*C*C*C*C*C*C*C.
		
		then your erl will stop responding. It isn't in a loop
and it isn't
		using up cpu or crash dumping.
		
		It is just completely dead.
		
		I've tried this on two completely different PC's running
windows XP Pro
		with the same result. You do it on werl on the same
machine, everything
		is fine. Do it from erl, and it hangs.
		
		i am using R12B.
		
		inspection via a remote shell reveals that these
processes have
		disappeared from i() listing:
		<0.26.0>              supervisor_bridge:user_sup/1
233
		81    0
		                     gen_server:loop/6
9
		
		<0.28.0>              user:server/2
377
		600    0
		user                  user:get_chars/7
21
		
		<0.29.0>              erlang:apply/2
4181
		4649    0
		                     shell:get_command1/5
16
		
		<0.35.0>              erlang:apply/2
1597
		2550    0
		                     shell:eval_loop/3
6
		
		
		why is this happening?
		_______________________________________________
		erlang-questions mailing list
		erlang-questions@REDACTED
		http://www.erlang.org/mailman/listinfo/erlang-questions
		




	-- 
	--Hynek (Pichi) Vychodil
	
	Analyze your data in minutes. Share your insights instantly.
Thrill your boss.  Be a data hero!
	Try Good Data now for free: www.gooddata.com 
	




-- 
--Hynek (Pichi) Vychodil

Analyze your data in minutes. Share your insights instantly. Thrill your
boss.  Be a data hero!
Try Good Data now for free: www.gooddata.com 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20090420/d9c1dc22/attachment.htm>


More information about the erlang-questions mailing list