Comments (9)
Thanks for the report.
I don't see how this is related to twisted.
I don't see any twisted code in the traceback.
From what I can see, this is about mac-notifications and that project don't use Twisted.
Can you please share an self-contained example that replicate this error
Note that if you are using threads in your Twisted code, those thread should be handled only via Twisted helper API. You should not mix Twited code and threading code without using the Twisted helping API.
I am closing this.
If you think this is a bug with twisted please add a complete example that can be used to reproduce this bug and then we can look into this,
Without being able to reproduce this error, it is very hard to fix this.
If you have a fix for this, please submit a pull request and I we can reopen this ticket.
Regards
from twisted.
As I said in the bug report all I did was call macos_notifications
from opencanary
. OpenCanary is a twisted application; here's the .tac
file. the bug arises in instantiation just a few lines in when SimpleQueue()
constructor is called. i don't have more of the stack trace at hand right now.
Note that if you are using threads in your Twisted code, those thread should be handled only via Twisted helper API. You should not mix Twited code and threading code without using the Twisted helping API.
thanks, i suspect it is related to this, but the code never gets to the thread instantiation. it dies on literally the first line of __init__()
in one of the startup classes.
from twisted.
I think there might be more to discuss here.
The fact that this is related to fds_to_keep
suggests that Twisted is manipulating some global file descriptor state that it is fighting with Multiprocessing over, and we may have some work to do there.
I am not reopening right away because this really needs a clear reproducer to be actionable enough to be more than a vague "uhhh, maybe, global state, handwave handwave processes, file descriptors" magnet for anxiety or FUD :).
But if someone can do that so we can figure out what, if anything, we are having issues with, that would be great.
from twisted.
i think i can create a reproducible example relatively easily; i will try to do so.
from twisted.
The fact that this is related to fds_to_keep suggests that Twisted is manipulating some global file descriptor state that it is fighting with Multiprocessing over, and we may have some work to do there.
and fwiw that was my general impression as well.
from twisted.
ps i did find a very old issue over in the klein
repo where someone seemed to have run into something similar - they were trying to use a package that did its own multiprocessing with a twistd server and getting fds_to_keep
issues.
from twisted.
Easily reproducible on macOS:
- Checkout my branch of
opencanary
: https://github.com/michelcrypt4d4mus/opencanary/tree/twistd_fds_to_keep_reproduce - run
build_scripts/build_opencanary.sh
- activate virtual env
- run
twistd -noy bin/opencanary.tac
ssh localhost
from another window
from twisted.
I updated the issue description with the full stack trace instead of just the fragment i had put initially.
from twisted.
I am reopening this.
I don't have a macOS VM at hand to try to reproduce this... but I guess that there is enought information here to reproduce it.
It would be awesome to have this error reproduced via GitHub Actions
from twisted.
Related Issues (20)
- Performance benchmarks for Deferreds HOT 1
- http logger should respect the encoding of its log outputs HOT 5
- Update twisted.words.protocol.irc to use IRCv3 HOT 3
- IndexError due to empty args in OpenSSL.SSL.ZeroReturnError handling in Twisted HOT 17
- t.protocols.policies.LimitConnectionsByPeer
- Add support for Encrypt-then-MAC MAC algorithms HOT 1
- twisted.names.test.test_names.ServerDNSTests.test_zoneTransferConnectionFails fails when there is no network access
- Add a context manager for calling `log.failure` when code fails
- Speed up HTTP header processing even more HOT 1
- absorb twisted-infra/twisted-benchmarks into a codspeed benchmark
- Python 3.13.0b1: test_asynchronousFlattenError fails: builtins.KeyError: "local variable ''root'' is not defined"; then `Regex didn't match` HOT 1
- demonstrate the utility of / migrate to `Logger.handlingFailures`
- Investigate tracing functionality in codspeed HOT 2
- Remove attribute lookups from twisted.web
- dev process document describes incorrect extras to get set up for testing HOT 2
- until we support `trial -j` on Windows, let's at least have a reasonable error message
- support for the Windows Subsystem for Linux (WSL)
- Several tests involving ipv6 in twisted.internet.test.test_tcp time out on Windows with no further information HOT 3
- test_startTLSAfterRegisterProducerNonStreaming is flaky
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from twisted.