Opened 13 years ago
Closed 13 years ago
#18842 closed Bug (needsinfo)
Calling "manage.py reset <appname>" causes infinite loop
| Reported by: | anonymous | Owned by: | nobody |
|---|---|---|---|
| Component: | Core (Management commands) | Version: | 1.4 |
| Severity: | Normal | Keywords: | manage.py 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 |
Description
When calling manage.py 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 "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 443, in execute_from_command_line
utility.execute()
File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 382, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/lib/python2.7/site-packages/django/core/management/base.py", line 196, in run_from_argv
self.execute(*args, **options.__dict__)
File "/usr/lib/python2.7/site-packages/django/core/management/base.py", line 232, in execute
output = self.handle(*args, **options)
File "/usr/lib/python2.7/site-packages/django/core/management/base.py", line 304, in handle
app_output = self.handle_app(app, **options)
File "/usr/lib/python2.7/site-packages/django/core/management/commands/reset.py", line 51, in handle_app
cursor.execute(sql)
File "/usr/lib/python2.7/site-packages/django/db/backends/util.py", line 40, in execute
return self.cursor.execute(sql, params)
File "/usr/lib/python2.7/site-packages/django/db/backends/mysql/base.py", line 114, in execute
return self.cursor.execute(query, args)
File "/usr/lib/python2.7/site-packages/MySQLdb/cursors.py", line 161, in execute
r = self._query(query)
KeyboardInterrupt
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 by , 13 years ago
comment:2 by , 13 years ago
| Component: | Core (Other) → Core (Management commands) |
|---|---|
| Resolution: | → needsinfo |
| Status: | new → closed |
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.
Update: restarting the mysql daemon and killing the python2 process resolves the problem temporarily.
The infinite loop thing occurs randomly, but not every time...