Changeset 1105ce0 for lib


Ignore:
Timestamp:
06/23/17 14:17:24 (4 years ago)
Author:
GitHub <noreply@…>
Branches:
cachetimestamps, develop, dpdk-ndag, etsilive, master, ndag_format, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance
Children:
9cdbedb, fdf1f7b
Parents:
e9c089a (diff), b606855 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Shane Alcock <salcock@…> (06/23/17 14:17:24)
git-committer:
GitHub <noreply@…> (06/23/17 14:17:24)
Message:

Merge pull request #53 from LibtraceTeam?/fix_assertion_error

Fixes issue #50 pstop errors/assertions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/trace_parallel.c

    rf4fdcd1 rb606855  
    805805                                        break;
    806806                                case MESSAGE_DO_STOP:
     807                                        /* Either FINISHED or FINISHING */
    807808                                        assert(trace->started == false);
    808                                         assert(trace->state == STATE_FINISHED);
    809809                                        /* Mark the current packet as EOF */
    810810                                        packet->error = 0;
    811                                         break;
     811                                        goto hasher_eof;
    812812                                default:
    813813                                        fprintf(stderr, "Hasher thread didn't expect message code=%d\n", message.code);
     
    850850                }
    851851        }
    852 
     852hasher_eof:
    853853        /* Broadcast our last failed read to all threads */
    854854        for (i = 0; i < trace->perpkt_thread_count; i++) {
     
    862862                ASSERT_RET(pthread_mutex_lock(&trace->libtrace_lock), == 0);
    863863                if (trace->perpkt_threads[i].state != THREAD_FINISHED) {
    864                         // Unlock early otherwise we could deadlock
    865864                        libtrace_ringbuffer_write(&trace->perpkt_threads[i].rbuffer, bcast);
     865                } else {
     866                        libtrace_ocache_free(&trace->packet_freelist, (void **) &bcast, 1, 1);
    866867                }
    867868                ASSERT_RET(pthread_mutex_unlock(&trace->libtrace_lock), == 0);
Note: See TracChangeset for help on using the changeset viewer.