beam crasher: ets + write_concurrency

Dave Smith dizzyd@REDACTED
Thu Oct 8 19:23:43 CEST 2009


Greetings,

I believe that I have identified a VM crasher when using ETS with
write concurrency enabled. Sample code is as follows:

T = ets:new(?MODULE, [{write_concurrency, true}]),
ets:insert_new(T, {foo, 1}),
ets:match(T, {nosuchvalue, '$1'}).

GDB stack trace shows:

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000008
[Switching to process 69425]
0x00000001000c894b in db_select_chunk_hash (p=0x101466398,
tbl=0x1013b6eb0, pattern=4330115329, chunk_size=0, reverse=0,
ret=0x102185080) at beam/erl_db_hash.c:1426
1426		if (current->hvalue != INVALID_HASH &&
(gdb) bt
#0  0x00000001000c894b in db_select_chunk_hash (p=0x101466398,
tbl=0x1013b6eb0, pattern=4330115329, chunk_size=0, reverse=0,
ret=0x102185080) at beam/erl_db_hash.c:1426
#1  0x00000001000c85f2 in db_select_hash (p=0x101466398,
tbl=0x1013b6eb0, pattern=4330115329, reverse=0, ret=0x102185080) at
beam/erl_db_hash.c:1344
#2  0x00000001000b1c6f in ets_select_2 (A__p=0x101466398, A_1=262367,
A_2=4330115329) at beam/erl_db.c:2136
#3  0x00000001000b1524 in ets_match_2 (A__p=0x101466398, A_1=262367,
A_2=4335025986) at beam/erl_db.c:1940
#4  0x000000010011e5ed in process_main () at beam/beam_emu.c:2084
#5  0x000000010007ed86 in sched_thread_func (vesdp=0x1007812e8) at
beam/erl_process.c:3015
#6  0x00000001001a3360 in thr_wrapper (vtwd=0x7fff5fbff0e0) at
common/ethread.c:475
#7  0x00007fff819a2e19 in thread_start ()
(gdb)


This crash was repeatable on the following platforms:

OS X 10.6 (Snow Leopard), 64-bit and 32-bit VM
OS X 10.5 (Leopard), 32-bit VM
Debian Linux 2.6 x86_64, 64-bit VM

Erlang versions tested: R13B01, R13B02-1

Thanks,

D.


More information about the erlang-questions mailing list