Re: [PORTS] Port Bug Report: lo_import fails - SIGBUS error in inv_newtuple

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: ldavid(at)verisign(dot)com
Cc: pgsql-ports(at)postgreSQL(dot)org
Subject: Re: [PORTS] Port Bug Report: lo_import fails - SIGBUS error in inv_newtuple
Date: 1999-03-16 21:03:53
Message-ID: 199903162103.QAA19988@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-ports

This is already fixed in the upcoming 6.5 beta, to start soon.

>
> ============================================================================
> POSTGRESQL BUG REPORT TEMPLATE
> ============================================================================
>
>
> Your name : Lysander David
> Your email address : ldavid(at)verisign(dot)com
>
> Category : runtime: back-end
> Severity : critical
>
> Summary: lo_import fails - SIGBUS error in inv_newtuple
>
> System Configuration
> --------------------
> Operating System : Solaris
>
> PostgreSQL version : 6.4.2
>
> Compiler used : gcc 2.7.1
>
> Hardware:
> ---------
> Sun Ultra 5, 256M RAM
>
> Versions of other tools:
> ------------------------
> gmake - 3.74
> flex - 2.5.4
>
> --------------------------------------------------------------------------
>
> Problem Description:
> --------------------
> When attempting to use lo_import to insert a
> large object, it fails.
>
> --------------------------------------------------------------------------
>
> Test Case:
> ----------
> 1) create database test
> createdb test
>
> 2) create a file to create the table named create.sql
> with the contents
> CREATE TABLE test (
> id int4 PRIMARY KEY,
> largeObject oid
> );
> 3) execute create.sql
> psql -d test -f create.sql
>
> 4) create a file to insert a row named insert.sql
> with these contents
> INSERT INTO test ( id, largeObject)
> VALUES ( 1, lo_import (<some local file>));
>
> 5) execute insert.sql
> psql -d test -f insert.sql
>
> 6) it will fail with output like this :
> 32 postgres(at)ldavid-sun(dot)verisign(dot)com:/home/postgres/devel/build/BuildReq/Query% psql -d test -f insert.sql
> postmaster: ServerLoop: handling reading 5
> postmaster: ServerLoop: handling reading 5
> postmaster: ServerLoop: handling writing 5
> postmaster: BackendStartup: environ dump:
> -----------------------------------------
> PWD=/home/postgres/devel/build/BuildReq/Query
> TERM=dumb
> TERMCAP=
> COLUMNS=80
> EMACS=t
> DISPLAY=ldavid-sun:0.0
> POSTGRES_HOME=/net/ldavid-sun/disk1/opt/postgres
> LC_CTYPE=C
> LC_COLLATE=C
> PGDATA=/net/ldavid-sun/disk1/opt/postgres/data
> PGLIB=/net/ldavid-sun/disk1/opt/postgres/lib
> PURIFYOPTIONS=-follow-child-processes=yes
> FE_PC_EN_INSTALL=/ecas/public/fe-pc-en/
> FE_PC_CC_INSTALL=/ecas/public/fe-pc-cc/
> FE_SC_EN_INSTALL=/ecas/public/fe-sc-en/
> FE_SC_CC_INSTALL=/ecas/public/fe-sc-cc/
> FE_ONSITE_CRS_INSTALL=/ecas/public/fe-onsite-crs/
> FE_ONSITE_CC_INSTALL=/ecas/public/fe-onsite-cc/
> FE_ONSITE_EN_INSTALL=/ecas/public/fe-onsite-en/
> FE_EN_INSTALL=/ecas/public/fe-en/
> FE_OP_INSTALL=/ecas/public/fe-op/
> BE_INSTALL=/ecas/public/be/
> PORTAL=/opt/pin/5.0/
> ONE_OP_ALLOWED=1
> ECAS_ARGS_DEBUG=1
> ECAS_LOG_LEVEL=ECAS_LOG_DEBUG
> QMDEBUG=1
> ECAS_CUSTOM_CFG=/net/ldavid-sun/disk1/tcheung/build/make/custom/SunOS55.cfg
> AEAPPROVE=1
> LRACERT=1
> ECASINSTALL=/ecas/public/be/
> BEFORE_PATH=/net/ldavid-sun/disk1/opt/tcl/bin:/home/build/tools/Cvs/bin:/net/david-sun/disk1/opt/gnu/bin:/usr/local/bin:/opt/SUNWspro/bin:/usr/ccs/bin:/opt/SUNWspro/bin:/usr/dt/bin:/usr/openwin/bin:/bin:/usr/bin:/usr/ucb:/usr/contrib/bin:/usr/ccs/bin:/u/tools/bin:/home/pure/purify-4.0-solaris2:/usr/sbin:/usr/lib/lp:~/bin:.:/home/ddts/bin:/home/oracle/orahome/bin:/disk1/opt/tex/bin/sparc-solaris2.5.1:~/lbin2:/usr/openwin/bin:/opt/lesstif/bin:/u/tools/bin
> ORAHOME=/home/oracle/orahome
> ORACLE_DOC=/home/oracle/orahome/odoc
> ORACLE_SID=sid1
> ORACLE_NLS=/home/oracle/orahome/ocommon/nls/admin/data
> ORACLE_TERM=xsun
> ORACLE_HOME=/home/oracle/orahome
> TK_LIBRARY=/net/ldavid-sun/disk1/opt/tcl/lib
> TCL_LIBRARY=/net/ldavid-sun/disk1/opt/tcl/lib
> RCSBIN=/opt/gnu/bin
> CVSROOT=/cvs
> LD_LIBRARY_PATH=/lib:/usr/lib:/lib/dt/lib:/opt/SUNWspro/lib:/opt/lesstif/lib:/home/oracle/orahome/lib:/net/ldavid-sun/disk1/opt/postgres/bin
> MANPATH=/usr/man:/u/tools/man:/opt/SUNWspro/man:/net/ldavid-sun/disk1/opt/gnu/man:/net/ldavid-sun/disk1/opt/tcl/man:/net/ldavid-sun/disk1/opt/postgres/man
> OPENWINHOME=/usr/openwin
> PATH=/net/ldavid-sun/disk1/opt/gnu/bin:/ecas/public/be//bin:/net/ldavid-sun/disk1/opt/tcl/bin:/home/build/tools/Cvs/bin:/net/david-sun/disk1/opt/gnu/bin:/usr/local/bin:/opt/SUNWspro/bin:/usr/ccs/bin:/opt/SUNWspro/bin:/usr/dt/bin:/usr/openwin/bin:/bin:/usr/bin:/usr/ucb:/usr/contrib/bin:/usr/ccs/bin:/u/tools/bin:/home/pure/purify-4.0-solaris2:/usr/sbin:/usr/lib/lp:~/bin:.:/home/ddts/bin:/home/oracle/orahome/bin:/disk1/opt/tex/bin/sparc-solaris2.5.1:~/lbin2:/usr/openwin/bin:/opt/lesstif/bin:/u/tools/bin:/net/ldavid-sun/disk1/opt/postgres/bin
> LOGNAME=postgres
> USER=postgres
> SHELL=/bin/csh
> HOME=/home/postgres
> POSTPORT=5432
> POSTID=2147483643
> PG_USER=postgres
> IPC_KEY=5432100
> -----------------------------------------
> postmaster child[2594]: starting with (/net/ldavid-sun/disk1/opt/postgres/bin/postgres, -p, -d3, -P5, -v131072, test, )
> FindExec: found "/net/ldavid-sun/disk1/opt/postgres/bin/postgres" using argv[0]
> debug info:
> User = postgres
> RemoteHost = localhost
> RemotePort = 0
> DatabaseName = test
> Verbose = 3
> Noversion = f
> timings = f
> dates = Normal
> bufsize = 64
> sortmem = 512
> query echo = f
> InitPostgres
> INSERT INTO test ( id, largeObject )
> VALUES ( 1, lo_import ( '/home/postgres/devel/build/BuildReq/Query/rel_note' ));
> StartTransactionCommand
> postmaster: BackendStartup: pid 2594 user postgres db test socket 5
> query: INSERT INTO test ( id, largeObject ) VALUES ( 1, lo_import ( '/home/postgres/devel/build/BuildReq/Query/rel_note' ));
> ProcessQuery
> postmaster: reaping dead processes...
> postmaster: CleanupProc: pid 2594 exited with status 138
> postmaster: CleanupProc: reinitializing shared memory and semaphores
> shmem_exit(0) [#0]
> binding ShmemCreate(key=52e389, size=831176)
> pqReadData() -- backend closed the channel unexpectedly.
> This probably means the backend terminated abnormally before or while processing the request.
> We have lost the connection to the backend, so further processing is impossible. Terminating.
>
> 7) It fails in the source due to a SIGBUS error in
> inv_api.c:1067
>
> attptr = ((char *) ntup) + hoff;
> -> *((int32 *) attptr) = obj_desc->offset + nwrite - 1;
> attptr += sizeof(int32);
>
>
> --------------------------------------------------------------------------
>
> Solution:
> ---------
>
>
> --------------------------------------------------------------------------
>
>
>

--
Bruce Momjian | http://www.op.net/~candle
maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-ports by date

  From Date Subject
Next Message David Cuny 1999-03-17 09:34:18 OS/2??
Previous Message Unprivileged user 1999-03-16 21:00:09 Port Bug Report: lo_import fails - SIGBUS error in inv_newtuple