simulator fails on stopiing server

Bug #1576614 reported by Julia Portnova
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo.messaging
Fix Released
Undecided
Dmitriy Ukhlov

Bug Description

Simulator.py fails to exit correctly on SIGINT

2016-04-29 08:40:58,375 INFO root Signal 2 is caught. Interrupting the execution
Traceback (most recent call last):
  File "simulator.py", line 696, in <module>
    main()
  File "simulator.py", line 656, in main
    args.executor, args.duration)
  File "simulator.py", line 410, in rpc_server
    run_server(server, duration=duration)
  File "simulator.py", line 399, in run_server
    server.wait()
  File "/var/venv/local/lib/python2.7/site-packages/oslo_messaging/server.py", line 264, in wrapper
    log_after, timeout_timer)
  File "/var/venv/local/lib/python2.7/site-packages/oslo_messaging/server.py", line 163, in wait_for_completion
    msg, log_after, timeout_timer)
  File "/var/venv/local/lib/python2.7/site-packages/oslo_messaging/server.py", line 145, in _wait
    self._cond.wait(wait)
  File "/usr/lib/python2.7/threading.py", line 339, in wait
    waiter.acquire()
  File "/var/venv/local/lib/python2.7/site-packages/eventlet/semaphore.py", line 113, in acquire
    hubs.get_hub().switch()
  File "/var/venv/local/lib/python2.7/site-packages/eventlet/hubs/hub.py", line 294, in switch
    return self.greenlet.switch()
  File "/var/venv/local/lib/python2.7/site-packages/eventlet/hubs/hub.py", line 346, in run
    self.wait(sleep_time)
  File "/var/venv/local/lib/python2.7/site-packages/eventlet/hubs/poll.py", line 85, in wait
    presult = self.do_poll(seconds)
  File "/var/venv/local/lib/python2.7/site-packages/eventlet/hubs/epolls.py", line 62, in do_poll
    return self.poll.poll(seconds)
  File "simulator.py", line 540, in signal_handler
    server.stop()
  File "/var/venv/local/lib/python2.7/site-packages/oslo_messaging/server.py", line 268, in wrapper
    log_after, timeout_timer)
  File "/var/venv/local/lib/python2.7/site-packages/oslo_messaging/server.py", line 188, in run_once
    post_fn = fn()
  File "/var/venv/local/lib/python2.7/site-packages/oslo_messaging/server.py", line 267, in <lambda>
    states[state].run_once(lambda: fn(self, *args, **kwargs),
  File "/var/venv/local/lib/python2.7/site-packages/oslo_messaging/server.py", line 426, in stop
    self.listener.stop()
  File "/var/venv/local/lib/python2.7/site-packages/oslo_messaging/_drivers/base.py", line 221, in stop
    self._listen_thread.join()
  File "/usr/lib/python2.7/threading.py", line 949, in join
    self.__block.wait()
  File "/usr/lib/python2.7/threading.py", line 339, in wait
    waiter.acquire()
  File "/var/venv/local/lib/python2.7/site-packages/eventlet/semaphore.py", line 113, in acquire
    hubs.get_hub().switch()
  File "/var/venv/local/lib/python2.7/site-packages/eventlet/hubs/hub.py", line 280, in switch
    assert cur is not self.greenlet, 'Cannot switch to MAINLOOP from MAINLOOP'
AssertionError: Cannot switch to MAINLOOP from MAINLOOP

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo.messaging (master)

Fix proposed to branch: master
Review: https://review.openstack.org/311090

Changed in oslo.messaging:
assignee: nobody → Dmitriy Ukhlov (dukhlov)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo.messaging (master)

Reviewed: https://review.openstack.org/311090
Committed: https://git.openstack.org/cgit/openstack/oslo.messaging/commit/?id=a98fa8f52fe309d49884b8a75eb348b023adf55c
Submitter: Jenkins
Branch: master

commit a98fa8f52fe309d49884b8a75eb348b023adf55c
Author: Dmitriy Ukhlov <email address hidden>
Date: Fri Apr 29 07:18:39 2016 -0500

    Fixes sumulator.py signal_handler logic

    Change-Id: I95ee737a6c12572e7b3d27d8ea117c9f2909ef28
    Closes-bug: #1576614

Changed in oslo.messaging:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/oslo.messaging 5.0.0

This issue was fixed in the openstack/oslo.messaging 5.0.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.