Issue arises when a user runs two or more stata_kernel sessions simultaneously with the same cache_directory path configured. The stata_kernel uses the same include.do file in the cache_dir directory for both sessions. This leads to a race condition between sessions in writing to and reading/executing from include.do.
The effect is intermittent, seemingly inexplicable Stata errors resulting from Stata executing code run from a different session.
Code Sample
To reproduce, run multiple simultaneous sessions. Easiest to reproduce when the notebooks for each session have multiple cells that may start near-simultaneously.
Problem description
Issue arises when a user runs two or more stata_kernel sessions simultaneously with the same
cache_directory
path configured. The stata_kernel uses the sameinclude.do
file in thecache_dir
directory for both sessions. This leads to a race condition between sessions in writing to and reading/executing frominclude.do
.The effect is intermittent, seemingly inexplicable Stata errors resulting from Stata executing code run from a different session.
Code Sample
To reproduce, run multiple simultaneous sessions. Easiest to reproduce when the notebooks for each session have multiple cells that may start near-simultaneously.
Expected Output
No Stata errors.
Other information