race condition in the concurrency profiler (percept)?

Ahmed Omar <>
Fri Dec 10 14:00:32 CET 2010


In percept_db, the function start/1 if it find an instance running , it will
send a message to stop the running db and spawn a process to start a new
one, which leads to a race condition.

It can be reproduced with enough stress testing. But one way to easily
reproduce it, you can call percept:analyze/2 two subsequent times.

63> percept:analyze("test.dat").
Parsing: "test.dat"

=ERROR REPORT==== 10-Dec-2010::13:52:46 ===
Error in process <0.252.0> with exit value:
{badarg,[{ets,new,[pdb_info,[named_table,private,{keypos,2},set]]},{percept_db,init_percept_db,0}]}


=ERROR REPORT==== 10-Dec-2010::13:52:46 ===
Error in process <0.253.0> with exit value:
{badarg,[{percept_db,insert,1},{percept,trace_parser,2},{dbg,tc_loop,3}]}

{error,{badarg,[{percept_db,insert,1},
                {percept,trace_parser,2},
                {dbg,tc_loop,3}]}}


-- 
Best Regards,
- Ahmed Omar
http://nl.linkedin.com/in/adiaa
Follow me on twitter
@spawn_think <http://twitter.com/#!/spawn_think>


More information about the erlang-bugs mailing list