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.
* 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>