New issue
Advanced search Search tips

Issue 723985 link

Starred by 1 user

Issue metadata

Status: Archived
Owner: ----
Closed: Jul 13
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Threads Contention between Thread of running FactoryTaskManager and Test UI

Project Member Reported by marcochen@chromium.org, May 18 2017

Issue description

Problem: If a test case has these conditions below

  1) leverage FactoryTaskManager with multiple tasks and test_ui 
  2) there is a limited resource should be owned by one task in a time
  3) A FactoryTask bind a key to test_ui for calling pass() or fail()

then it is possible to happen that a task later can't acquire this limited resource successfully then test case will be failed. This is because the limited resource are competed by two parallel tasks in different threads.

Even worse that, if a factory task be run on the thread of test_ui then it might block this thread to deal with next event in the queue (EventClient). ex: task run in a loop and wait for test_ui thread's notification.

Detail:

  a. Here I assume that FactoryTaskManager should run tasks sequentially (and maybe in one single thread) so the designer who leverages it don't need to take care resource contention. Designer can treat all tasks can be done one by one and not in parallel.
  b. Normally if you run FactoryTaskManager in a test case then the assumption above is correct.
  c. But if you run FactoryTaskManager and depend on BindKey of test_ui to trigger TaskManager.Pass/Fail() then it turns out that next task will be run on thread of test_ui not original one thread of creating FactoryTaskManager


 
Labels: TE-NeedsTriageHelp
This issue seems to be out of TE's scope. Hence adding the lable 'TE-NeedsTriageHelp' for further investigation.
Project Member

Comment 2 by sheriffbot@chromium.org, Jul 13

Status: Archived (was: Unconfirmed)
Issue has not been modified or commented on in the last 365 days, please re-open or file a new bug if this is still an issue.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment