Hi everyone, 

It seems that I ran into a rather inextricable problem, would love to see what 
you think.

As you might remember, I have been working on a distributed, anonymous 
community platform(s) called Aether ( www.getaether.net ) which is largely a 
Twisted codebase in its networking system. After releasing the app, I ended up 
with performance problems, in some part due to my programming incompetence, and 
some part because I was also using it to drive a GUI with qtreactor, which ran 
its own Javascript interpreter.

The codebase is largely cleaned up now and the current architecture of the 
program involves two processes that talk to each other via Ampoule: a default 
reactor core, which handles network events, and a qtreactor which is solely 
concerned with the user interface. It works very well. Stress induced by 
networking does not slow down the UI and vice versa. 

The problem here is that I can’t freeze and package the app via PyInstaller to 
release it. What happens is that when I run the packaged application, the 
application starts to spawn an infinite amount of copies of itself. This seems 
to be the default behaviour of Ampoule, in when a worker process (my GUI) 
fails, it spawns a new one. 

1) How can I disable this feature? I want ampoule to not restart a failed 
worker process. 

2) How can I get information about what’s going wrong in the worker process? I 
am using a custom bootstrap code, and it seems that even if I deliver an empty 
bootstrap code to make it a noop, the process still fails and a new one is 
spawned. Or to be more accurate, just a new process is spawned, I don’t know 
whether if it is failing, but nothing happens on spawned processes, none of 
them start to show GUI or any other signs of life. 

If I don’t force quit my frozen app, it will create an increasing number of 
zombie processes. 

I have Twisted logging set up in the GUI process, but it doesn’t even hit that 
line, so I get no exceptions or any message of any kind. It fails even with 
empty bootstrap code. 

Any idea on how to approach this problem? I have nothing to start with , so 
anything would be appreciated. I’m reading the source code of Ampoule but found 
nothing useful so far. 

The non-frozen version of the app works fine. I also have a prior version of 
the app that can be packaged, so there’s nothing wrong with my Twisted code 
that can’t be packaged. It’s Ampoule that is newly added, and so far resisting 
the refrigerator.

Best regards,
Burak






_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to