Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 99bbc3cc4b9e93b97035efcbd980245652de5223
https://github.com/WebKit/WebKit/commit/99bbc3cc4b9e93b97035efcbd980245652de5223
Author: Dewei Zhu <[email protected]>
Date: 2024-07-09 (Tue, 09 Jul 2024)
Changed paths:
M Websites/perf.webkit.org/public/include/report-processor.php
Log Message:
-----------
Race condition in report-processor between fetching `tests` and
`test_metrics` tables
rdar://131324950
https://bugs.webkit.org/show_bug.cgi?id=276330
Reviewed by Ryosuke Niwa.
The race condition is caused by `tests` and `test_metrics` not being fetched
atomically.
New `tests` and `test_metrics` entries can be inserted by another concurrent
call after `tests` table
fetch but before `test_metrics` fetch. `test_metrics` can refer to a new test
and cause null reference
in the array key by test id.
The fix is to ignore new `test_metrics` based on following observation:
1. `ReportProcessor->fetch_tests` builds `ReportProcessor->tests` variable
which is only used by
`ReportProcessor->recursively_ensure_tests`.
2. `ReportProcessor->recursively_ensure_tests` handles missing tests /
metrics by fetching them
from database.
* Websites/perf.webkit.org/public/include/report-processor.php: Add a null
check on `$test['metrics']`.
Canonical link: https://commits.webkit.org/280784@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes