﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
26738	Window resize crashes runserver --noreload with pdb on linux	Dan Davison	nobody	"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')
}}}"	Uncategorized	closed	HTTP handling	dev	Normal	invalid	runserver pdb noreload resize linux		Unreviewed	0	0	0	0	0	0
