6.4 beta crashed backend - Mailing list pgsql-hackers

From Marcus Mascari
Subject 6.4 beta crashed backend
Date
Msg-id 19980921101219.25783.rocketmail@send1c.yahoomail.com
Whole thread Raw
List pgsql-hackers
I don't know if this is the correct place to post
this message or if the bug in question has already
been fixed but the following query crashed the
backend.  Note however, that when there is only one
constant in the IN () list, the query works:

flock error for /tmp/.s.PGSQL.5432
debug info:
    User         = mmsadmin
    RemoteHost   = localhost
    RemotePort   = 0
    DatabaseName = mms
    Verbose      = 5
    Noversion    = f
    timings      = f
    dates        = Normal
    bufsize      = 64
    sortmem      = 512
    query echo   = f
InitPostgres
StartTransactionCommand
query: SELECT employees.lastname, employees.firstname, employees.email,
employees.phoneno, employees.department, employees.title,
employees.employee FROM employees, engineers WHERE employees.employee =
engineers.employee AND engineers.costcntr IN ('63100','60100');
parser outputs:
{ QUERY
   :command  1
   :utility <>
   :resultRelation  0
   :into <>
   :isPortal false
   :isBinary false
   :unionall false
   :unique <>
   :sortClause <>
   :rtable (
      { RTE
      :relname employees
      :refname employees
      :relid 315967
      :inh false
      :inFromCl true
      :skipAcl false
      }

      { RTE
      :relname engineers
      :refname engineers
      :relid 316336
      :inh false
      :inFromCl true
      :skipAcl false
      }
   )

   :targetlist (
      { TARGETENTRY
      :resdom
         { RESDOM
         :resno 1
         :restype 1043
         :restypmod 24
         :resname "lastname"
         :reskey 0
         :reskeyop 0
         :resjunk 0
         }

      :expr
         { VAR
         :varno 1
         :varattno 2
         :vartype 1043
         :vartypmod 24
         :varlevelsup 0
         :varnoold 1
         :varoattno 2
         }
      }

      { TARGETENTRY
      :resdom
         { RESDOM
         :resno 2
         :restype 1043
         :restypmod 20
         :resname "firstname"
         :reskey 0
         :reskeyop 0
         :resjunk 0
         }

      :expr
         { VAR
         :varno 1
         :varattno 3
         :vartype 1043
         :vartypmod 20
         :varlevelsup 0
         :varnoold 1
         :varoattno 3
         }
      }

      { TARGETENTRY
      :resdom
         { RESDOM
         :resno 3
         :restype 1043
         :restypmod 54
         :resname "email"
         :reskey 0
         :reskeyop 0
         :resjunk 0
         }

      :expr
         { VAR
         :varno 1
         :varattno 5
         :vartype 1043
         :vartypmod 54
         :varlevelsup 0
         :varnoold 1
         :varoattno 5
         }
      }

      { TARGETENTRY
      :resdom
         { RESDOM
         :resno 4
         :restype 1043
         :restypmod 20
         :resname "phoneno"
         :reskey 0
         :reskeyop 0
         :resjunk 0
         }

      :expr
         { VAR
         :varno 1
         :varattno 6
         :vartype 1043
         :vartypmod 20
         :varlevelsup 0
         :varnoold 1
         :varoattno 6
         }
      }

      { TARGETENTRY
      :resdom
         { RESDOM
         :resno 5
         :restype 1043
         :restypmod 36
         :resname "department"
         :reskey 0
         :reskeyop 0
         :resjunk 0
         }

      :expr
         { VAR
         :varno 1
         :varattno 7
         :vartype 1043
         :vartypmod 36
         :varlevelsup 0
         :varnoold 1
         :varoattno 7
         }
      }

    postmaster: reaping dead processes...
postmaster: CleanupProc: pid 2769 exited with status 139
postmaster: CleanupProc: reinitializing shared memory and semaphores
binding ShmemCreate(key=52e325, size=831176)
nk 0
         }

      :expr
         { VAR
         :varno 1
         :varattno 8
         :vartype 1043
         :vartypmod 36
         :varlevelsup 0
         :varnoold 1
         :varoattno 8
         }
      }

      { TARGETENTRY
      :resdom
         { RESDOM
         :resno 7
         :restype 1043
         :restypmod 14
         :resname "employee"
         :reskey 0
         :reskeyop 0
         :resjunk 0
         }

      :expr
         { VAR
         :varno 1
         :varattno 1
         :vartype 1043
         :vartypmod 14
         :varlevelsup 0
         :varnoold 1
         :varoattno 1
         }
      }
   )

   :qual
      { EXPR
      :typeOid 16
      :opType and
      :oper <>
      :args (
         { EXPR
         :typeOid 16
         :opType op
         :oper
            { OPER
            :opno 1062
            :opid 0
            :opresulttype 16
            }

         :args (
            { VAR
            :varno 1
            :varattno 1
            :vartype 1043
            :vartypmod 14
            :varlevelsup 0
            :varnoold 1
            :varoattno 1
            }

            { VAR
            :varno 2
            :varattno 1
            :vartype 1043
            :vartypmod 14
            :varlevelsup 0
            :varnoold 2
            :varoattno 1
            }
         )
         }

         { EXPR
         :typeOid 16
         :opType or
         :oper <>
         :args (
            { EXPR
            :typeOid 16
            :opType op
            :oper
               { OPER
               :opno 1062
               :opid 0
               :opresulttype 16
               }

            :args (
               { VAR
               :varno 2
               :varattno 2
               :vartype 1043
               :vartypmod 9
               :varlevelsup 0
               :varnoold 2
               :varoattno 2
               }

               { CONST
               :consttype 1043
               :constlen -1
               :constisnull false
               :constvalue  9 [  9  0  0  0  54  51  49  48  48 ]
               :constbyval true
               }
            )
            }

            { EXPR
            :typeOid 16
            :opType op
            :oper
               { OPER
               :opno 1062
               :opid 0
               :opresulttype 16
               }

            :args (
               { VAR
               :varno 2
               :varattno 2
               :vartype 1043
               :vartypmod 9
               :varlevelsup 0
               :varnoold 2
               :varoattno 2
               }

               { CONST
               :consttype 1043
               :constlen -1
               :constisnull false
               :constvalue  9 [  9  0  0  0  54  48  49  48  48 ]
               :constbyval true
               }
            )
            }
         )
         }
      )
      }

   :groupClause <>
   :havingQual <>
   :hasAggs false
   :hasSubLinks false
   :unionClause <>
   }
