#36333: runserver: could not acquire lock for _io.BufferedWriter at interpreter
shutdown
-------------------------------------+-------------------------------------
     Reporter:  Klaas van Schelven   |                     Type:
                                     |  Uncategorized
       Status:  new                  |                Component:
                                     |  Uncategorized
      Version:  4.2                  |                 Severity:  Normal
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
 I just ran into the following while running a `manage.py runserver`



 {{{
 Fatal Python error: _enter_buffered_busy: could not acquire lock for
 <_io.BufferedWriter name='<stderr>'> at interpreter shutdown, possibly due
 to daemon threads
 Python runtime state: finalizing (tstate=0x000057b67d5dc5c0)
 Current thread 0x0000722a9aa4d000 (most recent call first):
 <no Python frame>
 Extension modules: greenlet._greenlet,
 zope.interface._zope_interface_coptimizations, gevent.libev.corecext,
 gevent._gevent_c_greenlet_primitives, gevent._gevent_c_hub_local,
 gevent._gevent_c_waiter, gevent._gevent_c_hub_primitives,
 gevent._gevent_c_ident, gevent._gevent_cgreenlet,
 gevent._gevent_c_abstract_linkable, gevent._gevent_cevent,
 gevent._gevent_c_semaphore, gevent._gevent_cqueue, gevent._gevent_c_imap,
 _brotli, markupsafe._speedups, psycopg2._psycopg, charset_normalizer.md
 (total: 18)
 }}}

 Seems hard to debug, but since I'm not doing anything with threads myself,
 I'm tempted to say this is caused by Django's multi-threaded server.

 Why is the Python interpreter being shut down in the first place? It
 doesn't say... this was during normal operation (perhaps I touched a file
 and the server restarted? Can't tell).

 --
 I realize this may not be the best place to open this completely
 unreproducable ticket, but it's not the worst either... at least it will
 allow others to find it.

 Similar thoughts about this occurring on Django 4.2 and that currently
 being security-only. I'm just reporting what I found... if it was never
 fixed, it's probably still around on 5.2
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36333>
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 view this discussion visit 
https://groups.google.com/d/msgid/django-updates/0107019648d327e7-88e20450-569f-4dbc-bed6-a44a246d7136-000000%40eu-central-1.amazonses.com.

Reply via email to