pytorch
5525e9a5 - Lock unpickling of source ranges

Commit
4 years ago
Lock unpickling of source ranges Summary: The source is shared across all threads running the torchscript interpreter, so if several threads encounter errors at once, they will all race to unpickle the source, leading to memory corruption. Test Plan: Model 217993215_0 is the problematic model; I wasn't able to repro the crash with requests stored in Hive, but I could easily by adding my devserver (SMC tier predictor.bertrand) as a shadow tier to the model's tier (inference_platform.predictor_model.prod.bi.217993215_latest). (i.e., set shadow_tier property to predictor.bertrand=1 to proxy 1% of traffic). With this diff, the ASAN/TSAN errors go away. Reviewed By: suo Differential Revision: D31044009 fbshipit-source-id: 56f9ef3880e7cf09f334db71b4256e362b4de965
Author
Parents
Loading