[Django] #26738: Window resize crashes runserver --noreload with pdb on linux

26 views
Skip to first unread message

Django

unread,
Jun 9, 2016, 7:01:25 PM6/9/16
to django-...@googlegroups.com
#26738: Window resize crashes runserver --noreload with pdb on linux
-------------------------+-------------------------------------------------
Reporter: | Owner: nobody
dandavison |
Type: | Status: new
Uncategorized |
Component: HTTP | Version: master
handling |
Severity: Normal | Keywords: runserver pdb noreload resize linux
Triage Stage: | Has patch: 0
Unreviewed |
Easy pickings: 0 | UI/UX: 0
-------------------------+-------------------------------------------------
Resizing the terminal window while pdb is active in an HTTP handler thread
using `--noreload` on linux causes the kernel to raise an error condition
that crashes django (true for current HEAD `8f50ff5b` and e.g. 1.6). To
reproduce this:

1. Put a `pdb.set_trace()` call in a view function.
2. On linux, start the server with `--noreload`.
3. Send a request to the URL. The `pdb` prompt should now be in effect in
the terminal.
4. Resize the terminal window. This will cause django to crash with
`select.error: (4, 'Interrupted system call')` as in the traceback below.

The bug only affects `--noreload`. It does not occur with `--noreload
--nothreading`.


{{{
(Pdb) Traceback (most recent call last):
File "exampledev/manage.py", line 22, in <module>
execute_from_command_line(sys.argv)
File "/vagrant/django-
examples/django/django/core/management/__init__.py", line 367, in
execute_from_command_line
utility.execute()
File "/vagrant/django-
examples/django/django/core/management/__init__.py", line 359, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/vagrant/django-examples/django/django/core/management/base.py",
line 305, in run_from_argv
self.execute(*args, **cmd_options)
File "/vagrant/django-
examples/django/django/core/management/commands/runserver.py", line 58, in
execute
super(Command, self).execute(*args, **options)
File "/vagrant/django-examples/django/django/core/management/base.py",
line 356, in execute
output = self.handle(*args, **options)
File "/vagrant/django-
examples/django/django/core/management/commands/runserver.py", line 97, in
handle
self.run(**options)
File "/vagrant/django-
examples/django/django/core/management/commands/runserver.py", line 108,
in run
self.inner_run(None, **options)
File "/vagrant/django-
examples/django/django/core/management/commands/runserver.py", line 144,
in inner_run
ipv6=self.use_ipv6, threading=threading)
File "/vagrant/django-examples/django/django/core/servers/basehttp.py",
line 193, in run
httpd.serve_forever()
File "/usr/lib/python2.7/SocketServer.py", line 225, in serve_forever
r, w, e = select.select([self], [], [], poll_interval)
select.error: (4, 'Interrupted system call')
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26738>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jun 9, 2016, 7:37:39 PM6/9/16
to django-...@googlegroups.com
#26738: Window resize crashes runserver --noreload with pdb on linux
-------------------------------------+-------------------------------------
Reporter: dandavison | Owner: nobody
Type: Uncategorized | Status: closed
Component: HTTP handling | Version: master
Severity: Normal | Resolution: invalid
Keywords: runserver pdb | Triage Stage:
noreload resize linux | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by dandavison):

* status: new => closed
* needs_better_patch: => 0
* resolution: => invalid
* needs_tests: => 0
* needs_docs: => 0


Comment:

Actually, I can't reproduce this in a different VM, so I'm going to close
this as `invalid`. It's maybe of interest that the error was only seen in
`runserver --noreload` and not in vanilla `runserver`.

--
Ticket URL: <https://code.djangoproject.com/ticket/26738#comment:1>

Reply all
Reply to author
Forward
0 new messages