From: Sergey Vlasov <vsu@altlinux.ru>
To: devel@lists.altlinux.org
Subject: Re: [devel] How to generate core and backtrace files
Date: Thu, 14 Jun 2007 22:35:29 +0400
Message-ID: <20070614183529.GA4890@procyon.home> (raw)
In-Reply-To: <4671665B.2050800@stc.donpac.ru>
[-- Attachment #1: Type: text/plain, Size: 1924 bytes --]
On Thu, Jun 14, 2007 at 08:01:31PM +0400, Eugene Prokopiev wrote:
> # ulimit -c 10000000000
> # cp -a
> /data/build/hasher-callweaver/chroot/usr/src/RPM/BUILD/callweaver-1.1.99.20070614/
> .
> # cd callweaver-1.1.99.20070614
> # LD_LIBRARY_PATH=/usr/lib/debug:$PWD gdb .libs/callweaver
> GNU gdb 6.6-alt1 (ALT Linux)
> Copyright (C) 2006 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB. Type "show warranty" for details.
> This GDB was configured as "x86_64-alt-linux"...
> Using host libthread_db library "/lib64/libthread_db.so.1".
> (gdb) run -vvvvvcd
> ...
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 1092139328 (LWP 24377)]
> 0x00002afca9067cc4 in strncpy () from /lib64/libc.so.6
> (gdb) quit
> The program is running. Exit anyway? (y or n) y
>
> И где теперь сам дамп? В текущем каталоге ничего подозрительного нет.
gdb перехватывает SIGSEGV до создания дампа (но в таком варианте дамп
и не нужен - после SIGSEGV можно изучать через gdb состояние ещё
живого процесса, а не восстановленное из дампа, которое может быть уже
неполным). Вот если запускать программу напрямую (без gdb), должен
создастся дамп (но опять-таки при условии, что программа не пытается
обработать SIGSEGV самостоятельно).
Ещё одни возможные грабли: обычно дамп пишется в текущий каталог
процесса - если выполнялись вызовы chdir(), дамп может оказаться не
там, где ожидалось (либо вообще не создастся, если запись в каталог
оказалась запрещена). Подобная ситуация может возникать при отладке
демонов; в таких случаях можно писать в kernel.core_pattern абсолютный
путь (и добавить, например, ".%p", чтобы имя файла зависело от pid).
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2007-06-14 18:35 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-14 15:11 Eugene Prokopiev
2007-06-14 15:41 ` Led
2007-06-14 15:45 ` Pavlov Konstantin
2007-06-14 16:06 ` Eugene Prokopiev
2007-06-14 16:01 ` Eugene Prokopiev
2007-06-14 16:12 ` Andrey Rahmatullin
2007-06-14 17:47 ` Eugene Prokopiev
2007-06-14 17:51 ` Andrey Rahmatullin
2007-06-14 18:43 ` Eugene Prokopiev
2007-06-14 18:45 ` Andrey Rahmatullin
2007-06-14 19:18 ` Sergey Vlasov
2007-06-14 20:03 ` Eugene Prokopiev
2007-06-15 8:41 ` Sergey Vlasov
2007-06-15 2:00 ` Hihin Ruslan
2007-06-15 17:29 ` Alexey I. Froloff
2007-06-16 14:49 ` [devel] [JT] " Ivan Fedorov
2007-06-17 11:33 ` Денис Смирнов
2007-06-14 18:41 ` [devel] " Sergey Vlasov
2007-06-14 16:18 ` Led
2007-06-14 18:32 ` Eugene Prokopiev
2007-06-14 21:15 ` Led
2007-06-14 18:35 ` Sergey Vlasov [this message]
2007-06-15 8:57 ` Eugene Prokopiev
2007-06-18 19:24 ` Michael Shigorin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070614183529.GA4890@procyon.home \
--to=vsu@altlinux.ru \
--cc=devel@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Team development discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
public-inbox-index devel
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.devel
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git