[erlang-questions] bad_object in mnesia

Erik Stenman Erik.Stenman@REDACTED
Wed Jan 3 12:31:57 CET 2007


Has anyone had any experience with mnesia returning bad_object?

Every now and then one of our mnesia database tables breaks in some way.
The breakage manifests itself in one of two ways:
 1. Transactions on the tables aborts with {badarg, [TABLENAME]}
 2. Reads on the table returns {error, {bad_object, "FULLPATH_TO_TABLENAME.DAT"}}
This happens in a running system where the table has been used for a long time.

I can not find any documentation in mnesia (nor in dets) stating that mnesia
can return the error code bad_object.
Has anyone seen any documentation of this?
Is it a bug in mnesia or in the documentation?
(I.e. is this supposed to be happening and it is just not documented?
 In that case what are you supposed to do when you get such an error message?)

The error seems to indicate that the table is corrupt in some way.
Sometimes the table can be fixed by simply restarting mnesia,
sometimes we have to copy the table from another node in order
to fix the problem.

Any input appreciated.

We have seen this error in R10-B8 and recently in the latest R11-B2.

Erik Stenman




More information about the erlang-questions mailing list