Opened 8 years ago

Closed 8 years ago

#26738 closed Uncategorized (invalid)

Window resize crashes runserver --noreload with pdb on linux

Reported by: Dan Davison Owned by: nobody
Component: HTTP handling Version: dev
Severity: Normal Keywords: runserver pdb noreload resize linux
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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')

Change History (1)

comment:1 by Dan Davison, 8 years ago

Resolution: invalid
Status: newclosed

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.

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