It's all about the answers!

Ask a question

Addressing hanging daemons

Dana Maxfield (2336) | asked Mar 18 '14, 3:46 p.m.
edited Mar 19 '14, 3:46 a.m. by Ralph Schoon (56.0k23642)
We have a custom build environment that we are adjusting to work with RTC. The issue that we have found is that with our current functionality, we are experiencing hanging daemons; 90 of them hanging at once in 7 days. When we set the SCM_DAEMON_INACTIVE_TIME_OUT environment variable, our daemons aren't starting at all.

So my question.... if we issue the command to stop a daemon, and that daemon is not hanging but is actually doing something, will the daemon finish what it is doing before it is stopped?

Ralph Schoon commented Mar 19 '14, 3:45 a.m.

Are you running scm commandline commands in the buil? Just to make sure we understand, where the daemons are launched.

Dana Maxfield commented Mar 19 '14, 10:53 a.m.

No scm command line commands from the build, but our automated build management tool runs lscm.bat whenever our UI needs to refresh or one of our build branches polls.

Evan Hughes commented Mar 20 '14, 2:09 p.m.

That shouldn't happen. Assuming that you aren't doing any operations on a sandbox (load, accept, commit, etc) then a single daemon should be started and reused by each invocation of 'lscm'.

Is the user's home directory on a filesystem that supports locks (e.g. NFS)? If not, 'lscm' won't be able to acquire a mutex necessary to find the daemon and will start a new one.

Are you using %SCM_CONFIG_DIRECTORY% or --config to set the CLI configuration directory? If so, make sure the value is always the same.

One answer

permanent link
Shashikant Padur (4.0k27) | answered Mar 19 '14, 7:14 a.m.
If a 'daemon stop' command is issued and if the daemon is actively processing a request, it will complete the request and then terminate.

By the way, to understand why there are so many hanging daemons could you explain how you are launching the daemons? or the process you follow to execute the cli commands.

Dana Maxfield commented Mar 19 '14, 10:52 a.m.

Thank you for the feedback on the daemon stop command.

The majority of the daemons are launched from our build management tool, but not from within the builds themselves. We have a fully automated system which manages over 500 build branches with various build times/cycles. Whenever our UI needs to refresh OR if a build branch needs to check if it should build, our software will communicate with RTC. This is done using the lscm.bat launching a daemon.

Your answer

Register or to post your answer.