0

サーバーで突然ロックアップする問題が発生していたので、SOで気の利いたコードを見つけ、サーバーが再びロックされたときにそれを使用して、すべてのサーバースレッドのスタックトレースを出力しました。

ほとんどのスレッドは本来あるべきことを行っていましたが、これは非常に奇妙に思えました。sympy テストを呼び出しているようです。テンプレートタグから sympy になった経緯がまったく理解できません。

File: "/opt/django-live1.0/django/core/handlers/wsgi.py", line 248, in __call__
  response = self.get_response(request)
File: "/opt/django-live1.0/django/core/handlers/base.py", line 80, in get_response
  response = middleware_method(request)
File: "/opt/django-live1.0/protected/middleware.py", line 16, in         process_request
  login_url = reverse('protected-login')
File: "/opt/django-live1.0/django/core/urlresolvers.py", line 351, in reverse
  *args, **kwargs)))
File: "/opt/django-live1.0/django/core/urlresolvers.py", line 272, in reverse
  possibilities = self.reverse_dict.getlist(lookup_view)
File: "/opt/django-live1.0/django/core/urlresolvers.py", line 194, in _get_reverse_dict
  self._populate()
File: "/opt/django-live1.0/django/core/urlresolvers.py", line 162, in _populate
  for pattern in reversed(self.url_patterns):
File: "/opt/django-live1.0/django/core/urlresolvers.py", line 244, in _get_url_patterns
  patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File: "/opt/django-live1.0/django/core/urlresolvers.py", line 239, in _get_urlconf_module
  self._urlconf_module = import_module(self.urlconf_name)
File: "/opt/django-live1.0/django/utils/importlib.py", line 35, in import_module
  __import__(name)
File: "/var/www/site/urls.py", line 12, in <module>
  from sitelib.urls import initialize_urls
File: "/opt/django-live1.0/utils/urls.py", line 11, in <module>
  admin.autodiscover()
File: "/opt/django-live1.0/utils/default_settings.py", line 178, in init_defaults
  logging.error("Error setting up logging: %s" % ex)
File: "/opt/django-live1.0/django/template/__init__.py", line 1049, in add_to_builtins
  builtins.append(import_library(module))
File: "/opt/django-live1.0/django/template/__init__.py", line 997, in import_library
  return mod.register
File: "/opt/django-live1.0/django/utils/importlib.py", line 36, in import_module
  return sys.modules[name]
File: "/opt/django-live1.0/misc/templatetags/misc_tags.py", line 427, in <module>
  @make_tag
File: "/usr/local/lib/python2.6/dist-packages/sympy-0.6.7-py2.6.egg/sympy/__init__.py", line 44, in <module>
  evalf._create_evalf_table()
File: "/usr/local/lib/python2.6/dist-packages/sympy-0.6.7-py2.6.egg/sympy/core/__init__.py", line 22, in <mod
ule>
  exec '%s = _cls()' % (_n)
File: "/usr/local/lib/python2.6/dist-packages/sympy-0.6.7-py2.6.egg/sympy/core/basic.py", line 2505, in <modu
le>
  from numbers import Rational, Integer
File: "/usr/local/lib/python2.6/dist-packages/sympy-0.6.7-py2.6.egg/sympy/mpmath/__init__.py", line 385, in <
module>
  doctests()
File: "/usr/local/lib/python2.6/dist-packages/sympy-0.6.7-py2.6.egg/sympy/mpmath/ctx_fp.py", line 12, in <mod
ule>
  class FPContext(StandardBaseContext):
File: "/usr/local/lib/python2.6/dist-packages/sympy-0.6.7-py2.6.egg/sympy/mpmath/ctx_base.py", line 31, in <m
odule>
  VisualizationMethods):
File: "/usr/local/lib/python2.6/dist-packages/sympy-0.6.7-py2.6.egg/sympy/mpmath/identification.py", line 840
, in <module>
  doctest.testmod()
File: "/usr/local/lib/python2.6/dist-packages/sympy-0.6.7-py2.6.egg/sympy/mpmath/libmp/__init__.py", line 63,
 in <module>
  from backend import (gmpy, sage, BACKEND, STRICT, MPZ, MPZ_TYPE,
File: "/usr/local/lib/python2.6/dist-packages/sympy-0.6.7-py2.6.egg/sympy/mpmath/libmp/libmpf.py", line 1317,
 in <module>
  pass
File: "/usr/local/lib/python2.6/dist-packages/sympy-0.6.7-py2.6.egg/sympy/mpmath/libmp/libintmath.py", line 4
25, in <module>
  def eulernum(m, _cache={0:MPZ_ONE}):
File: "/usr/local/lib/python2.6/dist-packages/sympy-0.6.7-py2.6.egg/sympy/mpmath/libmp/libintmath.py", line 6
5, in python_trailing
  return t

@make_tag は、関数をテンプレート タグに変換する単なるスニペットです。

これがどのように起こるか知っている人はいますか?

4

0 に答える 0