<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On 7 November 2013 01:05, Tobias Brunner <span dir="ltr"><<a href="mailto:tobias@strongswan.org" target="_blank">tobias@strongswan.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Guru,<br>
<br>
Thanks for the detailed report. It is in fact a deadlock caused by<br>
thread 3 holding the lock in bus.c and trying to acquire the lock in<br>
trap_manager.c that is currently being held by thread 14, which in turn<br>
wants to acquire the lock in bus.c held by thread 3.<br>
<br>
This situation may occur if "ipsec route" is called (maybe via starter<br>
due to auto=route) while SAs are concurrently being established.<br>
<br>
The main problem is that the write lock in trap_manager.c is held while<br>
the IPsec policies are installed. I pushed a fix to the trap-deadlock<br>
branch in our repository [1] (it won't apply to 5.0.4 directly as there<br>
were some changes to trap_manager.c since then).<br>
<br>
Regards,<br>
Tobias<br>
<br>
[1] <a href="http://git.strongswan.org/?p=strongswan.git;a=commitdiff;h=4ffa72f65" target="_blank">http://git.strongswan.org/?p=strongswan.git;a=commitdiff;h=4ffa72f65</a><br></blockquote><div><br></div><div>Thanks much for the quick patch. I did a back port to 5.0.4. I have hit this bug a couple of times in the last few weeks. So, I will know if this patch helps soon.<br>
<br></div></div><br></div></div>