• Brian Christiansen's avatar
    Fix segfault when starting ctld w/out dbd · eab9f405
    Brian Christiansen authored
    If the dbd comes up after a job array has been submitted to the
    controller, the controller calls _update_job_tres() which calls
    assoc_mgr_set_tres_cnt_array() which allocates memory for the job's
    tres_alloc_cnt. The job array gets scheduled, but job_array_split()
    doesn't NULL out the pending job's tres_alloc_cnt, so both the array
    task and the pending array job are pointing to the same memory. The
    array task calls job_set_alloc_tres() which free's the running job's
    tres_alloc_cnt and now the pending array job is pointing to bad memory
    and when the array splits again the new array task tries to free
    tres_alloc_cnt in job_set_alloc_tres() and segfaults.
    
    Bug 5604
    eab9f405
To find the state of this project's repository at the time of any of these versions, check out the tags.