Path: csiph.com!goblin2!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail From: David Ayers Newsgroups: gnu.gnustep.bug Subject: [bug #58550] WebServer - Deadlock due to missing socketAddress Date: Fri, 12 Jun 2020 05:29:33 -0400 (EDT) Lines: 53 Approved: bug-gnustep@gnu.org Message-ID: References: <20200612-112931.sv15401.74795@savannah.gnu.org> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain;charset=UTF-8 X-Trace: usenet.stanford.edu 1591954175 30138 209.51.188.17 (12 Jun 2020 09:29:35 GMT) X-Complaints-To: action@cs.stanford.edu To: David Ayers , bug-gnustep@gnu.org Envelope-to: bug-gnustep@gnu.org X-PHP-Originating-Script: 1001:sendmail.php X-Savane-Server: savannah.gnu.org:443 [209.51.188.72] X-Savane-Project: gnustep X-Savane-Tracker: bugs X-Savane-Item-ID: 58550 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0 X-Apparently-From: 78.55.32.103 (Savane authenticated user ayers) In-Reply-To: X-BeenThere: bug-gnustep@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports for the GNUstep programming environment List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <20200612-112931.sv15401.74795@savannah.gnu.org> Xref: csiph.com gnu.gnustep.bug:4388 URL: Summary: WebServer - Deadlock due to missing socketAddress Project: GNUstep Submitted by: ayers Submitted on: Fri 12 Jun 2020 11:29:31 AM CEST Category: Libraries Severity: 3 - Normal Item Group: Bug Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any _______________________________________________________ Details: The WebServer method _didConnect retrieves the foreign socketAddress from the file handle. The refusal message addresses the possibility of that address being nil. Yet later the variable for the address is unconditionally added the the _perHost set which raises an Exception while holding the WebServer lock, leading to a deadlock upon the next request. Problem posting notification: NAME:NSInvalidArgumentException REASON:Tried to nil value to counted set INFO:(null) *** -[NSLock lock]: deadlock ( (locked by 19025)) *** Break on _NSLockError() to debug. Later in _endConnect the address is also conditionally removed again, but that only invokes a warning if address is nil. I do not know what the intended behavior is but I've fixed/worked around the problem, by simply checking for nil and not adding or removing the nil value to or from the set. _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via Savannah https://savannah.gnu.org/