monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] Problems after building monotone


From: Justin Patrin
Subject: Re: [Monotone-devel] Problems after building monotone
Date: Thu, 20 Jul 2006 13:02:36 -0700

On 7/20/06, Zack Weinberg <address@hidden> wrote:
On 7/20/06, Justin Patrin <address@hidden> wrote:
>
> The manual compile I did most certainly didn't have anything but the
> default optimization in monotone's build scripts. I've tried both 0.25
> and 0.27 at -O0 and it made no difference. -O3 worked fine before for
> 0.25.

Ah.  That probably rules out the compiler, then.  -O0 miscompiles are
rare, but they do happen.

I think what we'd like to see next is the backtrace at -g -O0.

Compiled with CFLAGS="-g -O0" CPPFLAGS="-g -O0" CXXFLAGS="-g -O0" by hand.

Pardon the copious pasting. I appreciate the help very much.

# gdb ./mtn
GNU gdb 6.4
Copyright 2005 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 "i686-pc-linux-gnu"...Using host
libthread_db library "/lib/tls/libthread_db.so.1".

(gdb) start
Breakpoint 1 at 0x82a0409: file main.cc, line 495.
Starting program: /home/papercrane/net.venge.monotone/mtn

Program received signal SIGSEGV, Segmentation fault.
0xb7ef0d96 in std::basic_stringbuf<char, std::char_traits<char>,
std::allocator<char> >::~basic_stringbuf ()
  from /usr/lib/libboost_date_time.so.1.33.1
(gdb) bt
#0  0xb7ef0d96 in std::basic_stringbuf<char, std::char_traits<char>,
std::allocator<char> >::~basic_stringbuf ()
  from /usr/lib/libboost_date_time.so.1.33.1
#1  0xb7e836ef in std::basic_ostringstream<char,
std::char_traits<char>, std::allocator<char> >::~basic_ostringstream
()
  from /usr/lib/gcc/i686-pc-linux-gnu/3.4.6/libstdc++.so.6
#2  0x080565a9 in ~impl (this=0x85451b8) at sanity.cc:377
#3  0x0805594d in ~format_base (this=0xbf9e6900) at sanity.cc:377
#4  0x08056261 in ~plain_format (this=0xbf9e6900) at process.cc:22
#5  0x083b41d1 in get_system_flavour (address@hidden) at
get_system_flavour.cc:16
#6  0x080532a8 in sanity (this=0x8508760) at sanity.cc:51
#7  0x0805619d in __static_initialization_and_destruction_0
(__initialize_p=1, __priority=65535) at sanity.cc:44
#8  0x08056212 in global constructors keyed to global_sanity () at sanity.cc:152
#9  0x083b7868 in __do_global_ctors_aux ()
#10 0x080511b1 in _init () at stl_algobase.h:150
#11 0x083b76fb in __libc_csu_init ()
#12 0xb7cd6ec9 in __libc_start_main () from /lib/tls/libc.so.6
#13 0x08052e21 in _start () at stl_algobase.h:150
(gdb)


Also,
try running under valgrind (again, the unoptimized version) and tell
us what it prints for the very first invalid memory access that isn't
in setlocale().  (glibc is buggy.)

