Think that might be the problem then.<br><br>Thanks!<br><br><div class="gmail_quote">On Mon, Aug 13, 2012 at 3:32 AM, Thomas Graf <span dir="ltr"><<a href="mailto:tgraf@suug.ch" target="_blank">tgraf@suug.ch</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Fri, Aug 10, 2012 at 02:34:04PM -0400, samriti katoch wrote:<br>
> Hi,<br>
><br>
> I am using libnl-3-200_3.2.7-2_i386.deb and<br>
> libnl-route-3-200_3.2.7-2_i386.deb on Ubuntu to resolve IPv6 addresses into<br>
> corresponding MAC addresses, in a multi-threaded application. I see the<br>
> application crash with Segmentation fault after resolving close to 30,000<br>
> IPv6 addresses.<br>
> The application creates a cache manager for both route/link and route/neigh<br>
> and then uses nl_cache_mngr_poll function to receive neighbor cache<br>
> updates. Here is a backtrace from gdb after the segmentation fault:<br>
><br>
> Program received signal SIGSEGV, Segmentation fault.<br>
> [Switching to Thread -378549344 (LWP 3159)]<br>
> 0xf7e081b3 in main_arena () from /lib/tls/i686/cmov/libc.so.6<br>
> (gdb) bt<br>
> #0  0xf7e081b3 in main_arena () from /lib/tls/i686/cmov/libc.so.6<br>
> #1  0xf7f968b6 in nl_recvmsgs () from /lib/libnl-3.so.200<br>
> #2  0xf7f96e52 in nl_recvmsgs_default () from /lib/libnl-3.so.200<br>
> #3  0xf7f929ee in nl_cache_mngr_data_ready () from /lib/libnl-3.so.200<br>
> #4  0xf7f92a8a in nl_cache_mngr_poll () from /lib/libnl-3.so.200<br>
><br>
> I looked through logs of recent commits and did not find anything that<br>
> mentions this problem.<br>
> I would appreciate it if I could get your inputs on this, and also if libnl<br>
> can handle high load from a multi-threaded applications.<br>
<br>
</div></div>Do you run updates to the cache manager from multiple threads? That is<br>
not safe. You can read from the cache manager from multiple threads if<br>
you ensure that the updating thread does not run while you are reading<br>
it. libnl only implements locking for static data.<br>
<span class="HOEnZb"><font color="#888888"><br>
~Thomas<br>
</font></span></blockquote></div><br>