race condition in the concurrency profiler (percept)?

Ahmed Omar spawn.think@REDACTED
Fri Dec 10 14:27:24 CET 2010


if you confirm it's a bug i can submit a patch supported with a test case

On Fri, Dec 10, 2010 at 2:00 PM, Ahmed Omar <spawn.think@REDACTED> wrote:

> 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>
>
>


-- 
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