[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [lvm-devel] [PATCH] Fix a double close() in clvmd (fixing another deadlock bug)

On 10/27/2010 01:37 AM, Petr Rockai wrote:

> - a connection to clvmd is about to finish, let's say the fd is 13 (it
>   often happens to be in my test script, don't ask why)
> - the local_sock thread calls close(13)
> - the lvm thread calls open("/proc/devices"...) and gets 13
> - the main_loop thread calls close(13) [OOPS!]
> - new connection arrives, and is accept'd by a (new) local_sock thread
> - the accept gives an fd of 13 (since it's the lowest free fd at this point)
> - the lvm thread gets around to read from it's /proc/devices
>   handle... 13, again
> - the lvm thread hangs forever trying to read from the socket instead
>   from /proc/devices

Aieeeee. Which fd you want to read today? This sounds so secure... :)

But I still think it is not the real deadlocking problem still...

Anyway, should I build another test rpm with that?

Of course, Ack.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]