bug-gnustep
[Top][All Lists]
Advanced

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

[bug #58550] WebServer - Deadlock due to missing socketAddress


From: David Ayers
Subject: [bug #58550] WebServer - Deadlock due to missing socketAddress
Date: Fri, 12 Jun 2020 05:29:33 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0

URL:
  <https://savannah.gnu.org/bugs/?58550>

                 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: <NSException: 0x55e7b5b0fd80>
NAME:NSInvalidArgumentException REASON:Tried to nil value to counted set
INFO:(null)
*** -[NSLock lock]: deadlock (<NSLock: 0x55e7a9a75ed0> (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:

  <https://savannah.gnu.org/bugs/?58550>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]