pg.ddx.io pgsql-general@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Glauco Torres <torres.glauco@gmail.com>
Cc: pgsql-general@postgresql.org
Subject: Re: Segmentation fault with core dump
Date: Wed, 10 Jan 2018 12:08:32 -0500
Message-ID: <15631.1515604112@sss.pgh.pa.us> (raw)
In-Reply-To: <CAMd+QORjQGFPhRqXj8DSLn2_UgnTHtP=Kc7h2e5_hGz0GLaBMw@mail.gmail.com>
References: <CAMd+QORjQGFPhRqXj8DSLn2_UgnTHtP=Kc7h2e5_hGz0GLaBMw@mail.gmail.com>
Glauco Torres <torres.glauco@gmail.com> writes:
> (gdb) bt
> #0 ckpt_buforder_comparator (pa=pa@entry=0x7f6fa9ef4b2c,
> pb=pb@entry=0x1be06d2d06644)
> at bufmgr.c:4137
> #1 0x0000000000801268 in med3 (a=0x7f6fa9ef4b2c "\177\006",
> b=0x1be06d2d06644 <Address 0x1be06d2d06644 out of bounds>,
> c=0x2fc9dfbb1815c <Address 0x2fc9dfbb1815c out of bounds>, cmp=0x6a4d20
> <ckpt_buforder_comparator>)
> at qsort.c:107
> #2 0x0000000000801621 in pg_qsort (a=0x7f6fa9ef4b2c, a@entry=0x7f6fa9ea8380,
> n=<optimized out>, es=es@entry=20, cmp=cmp@entry=0x6a4d20
> <ckpt_buforder_comparator>) at qsort.c:157
> #3 0x00000000008015e2 in pg_qsort (a=0x7f6fa9ea8380, n=<optimized out>,
> n@entry=111473, es=es@entry=20, cmp=cmp@entry=0x6a4d20
> <ckpt_buforder_comparator>) at qsort.c:203
> #4 0x00000000006a81cf in BufferSync (flags=flags@entry=128) at
> bufmgr.c:1863
Hm. I'm not normally one to jump to the conclusion that something is a
compiler bug, but it's hard to explain this stack trace any other way.
The value of "n" passed to the inner invocation of pg_qsort should not
have been more than 29914, but working from either the value of d or the
value of pn leads to the conclusion that it was 0x7f6fa9f3a470, which
looks a lot more like an address in the array than a proper value of n.
I suppose this might be due to a corrupted copy of the postgres executable
rather than an actual compiler bug. Did you build it yourself?
BTW, I notice that ckpt_buforder_comparator assumes it can't possibly
see the same block ID twice in the array, which I think is an
unsupportable assumption. But I cannot see a way that that could lead
to a crash in pg_qsort --- at worst it might cause a little inefficiency.
regards, tom lane
view thread (32+ messages) latest in thread
Message-ID: <15631.1515604112@sss.pgh.pa.us> Permalink: ../15631.1515604112@sss.pgh.pa.us/ Also on: postgresql.org/message-id/15631.1515604112@sss.pgh.pa.us ·
reply
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Reply to all the recipients from your mail client; the link fills in the headers below: reply via email Some clients, webmail especially, drop In-Reply-To and References from a link, and the reply then starts a new thread: use the mbox below. To: pgsql-general@postgresql.org Cc: tgl@sss.pgh.pa.us, torres.glauco@gmail.com Subject: Re: Segmentation fault with core dump In-Reply-To: <15631.1515604112@sss.pgh.pa.us> References: <CAMd+QORjQGFPhRqXj8DSLn2_UgnTHtP=Kc7h2e5_hGz0GLaBMw@mail.gmail.com> <15631.1515604112@sss.pgh.pa.us> * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox