Commit e1d59ff
Fix race between two phase algorithm preSuspendBarrierand commit_begin
There is race between two phase algorithm preSuspendBarrier() and two
phase commit commit_begin().
T1 thread #1: setCkptPending()
T2 thread mpickpt#2: checks isCkptPending() then stop(comm)
T3 thread mpickpt#2: stop(comm) sets state to PHASE_1
T4 thread mpickpt#2: while isCkptPending() loop
T5 thread #1 calls waitForNewStateAfter(PHASE_1)
This change adds a timeout when waiting state change. When the
preSuspend wait for PHASE_1 state change times out, it would
set response to FREE_PASS.
Co-authored-by: Dahong Li <root@cori.nersc.gov>1 parent e3118a6 commit e1d59ff
2 files changed
Lines changed: 20 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
233 | | - | |
234 | | - | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
235 | 237 | | |
236 | 238 | | |
237 | 239 | | |
| |||
299 | 301 | | |
300 | 302 | | |
301 | 303 | | |
302 | | - | |
303 | 304 | | |
304 | 305 | | |
305 | 306 | | |
306 | 307 | | |
307 | 308 | | |
308 | 309 | | |
309 | 310 | | |
310 | | - | |
| 311 | + | |
311 | 312 | | |
312 | 313 | | |
313 | | - | |
314 | | - | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
315 | 319 | | |
316 | 320 | | |
317 | 321 | | |
318 | 322 | | |
319 | 323 | | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
320 | 333 | | |
321 | 334 | | |
322 | 335 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | | - | |
| 165 | + | |
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
| |||
0 commit comments