Hi There, I have some problems using soffice in headless mode while spawning it from a python script.
I use the following command: /usr/bin/soffice -accept='socket,host=localhost,port=8100;urp;StarOffice.ServiceManager' -nofirststartwizard -nologo -headless When run directly from the command line, all works fine. If I try to spawn a subprocess using exactly the same command, the newly spawned subprocess eats up 100% of the CPU. After different google searches I found that I'm not the only one having this problem, and that different people solved this problem in different ways, but none worked for me. I also tried to spawn the subprocess inside 'xvfb', but I obtained exactly the same results: 2-8% load when run directly and 100% when spawned as a subprocess. I'm using twisted[1] and its spawnProcess[2] function to spawn the process. I already tried with and without PTY and I'm passing the environment variables along to the subprocess. I tried to use 'strace' on both (command line and spawned by twisted) processes with the following results: - Command line: https://gist.github.com/821565#file_strace%20from%20command%20line - Twisted: https://gist.github.com/821565#file_strace%20from%20script As you can see, the only relevant difference is that the spawned subprocess never calls the 'wait4' function (last line of the strace output). So I tried to get the backtrace of the different running threads, again here are the results: - Command line: https://gist.github.com/821565#file_backtrace%20from%20command%20line - Twisted: https://gist.github.com/821565#file_backtrace%20from%20script Here the differences are more interesting, namely the Thread 2 of the spawned process throws an exception (line 39) and never calls the 'osl_acceptConnectionOnSocket' function. As the debug symbols are (obviously) not present, I cannot know which exception is being thrown and, most importantly, what the cause is. I tried to dig around in the sources but without any relevant result. Is there anybody who knows how to solve this? Or perhaps how to further debug and investigate the issue? Thank you for your help! Jonathan [1]: http://twistedmatrix.com/trac/ [2]: http://twistedmatrix.com/documents/current/core/howto/process.html --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
