Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 7th, 2012  |  syntax: None  |  size: 12.96 KB  |  hits: 12  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. ***************************************************************************
  2.  
  3. Crash traceback:
  4.  
  5. ---------------------------------------------------------------------------
  6. KeyboardInterrupt  Python 2.6.6: /home/ben/dev/ve/ticket-manager/bin/python
  7.                                                    Mon Aug  1 12:21:42 2011
  8. A problem occured executing Python code.  Here is the sequence of function
  9. calls leading up to the error, with the most recent (innermost) call last.
  10. /usr/lib/python2.6/atexit.pyc in _run_exitfuncs()
  11.       9
  12.      10 import sys
  13.      11
  14.      12 _exithandlers = []
  15.      13 def _run_exitfuncs():
  16.      14     """run any registered exit functions
  17.      15
  18.      16     _exithandlers is traversed in reverse order so functions are executed
  19.      17     last in, first out.
  20.      18     """
  21.      19
  22.      20     exc_info = None
  23.      21     while _exithandlers:
  24.      22         func, targs, kargs = _exithandlers.pop()
  25.      23         try:
  26. ---> 24             func(*targs, **kargs)
  27.         func = <function shutdown at 0x97d54c4>
  28.         global function = undefined
  29.         global to = undefined
  30.         global be = undefined
  31.         global called = undefined
  32.         global at = undefined
  33.         global exit = undefined
  34.      25         except SystemExit:
  35.      26             exc_info = sys.exc_info()
  36.      27         except:
  37.      28             import traceback
  38.      29             print >> sys.stderr, "Error in atexit._run_exitfuncs:"
  39.      30             traceback.print_exc()
  40.      31             exc_info = sys.exc_info()
  41.      32
  42.      33     if exc_info is not None:
  43.      34         raise exc_info[0], exc_info[1], exc_info[2]
  44.      35
  45.      36
  46.      37 def register(func, *targs, **kargs):
  47.      38     """register a function to be executed upon normal program termination
  48.      39
  49.  
  50. /home/ben/dev/ve/ticket-manager/lib/python2.6/site-packages/ipython-0.11-py2.6.egg/IPython/core/history.pyc in stop(self=<HistorySavingThread(Thread-1, started -1221960848)>)
  51.     483                     return
  52.     484                 self.history_manager.save_flag.clear()
  53.     485                 self.history_manager.writeout_cache(self.db)
  54.     486         except Exception as e:
  55.     487             print(("The history saving thread hit an unexpected error (%s)."
  56.     488                    "History will not be written to the database.") % repr(e))
  57.     489        
  58.     490     def stop(self):
  59.     491         """This can be called from the main thread to safely stop this thread.
  60.     492        
  61.     493         Note that it does not attempt to write out remaining history before
  62.     494         exiting. That should be done by calling the HistoryManager's
  63.     495         end_session method."""
  64.     496         self.stop_now = True
  65.     497         self.history_manager.save_flag.set()
  66. --> 498         self.join()
  67.     499
  68.     500        
  69.     501 # To match, e.g. ~5/8-~2/3
  70.     502 range_re = re.compile(r"""
  71.     503 ((?P<startsess>~?\d+)/)?
  72.     504 (?P<start>\d+)                    # Only the start line num is compulsory
  73.     505 ((?P<sep>[\-:])
  74.     506  ((?P<endsess>~?\d+)/)?
  75.     507  (?P<end>\d+))?
  76.     508 $""", re.VERBOSE)
  77.     509
  78.     510 def extract_hist_ranges(ranges_str):
  79.     511     """Turn a string of history ranges into 3-tuples of (session, start, stop).
  80.     512    
  81.     513     Examples
  82.  
  83. /usr/lib/python2.6/threading.pyc in join(self=<HistorySavingThread(Thread-1, started -1221960848)>, timeout=None)
  84.     629     def join(self, timeout=None):
  85.     630         if not self.__initialized:
  86.     631             raise RuntimeError("Thread.__init__() not called")
  87.     632         if not self.__started.is_set():
  88.     633             raise RuntimeError("cannot join thread before it is started")
  89.     634         if self is current_thread():
  90.     635             raise RuntimeError("cannot join current thread")
  91.     636
  92.     637         if __debug__:
  93.     638             if not self.__stopped:
  94.     639                 self._note("%s.join(): waiting until thread stops", self)
  95.     640         self.__block.acquire()
  96.     641         try:
  97.     642             if timeout is None:
  98.     643                 while not self.__stopped:
  99. --> 644                     self.__block.wait()
  100.     645                 if __debug__:
  101.     646                     self._note("%s.join(): thread stopped", self)
  102.     647             else:
  103.     648                 deadline = _time() + timeout
  104.     649                 while not self.__stopped:
  105.     650                     delay = deadline - _time()
  106.     651                     if delay <= 0:
  107.     652                         if __debug__:
  108.     653                             self._note("%s.join(): timed out", self)
  109.     654                         break
  110.     655                     self.__block.wait(delay)
  111.     656                 else:
  112.     657                     if __debug__:
  113.     658                         self._note("%s.join(): thread stopped", self)
  114.     659         finally:
  115.  
  116. /usr/lib/python2.6/threading.pyc in wait(self=<Condition(<thread.lock object at 0xb77214e0>, 1)>, timeout=None)
  117.     224         if self.__lock.acquire(0):
  118.     225             self.__lock.release()
  119.     226             return False
  120.     227         else:
  121.     228             return True
  122.     229
  123.     230     def wait(self, timeout=None):
  124.     231         if not self._is_owned():
  125.     232             raise RuntimeError("cannot wait on un-acquired lock")
  126.     233         waiter = _allocate_lock()
  127.     234         waiter.acquire()
  128.     235         self.__waiters.append(waiter)
  129.     236         saved_state = self._release_save()
  130.     237         try:    # restore state no matter what (e.g., KeyboardInterrupt)
  131.     238             if timeout is None:
  132. --> 239                 waiter.acquire()
  133.         global allocate_lockR0 = undefined
  134.         global t = undefined
  135.         global get_identR9 = undefined
  136.         global errort = undefined
  137.         global ThreadErrort = undefined
  138.         global filterwarningst = undefined
  139.         global DeprecationWarningRQ = undefined
  140.         global R = undefined
  141.         global objectR = undefined
  142.     240                 if __debug__:
  143.     241                     self._note("%s.wait(): got it", self)
  144.     242             else:
  145.     243                 # Balancing act:  We can't afford a pure busy loop, so we
  146.     244                 # have to sleep; but if we sleep the whole timeout time,
  147.     245                 # we'll be unresponsive.  The scheme here sleeps very
  148.     246                 # little at first, longer as time goes on, but never longer
  149.     247                 # than 20 times per second (or the timeout time remaining).
  150.     248                 endtime = _time() + timeout
  151.     249                 delay = 0.0005 # 500 us -> initial delay of 1 ms
  152.     250                 while True:
  153.     251                     gotit = waiter.acquire(0)
  154.     252                     if gotit:
  155.     253                         break
  156.     254                     remaining = endtime - _time()
  157.  
  158. /home/ben/dev/ve/ticket-manager/src/eventlet/eventlet/semaphore.pyc in acquire(self=<Semaphore at 0xa2abeec c=0 _w[0]>, blocking=True)
  159.      56         which blocked threads are awakened should not be relied on. There is no
  160.      57         return value in this case.
  161.      58
  162.      59         When invoked with blocking set to true, do the same thing as when called
  163.      60         without arguments, and return true.
  164.      61
  165.      62         When invoked with blocking set to false, do not block. If a call without
  166.      63         an argument would block, return false immediately; otherwise, do the
  167.      64         same thing as when called without arguments, and return true."""
  168.      65         if not blocking and self.locked():
  169.      66             return False
  170.      67         if self.counter <= 0:
  171.      68             self._waiters.add(greenthread.getcurrent())
  172.      69             try:
  173.      70                 while self.counter <= 0:
  174. ---> 71                     hubs.get_hub().switch()
  175.         global The = undefined
  176.         blocking = True
  177.         global argument = undefined
  178.         global consistency = undefined
  179.         global CappedSemaphore = <class 'eventlet.semaphore.CappedSemaphore'>
  180.      72             finally:
  181.      73                 self._waiters.discard(greenthread.getcurrent())
  182.      74         self.counter -= 1
  183.      75         return True
  184.      76
  185.      77     def __enter__(self):
  186.      78         self.acquire()
  187.      79
  188.      80     def release(self, blocking=True):
  189.      81         """Release a semaphore, incrementing the internal counter by one. When
  190.      82         it was zero on entry and another thread is waiting for it to become
  191.      83         larger than zero again, wake up that thread.
  192.      84
  193.      85         The *blocking* argument is for consistency with CappedSemaphore and is
  194.      86         ignored"""
  195.  
  196. /home/ben/dev/ve/ticket-manager/src/eventlet/eventlet/hubs/hub.pyc in switch(self=<eventlet.hubs.epolls.Hub object>)
  197.     162         assert cur is not self.greenlet, 'Cannot switch to MAINLOOP from MAINLOOP'
  198.     163         switch_out = getattr(cur, 'switch_out', None)
  199.     164         if switch_out is not None:
  200.     165             try:
  201.     166                 switch_out()
  202.     167             except:
  203.     168                 self.squelch_generic_exception(sys.exc_info())
  204.     169         if self.greenlet.dead:
  205.     170             self.greenlet = greenlet.greenlet(self.run)
  206.     171         try:
  207.     172             if self.greenlet.parent is not cur:
  208.     173                 cur.parent = self.greenlet
  209.     174         except ValueError:
  210.     175             pass  # gets raised if there is a greenlet parent cycle
  211.     176         clear_sys_exc_info()
  212. --> 177         return self.greenlet.switch()
  213.     178
  214.     179     def squelch_exception(self, fileno, exc_info):
  215.     180         traceback.print_exception(*exc_info)
  216.     181         sys.stderr.write("Removing descriptor: %r\n" % (fileno,))
  217.     182         sys.stderr.flush()
  218.     183         try:
  219.     184             self.remove_descriptor(fileno)
  220.     185         except Exception, e:
  221.     186             sys.stderr.write("Exception while removing descriptor! %r\n" % (e,))
  222.     187             sys.stderr.flush()
  223.     188
  224.     189     def wait(self, seconds=None):
  225.     190         raise NotImplementedError("Implement this in a subclass")
  226.     191
  227.     192     def default_sleep(self):
  228.  
  229. /home/ben/dev/ve/ticket-manager/src/eventlet/eventlet/hubs/hub.pyc in run(self=<eventlet.hubs.epolls.Hub object>, *a=(), **kw={})
  230.     211             self.stopping = False
  231.     212             while not self.stopping:
  232.     213                 self.prepare_timers()
  233.     214                 if self.debug_blocking:
  234.     215                     self.block_detect_pre()
  235.     216                 self.fire_timers(self.clock())
  236.     217                 if self.debug_blocking:
  237.     218                     self.block_detect_post()
  238.     219                 self.prepare_timers()
  239.     220                 wakeup_when = self.sleep_until()
  240.     221                 if wakeup_when is None:
  241.     222                     sleep_time = self.default_sleep()
  242.     223                 else:
  243.     224                     sleep_time = wakeup_when - self.clock()
  244.     225                 if sleep_time > 0:
  245. --> 226                     self.wait(sleep_time)
  246.     227                 else:
  247.     228                     self.wait(0)
  248.     229             else:
  249.     230                 self.timers_canceled = 0
  250.     231                 del self.timers[:]
  251.     232                 del self.next_timers[:]
  252.     233         finally:
  253.     234             self.running = False
  254.     235             self.stopping = False
  255.     236
  256.     237     def abort(self, wait=False):
  257.     238         """Stop the runloop. If run is executing, it will exit after
  258.     239         completing the next runloop iteration.
  259.     240
  260.     241         Set *wait* to True to cause abort to switch to the hub immediately and
  261.  
  262. /home/ben/dev/ve/ticket-manager/src/eventlet/eventlet/hubs/poll.pyc in wait(self=<eventlet.hubs.epolls.Hub object>, seconds=60.0)
  263.      66         except (KeyError, ValueError, IOError, OSError):
  264.      67             # raised if we try to remove a fileno that was
  265.      68             # already removed/invalid
  266.      69             pass
  267.      70
  268.      71     def do_poll(self, seconds):
  269.      72         # poll.poll expects integral milliseconds
  270.      73         return self.poll.poll(int(seconds * 1000.0))
  271.      74
  272.      75     def wait(self, seconds=None):
  273.      76         readers = self.listeners[READ]
  274.      77         writers = self.listeners[WRITE]
  275.      78
  276.      79         if not readers and not writers:
  277.      80             if seconds:
  278. ---> 81                 sleep(seconds)
  279.      82             return
  280.      83         try:
  281.      84             presult = self.do_poll(seconds)
  282.      85         except (IOError, select.error), e:
  283.      86             if get_errno(e) == errno.EINTR:
  284.      87                 return
  285.      88             raise
  286.      89         SYSTEM_EXCEPTIONS = self.SYSTEM_EXCEPTIONS
  287.      90
  288.      91         if self.debug_blocking:
  289.      92             self.block_detect_pre()
  290.      93
  291.      94         for fileno, event in presult:
  292.      95             try:
  293.      96                 if event & READ_MASK:
  294.  
  295. KeyboardInterrupt:
  296.  
  297. ***************************************************************************