after rewriting:
{ QUERY
   :command  1
   :utility <>
   :resultRelation  0
   :into <>
   :isPortal false
   :isBinary false
   :unionall false
   :unique <>
   :sortClause <>
   :rtable (
      { RTE
      :relname employees
      :refname employees
      :relid 315967
      :inh false
      :inFromCl true
      :skipAcl false
      }

      { RTE
      :relname engineers
      :refname engineers
      :relid 316336
      :inh false
      :inFromCl true
      :skipAcl false
      }
   )

   :targetlist (
      { TARGETENTRY
      :resdom
         { RESDOM
         :resno 1
         :restype 1043
         :restypmod 24
         :resname "lastname"
         :reskey 0
         :reskeyop 0
         :resjunk 0
         }

      :expr
         { VAR
         :varno 1
         :varattno 2
         :vartype 1043
         :vartypmod 24
         :varlevelsup 0
         :varnoold 1
         :varoattno 2
         }
      }

      { TARGETENTRY
      :resdom
         { RESDOM
         :resno 2
         :restype 1043
         :restypmod 20
         :resname "firstname"
         :reskey 0
         :reskeyop 0
         :resjunk 0
         }

      :expr
         { VAR
         :varno 1
         :varattno 3
         :vartype 1043
         :vartypmod 20
         :varlevelsup 0
         :varnoold 1
         :varoattno 3
         }
      }

      { TARGETENTRY
      :resdom
         { RESDOM
         :resno 3
         :restype 1043
         :restypmod 54
         :resname "email"
         :reskey 0
         :reskeyop 0
         :resjunk 0
         }

      :expr
         { VAR
         :varno 1
         :varattno 5
         :vartype 1043
         :vartypmod 54
         :varlevelsup 0
         :varnoold 1
         :varoattno 5
         }
      }

      { TARGETENTRY
      :resdom
         { RESDOM
         :resno 4
         :restype 1043
         :restypmod 20
         :resname "phoneno"
         :reskey 0
         :reskeyop 0
         :resjunk 0
         }

      :expr
         { VAR
         :varno 1
         :varattno 6
         :vartype 1043
         :vartypmod 20
         :varlevelsup 0
         :varnoold 1
         :varoattno 6
         }
      }

      { TARGETENTRY
      :resdom
         { RESDOM
         :resno 5
         :restype 1043
         :restypmod 36
         :resname "department"
         :reskey 0
         :reskeyop 0
         :resjunk 0
         }

      :expr
         { VAR
         :varno 1
         :varattno 7
         :vartype 1043
         :vartypmod 36
         :varlevelsup 0
         :varnoold 1
         :varoattno 7
         }
      }

      { TARGETENTRY
      :resdom
         { RESDOM
         :resno 6
         :restype 1043
         :restypmod 36
         :resname "title"
         :reskey 0
         :reskeyop 0
         :resjunk 0
         }

      :expr
         { VAR
         :varno 1
         :varattno 8
         :vartype 1043
         :vartypmod 36
         :varlevelsup 0
         :varnoold 1
         :varoattno 8
         }
      }

      { TARGETENTRY
      :resdom
         { RESDOM
         :resno 7
         :restype 1043
         :restypmod 14
         :resname "employee"
         :reskey 0
         :reskeyop 0
         :resjunk 0
         }

      :expr
         { VAR
         :varno 1
         :varattno 1
         :vartype 1043
         :vartypmod 14
         :varlevelsup 0
         :varnoold 1
         :varoattno 1
         }
      }
   )

   :qual
      { EXPR
      :typeOid 16
      :opType and
      :oper <>
      :args (
         { EXPR
         :typeOid 16
         :opType op
         :oper
            { OPER
            :opno 1062
            :opid 0
            :opresulttype 16
            }

         :args (
            { VAR
            :varno 1
            :varattno 1
            :vartype 1043
            :vartypmod 14
            :varlevelsup 0
            :varnoold 1
            :varoattno 1
            }

            { VAR
            :varno 2
            :varattno 1
            :vartype 1043
            :vartypmod 14
            :varlevelsup 0
            :varnoold 2
            :varoattno 1
            }
         )
         }

         { EXPR
         :typeOid 16
         :opType or
         :oper <>
         :args (
            { EXPR
            :typeOid 16
            :opType op
            :oper
               { OPER
               :opno 1062
               :opid 0
               :opresulttype 16
               }

            :args (
               { VAR
               :varno 2
               :varattno 2
               :vartype 1043
               :vartypmod 9
               :varlevelsup 0
               :varnoold 2
               :varoattno 2
               }

               { CONST
               :consttype 1043
               :constlen -1
               :constisnull false
               :constvalue  9 [  9  0  0  0  54  51  49  48  48 ]
               :constbyval false
               }
            )
            }

            { EXPR
            :typeOid 16
            :opType op
            :oper
               { OPER
               :opno 1062
               :opid 0
               :opresulttype 16
               }

            :args (
               { VAR
               :varno 2
               :varattno 2
               :vartype 1043
               :vartypmod 9
               :varlevelsup 0
               :varnoold 2
               :varoattno 2
               }

               { CONST
               :consttype 1043
               :constlen -1
               :constisnull false
               :constvalue  9 [  9  0  0  0  54  48  49  48  48 ]
               :constbyval false
               }
            )
            }
         )
         }
      )
      }

   :groupClause <>
   :havingQual <>
   :hasAggs false
   :hasSubLinks false
   :unionClause <>
   }
