dwarves.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rakesh Pandit <rakesh.pandit-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Arnaldo Carvalho de Melo
	<acme-f8uhVLnGfZaxAyOMLChx1axOck334EZe@public.gmane.org>
Cc: dwarves-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: dwarf_loader.c: Fixed leaked bogon
Date: Mon, 10 May 2010 16:33:26 +0530	[thread overview]
Message-ID: <AANLkTil8acwy2ory42GSCT-8e-Nh1jlo--Cg4HSjoie5@mail.gmail.com> (raw)
In-Reply-To: <20100106164444.GB18919-f8uhVLnGfZaxAyOMLChx1axOck334EZe@public.gmane.org>

Finally had a look at this case again and I am able to reproduce it.
Kernel kills the command:
[rakesh@simu build]$ ./pfunct -l -P
~/testrpms/webkitgtk-debuginfo-1.1.12-1.fc12.x86_64/usr/lib/debug/usr/lib64/libwebkit-1.0.so.2.debug
with message:
May 10 12:19:20 simu kernel: Out of memory: kill process 2956 (bash)
score 496818 or a child
May 10 12:19:20 simu kernel: Killed process 5758 (pfunct)

On 6 January 2010 22:14, Arnaldo Carvalho de Melo  wrote:
> Em Wed, Jan 06, 2010 at 08:54:59PM +0530, Rakesh Pandit escreveu:
>> While checking one of big shared objects I found kernel getting
>> unhappy and sending SIGKILL. File was 282M libwebkit-1.0.so.2.8.1 from
>> webkit project. (Can be obtained from
>> http://kojipkgs.fedoraproject.org/packages/webkitgtk/1.1.12/2.fc12/x86_64/webkitgtk-debuginfo-1.1.12-2.fc12.x86_64.rpm
>> and extracted via rpm2cpio, file is libwebkit-1.0.so.2.8.1.debug)
>>
>> URL: http://rakesh.fedorapeople.org/misc/0001-dwarf_loader.c-Fixed-leaked-bogon.patch
>
> What is the exact command line you are using? You cannot destroy that
> obstack if you really will use the extra debugging info that is has
> many pointers that will point to some other info if you destroy it.
>
> By default cu->extra_dbg_info is false, it only is true if set
> explicitely by one of the tools, like:
>
> [acme@doppio pahole]$ grep extra_dbg_info *.c
> dwarf_loader.c: if (cu->extra_dbg_info) {
> dwarf_loader.c: return cu->extra_dbg_info ?
> dwarf_loader.c: return cu->extra_dbg_info ? dtag->decl_line : 0;
> dwarf_loader.c: return cu->extra_dbg_info ? dtag->id : 0;
> dwarf_loader.c: return cu->extra_dbg_info ? dtag->type : 0;
> dwarf_loader.c:         cu->extra_dbg_info = conf ? conf->extra_dbg_info : 0;
> dwarf_loader.c:         if (!cu->extra_dbg_info)
> dwarves.c:              self->extra_dbg_info = 0;
> pahole.c:                 conf_load.extra_dbg_info = 1;         break;
> pahole.c:                 conf_load.extra_dbg_info = 1;         break;
> pahole.c:                 conf_load.extra_dbg_info = 1;         break;
> pfunct.c:                 conf_load.extra_dbg_info = true;
> pfunct.c:                 conf_load.extra_dbg_info = 1;          break;
> pfunct.c:                 conf_load.extra_dbg_info = true;
> [acme@doppio pahole]$
>
> pahole and pfunct, and inpahole, assuming it is the one you are using:
>
>                .name = "decl_exclude",
>                .key  = 'D',
>                .arg  = "PREFIX",
>                .doc  = "exclude classes declared in files with PREFIX",
>
>        case 'D': decl_exclude_prefix = arg;
>                  decl_exclude_prefix_len = strlen(decl_exclude_prefix);
>                  conf_load.extra_dbg_info = 1;         break;
>
>                .name = "show_decl_info",
>                .key  = 'I',
>                .doc  = "Show the file and line number where the tags were defined"
>
>        case 'I': conf.show_decl_info = 1;
>                  conf_load.extra_dbg_info = 1;         break;
>
>                .name = "packable",
>                .key  = 'P',
>                .doc  = "show only structs that has holes that can be packed",
>
>        case 'P': show_packable = 1;
>                  conf_load.extra_dbg_info = 1;         break;
>
>
> The only seemingly "strange" case above is --packable, that I bet is
> what you're using, where it needs the extra debug info because for
> anonymous structs it shows in which file and line the struct is, and
> that is only available from the DWARF info.
>

I am using -l ( along with -P & one more option also) among the above.
ELF file is webkitgtk-debuginfo-1.1.12-1.fc12.x86_64/usr/lib/debug/usr/lib64/libwebkit-1.0.so.2.debug
which is essentially a symlink to libwebkit-1.0.so.2.8.1.debug in same
debuginfo rpm.

Link to debuginfo rpm is:
http://kojipkgs.fedoraproject.org/packages/webkitgtk/1.1.12/1.fc12/x86_64/webkitgtk-debuginfo-1.1.12-1.fc12.x86_64.rpm

It is 290 MB ELF file.

> Can you try the following patch to see if the problem goes away? We may
> want to just enable extra_dbg_info in this case if used with --verbose,
> something like that.
>

Looking into where this leaks happens and what would be better way to
deal with it.

-- 
Rakesh Pandit
https://fedoraproject.org/wiki/User:Rakesh
freedom, friends, features, first
--
To unsubscribe from this list: send the line "unsubscribe dwarves" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      parent reply	other threads:[~2010-05-10 11:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-06 15:24 dwarf_loader.c: Fixed leaked bogon Rakesh Pandit
     [not found] ` <b401d2531001060724r4a06401fx9cc8a5dbf24518d3-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-01-06 16:44   ` Arnaldo Carvalho de Melo
     [not found]     ` <20100106164444.GB18919-f8uhVLnGfZaxAyOMLChx1axOck334EZe@public.gmane.org>
2010-04-05  7:27       ` Rakesh Pandit
2010-05-10 11:03       ` Rakesh Pandit [this message]

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=AANLkTil8acwy2ory42GSCT-8e-Nh1jlo--Cg4HSjoie5@mail.gmail.com \
    --to=rakesh.pandit-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=acme-f8uhVLnGfZaxAyOMLChx1axOck334EZe@public.gmane.org \
    --cc=dwarves-u79uwXL29TY76Z2rM5mHXA@public.gmane.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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).