question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

version 3.3.0 hang problem

See original GitHub issue

When I upgrade from version 3.2.10 to 3.3.0(daphne:2.5.0, python:3.8.2, django:2.2.16), the server looks like hang there randomly, no error info found in access.log and asgi.log.

the supervisord.conf as follow:

[fcgi-program:om]
directory=./
socket=tcp://0.0.0.0:8000
command=daphne -u ./daphne%(process_num)d.sock --fd 0 --access-log ./logs/access.log --proxy-headers MyProject.asgi:application
numprocs=4
process_name=asgi%(process_num)d
stdout_logfile=./logs/asgi.log
redirect_stderr=true

Now, I downgrade to 3.2.10, everything is OK.

Maybe modification about thread has some bugs or something I should do to adapt it.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
belongwqzcommented, May 7, 2021

Ah, you’re using Channels, you didn’t mention that initially - you might want to go look at issues over there, as it’s significantly more complex and a lot easier to deadlock yourself/write async code wrong.

If you’re running into this error, I will caution you that it is probably an early warning of an existing deadlock or race condition that was already in your code, so the best thing to do would be to track it down (via PYTHONASYNCIODEBUG, bisecting code, etc.) before it crops up on real user data.

There’s no core workaround for this reason - again, if you can somehow make it happen in a small sample, I can help work out why, but the fact you can’t implies it’s probably a bug in how the app is written at large.

The one way we have of modifying how SyncToAsync does its threading is the thread_sensitive_context attribute on the class, which you can overwrite with your own way of detecting contexts if you wish (it needs to be something with a get() method, and look vaguely like a ContextVar), so if you want to pursue that road, you can.

@andrewgodwin Thank you for your patience, maybe something related to these two issues in https://github.com/django/channels/issues/1576 and https://github.com/django/channels/issues/1491.

looks like there is a problem with the combination of channels3(asgiref3.3.x)+django3.

I’ll try to reproduce it in a minimal sample project.

1reaction
dacevedo12commented, Nov 13, 2020

Just wanted to confirm that after downgrading to 3.2.10 the problem disappeared 🎉

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cb Defense: OS Hang On Windows Devices with 3.3.0....
Boot impacted system into Safe mode; Remove 3.3.0.953 sensor using command line. Sensor in Policy with "Require code to uninstall sensor" checked ...
Read more >
Readme and Release notes for release 3.3.0.9 General ... - IBM
GPFS 3.3.0-2 corrects this issue. [November 7, 2008] ... Fix hang when executable run out of GPFS and mmapRangeLock=no.
Read more >
785384 – hibernate hangs since kernel version 3.2.2-1.fc16.i686
Description of problem: With kernel version 3.1.9-1.fc16.i686, both suspend (STR) and hibernate (STD) work fine on my Asus F3SG laptop.
Read more >
Places SDK for iOS release notes - Google Developers
According to the Mobile OS version support policy, we are freezing support for iOS 13 in an upcoming major version of Maps and...
Read more >
mvn dependency:tree -Dverbose hangs and never finishes
As pointed out before, the maven-dependency-plugin:3.2.0 seems to be the problem. The issue was fixed in version 3.3.0 https://issues.apache.org ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found