[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: XALLOC in program LIBHTTP/HTTPAPIR4



Thanks for the responses, you guys. 

Scott, I'm using version 1.23 of HTTPAPI. Is there a beta version that's
newer? Since I'm calling a web service that is subscriber-only, I'm not
sure how to reproduce the problem. I can't save the response that's
received from the web service - that's where the error occurs.
However....it *is* saved in httpapi_debug.txt. Would that help? I could
remove the identifying information and send it to you, if it would help.

As per Dennis' idea, I've been poking around HTTPAPIR4 to see what
XALLOC was doing, and I've seen the TERASPACE definition. I can sure
take a look at enabling it & recompiling HTTPAPI. My boss is out of the
office for the next 3 weeks, and he's the SECOFR, so getting the
recompiled HTTPAPI moved into production might be a challenge. Perhaps I
could do it in a test library on our iSeries that is a web server, and
see if it helps.

I'm going to be out for the rest of the day, but will be right back on
this first thing in the morning. I'll see about recompiling into test
with TERASPACE enabled.

Thank you!

Kim
________________________________________
* From: Thomas Raddatz <thomas.raddatz@xxxxxxxxxxx>
* To: HTTPAPI and FTPAPI Projects <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
* Subject: Re: XALLOC in program LIBHTTP/HTTPAPIR4
* Date: Mon, 07 Feb 2011 23:04:44 +0100
________________________________________
Scott,

Just an idea, but is it possible that the error happened when xalloc()
has 
been called from iconvdyn()? The iconvdyn() procedure tries to allocate
a 
memory buffer double the size of peSize (= inSize).

It appears as if the server returned 9767093 bytes. That size multiplied
by 
2 equals to 19534186 which exceeds the limit of 16776704 bytes.

@Kim: Is it possible for you to compile HTTPAPI with tera space enabled?

Thomas.

Am 07.02.2011 22:08, schrieb Scott Klement:
> Hi Kim,
>
> I'd be happy to help, if you can tell me how to reproduce the problem?
> (AFAIK, it's not related to the open/write/close you posted.)
>
> Are you using the current beta version of HTTPAPI?
>
>
> On 2/7/2011 2:11 PM, Kim Gibson wrote:
>> I'm using HTTPAPI to send a request to a web service and then parse
>> the response. When receiving the response, I create a new stream file
>> in the IFS and write the embedded XML document received in the
>> response to the stream file.
>>
>> To create the stream file, I'm using this code:
>>
>> fd = open( embfile
>>     : O_CREAT + O_WRONLY + O_EXCL +
>>       O_CCSID + O_TEXTDATA + O_TEXT_CREAT
>>     : S_IRUSR + S_IWUSR + S_IROTH
>>     : 819
>>     : 0 );
>> callp write(fd: retval.valptr: retval.len);
>> callp close(fd);
>>
>> It's been working very well, until I received an error message:
>>
>>     From module . . . . . . . . :   QRNXMSG
>>     From procedure  . . . . . . :   SignalException
>>     Statement . . . . . . . . . :   21
>>     To module . . . . . . . . . :   HTTPUTILR4
>>     To procedure  . . . . . . . :   XALLOC
>>     Statement . . . . . . . . . :   3433
>>     Message . . . . :   The length requested for storage allocation
is out of
>>       range.
>>     Cause . . . . . :   RPG procedure XALLOC in program
LIBHTTP/HTTPAPIR4 tried to
>>       allocate storage with a length that was not a value between 1
and 16776704.
>>       Recovery  . . . :   Contact the person responsible for program
maintenance
>>
>> The HTTP header of the response in this case follows:
>>
>> HTTP/1.1 200 OK
>> Cache-Control: private, max-age=0
>> Content-Length: 9767093
>> Content-Type: text/xml; charset=utf-8
>> svr: renwws02
>> X-Powered-By: ASP.NET
>> X-AspNet-Version: 2.0.50727
>> Date: Mon, 07 Feb 2011 19:52:11 GMT
>>
>> I dumped the program, but am not sure how to tell how much memory
>> XALLOC tried to allocate.  I do know that this response is
>> significantly larger than most that I receive, but probably not as
>> large as some that are going to come down the pike.
>>
>> Any ideas on where to start?
>>
>> Thanks so much,
>>
>> Kim Gibson

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------