Skip to content

Upload Fuzzer Logs to GCS only if not in a uworker#5363

Open
IvanBM18 wants to merge 1 commit into
masterfrom
fix/conditionally_upload_fuzzer_logs
Open

Upload Fuzzer Logs to GCS only if not in a uworker#5363
IvanBM18 wants to merge 1 commit into
masterfrom
fix/conditionally_upload_fuzzer_logs

Conversation

@IvanBM18

@IvanBM18 IvanBM18 commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Bug: b/473624472

Overview

After reverting this PR PERMISSION_DENIED errors started to reappear in CF. Its clear that we can't follow the same approach of doing a short-circuit in the DB calls.
image

This instance of PERMISSION_DENIED errors occurs on uworkers that perform the fuzz task, in this workflow theres a logic to upload the Fuzzer logs to GCS at the utask_main stage. As we know uworkers cant access nor DB nor GCS, so when a uworker reaches this code it fails. Now instead of always uploading the Fuzzer logs to GCS, we only upload them if not in a uworker, this allows regular bots that perform the fuzz task(pre->main->pos) locally to continue to work.

Tests performed

Changes have been in dev since Jul-13. Since then error logs related to this instance of PERMISSION_DENIED issues have been resolved.
image
Note how this error dramatically decreases. Other instances of this error like this one:
image
Are unrelated to this changes and seem intermittent errors due to external reasons.

Note:

This PR is the first of 3(maybe 4) PRs to tackle the PERMISSION_DENIED issues

@IvanBM18 IvanBM18 self-assigned this Jul 15, 2026
@IvanBM18 IvanBM18 requested a review from a team as a code owner July 15, 2026 00:49

@dylanjew dylanjew left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

drive by, for context I was looking into a similar issue in crbug.com/534369736

target=testcase_manager.run_testcase_and_return_result_in_queue,
args=(temp_queue, thread_index, testcase_file_path, gestures,
env_copy, True))
env_copy, not environment.is_uworker()))

@dylanjew dylanjew Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

should this just be environment.is_tworker? what about swarming and off swarming bots (like macs)?

It would be nice if there was a single function we could call with confidence that determined whether we have access to GCS/metadata and cleanly handled all environments :)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Tworkers only pick up pre/post tasks, hence they won't end up executing this workload.

Heres where it gets tricky, there are 2 kind of bots that can reach this code path in the fuzzing task workflow:

  • uworkers &
  • pre-emptible bots, these are bots that only execute fuzzing tasks, and they execute them locally(see how fuzz is a local Utask) using a trusted service account

Pre-emptibles don't have either the uworker nor the tworker flags in place.

So to make this work for both types of bots, we only check, if its its a uworker bot or not. There are upcoming PRs to change this a little bit more(see b/473624472 for more context)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This explains why although this issue appears on all uworkers, it doesnt completely hindered our fuzzing hours metric.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Got it, thanks for the explanation!

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.

2 participants