# valgrind ./mtn
==28380== Memcheck, a memory error detector.
==28380== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al.
==28380== Using LibVEX rev 1575, a library for dynamic binary translation.
==28380== Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP.
==28380== Using valgrind-3.1.1, a dynamic binary instrumentation framework.
==28380== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al.
==28380== For more details, rerun with: -v
==28380==
==28380== Invalid read of size 4
==28380==    at 0x4108D96: std::basic_stringbuf<char,
std::char_traits<char>, std::allocator<char> >::~basic_stringbuf() (in
/usr/lib/libboost_date_time.so.1.33.1)
==28380==    by 0x419C6EE: std::basic_ostringstream<char,
std::char_traits<char>, std::allocator<char> >::~basic_ostringstream()
(in /usr/lib/gcc/i686-pc-linux-gnu/3.4.6/libstdc++.so.6.0.3)
==28380==    by 0x80565A8: format_base::impl::~impl() (sanity.cc:377)
==28380==    by 0x805594C: format_base::~format_base() (sanity.cc:377)
==28380==    by 0x8056260: plain_format::~plain_format() (refiner.cc:206)
==28380==    by 0x83B41D0: get_system_flavour(std::string&)
(get_system_flavour.cc:16)
==28380==    by 0x80532A7: sanity::sanity() (sanity.cc:51)
==28380==    by 0x805619C:
__static_initialization_and_destruction_0(int, int) (sanity.cc:44)
==28380==    by 0x8056211: _GLOBAL__I_global_sanity (sanity.cc:152)
==28380==    by 0x83B7867: (within /home/papercrane/net.venge.monotone/mtn)
==28380==    by 0x80511B0: (within /home/papercrane/net.venge.monotone/mtn)
==28380==    by 0x83B76FA: __libc_csu_init (in
/home/papercrane/net.venge.monotone/mtn)
==28380==  Address 0xFFFFFFFC is not stack'd, malloc'd or (recently) free'd
==28380==
==28380== Process terminating with default action of signal 11 (SIGSEGV)
==28380==  Access not within mapped region at address 0xFFFFFFFC
==28380==    at 0x4108D96: std::basic_stringbuf<char,
std::char_traits<char>, std::allocator<char> >::~basic_stringbuf() (in
/usr/lib/libboost_date_time.so.1.33.1)
==28380==    by 0x419C6EE: std::basic_ostringstream<char,
std::char_traits<char>, std::allocator<char> >::~basic_ostringstream()
(in /usr/lib/gcc/i686-pc-linux-gnu/3.4.6/libstdc++.so.6.0.3)
==28380==    by 0x80565A8: format_base::impl::~impl() (sanity.cc:377)
==28380==    by 0x805594C: format_base::~format_base() (sanity.cc:377)
==28380==    by 0x8056260: plain_format::~plain_format() (refiner.cc:206)
==28380==    by 0x83B41D0: get_system_flavour(std::string&)
(get_system_flavour.cc:16)
==28380==    by 0x80532A7: sanity::sanity() (sanity.cc:51)
==28380==    by 0x805619C:
__static_initialization_and_destruction_0(int, int) (sanity.cc:44)
==28380==    by 0x8056211: _GLOBAL__I_global_sanity (sanity.cc:152)
==28380==    by 0x83B7867: (within /home/papercrane/net.venge.monotone/mtn)
==28380==    by 0x80511B0: (within /home/papercrane/net.venge.monotone/mtn)
==28380==    by 0x83B76FA: __libc_csu_init (in
/home/papercrane/net.venge.monotone/mtn)
==28380==
==28380== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 31 from 1)
==28380== malloc/free: in use at exit: 234,439 bytes in 605 blocks.
==28380== malloc/free: 713 allocs, 108 frees, 236,599 bytes allocated.
==28380== For counts of detected errors, rerun with: -v
==28380== searching for pointers to 605 not-freed blocks.
==28380== checked 244,768 bytes.
==28380==
==28380== LEAK SUMMARY:
==28380==    definitely lost: 0 bytes in 0 blocks.
==28380==      possibly lost: 15,508 bytes in 366 blocks.
==28380==    still reachable: 218,931 bytes in 239 blocks.
==28380==         suppressed: 0 bytes in 0 blocks.
==28380== Reachable blocks (those to which a pointer was found) are not shown.
==28380== To see them, rerun with: --show-reachable=yes
zsh: 28380 segmentation fault  valgrind ./mtn


> Could it be my boost or gcc versions? They were both likely
> updated since I originally installed monotone.

It can't hurt to make sure the boost libraries were compiled with the
compiler you have installed, but I doubt this is the problem.

I'll try recompiling boost now to see if it makes a difference.

--
Justin Patrin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]