MoriEdan / opensim4opencog

Automatically exported from code.google.com/p/opensim4opencog
1 stars 0 forks source link

inconsistent (race condition?) behavior when sleeping threads #83

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
1. Set numbots to 1 in hillpeople.pl
2. start hillpeople (commit nnnn) by double clicking
3. edit.
4. logon_bots.
5. IM bot  set super plan wander
6. IM bot BVSET yakk true
7. IM bot BVSET dumpaction true
8. ebt.
9. when the bot starts wandering...
10 IM bot set super plan rest
11. IM bot BVSET knockitoff true

bot will return to hut and lay down

(this triggers a less important bug, the bots don't always play the animation)

(also, the bot may dither a while before finally laying down)

OBSERVED:
12. with bot laying down, observe that sometimes bot says
A: sleeping
and sometimes complains of no valid action
EXPECTED:
Bot would consistently sleep

13. IM the bot BVSET gtsleeping true
14. In under 10 sec the graphic debugger shoudl pop up
each time it does, leap the debugger

OBSERVED:
always says its' sleeping
EXPECTED: brief stop in debugger wouldn't affect behavior

Original issue reported on code.google.com by anneogb...@gmail.com on 16 Jul 2012 at 4:58

GoogleCodeExporter commented 8 years ago
note, the commit number is 3387

Original comment by anneogb...@gmail.com on 16 Jul 2012 at 5:02

GoogleCodeExporter commented 8 years ago
actually, I realized I had two gtrace_by_botvar so I cleaned it up in 3388

Original comment by anneogb...@gmail.com on 16 Jul 2012 at 5:08

GoogleCodeExporter commented 8 years ago

Original comment by anneogb...@gmail.com on 22 Jul 2012 at 4:02

GoogleCodeExporter commented 8 years ago
The underlying test:

20 ?- botvar_get(bot, superplan , X), botvar_get(bot, superplan , Y).
X = Y, Y = "rest".

21 ?- botvar_get(bot, superplan , X), botvar_get(bot, superplan , Y), 
botvar_get(bot, superplan , Z).
false.

Original comment by logicmoo@gmail.com on 22 Jul 2012 at 9:14

GoogleCodeExporter commented 8 years ago
Fixed in r3403 - Using the stack trace depth for loop detection now

Original comment by logicmoo@gmail.com on 22 Jul 2012 at 10:00