Tom Keiser wrote: > On 2/14/06, Derrick J Brashear <[EMAIL PROTECTED]> wrote: >> On Tue, 7 Feb 2006, Christopher D. Clausen wrote: >> >>> [EMAIL PROTECTED]:/usr/afs/bin]# ./salvager >>> Exiting immediately without salvage. Look into the FileLog to find volumes >>> which really need to be salvaged! >> Did you --enable-fast-restart (I think that's what it is)? Did you do that >> also when you did 1.4.1-rc6? Basically I'm wondering if the CVS head is >> really broken or if you had a mixed set of binaries in play. > > I can confirm that we have a problem. Basically, the windows-64 type > safety patch changed a bunch of variable declarations of type long to > type size_t, which changed their signedness. This broke a few > comparison operator checks in the lwp iomgr, resulting in IOMGR_Select > returning 1 instead of -1. Thus, bproc() never reaps its children, > and the bnodes never change state. I don't really have time right now > to work on a patch, but that's the source of the bosserver problems. > > Regards, > > -Tom
Ah yes. The joy of using a variable to store both numeric values
under some circumstances and pointers at other times.
This patch will fix the problem. Sorry for the inconvenience.
Jeffrey Altman
Index: iomgr.c
===================================================================
RCS file: /cvs/openafs/src/lwp/iomgr.c,v
retrieving revision 1.15
diff -u -r1.15 iomgr.c
--- iomgr.c 5 Nov 2005 06:48:12 -0000 1.15
+++ iomgr.c 15 Feb 2006 12:54:00 -0000
@@ -129,7 +129,9 @@
struct TM_Elem timeout;
/* Result of select call */
- size_t result;
+ int result;
+
+ struct IoRequest *next; /* for iorFreeList */
#ifdef AFS_DJGPP_ENV
NCB *ncbp;
@@ -228,14 +230,14 @@
}
}
-#define FreeRequest(x) ((x)->result = (size_t)iorFreeList, iorFreeList
= (x))
+#define FreeRequest(x) ((x)->next = iorFreeList, iorFreeList = (x))
static struct IoRequest *NewRequest()
{
struct IoRequest *request;
if ((request=iorFreeList))
- iorFreeList = (struct IoRequest *) (request->result);
+ iorFreeList = (struct IoRequest *) (request->next);
else request = (struct IoRequest *) malloc(sizeof(struct IoRequest));
memset((char*)request, 0, sizeof(struct IoRequest));
@@ -304,7 +306,10 @@
*/
static void FDSetSet(int nfds, fd_set *fd_set1, fd_set *fd_set2)
{
- unsigned int i, n;
+ unsigned int i;
+#ifndef AFS_NT40_ENV
+ unsigned int n;
+#endif
if (fd_set1 == (fd_set*)0 || fd_set2 == (fd_set*)0)
return;
@@ -918,7 +923,7 @@
struct timeval *timeout;
{
register struct IoRequest *request;
- size_t result;
+ int result;
#ifndef AFS_NT40_ENV
if(fds > FD_SETSIZE) {
@@ -1007,7 +1012,7 @@
result = request -> result;
FreeRequest(request);
- return (result > 1 ? 1 : (int)result);
+ return (result > 1 ? 1 : result);
}
?
int IOMGR_Cancel(PROCESS pid)
smime.p7s
Description: S/MIME Cryptographic Signature
