Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Getting errno 34(ERANGE); Result too large .....
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......

Report this thread to moderator Post Follow-up to this message
Old Post
monty
03-24-08 09:35 AM


Re: Getting errno 34(ERANGE); Result too large .....
On 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.


Report this thread to moderator Post Follow-up to this message
Old Post
monty
03-24-08 09:35 AM


Re: Getting errno 34(ERANGE); Result too large .....
On 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

Report this thread to moderator Post Follow-up to this message
Old Post
moi
03-24-08 01:12 PM


Re: Getting errno 34(ERANGE); Result too large .....
On 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


Report this thread to moderator Post Follow-up to this message
Old Post
monty
03-25-08 12:25 AM


Re: Getting errno 34(ERANGE); Result too large .....
On 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

Report this thread to moderator Post Follow-up to this message
Old Post
moi
03-25-08 12:25 AM


Re: Getting errno 34(ERANGE); Result too large .....
> 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

Report this thread to moderator Post Follow-up to this message
Old Post
ppi
03-25-08 12:25 AM


Re: Getting errno 34(ERANGE); Result too large .....
IPC limits from IBM website per AIX versions:
http://publib.boulder.ibm.com/infoc.../ipc_limits.htm

-- paulo

Report this thread to moderator Post Follow-up to this message
Old Post
ppi
03-25-08 12:25 AM


Re: Getting errno 34(ERANGE); Result too large .....
On 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.


Report this thread to moderator Post Follow-up to this message
Old Post
monty
03-26-08 01:15 PM


Re: Getting errno 34(ERANGE); Result too large .....
monty 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.

Report this thread to moderator Post Follow-up to this message
Old Post
Noob
03-26-08 01:15 PM


Re: Getting errno 34(ERANGE); Result too large .....
On 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

Report this thread to moderator Post Follow-up to this message
Old Post
moi
03-27-08 12:43 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Unix Programming archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 02:31 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.