[v3.2.24] ct: endless loop when initializing netfilter/ct cache

Holger Eitzenberger holger at eitzenberger.org
Wed Oct 22 06:31:23 PDT 2014


Hi all,

I have program consuming 100% after upgrading libnl from v3.2.13
to v3.2.24:

#0  0xf77a404d in ?? () from /usr/lib/libnl-nf-3.so.200
001  0xf773741a in nl_object_identical () from /usr/lib/libnl-3.so.200
#2  0xf772f35f in nl_cache_search () from /usr/lib/libnl-3.so.200
003  0xf7730262 in ?? () from /usr/lib/libnl-3.so.200
#4  0xf77a3221 in ?? () from /usr/lib/libnl-nf-3.so.200
#5  0xf772f3ed in nl_cache_parse () from /usr/lib/libnl-3.so.200
006  0xf772f4b7 in ?? () from /usr/lib/libnl-3.so.200
007  0xf7735b8e in nl_recvmsgs_report () from /usr/lib/libnl-3.so.200
008  0xf7735ff4 in nl_recvmsgs () from /usr/lib/libnl-3.so.200
009  0xf772f5a7 in ?? () from /usr/lib/libnl-3.so.200
010 0xf772f69b in nl_cache_pickup () from /usr/lib/libnl-3.so.200
#11 0xf772fbd8 in nl_cache_refill () from /usr/lib/libnl-3.so.200
012 0xf77307e6 in nl_cache_alloc_and_fill () from /usr/lib/libnl-3.so.200
013 0xf77a213e in nfnl_ct_alloc_cache () from /usr/lib/libnl-nf-3.so.200
014 0xf77be797 in nl_cli_alloc_cache () from /usr/lib/libnl-cli-3.so.200
015 0xf77bf3b1 in nl_cli_ct_alloc_cache () from /usr/lib/libnl-cli-3.so.200
016 0x0804965c in do_cmd_ct_del (argc=6, argv=0xffa3e2d4) at ct.c:326

This small program I currently use to selectively delete conntracks
from the Kernel.  This is e. g. usefull for a firewall-like
product with UNREPLIED UDP conntracks, as they need to be removed
after changing NATs.

The relevant code of the small program is:

	cache = nl_cli_ct_alloc_cache(sock);
	nl_cache_foreach(cache, ct_del_filter_cb, ct_filter);

And according to the trace the loop is happening in first line, before
doing the actual delete ops on the cache.

Our libnl is only slightly patched these days.  When looking at the
changes from v3.2.13 to v3.2.24 there are quite some changes to the
cache behaviour.  And the issue could be related to that.

And idea what is wrong there?  I am currently investigating as well.
It can be triggered quite reliably.  Kernel is v3.12.

Thanks.

 /Holger




More information about the libnl mailing list