Dets bug
Alexey Shchepin
alexey@REDACTED
Mon Oct 18 12:59:39 CEST 2004
Hi!
I got the following error today:
=CRASH REPORT==== 18-Oct-2004::13:30:28 ===
crasher:
pid: <0.15846.65>
registered_name: []
error_info: {aborted,{badarg,[roster,"dtim",3]}}
initial_call: {gen,init_it,
[gen_fsm,
<0.218.0>,
<0.218.0>,
ejabberd_c2s,
[{gen_tcp,#Port<0.1903435>},
[{access,c2s},
{shaper,c2s_shaper},
starttls,
{certfile,"./ssl.pem"}]],
[]]}
ancestors: [ejabberd_c2s_sup,ejabberd_sup,<0.35.0>]
messages: [{<0.146.0>,
{error,{dets_bug,roster,
{lookup_keys,
[{"dtim",{"dottedmag","jabber.ru",[]}}]}
,
{11,'EXIT'}}}}]
links: [<0.218.0>]
dictionary: []
trap_exit: false
status: running
heap_size: 2584
stack_size: 21
reductions: 14321
neighbours:
Then I copied roster.DAT from working DB, repaired it and tried to do
dets:lookup on this key, but it returned empty result. After that I ran the
following command 3 times and got 3 different results:
(ejabberd@REDACTED)1> mnesia:dirty_read(roster, {"dtim",{"dottedmag","jabber.ru",[]}}).
{badarg,[{erlang,binary_to_term,
[<<131,104,10,100,0,6,114,111,115,116,101,114,104,2,107,0,6,109,104,97,109,...>>]},
{dets_v9,per_set_key,3},
{dets_v9,eval_work_list,2},
{dets,update_cache,2},
{dets,stream_end,5},
{dets,do_apply_op,4},
{proc_lib,init_p,5}]}
(ejabberd@REDACTED)2> mnesia:dirty_read(roster, {"dtim",{"dottedmag","jabber.ru",[]}}).
{error,{dets_bug,roster,
{lookup_keys,[{"dtim",{"dottedmag","jabber.ru",[]}}]},
{14,'EXIT'}}}
(ejabberd@REDACTED)3> mnesia:dirty_read(roster, {"dtim",{"dottedmag","jabber.ru",[]}}).
{error,{bad_object,"/opt/jabber/server/ejabberd/src/Mnesia.ejabberd@REDACTED/roster.DAT"}}
After that all requests to roster table return the last error, and after
restarting this error is unreproduceable.
Erlang version is R10B.
Snip from mnesia:info():
roster : with 412996 records occupying 95840830 bytes on disc
More information about the erlang-bugs
mailing list