Обсуждение: psql: core dumped

Поиск
Список
Период
Сортировка

psql: core dumped

От
Mario
Дата:
 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/


Re: psql: core dumped

От
Peter Eisentraut
Дата:
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/


Re: psql: core dumped

От
Mario
Дата:
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/


Re: psql: core dumped

От
"Andrew Dunstan"
Дата:
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





Re: psql: core dumped

От
Philip Yarra
Дата:
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


Re: psql: core dumped

От
Gregory Stark
Дата:
"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


Re: psql: core dumped

От
Jeremy Drake
Дата:
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


Re: psql: core dumped

От
Alvaro Herrera
Дата:
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


Re: psql: core dumped

От
Mario
Дата:
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/


Re: psql: core dumped

От
Mario
Дата:
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/


Re: psql: core dumped

От
Philip Yarra
Дата:
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