Search the web
Sign In
New User? Sign Up
mpatrol · mpatrol library discussion group
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Strange backtrace and segfault   Message List  
Reply | Forward Message #1036 of 1198 |
Re: [mpatrol] Strange backtrace and segfault

You need to configure valgrind to show possible leaks, memory that is
still referenced. Speed can be an issue though.

On Wednesday 29 November 2006 11:41, Andy Juniper wrote:
> Hi,
>
> I have tried valgrind and unfortunately it doesn't cut the mustard,
> because: a) I can't turn off memory checking like I can on mpatrol,
> and thus it runs almost too slowly to build up enough leak to track
> it down b) it's not showing any leaks even though the memory
> footprint has increased
>
> Andy
>
> > On linux, try valgrind. http://www.valgrind.org/
> >
> > On Tuesday 28 November 2006 17:51, andy_juniper wrote:
> >> Hi,
> >>
> >> Can anyone out there help with this strange problem.
> >>
> >> The program in question is fairly complex (threads & forks) and
> >> part built from binary-only libraries. It has a memory leak but
> >> no (obvious) memory corruption or other runtime problems.
> >>
> >> I'm running on Linux.
> >>
> >> My mpatrol options are: CHECKFORK NOPROTECT LEAKTABLE
> >> SHOWUNFREED AUTOSAVE=30
> >>
> >> If I run it with mpatrol, it segfaults. It also does this if I
> >> run it in gdb with mpatrol (dynamic preloaded library):
> >>
> >> Program received signal SIGSEGV, Segmentation fault.
> >> 0x400209a8 in getaddr () from /usr/lib/libmpatrolmt.so
> >> (gdb) bt
> >> #0 0x400209a8 in getaddr () from /usr/lib/libmpatrolmt.so
> >> #1 0x40020a2b in __mp_getframe () from /usr/lib/libmpatrolmt.so
> >> #2 0x40020c7d in __mp_getaddrs () from /usr/lib/libmpatrolmt.so
> >> #3 0x4001e695 in __mp_getmemory () from
> >> /usr/lib/libmpatrolmt.so #4 0x4002bf5b in __mp_alloc () from
> >> /usr/lib/libmpatrolmt.so #5 0x400300b3 in malloc () from
> >> /usr/lib/libmpatrolmt.so
> >>
> >> If I set a breakpoint on malloc and then do a backtrace and
> >> continue at that breakpoint, gdb is consistent in that it just
> >> shows (twice) immediately before the segfault:
> >>
> >> Breakpoint 2, 0x4003008c in malloc () from
> >> /usr/lib/libmpatrolmt.so #0 0x4003008c in malloc () from
> >> /usr/lib/libmpatrolmt.so
> >>
> >> Breakpoint 2, 0x4003008c in malloc () from
> >> /usr/lib/libmpatrolmt.so #0 0x4003008c in malloc () from
> >> /usr/lib/libmpatrolmt.so
> >>
> >> This is completely repeatable.
> >>
> >> If I run with strace, then I just get output consisting of
> >> 100,000's of pairs of lines like this:
> >>
> >> 29158 rt_sigaction(SIGBUS, {0x400e4540, [BUS],
> >> SA_RESTORER|SA_RESTART, 0x40c0bcf8}, {0x400e4540, [BUS],
> >> SA_RESTORER|SA_RESTART, 0x40c0bcf8}, 8) = 0
> >> 29158 rt_sigaction(SIGSEGV, {0x400e4540, [SEGV],
> >> SA_RESTORER|SA_RESTART, 0x40c0bcf8}, {0x400e4540, [SEGV],
> >> SA_RESTORER|SA_RESTART, 0x40c0bcf8}, 8) = 0
> >>
> >> Can anyone help with this?
> >>
> >> Thanks,
> >> Andy
> >>
> >>
> >>
> >> To Post a message, send it to: mpatrol@egroups.com
> >>
> >> To Unsubscribe, send a blank message to:
> >> mpatrol-unsubscribe@egroups.com Yahoo! Groups Links
> >
> > Privileged or confidential information may be contained in this
> > message. If you are not the addressee of this message please
> > notify the sender by return and thereafter delete the message,
> > and you may not use, copy, disclose or rely on the information
> > contained in it. Internet e-mail may be susceptible to data
> > corruption, interception and unauthorised amendment for which
> > Wall Street Systems does not accept liability. Whilst we have
> > taken reasonable precautions to ensure that this e-mail and any
> > attachments have been swept for viruses, Wall Street Systems does
> > not accept liability for any damage sustained as a result of
> > viruses. Statements in this message or attachments that do not
> > relate to the business of Wall Street Systems are neither given
> > nor endorsed by the company or its Directors.
>
> To Post a message, send it to: mpatrol@egroups.com
>
> To Unsubscribe, send a blank message to:
> mpatrol-unsubscribe@egroups.com Yahoo! Groups Links
>
>
>

Privileged or confidential information may be contained in this message. If you
are not the addressee of this message please notify the sender by return and
thereafter delete the message, and you may not use, copy, disclose or rely on
the information contained in it. Internet e-mail may be susceptible to data
corruption, interception and unauthorised amendment for which Wall Street
Systems does not accept liability. Whilst we have taken reasonable precautions
to ensure that this e-mail and any attachments have been swept for viruses, Wall
Street Systems does not accept liability for any damage sustained as a result of
viruses. Statements in this message or attachments that do not relate to the
business of Wall Street Systems are neither given nor endorsed by the company
or its Directors.



Wed Nov 29, 2006 3:46 pm

harripasanen
Offline Offline
Send Email Send Email

Forward
Message #1036 of 1198 |
Expand Messages Author Sort by Date

Hi, Can anyone out there help with this strange problem. The program in question is fairly complex (threads & forks) and part built from binary-only libraries....
andy_juniper
Offline Send Email
Nov 28, 2006
4:59 pm

On linux, try valgrind. http://www.valgrind.org/ On Tuesday 28 November 2006 17:51, andy_juniper wrote: > Hi, > > Can anyone out there help with this strange...
Harri Pasanen
harripasanen
Offline Send Email
Nov 29, 2006
9:48 am

Hi, I have tried valgrind and unfortunately it doesn't cut the mustard, because: a) I can't turn off memory checking like I can on mpatrol, and thus it runs...
andy_juniper
Offline Send Email
Nov 29, 2006
3:07 pm

Hi, I have tried valgrind and unfortunately it doesn't cut the mustard, because: a) I can't turn off memory checking like I can on mpatrol, and thus it runs...
Andy Juniper
andy_juniper
Offline Send Email
Nov 29, 2006
3:08 pm

You need to configure valgrind to show possible leaks, memory that is still referenced. Speed can be an issue though. On Wednesday 29 November 2006 11:41,...
Harri Pasanen
harripasanen
Offline Send Email
Nov 29, 2006
4:21 pm

Hi, Yep, done that already (--show-reachable=yes --trace-children=yes --leak-check=yes). Still no signs of leaks despite the fact that the process size...
Andy Juniper
andy_juniper
Offline Send Email
Nov 29, 2006
5:13 pm

Looks like I'm getting somewhere with valgrind now, having had to change my code to manually call the leak check process (whereas mpatrol would have done that...
Andy Juniper
andy_juniper
Offline Send Email
Nov 30, 2006
6:11 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help