Debian Codegraph @

netsvcs/clients/Tokens/manual/README

raw
1
2
3 ./manual gives users a text-based interactive interface to local or
4 remote tokens. This is extremely useful for manually testing the
5 token server and setting up deadlock scenarios.
6
7 Run it as follows
8
9 % ./manual -u
10 ./manual:
11 [-h <remote host>]
12 [-p <remote port>]
13 [-i ignore deadlock]
14 [-d debug]
15
16 ./manual gives you the following prompt.
17 <tid> <token> <type> <operation>
18
19 <tid> This is the client id of the current operation. This is set
20 manually by ./manual for every operation. Be careful when
21 using multiple <tid>'s during a remote session (see BUGS
22 below).
23
24 <token> This is the name of the token for the operation.
25
26 <type> This is the type of the token. This can be:
27 M - Corresponds to a Mutex lock.
28 R - Corresponds to Readers/Writer lock.
29 W - Corresponds to Readers/Writer lock.
30 Obviously, a single <token> can be M or it can R and/or W. If
31 you perform and operation like this "tid1 tokenA M A" then
32 don't do this "tid1 tokenA R A". This doesn't make sense.
33
34 <operation> This is the operation to perform on the
35 <tid>-<token>-<type> proxy. These include:
36 A - acquire.
37 N - renew.
38 R - release.
39 T - tryacquire.
40
41 BUGS!!!!
42
43 When performing remote tests, be careful when using a single running
44 ./manual to impersonate two <tid>'s. The Token Server client
45 connection policy is currently, one per thread. The Token Server
46 assumes that the same <tid> is always on the other end of a
47 connection. If you do something like the following, you will break
48 it:
49
50 lambada:Tokens/manual> ./manual -h tango -p 20202
51 <tid> <token> <type> <operation>
52 tid1 tokenA M A
53 ACE_TSS_Connection new connection
54 (1) acquired tokenA remotely.
55 Succeeded.
56 <tid> <token> <type> <operation>
57 tid2 tokenA M A
58 (1) acquired tokenA remotely. <------ This is remote BADness!!!
59 Succeeded.
60 Violated invariant. <------ Locally detected badness.
61 <tid> <token> <type> <operation>
62
63
64 Notice that the local side discovered that this was incorrect.
65 However, the Token Server thinks it was a recursive acquisition for
66 tid1. Keep in mind that this is not a problem with the Token library.
67 It is just a problem with how this primitive ./manual application maps
68 STDIN to the ACE Token API.