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

Re: GSKit I/O Broken Pipe



Sorry... I'm not referring to writing the contents....  I should've been 
more explicit.

Your symptoms sound like HTTPAPI is failing to open the debug file (via 
the open() API).  I'm wondering why the file isn't opening?  So I told 
you that the latest beta would put the reason in the job log... and you 
said you're using the latest beta, and it's not writing the reason to 
the job log...   so I wnated you to debug it and determine _why_ it's 
not... and what the reason is.

If you look at the code in http_dwrite() you see this code:

      c                   if        wkDbg < 0
      c                   eval      wkDbg = open( HTTP_DEBUG_FILE
      c                                         : O_CREAT+O_APPEND+O_WRONLY
      c                                           + CCSID_OR_CP
      c                                         : 511
      c                                         : FILE_CCSID )
      c                   if        wkDbg = -1 and wkDbgFail = *Off
      c                   eval      wkDbgFail = *on
      c                   eval      NumErr = errno
      c                   callp     QMHSNDPM( 'CPE' + CharErr
      c                                     : 'QCPFMSG   *LIBL'
      c                                     : ' '
      c                                     : 0
      c                                     : '*DIAG'
      c                                     : '*'
      c                                     : 0
      c                                     : MsgKey
      c                                     : ApiEscape )
      c                   callp     QMHSNDPM( 'CPF9897'
      c                                     : 'QCPFMSG   *LIBL'
      c                                     : ErrDbg + HTTP_DEBUG_FILE
      c                                     : %len(ErrDbg+HTTP_DEBUG_FILE)
      c                                     : '*DIAG'
      c                                     : '*'
      c                                     : 0
      c                                     : MsgKey
      c                                     : ApiEscape )
      c                   endif

So it attempts to open() the debug file here.  If it fails, open() will 
return -1, so wkDbg = -1. It should then set NumErr to the error number 
that caused open() to fail.  And it should put messages in the job log 
(that's what the two QMHSNDPM calls do) that say:

   Permission denied
   Unable to open debug file /tmp/httpapi_debug.txt

Obviously, it may say something different from "Permission denied", it 
depends on what the actual error is.

I can't come up with any reason why these messages wouldn't be in the 
job log.  So I'm asking you to debug the code.  Set a breakpoint on the 
QMHSNDPM.  See what the value of NumErr is at the time, and see why it's 
not calling this API successfully to write the failure to the job log.

So my question is what's going on?  Why isn't the file opening?  And 
when the open fails, why isn't it logging a message?



On 9/16/2010 12:50 PM, Wayne Raynor wrote:
>
>     Yes, the job is set to the correct logging level, and I've debugged
>     the code and the http_dwrite does step through as if it is writing the
>     debug comments.
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------