Problem using Starter
|
|
---|---|
Hi Tangoers, I have a device server which starts a thread to run a xmlrpc (using python library xmlrpclib) server. Whenever I start this device server using Starter my rpc server (the one launched in a thread) crashes. Whereas, when I start my device server directly from terminal, the rpc server does not crash and functions as desired. In order to debug the issue, I want to understand how does Starter manage the device servers it is controlling. Is there a possibility that the thread is getting suspended and hence causing the server to crash?
Regards,
TCS_GMRT |
|
|
---|---|
Hi I have never seen this problem before. The Starter launch the device server by a fork and then only ping the admin device to know if it is still alive. No idea about your thread. Regards |
|
|
---|---|
Hi TCS_GMRT< From the source code of the :
You can see that the Starter uses a fork() followed by a call to execvp(). This is the standard technique under Unix to start a new process [1]. Before doing the execvp() I noticed it changes the grp and user id. It closes stdout and stderr too but not stdin. I presume this is standard code. But this might explain why your server behaves differently when started with Starter or form the terminal. It would be good to try to debug the reason for the crash. Obviously not easy. You would need to attach to the Starter process and then set a breakpoint in the execv. Andy [1] https://en.wikipedia.org/wiki/Fork%E2%80%93exec |
|
|
---|---|
Thanks Pascal ! Thanks Andy! I will try debugging.
Regards,
TCS_GMRT |
|
|
---|---|
Hi TCS_GMRT, I wonder if you found what causes this issue? Cheers
- Philippe
|