Skip to content

Increase the memory allocated to 'BOT_TMPDIR' to 1GB#23

Open
9640-Akhil wants to merge 2 commits intoittiam-systems:masterfrom
9640-Akhil:no_space_left
Open

Increase the memory allocated to 'BOT_TMPDIR' to 1GB#23
9640-Akhil wants to merge 2 commits intoittiam-systems:masterfrom
9640-Akhil:no_space_left

Conversation

@9640-Akhil
Copy link
Collaborator

@9640-Akhil 9640-Akhil commented Dec 12, 2025

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.

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.
@9640-Akhil
Copy link
Collaborator Author

9640-Akhil commented Dec 19, 2025

Actually better than enlarging this, could we put the backup in the same volume as the testcases?

Have you verified this works?

mount -t tmpfs -o size=250M,mode=777 tmpfs $INSTALL_DIRECTORY/clusterfuzz/bot/inputs/fuzzer-testcases/

Let's put it here and increase this size to 1.25GB

@9640-Akhil
Copy link
Collaborator Author

9640-Akhil commented Dec 19, 2025

Thank you for the suggestion! I have pushed the requested changes.

Regarding verification, We have confirmed the change locally with the following steps:

  1. Built the base docker image.
  2. Ran the image, ensuring that the local tmpfs mounts and configuration are similar to production.
  3. Ran the start.sh script to verify the new memory allocation for the mounts.

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')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants