On 05/24/2016 12:16 PM, GUNA wrote:
> I suspect there could be glitch on switch may cause lost the probe or
> abort message.  However, even if the messages are lost for what ever
> reason, is not TIPC stack should handle the graceful shutdown of the
> TIPC connection by releasing all the resources instead of panic or
> dead itself ?
I don't think this is about lost packets or shutdown at all, as far as I 
can see form the dump.This is a node local socket-to-socket call that 
bypasses any interfaces and switches.
>
> Does lock_sock/release_sock use in tipc_sk_timeout() fix the issue ?

No, it won't. At first I thought this obvious, as can be deferred from 
my first comment:
tipc_sk_timeout() grabs sk.slock, sends a message to the receiver 
socket, which for some reason chooses to return it to sender. In 
tipc_sk_rcv we try to grab sk.slock again, and hence we end up in a 
deadlock.

Unfortunately this theory is not correct.
tipc_sk_timeout() actually releases sk.slock before it sends out the 
buffer, so there is no way a deadlock can happen this way.  Besides, 
given that we don't actually spin on  a spin_trylock_bh() call, I 
believe we are on the wrong track when suspecting a slock deadlock.

A message produced by tipc_sk_timeout can only be a 
CONN_MANAGER/CONN_PROBE message, but I don't see filter_rcv() calling 
tipc_sk_proto_rcv() anywhere. The explanation seems to be that 
tipc_sk_proto_rcv() is inlined. So, we can probably assume that the 
message causing the deadlock is a regular CONN_MANAGER/CONN_PROBE_REPLY.

So, my theory right now is that the reply message for some reason causes 
tipc_sk_rv() to enter a loop where 'inputq' never is emptied.

This is as far as I get in my analysis right now. Does anybody else have 
any good ideas?

///jon



>
> Thanks,
> Guna
>
> ------------------------------------------------------------------------------
> Mobile security can be enabling, not merely restricting. Employees who
> bring their own devices (BYOD) to work are irked by the imposition of MDM
> restrictions. Mobile Device Manager Plus allows you to control only the
> apps on BYO-devices by containerizing them, leaving personal data untouched!
> https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
> _______________________________________________
> tipc-discussion mailing list
> tipc-discussion@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tipc-discussion


------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
tipc-discussion mailing list
tipc-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tipc-discussion

Reply via email to