Issues

Issue #18 invalid

APScheduler main loop throws exception IOError 514

Anonymous created an issue

Environment OS : Linux 2.6.18-92.el5xen #1 SMP Tue Jun 10 19:20:18 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux Python : Python 2.7.1 APScheduler : APScheduler-2.0.2-py2.7

LOG Exception in thread APScheduler: Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 530, in bootstrap_inner self.run() File "/usr/lib/python2.7/threading.py", line 483, in run self.target(*self.args, **self.kwargs) File "/home/ead/disk1/adstat-tocassa/thirdpart/APScheduler-2.0.2-py2.7.egg/apscheduler/scheduler.py", line 552, in _main_loop self._wakeup.wait(wait_seconds) File "/usr/lib/python2.7/threading.py", line 394, in wait self.__cond.wait(timeout) File "/usr/lib/python2.7/threading.py", line 257, in wait _sleep(delay) IOError: [Errno 514] Unknown error 514

Comments (9)

  1. Anonymous

    Environment

    • OS : Linux 2.6.18-92.el5xen #1 SMP Tue Jun 10 19:20:18 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux
    • Python : Python 2.7.1
    • APScheduler : APScheduler-2.0.2-py2.7

    LOG

    Exception in thread APScheduler:
    Traceback (most recent call last):
      File "/usr/lib/python2.7/threading.py", line 530, in __bootstrap_inner
        self.run()
      File "/usr/lib/python2.7/threading.py", line 483, in run
        self.__target(*self.__args, **self.__kwargs)
      File "/home/ead/disk1/adstat-tocassa/thirdpart/APScheduler-2.0.2-py2.7.egg/apscheduler/scheduler.py", line 552, in _main_loop
        self._wakeup.wait(wait_seconds)
      File "/usr/lib/python2.7/threading.py", line 394, in wait
        self.__cond.wait(timeout)
      File "/usr/lib/python2.7/threading.py", line 257, in wait
        _sleep(delay)
    IOError: [Errno 514] Unknown error 514
    
  2. Alex Grönholm repo owner

    First of all: try with the latest APScheduler. Second: attach a script that reproduces the problem. Then I can start figuring out what's going on.

  3. Anonymous

    Thanks for your reply!

    I have tied with the lastest APScheduler-2.0.3-py2.7, and this problem still exists.

    2012-04-20 12:15:16,577 INFO - [merge] 0 to insert, 50 to update
    sort: /disk3/mfs/mcube/hourly/2012/04/19/19/m:p:2: disorder: 14 1342155-18790170-549-74445
    Exception in thread APScheduler:
    Traceback (most recent call last):
      File "/usr/lib/python2.7/threading.py", line 530, in __bootstrap_inner
        self.run()
      File "/usr/lib/python2.7/threading.py", line 483, in run
        self.__target(*self.__args, **self.__kwargs)
      File "build/bdist.linux-x86_64/egg/apscheduler/scheduler.py", line 562, in _main_loop
        self._wakeup.wait(wait_seconds)
      File "/usr/lib/python2.7/threading.py", line 394, in wait
        self.__cond.wait(timeout)
      File "/usr/lib/python2.7/threading.py", line 257, in wait
        _sleep(delay)
    IOError: [Errno 514] Unknown error 514
    
  4. Anonymous

    It's difficult to write a script to reproduce the problem, but the problem truely exisits in our system.

    To avoid the exit of main loop due to exception thrown by calling of wait(), I have to change the source code of APScheduler and let the main loop catch that exception.

  5. maoz_guttman

    Hi,

    I hit that bug too.

    time.sleep API is raising an "IOError: [Errno 514] Unknown error 514" exception rarely. You might have to call time.sleep API thousands of times in order to reproduce it. You can read about it here

    Anyway, I think a simple way to workaround it is by wrapping the following code in scheduler.py --> _main_loop function in a try-except: self._wakeup.wait(wait_seconds)

    threading._Event.wait API is calling time.sleep API when the timeout arguement is not None.

    Are you willing to do that fix?

    Thanks, Maoz

  6. Log in to comment