Thread

  1. psql: core dumped

    Mario Gonzalez <gonzalemario@gmail.com> — 2006-12-19T22:52:10Z

     When psql is running and CRTL + \ is pressed, a core dumped show up.
    In first place I ran psql into gdb, saw the backtrace and I believed
    it was a libc6 bug and I reported to my distro security team
    https://launchpad.net/distros/ubuntu/+source/glibc/+bug/76437
    
      Ubuntu edgy has got libc-2.4, a friend of my tested in Linux with
    libc-2.3 and nothing happened. I don't know why in my libc version
    (2.4) this happen.
    
      So, with humility :-) I want to help and I wrote a patch with a
    solution, you can have it in the next link:
    http://media.forestal.udec.cl/pgsql/startup.diff  I do not wanted to
    sent it as an attachment
    
      My solution is catch the SIGQUIT signal and abort in silence, just that.
    
    
       Regards!
    
    PS: sorry my English
    -- 
    http://www.advogato.org/person/mgonzalez/
    
    
  2. Re: psql: core dumped

    Peter Eisentraut <peter_e@gmx.net> — 2006-12-19T23:15:33Z

    Mario wrote:
    >  When psql is running and CRTL + \ is pressed, a core dumped show up.
    > In first place I ran psql into gdb, saw the backtrace and I believed
    > it was a libc6 bug and I reported to my distro security team
    > https://launchpad.net/distros/ubuntu/+source/glibc/+bug/76437
    
    This isn't a bug.  It's working as designed.
    
    -- 
    Peter Eisentraut
    http://developer.postgresql.org/~petere/
    
    
  3. Re: psql: core dumped

    Mario Gonzalez <gonzalemario@gmail.com> — 2006-12-19T23:17:47Z

    On 20/12/06, Peter Eisentraut <peter_e@gmx.net> wrote:
    > Mario wrote:
    > >  When psql is running and CRTL + \ is pressed, a core dumped show up.
    > > In first place I ran psql into gdb, saw the backtrace and I believed
    > > it was a libc6 bug and I reported to my distro security team
    > > https://launchpad.net/distros/ubuntu/+source/glibc/+bug/76437
    >
    > This isn't a bug.  It's working as designed.
    >
    
       Even if you get a core dumped every time you press CTRL+\  ?  why?
    
    >
    
    -- 
    http://www.advogato.org/person/mgonzalez/
    
    
  4. Re: psql: core dumped

    Andrew Dunstan <andrew@dunslane.net> — 2006-12-19T23:26:21Z

    Mario wrote:
    > On 20/12/06, Peter Eisentraut <peter_e@gmx.net> wrote:
    >> Mario wrote:
    >> >  When psql is running and CRTL + \ is pressed, a core dumped show up.
    >> > In first place I ran psql into gdb, saw the backtrace and I believed
    >> > it was a libc6 bug and I reported to my distro security team
    >> > https://launchpad.net/distros/ubuntu/+source/glibc/+bug/76437
    >>
    >> This isn't a bug.  It's working as designed.
    >>
    >
    >    Even if you get a core dumped every time you press CTRL+\  ?  why?
    >
    
    This normally a SIGQUIT, and on my machine at least the default action for
    that is a core dump. Perhaps you need to say what you are trying to do and
    why.
    
    cheers
    
    andrew
    
    
    
    
    
  5. Re: psql: core dumped

    Philip Yarra <philip@utiba.com> — 2006-12-19T23:27:19Z

    Mario wrote:
    >   Even if you get a core dumped every time you press CTRL+\  ?  why?
    
    Try ulimit -c 0, then run it (you should get no core dump)
    Then ulimit -c 500000, then run it (you should get a core dump)
    
    SIGQUIT is supposed to dump core. Ulimit settings can suppress 
    generation of core files. The difference between your machine and your 
    friend's is likely just the ulimit settings.
    
    Regards, Philip.
    
    -- 
    Philip Yarra
    Senior Software Engineer, Utiba Pty Ltd
    philip@utiba.com
    
    
  6. Re: psql: core dumped

    Greg Stark <stark@enterprisedb.com> — 2006-12-19T23:59:12Z

    "Mario" <gonzalemario@gmail.com> writes:
    
    > On 20/12/06, Peter Eisentraut <peter_e@gmx.net> wrote:
    > >
    > > This isn't a bug.  It's working as designed.
    >
    >   Even if you get a core dumped every time you press CTRL+\  ?  why?
    
    That's what C-\ does. Try it with any other program:
    
    $ sleep 1
    Quit (core dumped)
    
    
    Most distributions ship with coredumpsize limited to 0 by default though, so
    you would only cause it to crash without a core dump by default. Either yours
    doesn't or you've enabled core dumps with "ulimit -c unlimited" (not that
    that's a bad thing).
    
    -- 
      Gregory Stark
      EnterpriseDB          http://www.enterprisedb.com
    
    
  7. Re: psql: core dumped

    Jeremy Drake <pgsql@jdrake.com> — 2006-12-20T00:01:58Z

    On Wed, 20 Dec 2006, Philip Yarra wrote:
    
    > Mario wrote:
    > >   Even if you get a core dumped every time you press CTRL+\  ?  why?
    >
    > Try ulimit -c 0, then run it (you should get no core dump)
    > Then ulimit -c 500000, then run it (you should get a core dump)
    >
    > SIGQUIT is supposed to dump core. Ulimit settings can suppress generation of
    > core files. The difference between your machine and your friend's is likely
    > just the ulimit settings.
    
    If you want to type CTRL+\ you can redefine what char generates SIGQUIT
    with stty quit command.  For instance,
    
    stty quit ^@
    
    
    
    
    -- 
    fortune's Contribution of the Month to the Animal Rights Debate:
    
    	I'll stay out of animals' way if they'll stay out of mine.
    	"Hey you, get off my plate"
    		-- Roger Midnight
    
    
  8. Re: psql: core dumped

    Alvaro Herrera <alvherre@commandprompt.com> — 2006-12-20T01:12:41Z

    Jeremy Drake wrote:
    > On Wed, 20 Dec 2006, Philip Yarra wrote:
    > 
    > > Mario wrote:
    > > >   Even if you get a core dumped every time you press CTRL+\  ?  why?
    > >
    > > Try ulimit -c 0, then run it (you should get no core dump)
    > > Then ulimit -c 500000, then run it (you should get a core dump)
    > >
    > > SIGQUIT is supposed to dump core. Ulimit settings can suppress generation of
    > > core files. The difference between your machine and your friend's is likely
    > > just the ulimit settings.
    > 
    > If you want to type CTRL+\ you can redefine what char generates SIGQUIT
    > with stty quit command.
    
    I think the problem Mario is really trying to solve is quitting at
    psql's "Password: " prompt.  Ctrl-C is ignored at that point apparently.
    SIGQUIT (thus Ctrl-\ in most people's setup) does it but it also dumps
    core.
    
    -- 
    Alvaro Herrera                                http://www.CommandPrompt.com/
    PostgreSQL Replication, Consulting, Custom Development, 24x7 support
    
    
  9. Re: psql: core dumped

    Mario Gonzalez <gonzalemario@gmail.com> — 2006-12-20T11:54:04Z

    On 19/12/06, Alvaro Herrera <alvherre@commandprompt.com> wrote:
    >
    > I think the problem Mario is really trying to solve is quitting at
    > psql's "Password: " prompt.  Ctrl-C is ignored at that point apparently.
    > SIGQUIT (thus Ctrl-\ in most people's setup) does it but it also dumps
    > core.
    >
    
      yes, that is true and also when you are is psql prompt too. But, I
    had no idea that a core dump is normal with a SIGQUIT signal.
    
      Thank you all for your time and patience; this was my first "try"
    with a postgres patch, I'll try with something else in other chance
    :-)
    
    >
    
    -- 
    http://www.advogato.org/person/mgonzalez/
    
    
  10. Re: psql: core dumped

    Mario Gonzalez <gonzalemario@gmail.com> — 2006-12-20T11:55:59Z

    On 19/12/06, Andrew Dunstan <andrew@dunslane.net> wrote:
    >
    > This normally a SIGQUIT, and on my machine at least the default action for
    > that is a core dump. Perhaps you need to say what you are trying to do and
    > why.
    >
    
      I'd like to help :-)   I wanted to avoid a core dumped but you told
    me that's a normal thing for a SIGQUIT signal.
    
    >
    
    -- 
    http://www.advogato.org/person/mgonzalez/
    
    
  11. Re: psql: core dumped

    Philip Yarra <philip@utiba.com> — 2006-12-20T22:53:11Z

    Mario wrote:
    >  I'd like to help :-)   I wanted to avoid a core dumped but you told
    > me that's a normal thing for a SIGQUIT signal.
    
    Did you try running `ulimit -c 0` first? That should do what you want - 
      prevent generation of the dump file.
    
    Regards, Philip.
    
    -- 
    Philip Yarra
    Senior Software Engineer, Utiba Pty Ltd
    philip@utiba.com