Tom Ayerst | 4 Jul 22:37
Picon

Trouble with OTP

Hi,

I am running Kevin Smith's Mochiweb OTP example (http://weblog.hypotheticalabs.com/?p=226) but I cannot get it to start.  Could anyone give me some hints on interpreting the error messages?  I am running it on Windows.  I am not very familiar with debugging OTP yet.

Thanks

Tom

$ erl -boot file_server-1

=PROGRESS REPORT==== 4-Jul-2008::20:07:13 ===
          supervisor: {local,sasl_safe_sup}
             started: [{pid,<0.32.0>},
                       {name,alarm_handler},
                       {mfa,{alarm_handler,start_link,[]}},
                       {restart_type,permanent},
                       {shutdown,2000},
                       {child_type,worker}]

=PROGRESS REPORT==== 4-Jul-2008::20:07:13 ===
          supervisor: {local,sasl_safe_sup}
             started: [{pid,<0.33.0>},
                       {name,overload},
                       {mfa,{overload,start_link,[]}},
                       {restart_type,permanent},
                       {shutdown,2000},
                       {child_type,worker}]

=PROGRESS REPORT==== 4-Jul-2008::20:07:13 ===
          supervisor: {local,sasl_sup}
             started: [{pid,<0.31.0>},
                       {name,sasl_safe_sup},
                       {mfa,
                           {supervisor,start_link,
                               [{local,sasl_safe_sup},sasl,safe]}},
                       {restart_type,permanent},
                       {shutdown,infinity},
                       {child_type,supervisor}]

=PROGRESS REPORT==== 4-Jul-2008::20:07:13 ===
          supervisor: {local,sasl_sup}
             started: [{pid,<0.34.0>},
                       {name,release_handler},
                       {mfa,{release_handler,start_link,[]}},
                       {restart_type,permanent},
                       {shutdown,2000},
                       {child_type,worker}]

=PROGRESS REPORT==== 4-Jul-2008::20:07:13 ===
         application: sasl
          started_at: nonode <at> nohost

=PROGRESS REPORT==== 4-Jul-2008::20:07:13 ===
         application: sasl
          started_at: nonode <at> nohost

=CRASH REPORT==== 4-Jul-2008::20:07:13 ===
  crasher:
    pid: <0.37.0>
    registered_name: []
    exception exit: {bad_return,
                        {{mime_typer_app,start,[normal,[]]},
                         {'EXIT',
                             {undef,
                                 [{mime_typer_app,start,[normal,[]]},
                                  {application_master,start_it_old,4}]}}}}
      in function  application_master:init/4
    initial call: application_master:init(<0.5.0>,<0.36.0>,
                                          {appl_data,mime_typer,
                                           [mime_typer],
                                           undefined,
                                           {mime_typer_app,[]},
                                           [mime_typer,mime_typer_app],
                                           [],infinity,infinity},
                                          normal)
    ancestors: [<0.36.0>]
    messages: [{'EXIT',<0.38.0>,normal}]
    links: [<0.36.0>,<0.5.0>]
    dictionary: []
    trap_exit: true
    status: running
    heap_size: 377
    stack_size: 23
    reductions: 88
  neighbours:

=INFO REPORT==== 4-Jul-2008::20:07:13 ===
    application: mime_typer
    exited: {bad_return,
                {{mime_typer_app,start,[normal,[]]},
                 {'EXIT',
                     {undef,
                         [{mime_typer_app,start,[normal,[]]},
                          {application_master,start_it_old,4}]}}}}
    type: permanent
{"Kernel pid terminated",application_controller,"{application_start_failure,mime_typer,{bad_return,{{mime_typer_app,start,[normal,[]]},{'EXIT',{undef,[{mime_typer_app,start,[normal,[]]},{application_master,start_it_old,4}]}}}}}"}

