It's all about the answers!

Ask a question

Locking problems using commandline (multiple scm.exe daemons created for same sandbox)


Stephen Rooks (18232025) | asked Nov 07 '14, 4:22 p.m.
edited Nov 07 '14, 5:15 p.m.
Hi,

I'm using the RTC 5.0 commandline, and keep getting an error when checking in , either the first time, or subsequent times. The only work around I've found is to kill the scm.exe daemon.
Why are multiple scm daemons being created for the same sandbox, causing the lock issue?

Scenario: I've created a repo workspace and component via Eclipse. Via command line I load the workspace.

C:\Users\Administrator>lscm load -r RTC -i -d C:\RTCShell\wksp3 SteveTest3
Successfully loaded items into the sandbox.

C:\Users\Administrator>lscm status -d C:\RTCShell\wksp3
Workspace: (1119) "SteveTest3" <-> (1119) "SteveTest3"
  Component: (1120) "TestComp"
    Baseline: (1121) 1 "Initial Baseline"


File bm.bmp added into sandbox

C:\Users\Administrator>lscm status -d C:\RTCShell\wksp3
Workspace: (1119) "SteveTest3" <-> (1119) "SteveTest3"
  Component: (1120) "TestComp"
    Baseline: (1121) 1 "Initial Baseline"
    Unresolved:
      a-- /TestComp/bm.bmp

C:\Users\Administrator>scm checkin  -d c:/RTCShell/wksp3 /TestComp/bm.bmp
Problem running 'checkin':
Could not initialize data area. Could not lock C:\RTCShell\wksp3 - locked by other process.

C:\Users\Administrator>scm daemon stop -a
Daemon successfully terminated

C:\Users\Administrator>lscm checkin  -d c:/RTCShell/wksp3 /TestComp/bm.bmp
Workspace: (1119) "SteveTest3" <-> (1119) "SteveTest3"
  Component: (1120) "TestComp"
    Baseline: (1121) 1 "Initial Baseline"
    Outgoing:
      Change sets:
        (1122) -*--@  "<No comment>" 07-Nov-2014 04:08 PM
          Changes:
            --a-- \bm.bmp


C:\Users\Administrator>scm list daemons
Port  Description
56308 Jazz CLI (3.2.200.v20140426_0043)
  C:\RTCShell\wksp3

Now add another file to sandbox, bm3.bmp

C:\Users\Administrator>lscm checkin  -d c:/RTCShell/wksp3 /TestComp/bm3.bmp
Problem running 'checkin':
Could not initialize data area. Could not lock C:\RTCShell\wksp3 - locked by other process.

C:\Users\Administrator>scm list daemons
Port  Description
56349 Jazz CLI (3.2.200.v20140426_0043)
56308 Jazz CLI (3.2.200.v20140426_0043)
  C:\RTCShell\wksp3


C:\Users\Administrator>


Comments
Shashikant Padur commented Nov 10 '14, 12:09 a.m. | edited Nov 10 '14, 12:14 a.m.
JAZZ DEVELOPER

In the output C:\RTCShell\wksp3 is used by only one daemonĀ 56308 Jazz CLI (3.2.200.v20140426_0043)


56349 Jazz CLI (3.2.200.v20140426_0043) does not have any sandboxes linked. This daemon will be reused for remote operations or working with another sandbox.

How about you step into the directory C:\RTCShell\wksp3 and then run the command:
lscm checkin TestComp/bm3.bmp.
Does it work?

By the way, as Donald mentioned you shouldn't use scm and lscm against a sandbox. Use scm only to list/stop/start daemons or register/deregister sandboxes.


Stephen Rooks commented Nov 10 '14, 4:46 a.m.

Changing directory worked. Using the -d option failed due to locking issue. Any idea why?

One answer



permanent link
Donald Nong (14.5k614) | answered Nov 09 '14, 6:36 p.m.
I don't think it's a good idea to use lscm and scm at the same time against the same sandbox. When you run the lscm command, it creates a daemon to work in the specified sandbox. It is understandable that when you use scm (a different process for sure) against the same sandbox, you will get locking issue. Any reason that you cannot use lscm all the way through?
https://jazz.net/help-dev/clm/topic/com.ibm.team.scm.doc/topics/c_scm_cli.html

Comments
Stephen Rooks commented Nov 10 '14, 4:47 a.m.

I'd like to use lscm, but was getting the locking error (above)

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.