Reproduce thread safety issue