Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Apr 2012 18:21:37 +0200
From:      Alexandre Martins <alexandre.martins@netasq.com>
To:        freebsd-current@freebsd.org
Subject:   Potential deadlock on mbuf
Message-ID:  <201204021821.37437.alexandre.martins@netasq.com>

next in thread | raw e-mail | index | archive | help
Dear,

I have currently having troubles with a basic socket stress.

The socket are setup to use non-blocking I/O.

During this stress-test, the kernel is running mbuf exhaustion, the goal is to 
see system limits.

If the program make a write on a socket during this mbuf exhaustion, it become 
blocked in "write" system call. The status of the process is "zonelimit" and 
whole network I/O fall in timeout.

I have found the root cause of the block  :
http://svnweb.freebsd.org/base/head/sys/kern/uipc_socket.c?view=markup#l1279

So, the question is : Why m_uiotombuf is called with a blocking parameter 
(M_WAITOK) even if is for a non-blocking socket ?

Then, if M_NOWAIT is used, maybe it will be usefull to have an 'ENOMEM' error.

Regards

-- 
Alexandre Martins




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201204021821.37437.alexandre.martins>