| 2 | |
| 3 | === Few notes after running the stress test === |
| 4 | - The stress test could reproduce the previously suspected issue of "pop_freelist()+push_freelist() after remove_node() in pj_timer_heap_poll()", here is a bit more description on it: |
| 5 | |
| 6 | {{{pop_freelist()}}} will only preserve the {{{timer_id}}}, not the timer entry as the timer entry node has been completely detached from the heap. it may cause crash, as the number of free {{{timer_id}}} is less than timer heap slot, e.g: if the app has 4 timer polling threads, there can be 4 less free {{{timer_id}}} than timer heap slot, while the timer heap slot will grow only when there are 2 free timer heap slot left. |
| 7 | |
| 8 | So r5934 removes {{{pop_freelist() + push_freelist()}}} after {{{remove_node()}}}. |
| 9 | |
| 10 | - The issue described in #2172 (double destroy after cancel_timer() return code not checked) could not be reproduced, but later after a further investigation, found out that it may actually be a false alarm because the poll() sets timer entry group lock to NULL (within the same timer lock block as remove_node()) before invoking callback, so it should be safe from the double destroy issue. |