Skip site navigation (1) Skip section navigation (2)

Port Bug Report: Backend dies when run at high debug level

From: Unprivileged user <nobody>
To: pgsql-ports(at)postgresql(dot)org
Subject: Port Bug Report: Backend dies when run at high debug level
Date: 1999-05-28 16:11:36
Message-ID: 199905281611.MAA95585@hub.org (view raw or flat)
Thread:
Lists: pgsql-ports
============================================================================
                        POSTGRESQL BUG REPORT TEMPLATE
============================================================================


Your name               : Michael Reed
Your email address      : reed(at)itd(dot)nrl(dot)navy(dot)mil

Category                : runtime: back-end
Severity                : serious

Summary: Backend dies when run at high debug level

System Configuration
--------------------
  Operating System   : Solaris 2.6

  PostgreSQL version : 6.4.2

  Compiler used      : gcc 2.8.1

Hardware:
---------
SunOS sun0 5.6 Generic_105181-12 sun4u sparc SUNW,Ultra-4
Sun Ultra 450 (2x300Mhz, 512MB).  Also verified on Sun Ultra 2 (2x167Mhz, 256MB)


Versions of other tools:
------------------------
gmake 3.75, bison 1.25, flex 2.5.4

--------------------------------------------------------------------------

Problem Description:
--------------------
Backend server dies unexpectedly when running at high debug level.
Problem not seen with no debug level specified.


--------------------------------------------------------------------------

Test Case:
----------
Run server at debug '10' on any solaris 2.6 platform (verified on
multiple machine types).


--------------------------------------------------------------------------

Solution:
---------
Traced it to a SEGV in postgresql-6.4.2/src/backend/nodes/outfuncs.c
in the function _outResdom (line 671).  The node->resname pointer was
NULL leading to an explosion of the sprintf statement (kinda hard to
do a sprintf of a string with a null pointer as the argument :-) Quick
hack to fix is:
 
        sprintf(buf, "\"%s\"", node->resname ? node->resname : ""); /* fix for
SELECT col AS
 
instead of:
 
        sprintf(buf, "\"%s\"", node->resname); /* fix for SELECT col AS
 
Why/how we are actually getting a NULL pointer in that field I didn't
track down (since this hack fixed the problem).

Tried to email this report to the mailing list, but it bounced.

--------------------------------------------------------------------------


Responses

pgsql-ports by date

Next:From: Bruce MomjianDate: 1999-05-28 16:35:18
Subject: Re: [PORTS] Port Bug Report: Backend dies when run at high debug level
Previous:From: Unprivileged userDate: 1999-05-28 13:42:40
Subject: Port Bug Report:

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group