How to fix "Queue is not empty after probing"

More
17 Aug 2025 20:52 #333578 by AkkiSan
Replied by AkkiSan on topic How to fix "Queue is not empty after probing"
A lot of things could go wrong there; why not check the "obvious error" ```[tm]``` first?  
Probably just a race condition?
[...]

if (settings->probe_flag) {
    int queue_empty = 0;
    int retry = 0;
    static int probe_count = 0;
    
    probe_count++;
    
    while ((queue_empty = GET_EXTERNAL_QUEUE_EMPTY()) == 0 && retry < 100) {
        esleep(0.010); 
        retry++;
    }
    
    if (retry > 0) {
        logDebug("probe #%d: waited %dms for empty queue (state: %d)", 
                probe_count, retry*10, queue_empty);
    }
    
    CHKS((queue_empty == 0),
         "NCE_QUEUE_IS_NOT_EMPTY_AFTER_PROBING (probe #%d after %dms)",
         probe_count, retry*10);

[...]


Out testing,
AS
 

Please Log in or Create an account to join the conversation.

Time to create page: 0.105 seconds
Powered by Kunena Forum