ets:lookup and ets:update_counter return [] although key/value is there

Knut Bakke <>
Thu Sep 15 14:47:23 CEST 2005


Hi,
The bug is not in the application. I wouldn't dear to
post the problem if there was a risk for application
fault. A extreamly simple program writing and reading
to ets is reproducing the problem that we see in the
application.

However, I have been hunting other machins with the
exact HW in the meantime. On those machines I'm not
able to reproduce it.
 
Other program running on the machine is having no
problems, so how can this be a problem only visible in
ets - if its a HW problem?

Is ets:lookup returning [] in any cases somethings go
wrong in the emulator due to e.g. memory faults?

-knut.


--- Bjorn Gustavsson <> wrote:

> Knut Bakke <> writes:
> 
> > My best clue: I know that the memory driver for
> erlang
> > has been changed to delete memory areas before
> > updating them - to reduce memory fragmentation.
> Could
> > it be that there is a time slice where the data is
> not
> > there?
> 
> (I suppose you refer to the +r flag.)
> 
> NO. The current emulator is single-threaded. Nothing
> else
> can run while an ets operation is taking place.
> 
> I strongly suspect that there is a bug in your own
> application, that
> changing the hardware has changed the timing and
> exposed a latent bug.
> Of course, the bug could be in ets; in that case it
> should be possible
> to reproduce it on any machine if you would do
> EXACTLY the same ets
> operations.
> 
> Have you tried to trace all ets operations?
> 
> /Bjorn
> 
> -- 
> Björn Gustavsson, Erlang/OTP, Ericsson AB
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the erlang-questions mailing list