[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #43348] [WebServer] Retain/release balance is broken for main IOThr
From: |
Sergei Golovin |
Subject: |
[bug #43348] [WebServer] Retain/release balance is broken for main IOThread |
Date: |
Thu, 02 Oct 2014 13:38:56 +0000 |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0 |
URL:
<http://savannah.gnu.org/bugs/?43348>
Summary: [WebServer] Retain/release balance is broken for
main IOThread
Project: GNUstep
Submitted by: svg
Submitted on: Thu 02 Oct 2014 05:38:55 PM SAMT
Category: Libraries
Severity: 3 - Normal
Item Group: Bug
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
----- it is what i previously reported in the mail list --------
I need to start NSURLConnection tests consequently.
That means that after a test starting WebServer has been completed another
test is started.
If the former shuts down it's WebServer instance the latter should start it's
own instance.
There is the problem i have. It seems the second WebServer instance starts
fine but any connection
to it fails for 'Connection refused'. And i get
Uncaught exception NSInternalInconsistencyException, reason: Deallocating an
active thread without [+exit]!
at the end of the second test on destroying of the WebServer instance.
A simplified test session is attached.
------------------ the end of the report ---------------------
Since that time I have found that it is the retain/release cycle for the main
IOThread is unbalanced and is the culprit.
There is assigning of the main thread in the method -[WebServer _setup]
_ioMain->thread = [NSThread currentThread];
Later the test session tries to destroy the WebServer instance as a usual
cleaning practice. It leads eventually to deallocation of the main IOThread.
The method -[IOThread dealloc] tries to release not-retained (see above) ivar
'thread'
[thread release];
that causes the exception.
The trivial patch curing the problem for me is attached.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Thu 02 Oct 2014 05:38:55 PM SAMT Name: ConsequentWebServers.tar.bz2
Size: 1kB By: svg
<http://savannah.gnu.org/bugs/download.php?file_id=32211>
-------------------------------------------------------
Date: Thu 02 Oct 2014 05:38:55 PM SAMT Name: mainIOThreadRRCBalancing.patch
Size: 462B By: svg
<http://savannah.gnu.org/bugs/download.php?file_id=32212>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?43348>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [bug #43348] [WebServer] Retain/release balance is broken for main IOThread,
Sergei Golovin <=