Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Ticket #348 (defect)

Opened 3 years ago

Last modified 3 months ago

Server state tests fail on windows xp dual core box, possible threading issue

Status: reopened

Reported by: anonymous Assigned to: rdelon
Priority: normal Milestone: 2.2-final
Component: engine Keywords: test failure error
Cc:

under windows xp, rc2 fails to execute the test suite. rc1 works fine ====================================================================== ERROR: test_1_Restart (test_states.ServerStateTests?)


Traceback (most recent call last):

File "C:\Python24\Lib\site-packages\cherrypy\test\webtest.py", line 249, in call

testMethod()

File "C:\Python24\Lib\site-packages\cherrypy\test\test_states.py", line 133, in test_1_Restart

cherrypy.server.restart()

File "C:\Python24\Lib\site-packages\cherrypy\_cpserver.py", line 262, in restart

self.start_http_server()

File "C:\Python24\Lib\site-packages\cherrypy\_cpserver.py", line 177, in start_http_server

self.wait_for_http_ready()

File "C:\Python24\Lib\site-packages\cherrypy\_cpserver.py", line 190, in wait_for_http_ready

wait_for_occupied_port(host, port)

File "C:\Python24\Lib\site-packages\cherrypy\_cpserver.py", line 368, in wait_for_occupied_port

raise cherrypy.NotReady("Port not bound.") NotReady?: Port not bound.

Change History

10/19/05 13:37:00: Modified by anonymous

Addendum... all of the tutorials do, however execute without problem

10/21/05 07:40:16: Modified by rdelon

  • status changed from new to closed.
  • resolution set to invalid.

Probably caused by some network setup problem on this perticular computer

10/28/05 13:08:40: Modified by wayne_at_waynewerner.org

  • summary changed from rc2 tests fail on windows xp box to Server state tests fail on windows xp dual core box, possible threading issue.
  • milestone changed from 2.1-rc2 to 2.1-final.

I did some investigation... Test suite runs fine if test_states is not run. All state tests run fine for the serverless state tests. wsgi state tests run fine if restart test is not run. Only the normal flow state test works for the the pooled thread server state test. For the http server, again, restart throws in the towel.

As far as i can tell, the issue isn't a network problem, but a threading problem. The above error occurs because the port is never freed, and thus is in use, and fails to be rebound. I have carefully tested quite a few other networking apps, without incident.

I believe that these errors become apparent on my development system, as I am using a dual core pentium IV. Multiple processors on a particular os can often expose threading issues that don't occur on single processor systems, or on multi processor systems with other another os.

Please test again with a dual core system xp system. Thanks!

10/28/05 13:11:31: Modified by anonymous

  • status changed from closed to reopened.
  • resolution deleted.

11/18/05 06:00:19: Modified by rdelon

  • status changed from reopened to closed.
  • resolution set to invalid.

04/05/08 18:30:55: Modified by guest

  • status changed from closed to reopened.
  • resolution deleted.
  • milestone changed from 2.1-final to 2.2-final.

I have the Pentium IV dual core and cannot run the simple helloworld.py tutorial with CherryPy 2.3.0

06/Apr/2008:01:24:40 CONFIG INFO server.socket_file: 06/Apr/2008:01:24:40 CONFIG INFO server.reverse_dns: False 06/Apr/2008:01:24:40 CONFIG INFO server.socket_queue_size: 5 06/Apr/2008:01:24:40 CONFIG INFO server.thread_pool: 10 06/Apr/2008:01:24:46 HTTP INFO Port 80 not free on '127.0.0.1' Unhandled exception in thread started by <bound method Server._start of <cherryp y._cpserver.Server object at 0x00CF7F90>> Traceback (most recent call last):

File "c:\dev\python251\lib\site-packages\cherrypy-2.3.0-py2.5.egg\cherrypy\_cp server.py", line 79, in _start

self.start_http_server()

File "c:\dev\python251\lib\site-packages\cherrypy-2.3.0-py2.5.egg\cherrypy\_cp server.py", line 99, in start_http_server

wait_for_free_port(host, port)

File "c:\dev\python251\lib\site-packages\cherrypy-2.3.0-py2.5.egg\cherrypy\_cp server.py", line 252, in wait_for_free_port

raise cherrypy.NotReady("Port not free.") cherrypy._cperror.NotReady?: Port not free.

Hosted by WebFaction

Log in as guest/cpguest to create tickets