#30424: Queries within AppConfig.ready() can cause issues with some Django db
commands
--------------------------------+--------------------------------------
Reporter: Rich Rauenzahn | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 1.11
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+--------------------------------------
Changes (by Rich Rauenzahn):
* status: closed => new
* resolution: invalid =>
Comment:
I didn't consider this a documentation defect -- I think the team may want
to consider the merits of this bug instead whether they really want to
leak file handles across the fork()/exec() system call in the management
commands.
Python 34 changes the default to close file handles at fork, so this is
only an issue for 2.7 support in 1.11. Maybe that's enough reason to
close it.
https://www.python.org/dev/peps/pep-0446/
Leaking file descriptors in child processes causes various
annoying issues and is a known major security vulnerability. Using the
subprocess module with the close_fds parameter set to True is not possible
in all cases.
(This file handle leakage is a much more subtle issue than what the
warning in the docs implies.)
Aside: Is there any supported way for running db commands at startup?
--
Ticket URL: <https://code.djangoproject.com/ticket/30424#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/066.9c24cfd9e6a3f7814524cd8580093507%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.