Changeset c95ef4a


Ignore:
Timestamp:
06/30/18 15:00:23 (2 years ago)
Author:
Richard Sanger <rsanger@…>
Branches:
cachetimestamps, develop, master, rc-4.0.4, ringdecrementfix, ringperformance
Children:
7bb2fd4, 8f5d454
Parents:
b6579db
Message:

Fixes trace_pstop not working with pcapint issue #69

Fixes a deadlock which was caused by allowing a lock in a single threaded part of the code.
This would clear itself if enough packets are received, but not on a quiet link.

This lock was originally added to fix a bug I introduced allowing multiple
threads into that code. Introduced in 47c4490, which has since been fixed
properly by 684a21c.

If we need to lock on a read operation there is a read_lock which should be used
instead of the trace_lock.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/trace_parallel.c

    rf57722d6 rc95ef4a  
    690690                        if (!trace->pread) {
    691691                                assert(packets[0]);
    692                                 ASSERT_RET(pthread_mutex_lock(&trace->libtrace_lock), == 0);
    693692                                nb_packets = trace_read_packet(trace, packets[0]);
    694                                 ASSERT_RET(pthread_mutex_unlock(&trace->libtrace_lock), == 0);
    695693                                packets[0]->error = nb_packets;
    696694                                if (nb_packets > 0)
Note: See TracChangeset for help on using the changeset viewer.