[erlang-questions] ETS delete_trap

James Aimonetti james@REDACTED
Tue Apr 26 01:30:17 CEST 2016


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

We have a process, basically a gen_server with some AMQP stuff added
in (a behaviour we call gen_listener) that is getting a backed up
message queue, which obviously kills the VM after a short time.

The curious bit that I can't really figure out is the
{current_function, {ets,delete_trap,1}} bit from the process_info/1
call (output below). As far as I can tell, that is buried in the VM's
C code.

The process itself wraps an ETS table and provides a LRU-style cache
with AMQP bindings to programmatically flush entries based on AMQP
events elsewhere in the system.

Any thoughts on what delete_trap is doing and why it appears to
dead-lock the process? Or perhaps where to look to mitigate this?

> process_info(Pid).
[{registered_name,my_process_name},
 {current_function,{ets,delete_trap,1}},
 {initial_call,{proc_lib,init_p,5}},
 {status,runnable},
 {message_queue_len,1586057},
 {message_queue, [...huge...]},
 {links,[<0.3239.0>]},
 {dictionary,
 [{'$ancestors',[whistle_couch_sup,<0.3227.0>]},
 {callid,<<"3fc98d435ea14ab7">>},
 {'$initial_call',{gen_listener,init,1}}]},
 {trap_exit,true},
 {error_handler,error_handler},
 {priority,normal},
 {group_leader,<0.3226.0>},
 {total_heap_size,462590525},
 {heap_size,145962050},
 {stack_size,24},
 {reductions,71467274818},
 {garbage_collection,
 [{min_bin_vheap_size,46368},
 {min_heap_size,233},
 {fullsweep_after,65535},
 {minor_gcs,1}]},
 {suspending,[]}]

- -- 
James Aimonetti
Lead Systems Architect / Impressionable Scallywag
"If Dialyzer doesn't care, I don't care"

2600HzPDX | http://2600hz.com
sip:james@REDACTED
tel:415.886.7905
irc:mc_ @ freenode
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBCAAGBQJXHqiJAAoJENTKa+JPXCVglwcH/igh3Jtw0aChB1H/NLcD96fZ
pKqs3IN64tUb1pAQd7ia9DZqpIVooYhDn9gXsxDcw1XsOoerQj8ef6/7hp9V13U0
CJpXztiNegLhmqNFosod5vXwj9DkWD+Z0AyEmdq6/kA2msEDWnjw9EPgLUn2e8aI
q56DN+5mhorR9f2SW8JpW8KFRsEft4lzAoZwauUhgln0onqEv01SCLU1OY9E7pAd
dfhlIGY7bymmWJnieEtM6++nd3f/3zfaRQ2wQ0WfvnWaQ+U8OI9iwGwykS/7AgyK
0PQsK/NOgfcUyRP1pkMalXpf64/GcFQn7EUaWtqPC7JQ+K0+/HxNnhwPa1Qpj00=
=/Z74
-----END PGP SIGNATURE-----



More information about the erlang-questions mailing list