[strongSwan] what could cause strongswan 4.3.2 to freeze up

Martin Willi martin at strongswan.org
Tue Dec 6 09:45:05 CET 2011


Hi,

> If the above is all the mutex is trying to protect, then it would make
> my change simpler.

No, the important part is to protect the list of registered listeners.
There are not only loggers, but other dynamically registered listeners
that use this interface. Invoking a listener function while it gets
unregistered is problematic.

> The backtrace indicate the following events:
> - thread 9 passed through child_state_change() in bus.c:406 and owned
>   private_bus_t->mutex
> - thread 4 passed through build_address_list() in ike_mobike.c, called 
>   kernel_interface->create_address_enumerator and owned 
>   private_kernel_netlink_net_t->mutex
> - thread 9 invoked kernel_interface->get_interface and have to wait for 
>   the private_kernel_netlink_net_t->mutex
> - thread 4 called DBG2(DBG_ENC ,"added payload of type %N to message",...)
>   and have to wait for private_bus_t->mutex

I see. One option you have is to disable the updown plugin if you don't
need it. It is probably the only listener that locks the kernel
interface, disabling it will probably solve your issue.

A second option is to replace the kernel-interface mutex with a
read/write-lock, allowing multiple readers to get the interface list and
name. Shouldn't be too hard.

The third option, making bus_t to invoke listener functions in parallel,
would be preferable. But it is very very difficult to implement
properly. But that's what we should target for the long term.

Regards
Martin






More information about the Users mailing list