[lttng-dev] urcu hang in cds_lfht_add

Florian Lohoff f at zz.de
Tue Jan 28 16:01:50 EST 2014

On Tue, Jan 28, 2014 at 09:24:13PM +0100, Florian Lohoff wrote:
> Hi,
> i am using urcu hashes for indexing network packets. I am currently
> reading a pcap file for replaying so i am single threaded right now.
> I am indexing the same packet in multiple different hashes.
> I have now added call_rcu for freeing structures and now i experience
> hangs.
> As soon as i remove the call_rcu the code runs through. with the call_rcu
> it hangs after a couple thousand packets in an cds_lfht_add.
> As i find RCU still a little mind twisting i fail to find a path
> for debugging.
> Ah - this is urcu 0.7.7 on Debian/Wheezy amd64

Using 0.8.1 with DEBUG_RCU, adding a second thread calling synchronize_rcu regularly
gave an assert sometimes which showed some broken state.

Disabling the last free() caused the process to finish so 
i found a small bug causing a removal on a hash to fail.

I freed the memory and there was your hash corruption.

Sorry for the noise ...

Florian Lohoff                                                 f at zz.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: Digital signature
URL: <http://lists.lttng.org/pipermail/lttng-dev/attachments/20140128/6a7654f8/attachment.pgp>

More information about the lttng-dev mailing list