| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> | 
|---|---|
| To: | Peter Eisentraut <peter_e(at)gmx(dot)net> | 
| Cc: | pgsql-bugs(at)postgreSQL(dot)org | 
| Subject: | Re: psql -c tends to core dump if interrupted | 
| Date: | 2001-03-22 20:41:13 | 
| Message-ID: | 12352.985293673@sss.pgh.pa.us | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-bugs | 
I said:
> In current sources, try the following:
> while true; do
> psql -c "checkpoint" yourdb
> done
> (any SQL command will do, it needn't be a checkpoint)
> Press control-C while it's cycling.  A fair fraction of the time
> I get a SEGV coredump from psql.
Ah, I think I see the problem: if SIGINT is received before cancelConn
has been set, handle_sigint will do siglongjmp(main_loop_jmp, 1) ...
and the longjmp buffer is never set up in this control path.
Seems like there needs to be a main_loop_jmp_ready flag to prevent
an attempted siglongjmp before the buffer is set.  Or perhaps don't
establish the signal handler until main_loop_jmp is valid?
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Justin Clift | 2001-03-22 22:24:33 | Re: Tests randomly failed | 
| Previous Message | Tom Lane | 2001-03-22 20:28:56 | psql -c tends to core dump if interrupted |