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

RE: Allocation error in HTTPAPI




This is the call stack when the job is MSGW:

                                       REEKS OPGEROEPEN PROGRAMMA'S VOOR TAAK                                                       
 Thread  . :   00007EA3                                                                                                             
                                                                                                    Module of              Ctl      
 Type Programma               Instructie-ID's          Instructie       Activeringsgroep            Uitgebreid type        Bdy      
      QP0ZPCP2   QSYS                                                   *DFTACTGRP 0000000000000001 QP0ZPCP2   QBUILDSS1    Y       
         Procedure: _CXX_PEP__Fv                                                                                                    
      QP0ZPCPN   QSYS         266                                       *DFTACTGRP 0000000000000001 QP0ZPCPN   QBUILDSS1    N       
         Procedure: Qp0zNewProcess                                                                                                  
      QP0ZPCPN   QSYS         210                                       *DFTACTGRP 0000000000000001 QP0ZPCPN   QBUILDSS1    N       
         Procedure: InvokeTargetPgm__FP11qp0z_pcp_cb                                                                                
      QZSRCGI    QHTTPSVR                                               *NEW       0000000000000011 ZSRVHJOB   QBUILDDG1    Y       
         Procedure: _C_pep                                                                                                          
      QZSRCGI    QHTTPSVR     140                                       *NEW       0000000000000011 ZSRVHJOB   QBUILDDG1    N       
         Procedure: main                                                                                                            
      QZSRCGI    QHTTPSVR     143                                       *NEW       0000000000000011 ZSRVCGI    QBUILDDG1    N       
         Procedure: handlereq                                                                                                       
      QZSRCGI    QHTTPSVR     648                                       *NEW       0000000000000011 ZSRVCGI    QBUILDDG1    N       
         Procedure: CGICall                                                                                                         
      QZSRCGI    QHTTPSVR     3                                         *NEW       0000000000000011 ZSRVCGI    QBUILDDG1    N       
         Procedure: BigSwitch                                                                                                       
      RCVXML     ROES400                                                EASYORDER  0000000000000015 RCVXML     ROES400      Y       
         Procedure: _QRNP_PEP_RCVXML                                                                                                
      RCVXML     ROES400      19000                                     EASYORDER  0000000000000015 RCVXML     ROES400      N       
         Procedure: RCVXML                                                                                                          
      HTTPAPIR4  EBUZZTOOLS   173000                                    EASYORDER  0000000000000015 HTTPXMLR4  EBUZZTOOLS   N       
         Procedure: HTTP_PARSE_XML_STRING                                                                                           
      HTTPAPIR4  EBUZZTOOLS   84100                                     EASYORDER  0000000000000015 HTTPXMLR4  EBUZZTOOLS   N       
         Procedure: PARSEXML                                                                                                        
      EXPAT      EBUZZTOOLS   28                                        EASYORDER  0000000000000015 XMLPARSE   QTEMP        N       
         Procedure: XML_Parse                                                                                                       
      EXPAT      EBUZZTOOLS   14                                        EASYORDER  0000000000000015 XMLPARSE   QTEMP        N       
         Procedure: XML_ParseBuffer                                                                                                 
      EXPAT      EBUZZTOOLS   5                                         EASYORDER  0000000000000015 XMLPARSE   QTEMP        N       
         Procedure: prologInitProcessor                                                                                             
      EXPAT      EBUZZTOOLS   3                                         EASYORDER  0000000000000015 XMLPARSE   QTEMP        N       
         Procedure: prologProcessor                                                                                                 
      EXPAT      EBUZZTOOLS   130                                       EASYORDER  0000000000000015 XMLPARSE   QTEMP        N       
         Procedure: doProlog                                                                                                        
      EXPAT      EBUZZTOOLS   1                                         EASYORDER  0000000000000015 XMLPARSE   QTEMP        N       
         Procedure: contentProcessor                                                                                                
      EXPAT      EBUZZTOOLS   199                                       EASYORDER  0000000000000015 XMLPARSE   QTEMP        N       
         Procedure: doContent                                                                                                       
      HTTPAPIR4  EBUZZTOOLS   128400                                    EASYORDER  0000000000000015 HTTPXMLR4  EBUZZTOOLS   N       
         Procedure: ENDELEMENT                                                                                                      
      HTTPAPIR4  EBUZZTOOLS   3105                                      EASYORDER  0000000000000015 CCSIDR4    EBUZZTOOLS   N       
         Procedure: ICONVDYN                                                                                                        
      HTTPAPIR4  EBUZZTOOLS   3433                                      EASYORDER  0000000000000015 HTTPUTILR4 EBUZZTOOLS   N       
         Procedure: XALLOC                                                                                                          
      QRNXIE     QSYS         1                                         EASYORDER  0000000000000015 QRNXERR    QBUILDSS1    N       
         Procedure: _QRNX_CALL_FC_H                                                                                                 
      QRNXIE     QSYS         2                                         EASYORDER  0000000000000015 QRNXERR    QBUILDSS1    N       
         Procedure: _QRNX_DFT_ERROR                                                                                                 
      QRNXIE     QSYS         17                                        EASYORDER  0000000000000015 QRNXMSG    QBUILDSS1    N       
         Procedure: _QRNX_INQ                                                                                                       
      QRNXIE     QSYS         5                                         EASYORDER  0000000000000015 QRNXMSG    QBUILDSS1    N       
         Procedure: InqMsg                                                                                                          
      QMHRCVPM   QSYS                                              130D *DFTACTGRP 0000000000000001                         N       


