Commit 5014d9f
committed
gh-151475: Fix data race in faulthandler watchdog on free-threaded builds
Add a PyMutex to serialize dump_traceback_later() and
cancel_dump_traceback_later() calls. Without this, concurrent
arm/cancel from multiple threads corrupts the cancel_event/running
lock handshake, causing an abort from unlocking an unheld lock.1 parent a52f428 commit 5014d9f
3 files changed
Lines changed: 25 additions & 8 deletions
File tree
- Include/internal
- Misc/NEWS.d/next/Library
- Modules
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
51 | 53 | | |
52 | 54 | | |
53 | 55 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
| |||
836 | 837 | | |
837 | 838 | | |
838 | 839 | | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
839 | 850 | | |
840 | 851 | | |
841 | 852 | | |
| 853 | + | |
842 | 854 | | |
| 855 | + | |
843 | 856 | | |
844 | 857 | | |
845 | 858 | | |
846 | 859 | | |
847 | 860 | | |
848 | 861 | | |
| 862 | + | |
849 | 863 | | |
| 864 | + | |
850 | 865 | | |
851 | 866 | | |
852 | 867 | | |
| |||
855 | 870 | | |
856 | 871 | | |
857 | 872 | | |
858 | | - | |
859 | | - | |
860 | | - | |
861 | | - | |
862 | | - | |
863 | | - | |
864 | | - | |
865 | | - | |
866 | 873 | | |
867 | 874 | | |
868 | 875 | | |
| |||
885 | 892 | | |
886 | 893 | | |
887 | 894 | | |
| 895 | + | |
888 | 896 | | |
889 | 897 | | |
890 | 898 | | |
891 | 899 | | |
892 | 900 | | |
| 901 | + | |
893 | 902 | | |
894 | 903 | | |
895 | 904 | | |
| |||
904 | 913 | | |
905 | 914 | | |
906 | 915 | | |
| 916 | + | |
907 | 917 | | |
| 918 | + | |
908 | 919 | | |
909 | 920 | | |
910 | 921 | | |
| |||
0 commit comments