Deadlock when destroying agents in example SingleAgentModule
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenCog |
New
|
Undecided
|
Unassigned |
Bug Description
In the opencog example examples/
However, destroyAllAgents was previously called and that function called the agents destructor, both destroyAllAgents attempt to acquire agentsLock. The lock is not recursive so a deadlock results. Here is the backtrace. To replicate this, type the following into the opencog server prompt
loadmodule libsingleagent.so
agents-stop opencog:
#0 ~SingleAgentModule (this=0x82d8468, __in_chrg=<value optimized out>) at /home/seth/
#1 0xb7f40244 in opencog:
#2 0xb7f3c858 in std::for_
#3 0xb7f37685 in opencog:
#4 0xb6048a25 in opencog:
#5 0xb604bfc4 in opencog:
#6 0xb7f36f58 in opencog:
#7 0xb7f36ebe in opencog:
#8 0xb7f36dfc in opencog:
#9 0x0805d71e in main (argc=3, argv=0xbffff944) at /home/seth/
solution, make agentsLock lock recursive?