View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000408 | Spring engine | General | public | 2007-01-31 00:15 | 2007-04-04 22:35 |
| Reporter | M2 | Assigned To | jcnossen | ||
| Priority | normal | Severity | crash | Reproducibility | always |
| Status | resolved | Resolution | fixed | ||
| Summary | 0000408: [patch] Race condition with lua | ||||
| Description | This patch addresses some problems caused by the current logging design. The main issue is only caused indirectly by the logger, when it outputs a message it also calls all listening subscribers. One subscriber uses lua and if called from outside the main thread it has a reasonable good chance to run in parallel with some other lua widget from the main thread, and thus crash the game. The straightforward way of solving this would be to guard all public functions using lua with some locking mechanism. But this would create a lot of locking for the relatively few cases when lua gets used from outside the main thread. So instead all incoming log messages get cached and later invoked from the main thread, thereby avoiding race conditions inside lua. | ||||
| Additional Information | This can easily be reproduced by using the luaui and modifying the code to spam log messages from the server thread. | ||||
| Tags | No tags attached. | ||||
| Attached Files | |||||
| Checked infolog.txt for Errors | |||||
|
|
forgot to attach the patch? |
|
|
Thanks for finding this M2. Fixed, with enhancements in SVN (r3373). |
|
|
I apparently forgot to attach the patch to my original report and now you have fixed it, but you should still take a look at the patch because it also resolves some other small bugs. |
|
|
The LuaUI related bug is fixed, re-assigned to jc. |
|
|
AFAICS all chunks have been committed one way or another. Thanks for your contribution anyway. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2007-01-31 00:15 | M2 | New Issue | |
| 2007-01-31 22:35 | tvo | Note Added: 0000680 | |
| 2007-02-01 00:05 | trepan | Assigned To | => trepan |
| 2007-02-01 00:05 | trepan | Status | new => assigned |
| 2007-02-01 17:35 | trepan | Note Added: 0000688 | |
| 2007-02-01 17:35 | trepan | Status | assigned => resolved |
| 2007-02-01 17:35 | trepan | Resolution | open => fixed |
| 2007-02-01 19:23 | M2 | Status | resolved => feedback |
| 2007-02-01 19:23 | M2 | Resolution | fixed => reopened |
| 2007-02-01 19:23 | M2 | Note Added: 0000689 | |
| 2007-02-01 19:23 | M2 | File Added: logging.patch | |
| 2007-02-01 19:50 | trepan | Note Added: 0000690 | |
| 2007-02-01 19:50 | trepan | Assigned To | trepan => jcnossen |
| 2007-04-04 22:35 | tvo | Status | feedback => resolved |
| 2007-04-04 22:35 | tvo | Resolution | reopened => fixed |
| 2007-04-04 22:35 | tvo | Note Added: 0000864 |