Gitlab::ShellEnv is not thread-safe with GitLab 5.3
Created by: gussan
Gitlab::ShellEnv
is using ENV['GL_ID']
, but ENV
is shared by all threads.
ENV['GL_ID'] is possibilly accessed by many threads simultaneously on threadsafe!
environment.
I experienced trouble related this issue:
- When executing two or more Automerge request simultaneously, sometimes the push event's author are superseded by another user.
And I guess this thread-unsafeness also affects grack.
A possible fix will be changing Gitlab::ShellEnv
not to use ENV
and passing env variables to Grit::Git
explicitly.
Thanks.