Commit c8041cf
Pranav Sharma
Fix OrtEnv creation causing server to hang during shutdown. (#117)
OrtEnv gets created twice in onnx_loader. This causes its refcount to
increase to 2. Due to this when ReleaseEnv is called inside ~OnnxLoader,
it does nothing other than decrease the refcount to 1. Next all the libraries
are unloaded the openvino global context ptr gets unloaded followed by OrtEnv's
destructor which now actually does useful work trying to delete the openvno ctx ptr
which is not valid any more causing memory corruption.1 parent 96e1d93 commit c8041cf
1 file changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
58 | | - | |
59 | | - | |
60 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| |||
110 | 111 | | |
111 | 112 | | |
112 | 113 | | |
113 | | - | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| |||
0 commit comments