shmem_exit(0) [#0]
pmdie 2
proc_exit(0) [#0]
shmem_exit(0) [#0]
exit(0)

Again, if the same query is issued, but there is only
once constact in the IN () list, i.e.:

SELECT employees.lastname, employees.firstname, employees.email,
employees.phoneno, employees.department, employees.title,
employees.employee FROM employees, engineers WHERE employees.employee =
engineers.employee AND engineers.costcntr IN ('63100');

the backend succeeds without a problem.

The table definitions are as follows:

Table    = employees
+----------------------------------+----------------------------------+-------+
|              Field               |              Type
| Length|
+----------------------------------+----------------------------------+-------+
| employee                         | varchar() not null
|    10 |
| lastname                         | varchar() not null
|    20 |
| firstname                        | varchar() not null
|    16 |
| reportsto                        | varchar() not null
|    10 |
| email                            | varchar() not null
|    50 |
| phoneno                          | varchar() not null
|    16 |
| department                       | varchar() not null
|    32 |
| title                            | varchar() not null
|    32 |
+----------------------------------+----------------------------------+-------+
Index:    k_employees


Table    = engineers
+----------------------------------+----------------------------------+-------+
|              Field               |              Type
| Length|
+----------------------------------+----------------------------------+-------+
| employee                         | varchar() not null
|    10 |
| costcntr                         | varchar() not null
|     5 |
+----------------------------------+----------------------------------+-------+
Index:    k_engineers


The backend is the Beta1 release of 6.4 running on
Linux slackware 2.0.35 with gcc 2.7.2.2 on a Pentium
200 Mhz, 32M RAM, and the following libraries:

ldconfig: version 1.9.5
/usr/local/lib:
/usr/X11R6/lib:
    libXtst.so.6 => libXtst.so.6.1
    libXt.so.6 => libXt.so.6.0
    libXp.so.6 => libXp.so.6.2
    libXmu.so.6 => libXmu.so.6.0
    libXi.so.6 => libXi.so.6.0
    libXext.so.6 => libXext.so.6.3
    libXaw.so.6 => libXaw.so.6.1
    libXIE.so.6 => libXIE.so.6.0
    libX11.so.6 => libX11.so.6.1
    libSM.so.6 => libSM.so.6.0
    libPEX5.so.6 => libPEX5.so.6.0
    libICE.so.6 => libICE.so.6.3
    libXpm.so.4 => libXpm.so.4.3
/usr/i486-linuxaout/lib:
    libPEX5.so.6 => libPEX5.so.6.0
    libXpm.so.4 => libXpm.so.4.3
    libXt.so.6 => libXt.so.6.0
    libXaw.so.6 => libXaw.so.6.0
    libXIE.so.6 => libXIE.so.6.0
    libX11.so.6 => libX11.so.6.0
    libXt.so.3 => libXt.so.3.1.0
    libXaw.so.3 => libXaw.so.3.1.0
    libX11.so.3 => libX11.so.3.1.0
    libdb.so.1 => libdb.so.1.85.1
    libvga.so.1 => libvga.so.1.2.9
/usr/openwin/lib:
    libsspkg.so.1 => libsspkg.so.1.0.0
    libxview.so.3 => libxview.so.3.2.2
    libolgx.so.3 => libolgx.so.3.2.2
/usr/local/pgsql/lib:
    libpq++.so.1 => libpq++.so.1
    libecpg.so.2 => libecpg.so.2.6.1
    libpq.so.1 => libpq.so.1
/usr/lib:
    libforms.so.0.88 => libforms.so.0.88
    libz.so.1 => libz.so.1.0.2
    libtiff.so.3 => libtiff.so.3.4.33
    librle.so.1 => librle.so.1.0.0
    libppm.so.1 => libppm.so.1.0.0
    libpnm.so.1 => libpnm.so.1.0.0
    libpng.so.1 => libpng.so.1.0.89
    libpgm.so.1 => libpgm.so.1.0.0
    libpbm.so.1 => libpbm.so.1.0.0
    libjpeg.so.6 => libjpeg.so.6.0.1
    libfbm.so.1 => libfbm.so.1.0.0
    libtkx.so.1 => libtkx.so.1.4.1
    libtclx.so.1 => libtclx.so.1.7.5
    libtk.so.1 => libtk.so.1.4.1
    libtcl.so.1 => libtcl.so.1.7.5
    libform.so.3.0 => libform.so.3.0.0
    libmenu.so.3.0 => libmenu.so.3.0.0
    libpanel.so.3.0 => libpanel.so.3.0.0
    libbfd.so.2.8.1.0.1 => libbfd.so.2.8.1.0.1
    libopcodes.so.2.8.1.0.1 => libopcodes.so.2.8.1.0.1
    libgpm.so.1 => libgpm.so.1.10
    libdb.so.1 => libdb.so.1.85.4
    libgdbm.so.2 => libgdbm.so.2.0.0
    libdb.so.2 => libdb.so.2.0.0
    libg++.so.27 => libg++.so.27.2.1
    libstdc++.so.27 => libstdc++.so.27.2.1
    libvgagl.so.1 => libvgagl.so.1.2.10
    libvga.so.1 => libvga.so.1.2.10
/lib:
    libncp.so.1 => libncp.so.1.0
    libdl.so.1 => libdl.so.1.9.5
    ld-linux.so.1 => ld-linux.so.1.9.5
    libtermcap.so.2 => libtermcap.so.2.0.8
    libm.so.5 => libm.so.5.0.9
    libgdbm.so.1 => libgdbm.so.1.7.3
    libcurses.so.1 => libcurses.so.1.0.0
    libc.so.5 => libc.so.5.4.33
    libncurses.so.3.0 => libncurses.so.3.0.0
    libe2p.so.2 => libe2p.so.2.3
    libext2fs.so.2 => libext2fs.so.2.3
    libss.so.2 => libss.so.2.0
    libuuid.so.1 => libuuid.so.1.1
    libcom_err.so.2 => libcom_err.so.2.0
    libc.so.4 => libc.so.4.7.6
    libm.so.4 => libm.so.4.6.27
    libcurses.so.0 => libcurses.so.0.1.2

The backend was built without any options...just
./configure ; make ; make install.
I hope this can be fixed as I love the feature richness
of postgresql.

Marcus Mascari





_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com


pgsql-hackers by date:

Previous
From: "Jackson, DeJuan"
Date:
Subject: RE: [HACKERS] Make error in current cvs.
Next
From: Marcus Mascari
Date:
Subject: backend crashes under 6.4beta