Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 847FEF63329 for ; Thu, 19 Jul 2012 00:51:03 -0300 (ADT) Received: from mail-pb0-f46.google.com ([209.85.160.46]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SrhlT-0002uL-VF for pgsql-general@postgresql.org; Thu, 19 Jul 2012 03:51:02 +0000 Received: by pbbrp8 with SMTP id rp8so3669743pbb.19 for ; Wed, 18 Jul 2012 20:50:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:x-gm-message-state; bh=HjkQMBSxSZWNlF2qRSWI8T2NoJoADJ2KgcsbWjNhf3k=; b=EvegSuk3oI6tuAVN9SbVzg+2PQ3zS2QRWEbucMsiXc2A16MQNjgNj97gAI16MxXdyN guZvGxfJU2+MpKYzZprlBriz+IlUB0a2exvPYyVDZTVT9J3P9bCnq5EjTXi+bGokO9bi QYKuTooyoAZgCu4hTTP8JmC7aAdNswDfYmQC+pg/pKb841vMPpOhH9gTrHSWWs00nkgY 9oerDwsmuCQlxxQRTZ18nhuz5XM9IvsFA71cN00iNGRaNnUN+s7SkfrWogqVTBPys917 a9A8KdW5ZWUshn+wK1mG2bZ08J9Tb+AkWlUz1Arimq4wwJm0lDx40WFBDxTq1gYoniQU SsOw== Received: by 10.68.221.227 with SMTP id qh3mr1502440pbc.115.1342669846806; Wed, 18 Jul 2012 20:50:46 -0700 (PDT) Received: from ayaki.localdomain (office1.postnewspapers.com.au. [150.101.171.128]) by mx.google.com with ESMTPS id qc5sm896454pbb.6.2012.07.18.20.50.44 (version=SSLv3 cipher=OTHER); Wed, 18 Jul 2012 20:50:45 -0700 (PDT) Message-ID: <50078411.9030602@ringerc.id.au> Date: Thu, 19 Jul 2012 11:50:41 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120605 Thunderbird/13.0 MIME-Version: 1.0 To: Amod Pandey CC: pgsql-general@postgresql.org Subject: Re: Segmentation fault References: In-Reply-To: Content-Type: multipart/alternative; boundary="------------000204060702050803010800" X-Gm-Message-State: ALoCoQkXLzC6/yD+OFLxi6ks86FMJ0Tz1D6hViXQQDMo27+RNwg8Nlgzjq2x7L9CXT6SVrybzY29 X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201207/352 X-Sequence-Number: 188863 This is a multi-part message in MIME format. --------------000204060702050803010800 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 07/19/2012 12:37 AM, Amod Pandey wrote: > Server stopped due to Segmentation Fault. Server was running > successfully for an year. > > PostgreSQL: 9.0.3 > > from /var/log/messages > > Jul 18 19:00:03 ip-10-136-22-193 kernel: [18643442.660032] > postgres[6818]: segfault at 170a8c6f ip 000000000044c94d sp > 00007fff9fee5b80 error 4 in postgres[400000+495000] > > from pg log > > LOG: server process (PID 6818) was terminated by signal 11: > Segmentation fault > LOG: terminating any other active server processes > > Please suggest if there is a way to find out the issue. Did the crash produce a core file ? You haven't mentioned what Linux distro or kernel version you're on, and defaults vary. Look in your PostgreSQL datadir and see if there are any files with "core" in the name. Unfortunately most Linux distros default to not producing core files. Without a core file it'll be nearly impossible because the segfault message reported by the kernel only contains the instruction pointer and stack pointer. The stack pointer is invalid and useless without a core file, and with address space layout randomisation active the instruction pointer offsets are all randomised for each execution, so the ip doesn't tell you much on ASLR systems either. If you can show more of the PostgreSQL logs from around the incident that would possibly be helpful. -- Craig Ringer --------------000204060702050803010800 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit
On 07/19/2012 12:37 AM, Amod Pandey wrote:
Server stopped due to Segmentation Fault. Server was running successfully for an year.

PostgreSQL: 9.0.3

from /var/log/messages

Jul 18 19:00:03 ip-10-136-22-193 kernel: [18643442.660032] postgres[6818]: segfault at 170a8c6f ip 000000000044c94d sp 00007fff9fee5b80 error 4 in postgres[400000+495000]

from pg log

LOG:  server process (PID 6818) was terminated by signal 11: Segmentation fault
LOG:  terminating any other active server processes

Please suggest if there is a way to find out the issue.

Did the crash produce a core file ?

You haven't mentioned what Linux distro or kernel version you're on, and defaults vary. Look in your PostgreSQL datadir and see if there are any files with "core" in the name.

Unfortunately most Linux distros default to not producing core files. Without a core file it'll be nearly impossible because the segfault message reported by the kernel only contains the instruction pointer and stack pointer. The stack pointer is invalid and useless without a core file, and with address space layout randomisation active the instruction pointer offsets are all randomised for each execution, so the ip doesn't tell you much on ASLR systems either.

If you can show more of the PostgreSQL logs from around the incident that would possibly be helpful.

--
Craig Ringer
--------------000204060702050803010800--