[erlang-questions] strange badarith error

Kostis Sagonas <>
Thu Jun 23 16:09:23 CEST 2011


Anthony Shipman wrote:
> Today I was getting this occasional error while stress-testing:
> 
> 23-Jun-2011 18:24:20.290| ERROR fleetDevMgr: device 38: The process for the 
> device has exited for reason: {badarith,                                                                           
> [{fleetDevImpl,qualFromDevice, 2},                                                                            
> {fleetDevImpl, handle_cast, 2},                                                                            
> {asn1rt_ber_bin, cindex, 3}]}
> 
> ....
> 
> The only arithmetic in here is the division RSUpBad/RSUp and they are 
> definitely integers. The DEBUG line is definitely executed.
> 
> The code has been compiled with Hipe in R12B4
> Erlang (BEAM) emulator version 5.6.4 [source] [async-threads:0] [hipe] 
> [kernel-poll:true]
> 
> Is it possible I've got bad machine code here?
> 
> Why might asn1rt_ber_bin be in the stack trace when it isn't involved in this 
> code at all?

It's very difficult to say something intelligent here without being able 
to reproduce this and at least be able to form some educated guess on 
what might be the culprit.

If you have the possibility, try to create a self-contained test that 
shows the behavior you are experiencing.  Also, try to see whether this 
also happens in R14.  (R12 is too old and many things which have been 
fixed by then may be responsible for what you are experiencing.)

Kostis




More information about the erlang-questions mailing list