Changeset 18 for trunk


Ignore:
Timestamp:
05/31/11 17:23:32 (13 years ago)
Author:
mmamonski
Message:

log reader race condition causing hanging of application

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pbs_drmaa/log_reader.c

    r12 r18  
    424424                                                        { 
    425425                                                                fsd_log_debug(("WT - forcing update of job: %s", temp_job->job_id )); 
    426                                                                 temp_job->update_status( temp_job ); 
     426                                                                TRY 
     427                                                                { 
     428                                                                        temp_job->update_status( temp_job ); 
     429                                                                } 
     430                                                                EXCEPT_DEFAULT 
     431                                                                { 
     432                                                                        /*TODO: distinguish between invalid job and internal errors */ 
     433                                                                        fsd_log_debug(("Job finished just after entering running state: %s", temp_job->job_id)); 
     434                                                                } 
     435                                                                END_TRY 
    427436                                                        } 
    428437                                                        else 
     
    503512                 { 
    504513                        const fsd_exc_t *e = fsd_exc_get(); 
    505  
    506                         fsd_log_error(( "%s: <%d:%s>", self->name, e->code(e), e->message(e) )); 
    507                         fsd_exc_reraise(); 
     514                        /* Its better to exit and communicate error rather then let the application to hang */ 
     515                        fsd_log_fatal(( "Exception in wait thread %s: <%d:%s>. Exiting !!!", self->name, e->code(e), e->message(e) )); 
     516                        exit(1); 
    508517                 } 
    509518                END_TRY 
Note: See TracChangeset for help on using the changeset viewer.