Bug in libnl-3.2.0?

Thomas Graf tgraf at suug.ch
Mon Aug 13 03:32:53 EDT 2012


On Fri, Aug 10, 2012 at 02:34:04PM -0400, samriti katoch wrote:
> Hi,
> 
> I am using libnl-3-200_3.2.7-2_i386.deb and
> libnl-route-3-200_3.2.7-2_i386.deb on Ubuntu to resolve IPv6 addresses into
> corresponding MAC addresses, in a multi-threaded application. I see the
> application crash with Segmentation fault after resolving close to 30,000
> IPv6 addresses.
> The application creates a cache manager for both route/link and route/neigh
> and then uses nl_cache_mngr_poll function to receive neighbor cache
> updates. Here is a backtrace from gdb after the segmentation fault:
> 
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread -378549344 (LWP 3159)]
> 0xf7e081b3 in main_arena () from /lib/tls/i686/cmov/libc.so.6
> (gdb) bt
> #0  0xf7e081b3 in main_arena () from /lib/tls/i686/cmov/libc.so.6
> #1  0xf7f968b6 in nl_recvmsgs () from /lib/libnl-3.so.200
> #2  0xf7f96e52 in nl_recvmsgs_default () from /lib/libnl-3.so.200
> #3  0xf7f929ee in nl_cache_mngr_data_ready () from /lib/libnl-3.so.200
> #4  0xf7f92a8a in nl_cache_mngr_poll () from /lib/libnl-3.so.200
> 
> I looked through logs of recent commits and did not find anything that
> mentions this problem.
> I would appreciate it if I could get your inputs on this, and also if libnl
> can handle high load from a multi-threaded applications.

Do you run updates to the cache manager from multiple threads? That is
not safe. You can read from the cache manager from multiple threads if
you ensure that the updating thread does not run while you are reading
it. libnl only implements locking for static data.

~Thomas



More information about the libnl mailing list