[Queue-developers] Fwd: Bug in Queued when compileing on SuSE Linux 6.4
Brought to you by:
wkrebs
|
From: W. G. K. <wer...@ya...> - 2000-11-23 16:06:54
|
----- Forwarded message from Mike Trank <mi...@ne...> -----
Date: Thu, 23 Nov 2000 05:32:39 -0600 (CST)
From: Mike Trank <mi...@ne...>
Reply-To: Mike Trank <mi...@ne...>
Subject: Bug in Queued when compileing on SuSE Linux 6.4
To: bug...@gn...,eri...@co...
Hi there:
Well, I've been up all night working on this. I found a kind of weird bug
in queued. I have used this queue thing before on other machines and had
never had a problem compiling and making it work, but last night I wanted to
put it on another machine. This machine has SuSE Linux version 6.4. The kernel
version is 2.2.14 and has Glibc version 2.1.3 and Gcc version 2.95.2. The gcc
version display DOES NOT say "egcs" BTW, I dont know if that matters.
I have been running queue with no problem on an earlier version of suse Linux
that has kernel version 2.2.7 and glibc 2.0.7 and Gcc version "egcs-2.91.66".
Anyway, when I compiled Queue on this other machine and started queueing some
simple jobs, I always got a mail message saying that there was a fatal error
in queued. The error messages was "7: invalid integer rlimit".
Well, this was Queue version 1.30.1 "queue-latest.tar.gz", so I first tried
the version that I had been using on the other machine, which is queue-1.12.8.
But I got the exact same results.
So then, I looked through the Suse CDROM, and found that Suse actually
packages queue on the CD. I didn't know, that, but I figured I couldnt go
wrong with the RPM that suse has on their CDROM, so I installed that ( after
uninstalling the other versions ) but I gave me the EXACTR same results!
Now queued did exit upon making this error, it stayed in memory, but every job
i sent, I always got this error. So I decided to go into the source code and
see what's up, and I found that this error is generated by the "itorl(int i)"
function. that function is called in only one place, and that place is where I
founf this little snippet of code with the reference to the problem that Eric
had:
#ifndef solaris
/*Eric Deal <eri...@co...> found that this setrlimit
code breaks Solaris. Should test to see if it breaks other platforms
as well. GNU/Linux seems OK.*/
for( i=0; i<RLIM_NLIMITS; i++ ){
register struct rlimit *rlp = &(qp->q_rlimit[i]);
if( rlp->rlim_cur >= 0 && rlp->rlim_max >= 0 )
(void) setrlimit( itorl(i), rlp );
}
#endif /*end not for solaris.*/
After looking around some more, I saw that "i" should never get to 7, because
"RLIM_NLIMITS" is defeined as a constant in queue.h as 6. But my syslogs
sshowed RLIM_NLIMITS had the value 10! How did that happen? I dont know. To
fix this, I changed the "RLIM_NLIMITS" to "6" and now my queued works OK.
Kind of weird. maybe eric has the same thing happening in solaris.
Just thought you might like to know. I going to sleep.
----- End forwarded message -----
|