> From [EMAIL PROTECTED] Thu Apr 22 07:38:11 2004
> Date: Thu, 22 Apr 2004 08:52:18 -0500
> From: Russell Adams <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Cc: "Ritchie, Dale" <[EMAIL PROTECTED]>
> Subject: LPRng: LPD Crashing with realloc error
>
> The lpd daemon has crashed twice now in three days with the error on
> the last line below.  I'm trying to understand what caused this whole
> block of errors. Some form of memory error?
>
> The realloc that failed in getqueue.c happens in the Get_fd_image
> function, and the terminating error in linelist.c occurs in Check_max.
>
> We're running LPRng-3.8.26 on AIX 5.2 compiled with GCC, with just
> under 1000 print queues.
>
> Apr 22 05:21:45 ksx1 (Server)[661170]: J025: realloc of 0x0, new size 633 failed, 
> file './common/getqueue.c', line 189 - <NULL>
> Apr 22 05:21:45 ksx1 (Server)[661172]: J026: Do_queue_jobs: cannot read queue 
> '/var/spool/lpd/J026' - <NULL>
> Apr 22 05:21:45 ksx1 (Server)[661174]: J027: Do_queue_jobs: cannot read queue 
> '/var/spool/lpd/J027' - <NULL>
> Apr 22 05:21:46 ksx1 (Server)[661176]: J028: Do_queue_jobs: cannot read queue 
> '/var/spool/lpd/J028' - <NULL>
> Apr 22 05:21:46 ksx1 (Server)[661178]: J029: Do_queue_jobs: cannot read queue 
> '/var/spool/lpd/J029' - <NULL>
> Apr 22 05:21:46 ksx1 (Server)[661180]: J02A: Do_queue_jobs: cannot read queue 
> '/var/spool/lpd/J02A' - <NULL>
> Apr 22 05:21:46 ksx1 (Server)[661182]: J02B: Do_queue_jobs: cannot read queue 
> '/var/spool/lpd/J02B' - <NULL>
> Apr 22 05:21:46 ksx1 (Server)[661184]: J02C: Do_queue_jobs: cannot read queue 
> '/var/spool/lpd/J02C' - <NULL>
> Apr 22 05:21:46 ksx1 (Server)[661186]: J02D: Do_queue_jobs: cannot read queue 
> '/var/spool/lpd/J02D' - <NULL>
> Apr 22 05:21:47 ksx1 (Server)[661188]: J02E: Do_queue_jobs: cannot read queue 
> '/var/spool/lpd/J02E' - <NULL>
> Apr 22 05:21:47 ksx1 (Server)[661190]: J030: Do_queue_jobs: cannot read queue 
> '/var/spool/lpd/J030' - <NULL>
> Apr 22 05:21:47 ksx1 (Server)[661192]: j031: realloc of 0x0, new size 408 failed, 
> file './common/linelist.c', line 351 - <NULL>
> Apr 22 05:21:47 ksx1 (Server)[661194]: j032: realloc of 0x0, new size 408 failed, 
> file './common/linelist.c', line 351 - <NULL>
> Apr 22 05:21:47 ksx1 (Server)[661196]: j033: realloc of 0x0, new size 408 failed, 
> file './common/linelist.c', line 351 - <NULL>
> Apr 22 05:21:47 ksx1 (Server)[661198]: j034: realloc of 0x0, new size 408 failed, 
> file './common/linelist.c', line 351 - <NULL>
> Apr 22 05:21:48 ksx1 Waiting[755296]: realloc of 0x0, new size 408 failed, file 
> './common/linelist.c', line 351 - <NULL>
>
> Russell

Hmmm...  This is very odd.  Not just the error, but also the NULL error message.

The proble is caused by a failing 'opendir(".")' system call, which causes
logerr_die( ... ) to be called, which calls Errormsg() to be called, which will
cause the strerror() routine to be called.  Apparently the AIX strerror() return
does not include error messages for the failure.

I will modify the 'Errormsg()' code to cover this case:

    Errormsg( int err ){
        if( !(msg = strerror(err)) ){
                static char b[32];
                snprintf(b,sizeof(b),"errno=%d", err );
                msg = b;
        }
        return(msg);

Patrick Powell                 Astart Technologies
[EMAIL PROTECTED]            6741 Convoy Court
Network and System             San Diego, CA 92111
  Consulting                   858-874-6543 FAX 858-751-2435
LPRng - Print Spooler (http://www.lprng.com)

-----------------------------------------------------------------------------
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address

If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body.  For the impatient,
to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
with:                           | example:
subscribe LIST <mailaddr>       |  subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST <mailaddr>     |  unsubscribe lprng [EMAIL PROTECTED]

If you have major problems,  send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-----------------------------------------------------------------------------

Reply via email to