Actions:
|
2012-07-02 17:34 AEST by Arthur Barrett - This feature "terminate cvsnt if it takes > 500ms to finish was added as a part of bug 6061, but it's only
implemented on Windows (using semaphores).
We should implement this System V semaphores for Mac OS X and Linux:
http://www.ibm.com/developerworks/linux/library/l-ipc2lin2/index.html
There are four semaphores:
* CVSNT_client_proxy_%d (used by cvsnt.exe, created by cvsmanager and cvsproxy)
* Global\\CVSNT_MgrAccept
* CVSNT_Lockserver
* CVSNT_ControlPanel (not relavent for linux or mac?)
Linux and Mac don't have names for semaphores, but we can use ftok() with a PATH and the id 0 for the
manager semaphore or the id of PID for the client semaphores, e.g.:
* CVSNT_client_proxy_%d [/path/to/cvsnt]
* Global\\CVSNT_MgrAccept [/path/to/cvsmanager]
* CVSNT_Lockserver [/path/to/cvslockd]
The semaphores are used to:
* ensure the client does not try to attach to ports not yet ready
* ensure the server knows the client is finished / create a new client
Bug 6493 handles the implementation of Global\\CVSNT_MgrAccept on mac/linux - this bug is to handle
the implementation of CVSNT_client_proxy_%d |
|
2012-08-28 21:06 AEST by Arthur Barrett - Created an attachment (id=2493)
patch - cvsproxy semaphore (also cvsmanager)
The cvsproxy now has a semaphore - with a unique id based on the calling
process. That's not ideal when the calling process is cvsmaanger - not sure if
that's going to create problems on busy systems... It shouldn't because worse
case scenario the cvsntsrv process dies and cvsmanager creates another...
This doesn't actually implement the useful use of this semaphore (terminate the
process if it takes to long to terminate):
Checking in cvsapi/RunFile.h;
/usr/local/cvs/cvsnt/cvsapi/RunFile.h,v <-- RunFile.h
new revision: 1.1.2.19.4.6; previous revision: 1.1.2.19.4.5
done
Checking in cvsapi/unix/RunFile.cpp;
/usr/local/cvs/cvsnt/cvsapi/unix/RunFile.cpp,v <-- RunFile.cpp
new revision: 1.1.2.20.4.10; previous revision: 1.1.2.20.4.9
done
Checking in cvsapi/unix/SocketIO.cpp;
/usr/local/cvs/cvsnt/cvsapi/unix/SocketIO.cpp,v <-- SocketIO.cpp
new revision: 1.1.2.24.4.16; previous revision: 1.1.2.24.4.15
done
Checking in cvsapi/win32/RunFile.cpp;
/usr/local/cvs/cvsnt/cvsapi/win32/RunFile.cpp,v <-- RunFile.cpp
new revision: 1.1.2.28.4.5; previous revision: 1.1.2.28.4.4
done
Checking in src/main.cpp;
/usr/local/cvs/cvsnt/src/main.c,v <-- main.cpp
new revision: 1.71.2.151.6.77; previous revision: 1.71.2.151.6.76
done
Checking in CvsProxyUnix.cpp;
/scotty/cvsproxy/CvsProxyUnix.cpp,v <-- CvsProxyUnix.cpp
new revision: 1.12; previous revision: 1.11
done
Checking in CvsManager.cpp;
/scotty/cvsmanager/CvsManager.cpp,v <-- CvsManager.cpp
new revision: 1.79; previous revision: 1.78
done
|
|
2012-08-28 21:13 AEST by Arthur Barrett - Occasionally seeing this error - need to fix before moving on:
/private/tmp/server-56480.txt
-rw-r--r-- 1 abarrett wheel 548 28 Aug 20:05 /private/tmp/server-56489.txt
Mountain-mini:~ abarrett$ vi /private/tmp/server-56480.txt
20:05:05: -> Server trace started.
20:05:05: -> Tracelevel set to 0. PID is 56480
20:05:05: -> Session ID is dca0503c97d1437e
20:05:05: -> Session time is Tue Aug 28 10:05:05 2012
20:05:05: -> ftok failed - no path /Library/Frameworks/cvstools.framework/Versions/A/bin/cvsproxy
20:05:05: -> Open Semaphore failed - cannot ensure client terminates OK: No such file or directory
20:05:05: -> error_exit() - are we here due to a connection timeout?
20:05:05: -> Unloading - about to clear list
20:05:05: -> Unloading - cleared list
It goes away after I run 'some other command', eg: ls -la. So I think it's happening because something
hasn't terminated correctly...
Mountain-mini:~ abarrett$ cvs info -r localhost
cvsnt: Please run "cvs" not "cvsnt".
Error cannot continue.
Mountain-mini:~ abarrett$ ls -la /Library/Frameworks/cvstools.framework/Versions/A/bin/cvsproxy
-rwxrwxr-x 1 root wheel 129104 28 Aug 19:58
/Library/Frameworks/cvstools.framework/Versions/A/bin/cvsproxy
Mountain-mini:~ abarrett$ ls -la /private/tmp/server-*
-rw-r--r-- 1 abarrett wheel 136 28 Aug 20:05 /private/tmp/server-56462.txt
-rw-r--r-- 1 abarrett wheel 548 28 Aug 20:05 /private/tmp/server-56463.txt
-rw-r--r-- 1 abarrett wheel 548 28 Aug 20:05 /private/tmp/server-56480.txt
-rw-r--r-- 1 abarrett wheel 548 28 Aug 20:05 /private/tmp/server-56489.txt
Mountain-mini:~ abarrett$ cvs info -r localhost
Retry connect to remote server...
Retry connect to remote server...
Couldn't connect to remote server: Connection refused
|
|
2012-08-29 19:46 AEST by Arthur Barrett - Created an attachment (id=2500)
cvsproxy semaphore fixes
Checking in CvsProxyUnix.cpp;
/scotty/cvsproxy/CvsProxyUnix.cpp,v <-- CvsProxyUnix.cpp
new revision: 1.13; previous revision: 1.12
done
Checking in cvstools/ServerInfo.cpp;
/usr/local/cvs/cvsnt/cvstools/ServerInfo.cpp,v <-- ServerInfo.cpp
new revision: 1.1.2.7.4.9; previous revision: 1.1.2.7.4.8
done
Checking in src/main.cpp;
/usr/local/cvs/cvsnt/src/main.c,v <-- main.cpp
new revision: 1.71.2.151.6.78; previous revision: 1.71.2.151.6.77
done
|
|
2012-08-29 20:32 AEST by Arthur Barrett - Created an attachment (id=2502)
fix bug with ftok? semget called twice fix.
Checking in CvsProxyUnix.cpp;
/scotty/cvsproxy/CvsProxyUnix.cpp,v <-- CvsProxyUnix.cpp
new revision: 1.14; previous revision: 1.13
done
|
|
2012-08-29 21:28 AEST by Arthur Barrett - Created an attachment (id=2503)
fix bug with ftok()? compare key_t as unsigned int.
Checking in CvsProxyUnix.cpp;
/scotty/cvsproxy/CvsProxyUnix.cpp,v <-- CvsProxyUnix.cpp
new revision: 1.15; previous revision: 1.14
done
Checking in src/main.cpp;
/usr/local/cvs/cvsnt/src/main.c,v <-- main.cpp
new revision: 1.71.2.151.6.79; previous revision: 1.71.2.151.6.78
done
|