Commit 152a8a6
chore(utils): stop threads in dummy writer (#15307)
## Description
Fix crash in `appsec_threats` test on macos caused by to many
NativeWriter being created. The crash is due to each native writer
instance holding onto a kqueue fd exceeding the macos ulimit (256). This
fixes the issue by shutting down the tokio runtime of the native writer
when we are done with the DummyTracer ie. when pop is called.
## Testing
Run the `appsec_threats_fastapi` test with `ulimit -n` set to 256 (by
default on mac).
---------
Co-authored-by: Christophe Papazian <[email protected]>
Co-authored-by: Christophe Papazian <[email protected]>1 parent 5fd5f69 commit 152a8a6
2 files changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
644 | 644 | | |
645 | 645 | | |
646 | 646 | | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
647 | 651 | | |
648 | 652 | | |
649 | 653 | | |
| |||
0 commit comments