And this is part of the DUMP of my RCVXML program:

                                                     EEN SPOOL-BESTAND BEKIJKEN         
 Bestand . . . . :   QPPGMDMP                                                           
 Stuurtekens . . :                                                                      
 Zoeken  . . . . :   LEN                                                                
 *...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8....+..
  HTTP_URL_ENCODER      POINTER              SPP:*NULL                                  
  INLEN                 INT(10)              4213172          '004049B4'X               
  LEN                   INT(10)              4213172          '004049B4'X               

I believe the entire request is about 4.2 Mb. 

Rick Bovet
Development Manager
Siriusdreef 66, 2132 WT  Hoofddorp
Postbus 3005, 2130 KA  Hoofddorp
The Netherlands
rbovet@xxxxxxxxxxxxxxxx




-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: Tuesday, June 01, 2010 7:29 PM
To: HTTPAPI and FTPAPI Projects
Subject: Re: Allocation error in HTTPAPI

Hi Rick,

XALLOC() is called from many places within HTTPAPI, so unfortunately 
telling me that XALLOC is returning an error doesn't give me much 
information.

You say that ContLen() is approx 4.2 billion.  That's nice, but I don't 
know how ContLen() corresponds to the length that's being allocated?!

You show some code related to a user space.  If ContLen is 4.2 billion, 
how can you use it with a user space?  (User spaces are limited to 16 
MB!)  I'm lost.


On 6/1/2010 7:01 AM, Rick Bovet wrote:
>
>     Hello all,
>
>
>     Occasionally I get an allocation error while parsing a xml-document. I
>     believe it occurs when a large request (document) is being parsed.
>
>     I read in the documentation that there is a TERASPACE compile option
>     when generating HTTPAPI, but that is disabled for compatibility
>     reasons in EXPAT. I am not sure this compile option will solve my
>     problem though. I am running version 1.23 of HTTPAPI.
>
>
>     Here is a snippit of my code:
>
>     ...
>
>     len = ContLen();
>
>     UsrSpcNam = crtusrspc( UsrSpcLib : p2Space : qusei : '*ALL' : '' : le
>
>     UsrSpcReq = UsrSpc;
>
>
>     readIn( Workarea : len : inLen : Qusec );
>
>
>     InvalidRequest = *On;
>
>     // parse xml
>
>     http_XmlReturnPtr(*ON);
>
>     if (http_parse_xml_string( p2Space : inLen
>
>                            : 0
>
>                            : *NULL
>
>                            : %paddr(EndTag)
>
>                            : *null )<  0 );
>
>        MessageReturn  = http_error();
>
>        InvalidRequest = *Off;
>
>     endif;
>
>     ...
>
>
>     From the dump I generated after the MSGW in XALLOC it shows that my
>     ContLen() = 4.213.172. I read the entire request into a *USRSPC and I
>     pass the pointer to the userspace and the length to
>     http_parse_xml_string.
>
>
>     I use this method to send a flat file from one as/400 to another
>     as/400 (excuse the old name). The file/data is base64 encoded and
>     between two xml-tags. So the entire file is one XML-element. Probably
>     this was a large file.
>
>
>     Any hints on solving this problem...
>
>
>
>     Rick Bovet
>
>     Development Manager
>
>     Siriusdreef 66, 2132 WT  Hoofddorp
>
>     Postbus 3005, 2130 KA  Hoofddorp
>
>     The Netherlands
>
>     [1]rbovet@xxxxxxxxxxxxxxxx
>
>
>     [2]ECi-Software Solutions-sm_signature
>
> References
>
>     1. file://localhost/tmp/rbovet@xxxxxxxxxxxxxxxx
>     2. http://www.ecisolutions.com/
>
>
>
>
> -----------------------------------------------------------------------
> This is the FTPAPI mailing list.  To unsubscribe, please go to:
> http://www.scottklement.com/mailman/listinfo/ftpapi
> -----------------------------------------------------------------------

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