[erlang-questions] ETS delete_trap
Brujo Benavides
fernando.benavides@REDACTED
Tue Apr 26 03:24:03 CEST 2016
Oh, sorry… now I reread your email… you said that already. My bad.
> On Apr 25, 2016, at 22:23, Brujo Benavides <fernando.benavides@REDACTED> wrote:
>
> Not sure if this will be much help, but just out of curiosity I grepped otp codebase to see if I could find that function, but the only place it pops up is in erl_db.c[1] and I don’t really understand that code.
> Maybe some devs with c-trained eyes will be more suited to help you, James.
>
> [1] https://github.com/erlang/otp/blob/e1489c448b7486cdcfec6a89fea238d88e6ce2f3/erts/emulator/beam/erl_db.c#L3038
>
>> On Apr 25, 2016, at 20:30, James Aimonetti <james@REDACTED> wrote:
>>
>> Signed PGP part
>> 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
>>
>> _______________________________________________
>> erlang-questions mailing list
>> erlang-questions@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-questions
>
More information about the erlang-questions
mailing list