Originally posted by: SystemAdmin
Thanx for the reply....
To be more specific, we are using ML 0 AIX 5.3 ( 64 bit kernel) we thought that this would be causing some issue so we did the set up on ML 5 AIX 5.3 ( 32 bit kernel). Still getting the same error related to loading DSO.
We tried troubleshooting the issue, this is what we get:-
Apache need to load library A (our application) , which further need to dynamically load library B.
Apache is able to load A but it fails while loading B.
The error is from dlopen().
Following is the snippet of the code , where the main issue is:-
Void* DSOLoadLibrary ( const char *pPath, char **pErrorBuf )
{
void *pHandle = NULL;
pHandle = dlopen( ./test.so, RTLD_LAZY ); ===================> here the dlopen is not able to read the file and returning Null
if ( !pHandle )
{
char *pError = dlerror();
*pErrorBuf = strdup(pError);
return pHandle;
}
return pHandle;
}
And the error message "Not enough space" is read from the Error Buffer (pErrorBuf).......
The dlopen() fails when the library is loaded from Apache. But when we tried to load the same file outside Apache , we were able to load that on AIX 5.3.
This issue is on AIX 5.3 only and not on AIX 5.2.
we even tried to increase the address spaces and other envoirnment variables related to 64 bit applications but didn't get any respite from the error.
Please suggest.
> As far as I know it should just work boh AIX releases
> run 32 or 64 bits - out of the box. The kernel does
> not have to be 64 bit to run 64 bit application
> anyway but hte 63 bit kernel is recommended and
> mandatory on very big memory machines.
>
> But without knowing what your application is doing
> this is hard to determine.
> What does AIX support say?
>
> Here are a few guesses:
> Are you on the latest ML for AIX 5.3 (I think we are
> at ML6) - perhaps you have hit a bug already fixed.
> Certainly be above ML4 and thats been out a long time
> now.
>
> If you are using APIs that have changed between AIX
> 5.2 and 5.3, it would be worth recompiling on AIX 5.3
> to determine if this fixes it. I am thinking that
> perhaps the library is being misread and the wrong
> bytes in the library header are being taken as the
> size and its impossibilly large.
>
> Worth checking is perhaps that you don't have enough
> space :-)
> Have you free space in ALL file systems (df -m)?
> Have you free paging space (lsps -a)?
>
> Also, have you the latest version of your compilers?
> Could just be a bug that effects AIX5.3 but you get
> away with it on AIX 5.2!
>
> Generally speaking applications are recompiled for
> the different releases of AIX like AIX 5.1, 5.2 and
> 5.3 and now AIX 6. Unless you have very simple code
> just using libc. Yes, there is binary compatability
> but there are limits perhaps your apache extension is
> involved with something that is not compatible - I
> can't tell.
>
> Just curious:
> 1) Any reason why you are compiling for this old
> version of Apache?
> 2) Why 64 bit as AIX runs 32 bit applications at the
> same speed as 64 bit ones(or ever so slightly faster
> as they take up less memory)? do you need more than
> 2GB of memory in your app?
>
> Hope this helps, N
#AIX-Forum