I am trying to get GNU queue to work under IRIX 6.5.8 on an Origin 200 cluster. I can get the software to compile after I add #include <sys/types.def> to random.c. The queued daemon runs okay but when I try to do any tests with queue, for example
queue -i -w -n -- hostname
then it hangs and a message is sent to root (I have built GNU queue with --enable-root) which is given below.
as the configure options. I have looked in the code and it seems that IRIX supposedly works. Can anyone give me any pointers on how I might fix this problem with rlimit values.
Dave
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You need to compare the system resource types defined in the system headers (<sys/resource.h> on Linux at least...which actually includes the values from <bits/resource.h>) and compare that to the rtab structure in queued.c. If your system defines more resource types than already documented in the code it will fail (see below). Just add the missing ones in (be careful to define them in order of their values from the system header).
Somewhere (can't remember the function) there is a loop that indexes from 0 to RLIMIT_MAX. If on your system RLIMIT_MAX is greater than the last RLIMIT value in the rtab structure the call to itorl within that loop will think it has been passed an invalid resource limit. Redhat 7.0 added 3 new resource types that could be limited, asking itorl to index past the end of the rtab structure.
For this code to work portably without calling exit on failure, itorl could perhaps return a boolean value indicating "I do/don't know about this resource type" and return the current value in a pointer variable rather than quiting. The bool value would have to be examined before the call to setrlimit.
Commenting out the call error1 is dangerous. The return value in this case is undefined and results in an unknown value being passed to setrlimit. If this value is a valid rlimit the result would be undefined. I guess you could return -1 which would at least cause setrlimit to fail.
Cheers,
Ben.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am trying to get GNU queue to work under IRIX 6.5.8 on an Origin 200 cluster. I can get the software to compile after I add #include <sys/types.def> to random.c. The queued daemon runs okay but when I try to do any tests with queue, for example
queue -i -w -n -- hostname
then it hangs and a message is sent to root (I have built GNU queue with --enable-root) which is given below.
- 8: invalid integer rlimit value
QUEUED fatal error; queued terminating:
- 8: invalid integer rlimit value
Has anyone got GNU queue to work with IRIX 6.5? I am using the latest version of GNU queue and use the options
./configure --enable-root --prefix=/programs/local
as the configure options. I have looked in the code and it seems that IRIX supposedly works. Can anyone give me any pointers on how I might fix this problem with rlimit values.
Dave
I have the same problem on Linux and it is reported as a bug.
You'll find an ungly fix in my bug report.
You need to compare the system resource types defined in the system headers (<sys/resource.h> on Linux at least...which actually includes the values from <bits/resource.h>) and compare that to the rtab structure in queued.c. If your system defines more resource types than already documented in the code it will fail (see below). Just add the missing ones in (be careful to define them in order of their values from the system header).
Somewhere (can't remember the function) there is a loop that indexes from 0 to RLIMIT_MAX. If on your system RLIMIT_MAX is greater than the last RLIMIT value in the rtab structure the call to itorl within that loop will think it has been passed an invalid resource limit. Redhat 7.0 added 3 new resource types that could be limited, asking itorl to index past the end of the rtab structure.
For this code to work portably without calling exit on failure, itorl could perhaps return a boolean value indicating "I do/don't know about this resource type" and return the current value in a pointer variable rather than quiting. The bool value would have to be examined before the call to setrlimit.
Commenting out the call error1 is dangerous. The return value in this case is undefined and results in an unknown value being passed to setrlimit. If this value is a valid rlimit the result would be undefined. I guess you could return -1 which would at least cause setrlimit to fail.
Cheers,
Ben.
this'll fix u up:
tomw@opus 59% diff queued.c queued.c.bak
3302c3302
< } rtab[RLIM_NLIMITS] = {
---
> } rtab[] = {