[rabbitmq-discuss] Erlang has closed

tsuraan tsuraan at gmail.com
Thu Sep 17 21:25:21 BST 2009


> I've seen this symptom before, but the circumstances were a bit
> contrived - the way the output from uptime was being processed on OSX
> - see http://erlang.org/pipermail/erlang-questions/2008-May/034889.html.
>
> However, I'm not convinced that this has anything to do with what you
> are seeing.

I think what's happening is that the os_mon:call (from cpu_sup:avg1())
is errorring out somehow, so its return value is { error, _ } instead
of a number.  In the local_load function of rabbit_load.erl, where you
currently have

_Other -> cpu_sup:avg1()

it should probably be

_Other ->
  case cpu_sup:avg1() of
    { error, _ } -> 0.0;
    Value -> Value
  end

I really wish erlang gave line numbers in its traces, but the only
arithmetic line in pick() is LoadAvg * ?FUDGE_FACTOR, and I don't
think the macro's value is changing :)

Also, avg1()'s man page says it returns a number, but its spec says an
integer or an { 'error', any() } pair.  Its timeout is set at
infinity, so it's not a timeout, but it could be some other error.
I'll see if I can get that machine to bomb out some more with prints
for the return value of avg1().




More information about the rabbitmq-discuss mailing list