Increase the memory allocated to 'BOT_TMPDIR' to 1GB#23
Increase the memory allocated to 'BOT_TMPDIR' to 1GB#239640-Akhil wants to merge 2 commits intoittiam-systems:masterfrom
Conversation
09a2837 to
1786e6c
Compare
The 90MB tmpfs directory allocated for 'BOT_TMPDIR' is insufficient for downloading large corpus backup files, leading to the "OSError: [Errno 28] No space left on device" error in Cuttlefish and Linux hosts. This change increases the tmpfs size to 1GB to accommodate larger corpus backup files.
1786e6c to
cbb7b4f
Compare
|
|
Thank you for the suggestion! I have pushed the requested changes. Regarding verification, We have confirmed the change locally with the following steps:
The changes are working as intended. |
| shell.create_directory(directory, create_intermediates=True) | ||
| if corpus.backup_url: | ||
| tmpdir = environment.get_value('BOT_TMPDIR') | ||
| tmpdir = environment.get_value('FUZZ_INPUTS') |
There was a problem hiding this comment.
Are we sure this is the only place where this needs to be changed ? What about the place where it runs all the corpus files for various runs ? Where do they get stored ? Should that space also be increased ?
There was a problem hiding this comment.
Yes @svasudevprasad, we are confident that this is the only necessary change because the lifecycle of the corpus backup zip files happens entirely within a single function call and they are not used elsewhere. The temporary corpus backups are both downloaded and extracted directly to the /mnt/scratch0/clusterfuzz/inputs/data-bundles directory within the _sync_corpus_to_disk() function itself.
Regarding where the corpus files are stored and whether that space needs to be increased: the corpus files used during various runs are stored in the /mnt/scratch0/clusterfuzz/inputs/data-bundles directory. This path is not a tmpfs mount (unlike BOT_TMPDIR or the fuzzer-testcases directory), as it resides on the standard disk volume (/mnt/scratch0). Since it will have access to more than 100GB of free space, there is no need to increase the space for this.
The 90MB tmpfs mount allocated for 'BOT_TMPDIR' ('/mnt/scratch0/tmp') is insufficient for downloading large corpus backups, leading to "OSError: [Errno 28] No space left on device".
This error occurs during corpus synchronization, when a corpus backup zip file is downloaded to a temporary file within '/mnt/scratch0/tmp' in _sync_corpus_to_disk() before being extracted. If the said corpus' zip file exceeds 90MB, the download attempt fails.
This change modifies _sync_corpus_to_disk() to use the 'clusterfuzz/bot/inputs/fuzzer-testcases' directory instead of 'BOT_TMPDIR', and also increases the size of 'fuzzer-testcases' tmpfs mount to 1.25GB to accommodate for a large corpus backup zip file and prevent this error.