gsutil: PID check failed. RNG must be re-initialized after fork(). Hint: Try Random.atfork()
PID check failed. RNG must be re-initialized after fork(). Hint: Try Random.atfork()
gsutil exits with this message when I’m trying to copy a lot of large files to google storage:
gsutil -m cp -r /mnt/some/src gs://some/dest
It’s around 5000 files which vary in size. Their total size is around 100GB. Transfer sometimes succeeds and sometimes fails with the message above.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 18 (6 by maintainers)
Commits related to this issue
- Fixes #390. We use oauth2client, which has mechanisms in place to fall back to "pure Python crypto" in the absence of pyOpenSSL -- additionally, this crypto lib is only used for service account crede... — committed to houglum/gsutil by houglum 5 years ago
- Catch up py-six-current with master (#615) * Add crc32c instructions for enterprise SUSE * Fixes #390. (#602) We use oauth2client, which has mechanisms in place to fall back to "pure Python cr... — committed to GoogleCloudPlatform/gsutil by catleeball 5 years ago
- Catch up py-six-current with master [manual merge resolution] (#657) * Add crc32c instructions for enterprise SUSE * Fixes #390. (#602) We use oauth2client, which has mechanisms in place to fal... — committed to GoogleCloudPlatform/gsutil by catleeball 5 years ago
- Merge master branch into py-six-current (#699) * Add crc32c instructions for enterprise SUSE * Fixes #390. (#602) We use oauth2client, which has mechanisms in place to fall back to "pure Pytho... — committed to GoogleCloudPlatform/gsutil by catleeball 5 years ago
So, I think most folks don’t see this because it happens under a subset of runtime circumstances. We use oauth2client, which has mechanisms in place to fall back to “pure Python crypto” in the absence of pyOpenSSL – additionally, I believe this only happens when using service account credentials. Fun.
From the PyCrypto docs, I think the fix here is to call
Crypto
’sRandom.atfork()
method (ifCrypto
is installed and can be imported) in the parent and child every time we spawn a new process, whether that be withos.fork()
,multiprocessing.Process()
, etc.: