Action Scheduler queue cleanup fatals with "Unidentified action" after concurrent deletion
Maintainer thường phản hồi trong vòng 1 ngày
@Alexia-Soare đang làm issue này rồi.
Từ ngày 17/9/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Summary
Visualizer's scheduled-action cleanup can terminate with an uncaught InvalidArgumentException when an action selected for failure processing is deleted or otherwise disappears before its status update. Cleanup is expected to tolerate that race and continue processing the queue; instead, the request ends in a fatal error. This can interrupt scheduled work on an affected site.
Customer context
- Product / area: Visualizer scheduled database refresh / bundled Action Scheduler
- Version: 4.0.7
- Environment: WordPress site; PHP, WordPress, database, and hosting versions were not provided
- Integration / third party: Bundled
woocommerce/action-scheduler3.9.3 - Reported error / symptom: One captured uncaught
InvalidArgumentExceptionstates that an action could not be marked failed because another process may have deleted it - Impact: One queue-cleanup request terminated; broader scheduling impact is unknown
Reproduction notes
Runtime reproduction was not performed. Evidence-backed inferred workflow:
- Run Visualizer 4.0.7 with its bundled Action Scheduler active.
- Have queue cleanup query a stale action in
in-progressstatus. - Between that query and the status update, let another process delete the action or alter it so the update affects no row.
- Observe an uncaught
InvalidArgumentExceptionfromActionScheduler_DBStore::mark_failure().
The submitted crash log confirms steps 2–4 occurred on one site, but it does not identify the competing process or action hook.
Diagnosis
Conclusion
The fatal is confirmed as a dependency race exposed by Visualizer's bundled Action Scheduler. The captured stack shows ActionScheduler_QueueCleaner::mark_failures() selecting an action and ActionScheduler_DBStore::mark_failure() throwing when the subsequent database update affects no row. Inspection confirms that the cleaner does not handle that exception. Upstream issue woocommerce/action-scheduler#970 describes the same fatal, remains open, and is labeled as a high-priority bug.
Where this likely occurs
- Scheduled database-refresh subsystem:
classes/Visualizer/Module/Setup.php—Visualizer_Module_Setup::schedule_refresh_db_action()lines 486–504 schedules thevisualizer_schedule_refresh_dbrecurring action through Action Scheduler when its API is available. - Dependency bootstrap:
index.php— Visualizer startup callback approx. lines 148–157 loads the bundled Action Scheduler entry point. - Dependency selection:
composer.lock— package record lines 181–221 lockswoocommerce/action-scheduler3.9.3 at commitc58cdbab17651303d406cd3b22cf9d75c71c986c; tagv4.0.7contains this lock. - Queue-cleanup path:
vendor/woocommerce/action-scheduler/classes/ActionScheduler_QueueCleaner.php—ActionScheduler_QueueCleaner::mark_failures()lines 206–228 queries stale running action IDs and callsmark_failure()for each without an exception boundary. - Data-store path:
vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php—ActionScheduler_DBStore::mark_failure()lines 1215–1233 throws the reported exception when its update affects no row. - Git history: Visualizer commit
bc14d4b8introduced the Action Scheduler dependency and loading path; it is present fromv4.0.0throughv4.0.7. This identifies the feature boundary but does not prove a regression because the earlier releases did not provide the same scheduler workflow.
Engineering notes
Visualizer loads its packaged Action Scheduler conditionally and uses the global as_* API. On sites with multiple Action Scheduler copies, normal package version arbitration may determine which copy executes; the crash path identifies a copy under Visualizer's packaged vendor/woocommerce/action-scheduler directory. The race window lies between querying stale running actions and updating each action, so concurrent cleanup, deletion, or another process changing the row can trigger it. The exact action hook and the process that removed or changed the reported row are unknown.
Test coverage status
No relevant Visualizer unit or e2e coverage was found during inspection for Action Scheduler cleanup, concurrent action deletion, or mark_failure() exceptions. The upstream dependency's test suite was not available in the Visualizer checkout.
What to verify or explore next
- May be worth reproducing with Visualizer 4.0.7 by placing an action in stale
in-progressstate, deleting or changing it after the cleaner query, and running queue cleanup. - If reproducible, checking both WP-Cron and asynchronous queue-runner cleanup contexts may establish the affected execution surfaces.
- May be worth confirming behavior when another active plugin registers a newer or older Action Scheduler copy before Visualizer.
- Checking the packaged release ZIP can confirm that its dependency source exactly matches lock reference
c58cdbab17651303d406cd3b22cf9d75c71c986c.
Unknowns / follow-up
The report contains one occurrence and no site load, database, concurrency, or action-hook details. It is unknown whether the vanished action belonged to Visualizer or another component sharing the scheduler tables.
Confidence
Confidence: 94/100
The captured stack exactly matches a documented race in the Action Scheduler dependency bundled by Visualizer 4.0.7, and repository inspection confirms that the exception from mark_failure() is not handled by the queue cleaner. Upstream issue woocommerce/action-scheduler#970 independently classifies the same fatal as a bug; no matching Visualizer issue was found.
Source: automated uninstall feedback — visualizer, 2026-08-30
Generated by bug-report-triage (ID: bug-report-triage_6a950a8cd8e195.34071552)
- Ngôn ngữ chính
- PHP
- Star
- 108
- Fork
- 29
- Merge trung bình
- 1 ngày 5 giờ
- Pull request đã merge (30 ngày)
- 8
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Codeinwp/visualizer
-
feature-request-triage
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 64/100
Codeinwp/visualizer#1388 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`visualizer_schedule_refresh_db` remains missing after Visualizer reactivationCó thể đã có người làm @Alexia-Soare đã nhận 7 ngày trước. Đang mởbug-report bug-report-triage customer report
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Codeinwp/visualizer#1384 · 4 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Action Scheduler async queue crashes on WordPress 5.3 with `wpdb::db_server_info()` errorCó thể làm lại được @girishpanchal30 đã nhận 47 ngày trước và không có pull request nào đang mở. Đang mởbug-report bug-report-triage crash-report
Codeinwp/visualizer#1361 · 5 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add a Default value for font settingsCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 25/100
Codeinwp/visualizer#1111 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
customer report doc-needed new feature
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Codeinwp/visualizer#1058 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Codeinwp/visualizer
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
domain/crm-after-sales Platform(Default) priority/high
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
kind/bug status/to verify
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
PHP-CS-Fixer/PHP-CS-Fixer#9867 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
sync-en
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 2 ngày
-
sync-en
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 2 ngày