Commit 3bbe277
committed
dispatcher: Fix rare crash with 'pvar_algo_pattern' (part 2)
Commit fe1a50d was a quick-fix attempt, but the race condition was
still there, and continuing to cause rare crashes during 'ds_reload' if
using the 'pvar_algo_pattern' feature.
Long story short: pv_get_spec_value() on SHM-allocated structs has a
high risk of running into concurrency issues, depending on the spec in
use. Here, the issue happened to be with the $stat(xxx) algo pattern,
where 2 or more SIP workers performed concurrent READ/WRITE on it,
leading to a crash.
Many thanks to Eric Tamme from Five9 for reporting & testing!
(cherry picked from commit 063435d)1 parent a3574eb commit 3bbe277
3 files changed
Lines changed: 34 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
368 | 368 | | |
369 | 369 | | |
370 | 370 | | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
371 | 376 | | |
372 | 377 | | |
373 | 378 | | |
| |||
643 | 648 | | |
644 | 649 | | |
645 | 650 | | |
| 651 | + | |
| 652 | + | |
646 | 653 | | |
647 | 654 | | |
648 | 655 | | |
| |||
657 | 664 | | |
658 | 665 | | |
659 | 666 | | |
660 | | - | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
661 | 677 | | |
662 | 678 | | |
663 | 679 | | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
664 | 688 | | |
| 689 | + | |
| 690 | + | |
665 | 691 | | |
666 | 692 | | |
667 | 693 | | |
668 | 694 | | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
669 | 699 | | |
670 | 700 | | |
671 | 701 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
806 | 806 | | |
807 | 807 | | |
808 | 808 | | |
809 | | - | |
810 | 809 | | |
| 810 | + | |
811 | 811 | | |
812 | 812 | | |
813 | 813 | | |
| |||
0 commit comments