Re: upper() problem in 7.0.2 - Mailing list pgsql-bugs

From Christopher L. Cousins
Subject Re: upper() problem in 7.0.2
Date
Msg-id 20000706134513.B7607@cobalt.impulse.net
Whole thread Raw
In response to Re: upper() problem in 7.0.2  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Thu, Jul 06, 2000 at 03:18:59AM -0400, Tom Lane wrote:
> "Christopher L. Cousins" <chris@impulse.net> writes:
> > What I can do is create a fake dataset, find some values that cause the problem, then give
> > that to you.  Would that be acceptable?
>
> Sure, if you can do that.  I just want to reproduce the crash here.

FYI, using the fake dataset on a different box I was able to get a better backtrace.

Architecture (example: Intel Pentium)         : Intel Pentium
Operating System (example: Linux 2.0.26 ELF)  : FreeBSD 2.2.8-STABLE
PostgreSQL version (example: PostgreSQL-7.0)  : PostgreSQL-7.0.2
Compiler used (example:  gcc 2.8.0)           : gcc version 2.7.2.1

chris@indigo% gdb ./postgres ../data/base/chris/postgres.core
GDB is free software and you are welcome to distribute copies of it
 under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for GDB; type "show warranty" for details.
GDB 4.16 (i386-unknown-freebsd),
Copyright 1996 Free Software Foundation, Inc...
Core was generated by `postgres'.
Program terminated with signal 11, Segmentation fault.
Cannot access memory at address 0x20140080.
#0  0x202036b4 in ?? ()
(gdb) bt
#0  0x202036b4 in ?? ()
#1  0x1eeff4 in ?? ()
#2  0xdaa41 in fixedlen_like (
    s=0x1eeff4 "MQZSVRSJDSFR"... <Address 0x1ef000 out of bounds>, p=0x1bdbe0,
    charlen=12) at like.c:53
#3  0xdab1d in textlike (s=0x1eeff0, p=0x1bdbe0) at like.c:100
#4  0x105019 in fmgr_c (finfo=0x1d3c18, values=0xefbfc898,
    isNull=0xefbfc98f "") at fmgr.c:137
#5  0x4a5e6 in ExecMakeFunctionResult (node=0x1bd710, arguments=0x1bdd30,
    econtext=0x1d3738, isNull=0xefbfc98f "",
    isDone=0xefbfc903 "\001       004") at execQual.c:842
#6  0x4a62a in ExecEvalOper (opClause=0x1bdd48, econtext=0x1d3738,
    isNull=0xefbfc98f "") at execQual.c:902
#7  0x4a9b8 in ExecEvalExpr (expression=0x1bdd48, econtext=0x1d3738,
    isNull=0xefbfc98f "", isDone=0xefbfc94b "\001h
    at execQual.c:1249
#8  0x4a6ff in ExecEvalOr (orExpr=0x1bdf50, econtext=0x1d3738,
    isNull=0xefbfc98f "") at execQual.c:1032
#9  0x4a9d8 in ExecEvalExpr (expression=0x1bdf50, econtext=0x1d3738,
    isNull=0xefbfc98f "", isDone=0xefbfc98e "\001") at execQual.c:1256
#10 0x4aa8e in ExecQual (qual=0x1d3460, econtext=0x1d3738,
    resultForNull=0 '\000') at execQual.c:1377
#11 0x4afa0 in ExecScan (node=0x1bcfa0, accessMtd=0x50490 <SeqNext>)
    at execScan.c:144
#12 0x5056b in ExecSeqScan (node=0x1bcfa0) at nodeSeqscan.c:150
#13 0x490e6 in ExecProcNode (node=0x1bcfa0, parent=0x1bcfa0)
    at execProcnode.c:268
#14 0x47e50 in ExecutePlan (estate=0x1bd028, plan=0x1bcfa0,
    operation=CMD_SELECT, offsetTuples=0, numberTuples=0,
    direction=ForwardScanDirection, destfunc=0x1d3478) at execMain.c:1052
#15 0x4749b in ExecutorRun (queryDesc=0x1d34b8, estate=0x1bd028, feature=3,
    limoffset=0x0, limcount=0x0) at execMain.c:327
#16 0xc0121 in ProcessQueryDesc (queryDesc=0x1d34b8, limoffset=0x0,
    limcount=0x0) at pquery.c:310
#17 0xc019e in ProcessQuery (parsetree=0x1bc630, plan=0x1bcfa0, dest=Remote)
    at pquery.c:353
#18 0xbe12f in pg_exec_query_dest (
    query_string=0x15d3b8 "SELECT * FROM tblUser\nWHERE upper(tblUser.username) LIKE upper('%hr%')\nOR upper(tblUs
      er.gecos) LIKE upper('%hr%');", dest=Remote,  
    aclOverride=0) at postgres.c:663
#19 0xbdf54 in pg_exec_query (
    query_string=0x15d3b8 "SELECT * FROM tblUser\nWHERE upper(tblUser.username) LIKE upper('%hr%')\nOR upper(tblUs
      er.gecos) LIKE upper('%hr%');") 
    at postgres.c:562
#20 0xbf99d in PostgresMain (argc=4, argv=0xefbfd0c8, real_argc=5,
    real_argv=0xefbfd924) at postgres.c:1590
#21 0xa3b60 in DoBackend (port=0x169000) at postmaster.c:2009
#22 0xa36a6 in BackendStartup (port=0x169000) at postmaster.c:1776
#23 0xa2416 in ServerLoop () at postmaster.c:1037
#24 0xa1aec in PostmasterMain (argc=5, argv=0xefbfd924) at postmaster.c:725
#25 0x5b467 in main (argc=5, argv=0xefbfd924) at main.c:93

--

--Chris

                              ____
Impulse Internet Services    /    \
____________________________/      \_____

http://www.impulse.net <chris@impulse.net>

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Re: [HACKERS] Re: [SQL] MAX() of 0 records.
Next
From: "Christopher L. Cousins"
Date:
Subject: Re: upper() problem in 7.0.2