VirtualBox

Ignore:
Timestamp:
May 8, 2008 1:40:32 PM (17 years ago)
Author:
vboxsync
Message:

Just do the simple 30 second wait for each worker thread. There shouldn't be timeouts, but it seems there is something busted in the linux (64-bit) multiple release event semaphores that makes them time out too early. (linux 2.6.23)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/DevATA.cpp

    r8703 r8708  
    52765276    if (ataWaitForAllAsyncIOIsIdle(pDevIns, 20000))
    52775277    {
    5278         uint64_t u64Start = RTTimeMilliTS();
    5279         int rc2 = VINF_SUCCESS;
    5280         int iFailed = -1;
    52815278        for (unsigned i = 0; i < RT_ELEMENTS(pData->aCts); i++)
    52825279        {
    5283             /* Wait for at most 5 seconds, and if that is elapsed for 100msec
    5284              * per remaining thread. Just to be on the safe side. */
    5285             int64_t cMsElapsed = RTTimeMilliTS() - u64Start;
    5286             rc = RTThreadWait(pData->aCts[i].AsyncIOThread,
    5287                               RT_MAX(5000 - cMsElapsed, 100),
    5288                               NULL);
    5289             if (VBOX_FAILURE(rc) && rc != VERR_INVALID_HANDLE)
    5290             {
    5291                 AssertMsg(rc == VERR_TIMEOUT && RTTimeMilliTS() - u64Start >= 5000,
    5292                           ("rc=%Rrc cMsElapsed=%RI64 ms  Now: %RI64 ms i=%d\n", rc, cMsElapsed, RTTimeMilliTS() - u64Start, i));
    5293                 rc2 = rc;
    5294                 iFailed = i;
    5295             }
    5296         }
    5297         AssertMsgRC(rc2, ("Some of the async I/O threads are still running! (%RU64 ms) rc2=%Rrc iFailed=%d\n",
    5298                           RTTimeMilliTS() - u64Start, rc2, iFailed));
     5280            rc = RTThreadWait(pData->aCts[i].AsyncIOThread, 30000 /* 30 s*/, NULL);
     5281            AssertMsg(VBOX_SUCCESS(rc) || rc == VERR_INVALID_HANDLE, ("rc=%Rrc i=%d\n", rc, i));
     5282        }
    52995283    }
    53005284    else
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette