Commit f3ae653
committed
rping: terminate CM event thread before exiting
The CM event thread processes events in a loop with no explicit
termination. When the last CM event is received, the main thread
proceeds to clean up and destroy the CM event channel. If this occurs
after the CM event thread has processed the last event, but before it
reaches rdma_get_cm_event again, then the subsequent call to
rdma_get_cm_event will fail and cause the process to exit with a failure
code even though the test was actually successful.
This causes flakiness in test scripts that use rping for basic
functional testing.
Fix this by using an eventfd+poll to explicitly signal the CM event
thread for termination.
Tested by running 4096 parallel rping processes.
Fixes: 6f640ff ("r7019: Introduce event channels.")
Signed-off-by: Jacob Moroni <[email protected]>1 parent 5abc21f commit f3ae653
1 file changed
+41
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
39 | 42 | | |
40 | 43 | | |
41 | 44 | | |
| |||
151 | 154 | | |
152 | 155 | | |
153 | 156 | | |
| 157 | + | |
154 | 158 | | |
155 | 159 | | |
156 | 160 | | |
| |||
666 | 670 | | |
667 | 671 | | |
668 | 672 | | |
| 673 | + | |
669 | 674 | | |
670 | 675 | | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
671 | 681 | | |
672 | | - | |
673 | | - | |
674 | | - | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
675 | 685 | | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
676 | 702 | | |
677 | | - | |
678 | | - | |
679 | | - | |
680 | | - | |
681 | 703 | | |
682 | 704 | | |
683 | 705 | | |
| |||
1279 | 1301 | | |
1280 | 1302 | | |
1281 | 1303 | | |
| 1304 | + | |
1282 | 1305 | | |
1283 | 1306 | | |
1284 | 1307 | | |
| |||
1366 | 1389 | | |
1367 | 1390 | | |
1368 | 1391 | | |
| 1392 | + | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
| 1396 | + | |
| 1397 | + | |
| 1398 | + | |
1369 | 1399 | | |
1370 | 1400 | | |
1371 | 1401 | | |
| |||
1397 | 1427 | | |
1398 | 1428 | | |
1399 | 1429 | | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
| 1433 | + | |
1400 | 1434 | | |
1401 | 1435 | | |
1402 | 1436 | | |
| |||
0 commit comments