Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752324AbYHKIkU (ORCPT ); Mon, 11 Aug 2008 04:40:20 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751248AbYHKIkH (ORCPT ); Mon, 11 Aug 2008 04:40:07 -0400 Received: from main.gmane.org ([80.91.229.2]:46534 "EHLO ciao.gmane.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751178AbYHKIkG (ORCPT ); Mon, 11 Aug 2008 04:40:06 -0400 X-Injected-Via-Gmane: http://gmane.org/ To: linux-kernel@vger.kernel.org From: Alan Jenkins Subject: Re: Segmentation fault details? Date: Mon, 11 Aug 2008 09:36:33 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8Bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 86.53.68.233 User-Agent: KNode/0.10.9 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1532 Lines: 35 Wang Yi wrote: > Hi, all! > >  I'd like to know some details about segmentation fault. >  What I mean is when a program accesses invalid memory area, it will > get a SIGSEGV signal from kernel, and a message "Segmentation fault". > >  I also find that dmesg can show we something like this: >  ProgramName[Pid]: segfault at xxxx eip xxxx esp xxxx error x >  It is useful and provides the first-step information for further > debug/analysis. > >  My question is how dmesg gets the information, and if there are any > "decent" way to get this and maybe more information(An "indecent" way > I came to is grep dmesg) > so that I can perform some basic auto analysis. > >  Thank you. > > Leo Core dumps. You might also like to look at Ubuntu's "apport" bug reporting tool.  IIRC the necessary kernel support is now in mainline.  I believe it provides the option to dump core by piping it through an arbitrary program.  The aim of apport is to capture these core dumps, notify the user, and give them the option to submit it to the Ubuntu developers. One advantage of this last feature is that you don't need to search the filesystem for core files.  (They're dumped in the current directory, but you may not know what directory the program was in when it crashed). Alan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/