Code Comments
Programming Forum and web based access to our favorite programming groups.Hi Guys, I am using AIX53. I am having one server application written in C++. It gives me error number 34 (ERANGE) which is for "Result too large". I tried to search the possible ways to resolve it but couldnt. Could some one please tell me why this comes and how to resolve?? Thanks in advance......
Post Follow-up to this messageOn Mar 24, 12:59=A0pm, monty <manishgandh...@gmail.com> wrote: > Hi Guys, > > I am using AIX53. I am having one server application written in C++. > It gives me error number 34 (ERANGE) which is for "Result too large". > I tried to search the possible ways to resolve it but couldnt. > > Could some one please tell me why this =A0comes and how to resolve?? > > Thanks in advance...... sorry forgot to mention that function semop(semIdentifier ,&sembuf ,1); is setting that errno to 34.
Post Follow-up to this messageOn Mon, 24 Mar 2008 02:28:23 -0700, monty wrote: > On Mar 24, 12:59Â_pm, monty <manishgandh...@gmail.com> wrote: > > sorry forgot to mention that function semop(semIdentifier ,&sembuf ,1); > is setting that errno to 34. RTFM: ERANGE For some operation sem_op+semval is greater than SEMVMX, the implementation dependent maximum value for semval. So, you try to increment one (or more...) of the values beyond its max, which would cause it to wrap around, which you don't want, because that would destroy the ordering. HTH, AvK
Post Follow-up to this messageOn Mar 24, 5:58=A0pm, moi <r...@invalid.address.org> wrote: > On Mon, 24 Mar 2008 02:28:23 -0700, monty wrote: > > > > > > RTFM: > > ERANGE For some operation sem_op+semval is greater than SEMVMX, the > implementation dependent maximum value for semval. where is this SEMVMX defined and how can i see it's current value? Also is there any limit for this parameter? > > So, you try to increment one (or more...) of the values beyond its max, > which would cause it to wrap around, which you don't want, because that > would destroy the ordering. > > HTH, > AvK
Post Follow-up to this messageOn Mon, 24 Mar 2008 07:58:50 -0700, monty wrote:
> On Mar 24, 5:58Â_pm, moi <r...@invalid.address.org> wrote:
>
> where is this SEMVMX defined and how can i see it's current value? Also
> is there any limit for this parameter?
>
I don't know. Sorry.
Try grepping in your /usr/include/*/*.h files.
It appears to be system-dependent. Linux seems to have it
stored is semvmx in a seminfo {} structure which must probably be
obtained by calling some obscure semxxx() systemcall. It is not
obtainable via getrlimit().
For OSF, it appears to exist as SEMINFO_VMX; obtainable via the table()
systemcall.
AvK
Post Follow-up to this message> where is this SEMVMX defined and how can i see it's current value? > Also is there any limit for this parameter? The maximum value is os dependent. This constant, SEMVMX, is not defined by the SUSv3 (although it does exist on linux systems). From SUSv3 online docs: [ERANGE] An operation would cause a semval to overflow the system-imposed limit, or an operation would cause a semadj value to overflow the system-imposed limit. As such grab, your man page for semop(), and if nothing there check: http://publib.boulder.ibm.com/infoc...etrf2/semop.htm The limits you should be interested in are: # Maximum number of semaphores per ID is 65,535. # Maximum number of operations per call by the semop subroutine is 1024. Note that you MUST double check these values with IBM doc provided with your system and you current kernel conf (I don't remember if AIX allows you to update an /etc file to update those limits). cheers, -- paulo
Post Follow-up to this messageIPC limits from IBM website per AIX versions: http://publib.boulder.ibm.com/infoc.../ipc_limits.htm -- paulo
Post Follow-up to this messageOn Mar 24, 9:13=A0pm, ppi <vod...@gmail.com> wrote: > IPC limits from IBM website per AIX versions:http://publib.boulder.ibm.com=[/color ] /infocenter/systems/index.jsp?topic=3D/com... > > -- paulo I have cross checked all the values and all are having at their maximum according to AIX documentation. Also their are not to much load or iterations on the semaphore. I have intiated only few process. I think problem would be with the some of parameter values which are not getting reset properly on task completetion. Please please help me..... I have not worked to much on the semaphores.
Post Follow-up to this messagemonty wrote: > I think problem would be with the some of parameter values which are > not getting reset properly on task completetion. > Please please help me..... I have not worked to much on the > semaphores. May I remind you that you haven't shown any code? You're supposed to show a small but complete example that exhibits the problem you are discussing.
Post Follow-up to this messageOn Wed, 26 Mar 2008 04:12:06 -0700, monty wrote: > On Mar 24, 9:13Â_pm, ppi <vod...@gmail.com> wrote: topic=/com... Unluckily, the IBM site does not list the *names* of the #defined constants. > I think problem would be with the some of parameter values which are not > getting reset properly on task completetion. Please please help me..... > I have not worked to much on the semaphores. If you really cannot find the name/place of the SEMVMX constant, you could assume it to be 16K. If the error still occurs, assume it to be 8K... etc. If it gets down to 1, something else is wrong :-] I agree this is an ugly hack, but it will at least get you on the road. HTH, AvK
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.