Repository: pytorch
Issue: ☂️ 150+ MacOS tests were marked flaky recently
Labels: high priority,triaged,module: macos,module: infra

### 🐛 Describe the bug
Query to see all the disabled tests https://github.com/pytorch/pytorch/issues?q=is%3Aissue+is%3Aopen+DISABLED+test_comprehensive+created%3A%3E2024-08-31
Test-infra PR that prevents bot from disabling more of those https://github.com/pytorch/test-infra/pull/5664

All test failures exhibit the same pattern. One of the tests will fail with
```
OMP: Error #179: Function pthread_key_create failed:
2024-09-12T17:29:55.9079710Z OMP: System error #35: Resource temporarily unavailable
```
Which looks like a semaphore leak. All subsequent tests will fail, but succeed on re-run, which as far as I understand is done in context of new process

Flaky detection bot was not designed to mass disable the test, we should try to rootcause what caused flakiness ASAP:
- https://github.com/pytorch/pytorch/issues/135856
- https://github.com/pytorch/pytorch/issues/135855
- https://github.com/pytorch/pytorch/issues/135854
- https://github.com/pytorch/pytorch/issues/135853
- https://github.com/pytorch/pytorch/issues/135852
- https://github.com/pytorch/pytorch/issues/135851
- https://github.com/pytorch/pytorch/issues/135850
- https://github.com/pytorch/pytorch/issues/135849
- https://github.com/pytorch/pytorch/issues/135848
- https://github.com/pytorch/pytorch/issues/135847
- https://github.com/pytorch/pytorch/issues/135846
- https://github.com/pytorch/pytorch/issues/135845
- https://github.com/pytorch/pytorch/issues/135844
- https://github.com/pytorch/pytorch/issues/135843
- https://github.com/pytorch/pytorch/issues/135842
- https://github.com/pytorch/pytorch/issues/135841
- https://github.com/pytorch/pytorch/issues/135840
- https://github.com/pytorch/pytorch/issues/135839
- https://github.com/pytorch/pytorch/issues/135838


- https://github.com/pytorch/pytorch/issues/135815
- https://github.com/pytorch/pytorch/issues/135814
- https://github.com/pytorch/pytorch/issues/135813
- https://github.com/pytorch/pytorch/issues/135812
- https://github.com/pytorch/pytorch/issues/135811
- https://github.com/pytorch/pytorch/issues/135810
- https://github.com/pytorch/pytorch/issues/135808
- https://github.com/pytorch/pytorch/issues/135807
- https://github.com/pytorch/pytorch/issues/135806
- https://github.com/pytorch/pytorch/issues/135805
- https://github.com/pytorch/pytorch/issues/135804
- https://github.com/pytorch/pytorch/issues/135803
- https://github.com/pytorch/pytorch/issues/135802
- https://github.com/pytorch/pytorch/issues/135801
- https://github.com/pytorch/pytorch/issues/135799
- https://github.com/pytorch/pytorch/issues/135798
- https://github.com/pytorch/pytorch/issues/135797
- https://github.com/pytorch/pytorch/issues/135784
- https://github.com/pytorch/pytorch/issues/135782
- https://github.com/pytorch/pytorch/issues/135754
- https://github.com/pytorch/pytorch/issues/135753
- https://github.com/pytorch/pytorch/issues/135752
- https://github.com/pytorch/pytorch/issues/135751
- https://github.com/pytorch/pytorch/issues/135750
- https://github.com/pytorch/pytorch/issues/135749
- https://github.com/pytorch/pytorch/issues/135748
- https://github.com/pytorch/pytorch/issues/135747
- https://github.com/pytorch/pytorch/issues/135746
- https://github.com/pytorch/pytorch/issues/135745
- https://github.com/pytorch/pytorch/issues/135744

16 more issues fresh of the press:
- https://github.com/pytorch/pytorch/issues/135895
- https://github.com/pytorch/pytorch/issues/135896
- https://github.com/pytorch/pytorch/issues/135897
- https://github.com/pytorch/pytorch/issues/135898
- https://github.com/pytorch/pytorch/issues/135899
- https://github.com/pytorch/pytorch/issues/135900
- https://github.com/pytorch/pytorch/issues/135901
- https://github.com/pytorch/pytorch/issues/135902
- https://github.com/pytorch/pytorch/issues/135903
- https://github.com/pytorch/pytorch/issues/135904
- https://github.com/pytorch/pytorch/issues/135905
- https://github.com/pytorch/pytorch/issues/135906
- https://github.com/pytorch/pytorch/issues/135907
- https://github.com/pytorch/pytorch/issues/135908
- https://github.com/pytorch/pytorch/issues/135909
- https://github.com/pytorch/pytorch/issues/135910

And 16 more:
- https://github.com/pytorch/pytorch/issues/135937
- https://github.com/pytorch/pytorch/issues/135938
- https://github.com/pytorch/pytorch/issues/135939
- https://github.com/pytorch/pytorch/issues/135940
- https://github.com/pytorch/pytorch/issues/135941
- https://github.com/pytorch/pytorch/issues/135942
- https://github.com/pytorch/pytorch/issues/135943
- https://github.com/pytorch/pytorch/issues/135944
- https://github.com/pytorch/pytorch/issues/135945
- https://github.com/pytorch/pytorch/issues/135946
- https://github.com/pytorch/pytorch/issues/135947
- https://github.com/pytorch/pytorch/issues/135948
- https://github.com/pytorch/pytorch/issues/135949
- https://github.com/pytorch/pytorch/issues/135950
- https://github.com/pytorch/pytorch/issues/135951
- https://github.com/pytorch/pytorch/issues/135952

Another 16:
- https://github.com/pytorch/pytorch/issues/136014
- https://github.com/pytorch/pytorch/issues/136015
- https://github.com/pytorch/pytorch/issues/136016
- https://github.com/pytorch/pytorch/issues/136017
- https://github.com/pytorch/pytorch/issues/136018
- https://github.com/pytorch/pytorch/issues/136019
- https://github.com/pytorch/pytorch/issues/136020
- https://github.com/pytorch/pytorch/issues/136021
- https://github.com/pytorch/pytorch/issues/136022
- https://github.com/pytorch/pytorch/issues/136023
- https://github.com/pytorch/pytorch/issues/136024
- https://github.com/pytorch/pytorch/issues/136025
- https://github.com/pytorch/pytorch/issues/136026
- https://github.com/pytorch/pytorch/issues/136027
- https://github.com/pytorch/pytorch/issues/136028
- https://github.com/pytorch/pytorch/issues/136029
- https://github.com/pytorch/pytorch/issues/136030
### Versions

nightly

cc @ezyang @gchanan @zou3519 @kadeng @msaroufim @albanD