module reload problem in erl

Zoltan Peter Toth Zoltan.Toth@REDACTED
Wed Jul 16 13:52:02 CEST 2003


Hi,

I've found a problem which happens on Solaris (e.g. version 5.2.3.1) and Linux
(e.g. 5.2.3.3) similarly, described below.
I attached my simple test program, which manages a sorted list.

Do you think this is a bug in the Erlang virtual machine ?

Thanks for any info,
	Zoltan

---------------------------------------------------------------------
Problem: c:c(Module) for the 2nd time kills/loses the existing instance of the process in the erl
shell.
(The same problem exists if I recompile with erlc and load with l(Module).)

Erlang (BEAM) emulator version 5.2.3.1
Compiled on Fri Feb  7 08:42:17 2003

1> sl:start().
true
2> process_info(whereis(listStore)).
[{registered_name,listStore},
   {current_function,{sl,listLoop,1}},
   {initial_call,{sl,listLoop,1}},
   {status,waiting},
   {message_queue_len,0},
   {messages,[]},
   {links,[]},
   {dictionary,[]},
   {trap_exit,false},
   {error_handler,error_handler},
   {priority,normal},
   {group_leader,<0.21.0>},
   {heap_size,233},
   {stack_size,4},
   {reductions,1},
   {garbage_collection,[{fullsweep_after,65535}]}]
4> sl:getList().
getList from <0.29.0>
[]
5> sl:addElem({lali,1}).
insert of lali, 1
{insert,{lali,1}}
6> sl:getList().
getList from <0.29.0>
[{lali,1}]

%% Recompile for the 1st time:

7> c:c(sl).
{ok,sl}

%% Now the process is still alive (and holds the data):

8> process_info(whereis(listStore)).
[{registered_name,listStore},
   {current_function,{sl,listLoop,1}},
   {initial_call,{sl,listLoop,1}},
   {status,waiting},
   {message_queue_len,0},
   {messages,[]},
   {links,[]},
   {dictionary,[]},
   {trap_exit,false},
   {error_handler,error_handler},
   {priority,normal},
   {group_leader,<0.21.0>},
   {heap_size,233},
   {stack_size,4},
   {reductions,60},
   {garbage_collection,[{fullsweep_after,65535}]}]

%% Compile & load again:

9> c:c(sl).
{ok,sl}

%% But now the process has died:

10> process_info(whereis(listStore)).

=ERROR REPORT==== 16-Jul-2003::11:39:06 ===
Error in process <0.29.0> with exit value:
{badarg,[{erlang,process_info,[undefined]},{erl_eval,expr,3},{erl_eval,exprs,4},{shell,eval_loop,2}]}
** exited: {badarg,[{erlang,process_info,[undefined]},
                      {erl_eval,expr,3},
                      {erl_eval,exprs,4},
                      {shell,eval_loop,2}]} **

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: sl.erl
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20030716/c707bb9c/attachment.ksh>


More information about the erlang-bugs mailing list