Thread

  1. select cash_out('2'); crashes backend on 7.0.2

    Mark Stosberg <mark@summersault.com> — 2000-12-06T20:06:07Z

    Hello,
    
     I was just experimenting, trying to see if I could find a function that
    would format a numeric value like 'money' with Postgres 7.0.2. Here's
    what happened:
    
    ######
    cascade=> select cash_out(2);
    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.
    ######
    
    The same thing happened with Postgres 6.5.3. Here's my full version:
    PostgreSQL 7.0.2 on i686-pc-linux-gnu, compiled by gcc 2.96 
    
    I'm sure if what I tried is even valid input, but I'm guessing this is
    not a desired result in any case. :) 
    
    Thanks for the great software and good luck with this!
    
    A frequent Postgres user,
    
      -mark
    
    personal website             }      Summersault Website Development
    http://mark.stosberg.com/    {      http://www.summersault.com/
    
    
  2. Re: select cash_out('2'); crashes backend on 7.0.2

    Bruce Momjian <pgman@candle.pha.pa.us> — 2000-12-12T16:22:29Z

    I can confirm this is crashes in 7.1 too.
    
    > 
    > Hello,
    > 
    >  I was just experimenting, trying to see if I could find a function that
    > would format a numeric value like 'money' with Postgres 7.0.2. Here's
    > what happened:
    > 
    > ######
    > cascade=> select cash_out(2);
    > 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.
    > ######
    > 
    > The same thing happened with Postgres 6.5.3. Here's my full version:
    > PostgreSQL 7.0.2 on i686-pc-linux-gnu, compiled by gcc 2.96 
    > 
    > I'm sure if what I tried is even valid input, but I'm guessing this is
    > not a desired result in any case. :) 
    > 
    > Thanks for the great software and good luck with this!
    > 
    > A frequent Postgres user,
    > 
    >   -mark
    > 
    > personal website             }      Summersault Website Development
    > http://mark.stosberg.com/    {      http://www.summersault.com/
    > 
    
    
    -- 
      Bruce Momjian                        |  http://candle.pha.pa.us
      pgman@candle.pha.pa.us               |  (610) 853-3000
      +  If your life is a hard drive,     |  830 Blythe Avenue
      +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
    
    
  3. Re: select cash_out('2'); crashes backend on 7.0.2

    Tom Lane <tgl@sss.pgh.pa.us> — 2000-12-12T20:25:47Z

    Bruce Momjian <pgman@candle.pha.pa.us> writes:
    >> cascade=> select cash_out(2);
    >> pqReadData() -- backend closed the channel unexpectedly.
    
    > I can confirm this is crashes in 7.1 too.
    
    You can get this sort of result with almost any input or output function
    :-(.  The problem is that they're mostly misdeclared to take type
    "opaque", which for no good reason is also considered to mean "accepts
    any input type whatever", which means you can pass a value of any type
    at all to an input or output function.
    
    There have been some past discussions about introducing a little more
    rigor into the type system's handling of I/O functions, but it ain't
    gonna happen for 7.1 ...
    
    			regards, tom lane
    
    
  4. Re: select cash_out('2'); crashes backend on 7.0.2

    Bruce Momjian <pgman@candle.pha.pa.us> — 2000-12-12T20:28:05Z

    Added to TODO:
    
    	* SELECT cash_out(2) crashes because of opaque 
    
    > Bruce Momjian <pgman@candle.pha.pa.us> writes:
    > >> cascade=> select cash_out(2);
    > >> pqReadData() -- backend closed the channel unexpectedly.
    > 
    > > I can confirm this is crashes in 7.1 too.
    > 
    > You can get this sort of result with almost any input or output function
    > :-(.  The problem is that they're mostly misdeclared to take type
    > "opaque", which for no good reason is also considered to mean "accepts
    > any input type whatever", which means you can pass a value of any type
    > at all to an input or output function.
    > 
    > There have been some past discussions about introducing a little more
    > rigor into the type system's handling of I/O functions, but it ain't
    > gonna happen for 7.1 ...
    > 
    > 			regards, tom lane
    > 
    
    
    -- 
      Bruce Momjian                        |  http://candle.pha.pa.us
      pgman@candle.pha.pa.us               |  (610) 853-3000
      +  If your life is a hard drive,     |  830 Blythe Avenue
      +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
    
    
  5. Re: select cash_out('2'); crashes backend on 7.0.2

    Bruce Momjian <pgman@candle.pha.pa.us> — 2001-01-23T03:49:16Z

    Seems this still fails.  Hackers, does the crash cause other backends to
    abort?
    
    > 
    > Hello,
    > 
    >  I was just experimenting, trying to see if I could find a function that
    > would format a numeric value like 'money' with Postgres 7.0.2. Here's
    > what happened:
    > 
    > ######
    > cascade=> select cash_out(2);
    > 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.
    > ######
    > 
    > The same thing happened with Postgres 6.5.3. Here's my full version:
    > PostgreSQL 7.0.2 on i686-pc-linux-gnu, compiled by gcc 2.96 
    > 
    > I'm sure if what I tried is even valid input, but I'm guessing this is
    > not a desired result in any case. :) 
    > 
    > Thanks for the great software and good luck with this!
    > 
    > A frequent Postgres user,
    > 
    >   -mark
    > 
    > personal website             }      Summersault Website Development
    > http://mark.stosberg.com/    {      http://www.summersault.com/
    > 
    
    
    -- 
      Bruce Momjian                        |  http://candle.pha.pa.us
      pgman@candle.pha.pa.us               |  (610) 853-3000
      +  If your life is a hard drive,     |  830 Blythe Avenue
      +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
    
    
  6. Re: [BUGS] select cash_out('2'); crashes backend on 7.0.2

    Bruce Momjian <pgman@candle.pha.pa.us> — 2001-01-24T14:34:37Z

    Folks, I see we have many problems here:
    	
    	test=> select textout(2);
    	pqReadData() -- backend closed the channel unexpectedly.
    	        This probably means the backend terminated abnormally
    	        before or while processing the request.
    	The connection to the server was lost. Attempting reset: NOTICE: 
    	Message from PostgreSQL backend:
    	        The Postmaster has informed me that some other backend died
    	        abnormally and possibly corrupted shared memory.
    	        I have rolled back the current transaction and am going to
    	        terminate your database system connection and exit.
    	        Please reconnect to the database system and repeat your query.
    	Failed.
    
    and the server log shows:
    
    	Reinitializing shared memory and semaphores
    
    Seems like a pretty serious denial of service attack to me.  It restarts
    all running backends.
    
    I have aligned the error messages, at least.
    
    
    > 
    > Hello,
    > 
    >  I was just experimenting, trying to see if I could find a function that
    > would format a numeric value like 'money' with Postgres 7.0.2. Here's
    > what happened:
    > 
    > ######
    > cascade=> select cash_out(2);
    > 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.
    > ######
    > 
    > The same thing happened with Postgres 6.5.3. Here's my full version:
    > PostgreSQL 7.0.2 on i686-pc-linux-gnu, compiled by gcc 2.96 
    > 
    > I'm sure if what I tried is even valid input, but I'm guessing this is
    > not a desired result in any case. :) 
    > 
    > Thanks for the great software and good luck with this!
    > 
    > A frequent Postgres user,
    > 
    >   -mark
    > 
    > personal website             }      Summersault Website Development
    > http://mark.stosberg.com/    {      http://www.summersault.com/
    > 
    
    
    -- 
      Bruce Momjian                        |  http://candle.pha.pa.us
      pgman@candle.pha.pa.us               |  (610) 853-3000
      +  If your life is a hard drive,     |  830 Blythe Avenue
      +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026