Crash dump was written to: erl_crash.dump
Kernel pid terminated (application_controller) ({application_start_failure,mime_typer,{bad_return,{{mime_typer_app,start,[normal,[]]},{'EXIT',{undef,[{mime_typer_app,start,[normal,[]]},{application_


<div><p>Hi,<br><br>I am running Kevin Smith's Mochiweb OTP example (<a href="http://weblog.hypotheticalabs.com/?p=226">http://weblog.hypotheticalabs.com/?p=226</a>) but I cannot get it to start.&nbsp; Could anyone give me some hints on interpreting the error messages?&nbsp; I am running it on Windows.&nbsp; I am not very familiar with debugging OTP yet.<br><br>Thanks<br><br>Tom<br><br>$ erl -boot file_server-1<br><br>=PROGRESS REPORT==== 4-Jul-2008::20:07:13 ===<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; supervisor: {local,sasl_safe_sup}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; started: [{pid,&lt;0.32.0&gt;},<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {name,alarm_handler},<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {mfa,{alarm_handler,start_link,[]}},<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {restart_type,permanent},<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {shutdown,2000},<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {child_type,worker}]<br><br>=PROGRESS REPORT==== 4-Jul-2008::20:07:13 ===<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; supervisor: {local,sasl_safe_sup}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; started: [{pid,&lt;0.33.0&gt;},<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {name,overload},<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {mfa,{overload,start_link,[]}},<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {restart_type,permanent},<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {shutdown,2000},<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {child_type,worker}]<br><br>=PROGRESS REPORT==== 4-Jul-2008::20:07:13 ===<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; supervisor: {local,sasl_sup}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; started: [{pid,&lt;0.31.0&gt;},<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {name,sasl_safe_sup},<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {mfa,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {supervisor,start_link,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [{local,sasl_safe_sup},sasl,safe]}},<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {restart_type,permanent},<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {shutdown,infinity},<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {child_type,supervisor}]<br><br>=PROGRESS REPORT==== 4-Jul-2008::20:07:13 ===<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; supervisor: {local,sasl_sup}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; started: [{pid,&lt;0.34.0&gt;},<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {name,release_handler},<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {mfa,{release_handler,start_link,[]}},<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {restart_type,permanent},<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {shutdown,2000},<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {child_type,worker}]<br><br>=PROGRESS REPORT==== 4-Jul-2008::20:07:13 ===<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; application: sasl<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; started_at: nonode <at> nohost<br><br>=PROGRESS REPORT==== 4-Jul-2008::20:07:13 ===<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; application: sasl<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; started_at: nonode <at> nohost<br><br>=CRASH REPORT==== 4-Jul-2008::20:07:13 ===<br>&nbsp; crasher:<br>&nbsp;&nbsp;&nbsp; pid: &lt;0.37.0&gt;<br>&nbsp;&nbsp;&nbsp; registered_name: []<br>&nbsp;&nbsp;&nbsp; exception exit: {bad_return,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {{mime_typer_app,start,[normal,[]]},<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {'EXIT',<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {undef,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [{mime_typer_app,start,[normal,[]]},<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {application_master,start_it_old,4}]}}}}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; in function&nbsp; application_master:init/4<br>
&nbsp;&nbsp;&nbsp; initial call: application_master:init(&lt;0.5.0&gt;,&lt;0.36.0&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {appl_data,mime_typer,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [mime_typer],<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; undefined,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {mime_typer_app,[]},<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [mime_typer,mime_typer_app],<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [],infinity,infinity},<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; normal)<br>
&nbsp;&nbsp;&nbsp; ancestors: [&lt;0.36.0&gt;]<br>&nbsp;&nbsp;&nbsp; messages: [{'EXIT',&lt;0.38.0&gt;,normal}]<br>&nbsp;&nbsp;&nbsp; links: [&lt;0.36.0&gt;,&lt;0.5.0&gt;]<br>&nbsp;&nbsp;&nbsp; dictionary: []<br>&nbsp;&nbsp;&nbsp; trap_exit: true<br>&nbsp;&nbsp;&nbsp; status: running<br>&nbsp;&nbsp;&nbsp; heap_size: 377<br>
&nbsp;&nbsp;&nbsp; stack_size: 23<br>&nbsp;&nbsp;&nbsp; reductions: 88<br>&nbsp; neighbours:<br><br>=INFO REPORT==== 4-Jul-2008::20:07:13 ===<br>&nbsp;&nbsp;&nbsp; application: mime_typer<br>&nbsp;&nbsp;&nbsp; exited: {bad_return,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {{mime_typer_app,start,[normal,[]]},<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {'EXIT',<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {undef,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [{mime_typer_app,start,[normal,[]]},<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {application_master,start_it_old,4}]}}}}<br>&nbsp;&nbsp;&nbsp; type: permanent<br>
{"Kernel pid terminated",application_controller,"{application_start_failure,mime_typer,{bad_return,{{mime_typer_app,start,[normal,[]]},{'EXIT',{undef,[{mime_typer_app,start,[normal,[]]},{application_master,start_it_old,4}]}}}}}"}<br><br>Crash dump was written to: erl_crash.dump<br>Kernel pid terminated (application_controller) ({application_start_failure,mime_typer,{bad_return,{{mime_typer_app,start,[normal,[]]},{'EXIT',{undef,[{mime_typer_app,start,[normal,[]]},{application_<br><br><br></p></div>
Richard A. O'Keefe | 4 Jul 08:32
Picon
Favicon

PADS and Erlang

I'm currently slogging my way through the PADS manual and papers.
PADS is a toolkit for Processing Ad-hoc Data Streams, that is
for stuff like web logs, termcap, anything that's more complex
than you could comfortably process with AWK but less standardised
than XML.

PADS/C takes a data description and generates C code that you can
call to parse a data stream, either all at once or some at a time.
You get a converter to XML and a crude tabulator/statistics tool
for free with this.  The input language is somewhere between a
grammar and C data declarations.

PADS/ML does the same kind of thing, with a slightly different
but semantically similar input language that looks more like ML.
Sadly, the ML in question is not SML, but OCaml.  I am as fond
of high speed as the next hacker, but fond as I am of SML, I've
never been able to stomach OCaml syntax.

Some of the applications of PADS are clearly in Erlang's general
area: one of the running examples is some AT&T phone logs which
are really very very large (so that you would have to be either
a lunatic or a disc salesman to suggest converting them to
[textual] XML).

It might be interesting to speculate on the relationship between
PADS (or "Data Description Languages" in general) and Erlang.
I'm not sure that a PADS/Erlang would be much use, because you
can probably get most of the way with the binary matching syntax
parsing binaries.

The word is _speculate_!

--
"I don't want to discuss evidence." -- Richard Dawkins, in an
interview with Rupert Sheldrake.  (Fortean times 232, p55.)

Paul Fisher | 3 Jul 17:10
Favicon

erts design information/experts around?

I sent the following note to erlang-bugs two days ago and have not seen
anyone comment.

> We have a system where we run lots of linked-in driver ports that get
> created/used/closed frequently and sometimes very quickly.  Today when
> several open_port/2, port_command/2 and port_close/1 cycles happened
> rapid succession, a SIGSEGV occurrect in erl_bif_ddl.c:
> 
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 1125235040 (LWP 12087)]
> 0x0000000000449712 in erl_ddll_try_unload_2 (p=0x2aaaab11fc90,
>     name_term=659339, options=46912503328425) at beam/erl_bif_ddll.c:592
> 

This is not the first email about runtime internals that I have sent
which has gone without comment, and so I am wondering if the people with
detailed knowledge of the runtime do not follow these lists.

Is there a better place/way to get in contact?  (What I am really
looking for is a discussion of the overall internals design of the smp
runtime structures, so that I can get a jump start on fixing these types
of thing myself.)

thanks in advance,

--

-- 
paul

_______________________________________________
erlang-questions mailing list
erlang-questions <at> erlang.org
http://www.erlang.org/mailman/listinfo/erlang-questions
Corrado Santoro | 3 Jul 16:19
Picon

Small Erlang VM

Dear all,

I would like to have an erlang VM onto a small embedded system, that is 
an ARM7 machine, with 256K of flash and 64K or RAM. I have in mind 
something like the BEAM emulator and only a minimal subset of libraries 
and OTP system.

Could anyone have some suggestions or pointers for such an idea?

Thanks.

All the best,
--Corrado

--

-- 
==================================================================
Eng. Corrado Santoro, Ph.D.
University of Catania - ITALY - Engineering Faculty

Tel: +39 095 7382380        VoIP: sip:7035 <at> voicegw2.diit.unict.it

Personal Home Page: http://www.diit.unict.it/users/csanto
     NUXI Home Page: http://nuxi.diit.unict.it
==================================================================

Jan Lehnardt | 3 Jul 16:06
Picon
Favicon

CouchDB - An Erlang Project

Dear Erlang Community,

I'd like to tell you about a project that you might have
heard about, but don't know a lot about:

Enter CouchDB.

CouchDB is written an Erlang (why would I write otherwise),
but not very well established in the Erlang community. I'd
like to change this fact with the help of this email.

I went to the Erlang eXchange last week only to discover
that when I tell you guys about CouchDB, you get very
enthusiastic. Now, not all of you were in London and
I'd like you to give a chance to get enthusiastic, or at
least interested. (Sounds a bit like I would make a decent
sales person, not bad for a programmer...)

CouchDB is a distributed document database written in
less then 7k lines of pure Erlang (with a bit of C mixed in).

Here's the pitch:

   Most data is not inherently relational, yet relational
   databases are often the default when it comes to
   storing data. The downside is that an RDBMS is hard
   to learn and use upfront and hard to scale later. You
   have been working with non-relational databases for
   decades, you know that they are easier to use and
   easier to scale.

   CouchDB's main API is RESTful. It talks HTTP natively.
   This helps to reduce the learning curve further since
   everybody knows HTTP and all our tools support HTTP.

   All you need to talk to CouchDB is a browser!

   CouchDB stores data in the JSON format (through the API
   and in Erlang terms internally). It targets not only Erlang
   developers but everybody and JSON allows it to read and
   write everybody's data.

   CouchDB is built for concurrency. It stores data in an
   ACID compliant MVCC data store. It supports any
   number of parallel read and serialised write access.
   The data storage module is optimised to reduce
   hard-drive head seeks on reads and writes. It never
   overwrites data that is safe on disk and as a result,
   when it reports a write operation to be finished, the
   database files are guaranteed to be consistent on
   disk. If it crashes or if the hardware goes away,
   CouchDB just restarts later and is up and running
   without the need to run any lengthy consistency checks.

   To make sense of the no-schema data you can store
   with CouchDB, it support views. A map-reduce powered
   mechanism that allows you to filter, collate and
   aggregate your data that can be massively parallelised.

   A single-node database is no good in the modern
   computing world. To mitigate this problem CouchDB
   comes with a world-class replication system (that is
   influenced by the Lotus Notes database, but don't tell
   anybody!). Replication solves the general problem
   of data synchronisation. Be it for fault tolerance,
   load balancing or distributed- (and offline-) work
   environments. It comes with automatic conflict
   detection and resolution. Pretty awesome.

   Finally, CouchDB is free software released under the
   BSD-like Apache 2.0 license.

   See http://incubator.apache.org/couchdb/docs/overview.html
   for a more complete overview of what CouchDB wants to be.

   A lot of things are working today and are working well, but it
   still misses a few crucial features. Maybe you can jump aboard
   and help out? If you do, get in touch.

   --

Thanks for listening, this was a long read and I apologise,
but I couldn't find less words to tell the same. To wrap
this up:

   You guys seem to be running an awesome party,
   can we join?

Cheers
Jan
--
PS: You can find CouchDB at http://couchdb.org/ and you
can even follow it on Twitter at http://twitter.com/CouchDB
Alpár Jüttner | 3 Jul 14:16
Picon
Picon

Reference counting instead of GC?

Hi,

Did anyone consider replacing the garbage collection with reference
counting in the Erlang emulator? How difficult would it be to do?

Probably, it isn't worth changing in general, but reference counting has
some advantages which are important in some special use cases:

      * Per process memory pools is not necessary. 
      * Message passing (of large data) will be more efficient as
        messages don't have to be physically copied. 
      * There is no need for garbage collection.  GC is for example a
        major pitfall in hard real time systems (see e.g.
        http://www.erlang.se/workshop/2007/proceedings/05nicosi.pdf )

Here are the drawbacks I can see now:

      * Higher memory overhead. 
              * However the memory is less fragmented, so we get back
                something in return.
      * It is said to be slower. I'm not absolutely convinced about it
        though. 
      * In general, the highest problem with reference counting is that
        in case of cross/circular referencing, dead objects will be left
        in the memory. However, this cannot happen in Erlang due to the
        immutability of the data.

Regards,
Alpar

Maxim Treskin | 3 Jul 13:20
Picon

program.conf modification

Hello

When I write my program using application behaviour, I use
config-file, specified by erl -config program.conf. Is there any
standard way to modify it with erlang code? I.e. something alike:

Config = [{parm1, value1}, {parm2, value2}],
some_module:store_config(program, Config).

This code stores composed configuration to program.conf.
May be is there other way to do something like this?

Thank you
--

-- 
Maxim Treskin
Picon

help with message-passing syntax

im using:
http://www.erlang.org/doc/reference_manual/part_frame.html
but cant really figure it out. i didnt expect this to work but compiled anyway:
2> c("c:/Program Files/erl5.6.2/usr/serec", [{outdir, "c:/Program Files/erl5.6.2/usr/"}]).
c:/Program Files/erl5.6.2/usr/serec.erl:2: function squarer/1 undefined
c:/Program Files/erl5.6.2/usr/serec.erl:2: function squarer2/1 undefined
c:/Program Files/erl5.6.2/usr/serec.erl:23: premature end
error
3>


obv this is just a toy program but say I have a function that squares the integers of a list from 1 to the send parameter.
so i want to send a message to that function.


-module(serec).
-export([seq/2,squarer/1,squarer2/1]).
         
seq(Start, End) -> seq(Start, End, []).

seq(Start, End, Acc) when Start =< End ->
   seq(Start, End-1, [End|Acc]);
seq(_, _, Acc) ->
   Acc.

squarer(X) ->
    receive
    Pattern [when Pattern > 7] ->
        [X*X || X <- [seq(1, 7]];
    end

squarer2(X) ->
    receive
    when X > 7 -> [X*X || X <- [seq(1, 7]];
    end

squarer(X) ! 2+6


Låna pengar utan säkerhet.
Sök och jämför lån hos Kelkoo.
<div>
<table cellspacing="0" cellpadding="0" border="0"><tr><td valign="top">im using:<br>http://www.erlang.org/doc/reference_manual/part_frame.html<br>but cant really figure it out. i didnt expect this to work but compiled anyway:<br>2&gt; c("c:/Program Files/erl5.6.2/usr/serec", [{outdir, "c:/Program Files/erl5.6.2/usr/"}]).<br>c:/Program Files/erl5.6.2/usr/serec.erl:2: function squarer/1 undefined<br>c:/Program Files/erl5.6.2/usr/serec.erl:2: function squarer2/1 undefined<br>c:/Program Files/erl5.6.2/usr/serec.erl:23: premature end<br>error<br>3&gt; <br><br><br>obv this is just a toy program but say I have a function that squares the integers of a list from 1 to the send parameter.<br>so i want to send a message to that function.<br><br><br>-module(serec).<br>-export([seq/2,squarer/1,squarer2/1]).<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br>seq(Start, End) -&gt; seq(Start, End, []).<br><br>seq(Start, End, Acc) when Start
 =&lt; End -&gt;<br>&nbsp;&nbsp; seq(Start, End-1, [End|Acc]);<br>seq(_, _, Acc) -&gt;<br>&nbsp;&nbsp; Acc.<br><br>squarer(X) -&gt;<br>&nbsp;&nbsp;&nbsp; receive<br>&nbsp;&nbsp; &nbsp;Pattern [when Pattern &gt; 7] -&gt;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; [X*X || X &lt;- [seq(1, 7]];<br>&nbsp;&nbsp;&nbsp; end<br><br>squarer2(X) -&gt;<br>&nbsp;&nbsp;&nbsp; receive<br>&nbsp;&nbsp; &nbsp;when X &gt; 7 -&gt; [X*X || X &lt;- [seq(1, 7]];<br>&nbsp;&nbsp;&nbsp; end<br><br>squarer(X) ! 2+6<br><br>
</td></tr></table>
<br>
L&aring;na pengar utan s&auml;kerhet.<br><a href="http://www.kelkoo.se/c-100390123-lan-utan-sakerhet.html?partnerId=96915014">S&ouml;k och j&auml;mf&ouml;r l&aring;n hos Kelkoo.</a>
</div>
maestro | 3 Jul 00:32
Picon

Erlang = the future?

http://arstechnica.com/news.ars/post/20080702-intel-an-expensive-many-core-future-is-ahead-of-us.html

is it just me or could erlang be the future? or in some modified form.

i mean if there is so much to gain and erlang does it so well while
other languages are awful at it.

im glad im learning erlang :)
Alexander Lamb | 2 Jul 17:38
Picon

Environment variables in applications

Hello,

I am writing an OTP application which will create a Mnesia database if  
needed (will check upon init if schema exists on that node).

Since I can't give a path in the mnesia:create_schema(node())  
function, from the documentation I read that it takes the environment  
variable "dir" so I hoped I could pass it in my application file such  
as this:

{application,cs_foundations,
	[
		{description, "Foundations for handling roles and studies"},
		{vsn,"1.0.0"},
		{modules, [sasl,cs_guuid,cs_mnesia]},
		{registered, [cs_guuid,cs_mnesia,cs_foundations_sup]},
		{applications, [kernel,stdlib,sasl]},
		{env,[]},
		{mod, {cs_foundations_app,[]}},
		{start_phases, []},
		{env, [{core_dir, "/Users/alamb/Data/Mnesia"},{dir, "/Users/alamb/ 
Data/Mnesia"}]}
	]
}.

Unfortunately, it doesn't seem to work. Any workaround?

Thanks,

Alex
Bob Calco | 2 Jul 15:43
Picon

Call for Contributions: Mnesia best practices

Everyone:

I'm looking for thoughts from fellow Erlangers about database design &
implementation in Mnesia. With a heavy SQL background I, like many
relatively new Erlang folks I'm sure, have a tendency to think in terms of
the capabilities of traditional RDBMSs, and to try to normalize every data
model with which I come into contact. 

I'm also used to letting administrators deal with most database operations
and issues, whereas with Mnesia the programmer has basically supreme control
(both to do some really cool and flexible things, and to do some really dumb
things).

So the question is generic, not intended to solve a specific problem. I have
some ideas and will contribute separately. 

The question is: What is the best advice you could give a data architect
about designing and implementing a database in Mnesia from scratch? Examples
of the kinds of issues I'd like to see folks address:

* How to create an optimal data model for performance (vs. reporting,
comparing the SQL way to the Mnesia way). This question is really about
normalization in Mnesia vs. SQL, and tricks like storing whole records in
table fields.

* How to partition data between subsystems, without losing the illusion
they're all one big happy system.

* How to handle complex clustering and failover scenarios.

* How to handle calculation-intensive databases (for example, stock
databases that need to constantly recalculate certain attributes for the
purposes of sorting, searching)

* How to handle complex domain relationships. For example, let's say you are
writing a CRM tool and want to store each "person" in the database. But each
person can also be a colleague, or a client, or an incidental character
(contact person at some organization). E.e, What do you do when there is
inheritance in your domain model?

* What are some current pitfalls or "weak spots" of Mnesia that ought to be
avoided, however tempting they might be?

* How to implement the various callbacks, and what kinds outside of those
described in the Mnesia documentation, have been found most useful in
practice?

That kind of thing. I want to put together something of a master knowledge
base on this big subject that the community can use both to promote Erlang
and to promote Erlang's "best practices" implementation in the important
area of serving data to applications. 

/Bob


Gmane