trinity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Slaby <jslaby@suse.cz>
To: Dave Jones <davej@redhat.com>
Cc: trinity@vger.kernel.org
Subject: Re: trinity: lots of free(): invalid pointer
Date: Mon, 20 Jan 2014 20:51:10 +0100	[thread overview]
Message-ID: <52DD7E2E.7000307@suse.cz> (raw)
In-Reply-To: <52DD799F.7090403@suse.cz>

On 01/20/2014 08:31 PM, Jiri Slaby wrote:
> On 01/17/2014 08:09 PM, Dave Jones wrote:
>> On Wed, Jan 15, 2014 at 11:37:57PM +0100, Jiri Slaby wrote:
>>  > Hi Dave,
>>  > 
>>  > I see lots of $SUBJ generated by the current snapshot of trinity.
>>  > 0x4120ae below is free in the loop in post_move_pages. So this is
>>  > perhaps introduced with one of:
>>  > commit ae3b98fcbf52c808b0a3eb4eb5311c9fdf433f55
>>  > Author: Dave Jones <davej@redhat.com>
>>  > Date:   Wed Jan 8 11:08:22 2014 -0500
>>  > 
>>  >     only allocate page_types array once
>>  > 
>>  > commit 2a749813619348b3bfd144fe04488f698d83accc
>>  > Author: Dave Jones <davej@redhat.com>
>>  > Date:   Tue Jan 7 12:11:11 2014 -0500
>>  > 
>>  >     teach move_pages about the maps list
>>  > 
>>  > 
>>  > Any ideas?
>>
>> I rewrote a bunch of that code a few days ago, are you still seeing it ?
>> I'm not able to reproduce it here.  A run with -c move_pages runs and runs.
> 
> Yeah, I still see it with the current snapshot. But, not with move_pages
> anymore, it seems. There had to be more sources, the current one is
> (with -x move_pages):
>  *** Error in `trinity': double free or corruption (top):
> 0x00000000014f9bc0 ***
> ======= Backtrace: =========
> /lib64/libc.so.6(+0x740af)[0x7f0c48ba30af]
> /lib64/libc.so.6(+0x798de)[0x7f0c48ba88de]
> /lib64/libc.so.6(+0x7a5e6)[0x7f0c48ba95e6]
> trinity[0x40abc8]
> trinity[0x40dabc]
> trinity[0x40338a]
> trinity[0x40704c]
> trinity[0x402c47]
> /lib64/libc.so.6(__libc_start_main+0xf5)[0x7f0c48b50b15]
> trinity[0x402f13]
> 
> The topmost trinity item 0x40abc8 is "entry->post(childno)". There seems
> to be a lost/optimized-out frame between this call and libc :/.

Ok, -Og looks better:
/lib64/libc.so.6(+0x740af)[0x7f4192eba0af]
/lib64/libc.so.6(+0x798de)[0x7f4192ebf8de]
/lib64/libc.so.6(+0x7a5e6)[0x7f4192ec05e6]
../trinity/trinity[0x410fa4]
../trinity/trinity[0x40a02f]
../trinity/trinity[0x40cf47]
../trinity/trinity[0x402c3c]
../trinity/trinity[0x4060de]
../trinity/trinity[0x4065df]
../trinity/trinity[0x406700]
../trinity/trinity[0x40bd0c]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x7f4192e67b15]
../trinity/trinity[0x402779]

(gdb) l * 0x410fa4
0x410fa4 is in post_modify_ldt (syscalls/modify_ldt.c:62).
57
58              ptr = (void *) shm->scratch[childno];
59
60              if (ptr != NULL)
61                      free(ptr);
62      }
63
64      struct syscallentry syscall_modify_ldt = {
65              .name = "modify_ldt",
66              .num_args = 3,


-- 
js
suse labs

  reply	other threads:[~2014-01-20 19:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-15 22:37 trinity: lots of free(): invalid pointer Jiri Slaby
2014-01-17 19:09 ` Dave Jones
2014-01-20 19:31   ` Jiri Slaby
2014-01-20 19:51     ` Jiri Slaby [this message]
2014-01-20 21:37       ` Dave Jones

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=52DD7E2E.7000307@suse.cz \
    --to=jslaby@suse.cz \
    --cc=davej@redhat.com \
    --cc=trinity@vger.kernel.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).