Opened 6 years ago

Closed 6 years ago

#18842 closed Bug (needsinfo)

Calling " reset <appname>" causes infinite loop

Reported by: anonymous Owned by: nobody
Component: Core (Management commands) Version: 1.4
Severity: Normal Keywords: reset mysql arch
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


When calling reset <appname> on a django project the script seems to get stuck in an infinite loop, never completing the operation. I've even let it run for a few hours straight, but it never finished. The exact same project seems to be working on a fellow developer's system (Arch Linux), with the same python version (2.7.3).

Giving an interrupt signal the following call stack trace is printed:

  File "", line 10, in <module>
  File "/usr/lib/python2.7/site-packages/django/core/management/", line 443, in execute_from_command_line
  File "/usr/lib/python2.7/site-packages/django/core/management/", line 382, in execute
  File "/usr/lib/python2.7/site-packages/django/core/management/", line 196, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/lib/python2.7/site-packages/django/core/management/", line 232, in execute
    output = self.handle(*args, **options)
  File "/usr/lib/python2.7/site-packages/django/core/management/", line 304, in handle
    app_output = self.handle_app(app, **options)
  File "/usr/lib/python2.7/site-packages/django/core/management/commands/", line 51, in handle_app
  File "/usr/lib/python2.7/site-packages/django/db/backends/", line 40, in execute
    return self.cursor.execute(sql, params)
  File "/usr/lib/python2.7/site-packages/django/db/backends/mysql/", line 114, in execute
    return self.cursor.execute(query, args)
  File "/usr/lib/python2.7/site-packages/MySQLdb/", line 161, in execute
    r = self._query(query)

After the keyboard interrupt, the phpmyadmin interface also has difficulty loading. Somehow the bug seems to affect the sql daemon.

Change History (2)

comment:1 Changed 6 years ago by anonymous

Update: restarting the mysql daemon and killing the python2 process resolves the problem temporarily.
The infinite loop thing occurs randomly, but not every time...

comment:2 Changed 6 years ago by Aymeric Augustin

Component: Core (Other)Core (Management commands)
Resolution: needsinfo
Status: newclosed

The backtrace shows that the process is blocked because it waits for a reply from the MySQL server. That, and your other comments, point at a problem of your MySQL server rather than of Django.

In addition, the problem is hard to reproduce; it looks more like a quirk of your system than a bug in Django.

If you can reproduce the problem at least on another system, please provide as much information as possible and reopen this ticket. In the current state of things, there's not much we can do -- sorry.

Note: See TracTickets for help on using tickets.
Back to Top