[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: subversion 1.2.0 - libsvn_repos/reporter.c does not survive gcc 3.4.2 -O2 optimization

From: Kiyo Kelvin Lee <kiyolee_at_hotmail.com>
Date: 2005-06-21 16:43:25 CEST

John Szakmeister wrote:
> On Monday 20 June 2005 10:23, Kiyo Kelvin Lee wrote:
>
>>I am using FreeBSD 5.4-RELEASE and port subversion-python to build
>>subversion. And I am also using Apache 2.0.54 (with worker mpm but
>>prefork has the same problem) and mod_dav_svn.
>>After I build everything with -O2 using the ports system, svn co would
>>lead to httpd crashes at the function update_entry() in
>>libsvn_repos/reporter.c (found by debugging httpd with gdb).
>>It looked like an code optimization problem, so I went on to manually
>>recompile reporter.c (with the right flags I believe) without -O2 and
>>relink libsvn_repos.so. Putting in the new so file, and svn co works
>>right the way without problem.
>>Is this a known problem?
>
>
> I've not seen a problem with optimizations, but then I'm using gcc
3.3.4.
> Can you tell me where it's crashing in update_entry()? Maybe the
problem
> is a little more serious, and we're just not catching it.
>
>
>>And the problem seems to happen only if I use mod_dav_svn. I tested
>>with svnserve, the problem does not seem to happen for svnserve.
>>Also note that I noticed the problem since 1.1.4 but before reporting
>>the problem I just wanted to check the latest version 1.2.0 and found
>>the problem is still there.
>>Regards,
>>Kiyo
>
>
> -John

I recompiled libsvn_repos with debug info and here is the log (partial)
of a gdb session for httpd:

(gdb) c
Continuing.

### svn co command submitted at this point ###

Program received signal SIGBUS, Bus error.
[Switching to Thread 24 (LWP 100124)]
0x2876e30f in update_entry (b=Error accessing memory address 0xbfa88858:
Bad address.
) at subversion/libsvn_repos/reporter.c:631
631 {
(gdb) bt
#0 0x2876e30f in update_entry (b=Error accessing memory address
0xbfa88858: Bad address.
) at subversion/libsvn_repos/reporter.c:631
#1 0x2876e21e in delta_dirs (b=0x8205638, s_rev=932, s_path=0x82274b8
"/", t_path=0x82056a0 "/",
     dir_baton=0x82275e0, e_path=0x287724b2 "", start_empty=136833088,
pool=0x8206018)
     at subversion/libsvn_repos/reporter.c:857
#2 0x2876f43f in svn_repos_finish_report (baton=0x8205638, pool=0x8206018)
     at subversion/libsvn_repos/reporter.c:913
#3 0x28754d8c in dav_svn__update_report () from
/usr/local/libexec/apache2/mod_dav_svn.so
#4 0x08206018 in ?? ()
#5 0x00000001 in ?? ()
#6 0x00000000 in ?? ()
#7 0x0821a018 in ?? ()
#8 0x0821a018 in ?? ()
#9 0x00000000 in ?? ()
#10 0x00000001 in ?? ()
#11 0x00000001 in ?? ()
#12 0x00000000 in ?? ()
#13 0x082055f8 in ?? ()
#14 0xbfabab80 in ?? ()
#15 0x28752b80 in dav_svn_create_version_resource () from
/usr/local/libexec/apache2/mod_dav_svn.so
Previous frame inner to this frame (corrupt stack?)
(gdb) up
#1 0x2876e21e in delta_dirs (b=0x8205638, s_rev=932, s_path=0x82274b8
"/", t_path=0x82056a0 "/",
     dir_baton=0x82275e0, e_path=0x287724b2 "", start_empty=136833088,
pool=0x8206018)
     at subversion/libsvn_repos/reporter.c:857
857 SVN_ERR (update_entry (b, s_rev, s_fullpath, s_entry, t_fullpath,
(gdb) l
852 s_entry = s_entries ?
853 apr_hash_get (s_entries, t_entry->name, APR_HASH_KEY_STRING)
: NULL;
854 s_fullpath = s_entry ? svn_path_join (s_path, t_entry->name,
subpool)
855 : NULL;
856
857 SVN_ERR (update_entry (b, s_rev, s_fullpath, s_entry, t_fullpath,
858 t_entry, dir_baton, e_fullpath, NULL,
859 b->recurse, subpool));
860 }
861
(gdb) detach
Detaching from program: /usr/local/sbin/httpd, process 4533
(gdb) q

So obviously, the first arg to update_entry() is somehow corrupted.

The longer full log is attached which mainly added the information about
what shared objs are involved.
Also attached is b1-release-debug which lists the commands used to build
libsvn_repos manually.

Regards,
Kiyo

/usr/local/bin/libtool15 --tag=CC --silent --mode=compile cc -D_REENTRANT -D_THREAD_SAFE -pipe -ggdb -O2 -march=pentium2 -DNEON_ZLIB -DNEON_SSL -I./subversion/include -I./subversion -I/usr/local/include/neon -I/usr/local/include/apache2 -I/usr/local/include/apache2 -I/usr/local/include -o subversion/libsvn_repos/commit.lo -c subversion/libsvn_repos/commit.c
/usr/local/bin/libtool15 --tag=CC --silent --mode=compile cc -D_REENTRANT -D_THREAD_SAFE -pipe -ggdb -O2 -march=pentium2 -DNEON_ZLIB -DNEON_SSL -I./subversion/include -I./subversion -I/usr/local/include/neon -I/usr/local/include/apache2 -I/usr/local/include/apache2 -I/usr/local/include -o subversion/libsvn_repos/delta.lo -c subversion/libsvn_repos/delta.c
/usr/local/bin/libtool15 --tag=CC --silent --mode=compile cc -D_REENTRANT -D_THREAD_SAFE -pipe -ggdb -O2 -march=pentium2 -DNEON_ZLIB -DNEON_SSL -I./subversion/include -I./subversion -I/usr/local/include/neon -I/usr/local/include/apache2 -I/usr/local/include/apache2 -I/usr/local/include -o subversion/libsvn_repos/dump.lo -c subversion/libsvn_repos/dump.c
/usr/local/bin/libtool15 --tag=CC --silent --mode=compile cc -D_REENTRANT -D_THREAD_SAFE -pipe -ggdb -O2 -march=pentium2 -DNEON_ZLIB -DNEON_SSL -I./subversion/include -I./subversion -I/usr/local/include/neon -I/usr/local/include/apache2 -I/usr/local/include/apache2 -I/usr/local/include -o subversion/libsvn_repos/fs-wrap.lo -c subversion/libsvn_repos/fs-wrap.c
/usr/local/bin/libtool15 --tag=CC --silent --mode=compile cc -D_REENTRANT -D_THREAD_SAFE -pipe -ggdb -O2 -march=pentium2 -DNEON_ZLIB -DNEON_SSL -I./subversion/include -I./subversion -I/usr/local/include/neon -I/usr/local/include/apache2 -I/usr/local/include/apache2 -I/usr/local/include -o subversion/libsvn_repos/hooks.lo -c subversion/libsvn_repos/hooks.c
/usr/local/bin/libtool15 --tag=CC --silent --mode=compile cc -D_REENTRANT -D_THREAD_SAFE -pipe -ggdb -O2 -march=pentium2 -DNEON_ZLIB -DNEON_SSL -I./subversion/include -I./subversion -I/usr/local/include/neon -I/usr/local/include/apache2 -I/usr/local/include/apache2 -I/usr/local/include -o subversion/libsvn_repos/load.lo -c subversion/libsvn_repos/load.c
/usr/local/bin/libtool15 --tag=CC --silent --mode=compile cc -D_REENTRANT -D_THREAD_SAFE -pipe -ggdb -O2 -march=pentium2 -DNEON_ZLIB -DNEON_SSL -I./subversion/include -I./subversion -I/usr/local/include/neon -I/usr/local/include/apache2 -I/usr/local/include/apache2 -I/usr/local/include -o subversion/libsvn_repos/log.lo -c subversion/libsvn_repos/log.c
/usr/local/bin/libtool15 --tag=CC --silent --mode=compile cc -D_REENTRANT -D_THREAD_SAFE -pipe -ggdb -O2 -march=pentium2 -DNEON_ZLIB -DNEON_SSL -I./subversion/include -I./subversion -I/usr/local/include/neon -I/usr/local/include/apache2 -I/usr/local/include/apache2 -I/usr/local/include -o subversion/libsvn_repos/node_tree.lo -c subversion/libsvn_repos/node_tree.c
/usr/local/bin/libtool15 --tag=CC --silent --mode=compile cc -D_REENTRANT -D_THREAD_SAFE -pipe -ggdb -O2 -march=pentium2 -DNEON_ZLIB -DNEON_SSL -I./subversion/include -I./subversion -I/usr/local/include/neon -I/usr/local/include/apache2 -I/usr/local/include/apache2 -I/usr/local/include -o subversion/libsvn_repos/replay.lo -c subversion/libsvn_repos/replay.c
/usr/local/bin/libtool15 --tag=CC --silent --mode=compile cc -D_REENTRANT -D_THREAD_SAFE -pipe -ggdb -O2 -march=pentium2 -DNEON_ZLIB -DNEON_SSL -I./subversion/include -I./subversion -I/usr/local/include/neon -I/usr/local/include/apache2 -I/usr/local/include/apache2 -I/usr/local/include -o subversion/libsvn_repos/reporter.lo -c subversion/libsvn_repos/reporter.c
/usr/local/bin/libtool15 --tag=CC --silent --mode=compile cc -D_REENTRANT -D_THREAD_SAFE -pipe -ggdb -O2 -march=pentium2 -DNEON_ZLIB -DNEON_SSL -I./subversion/include -I./subversion -I/usr/local/include/neon -I/usr/local/include/apache2 -I/usr/local/include/apache2 -I/usr/local/include -o subversion/libsvn_repos/repos.lo -c subversion/libsvn_repos/repos.c
/usr/local/bin/libtool15 --tag=CC --silent --mode=compile cc -D_REENTRANT -D_THREAD_SAFE -pipe -ggdb -O2 -march=pentium2 -DNEON_ZLIB -DNEON_SSL -I./subversion/include -I./subversion -I/usr/local/include/neon -I/usr/local/include/apache2 -I/usr/local/include/apache2 -I/usr/local/include -o subversion/libsvn_repos/rev_hunt.lo -c subversion/libsvn_repos/rev_hunt.c
cd subversion/libsvn_repos && /usr/local/bin/libtool15 --tag=CC --silent --mode=link cc -pipe -ggdb -O2 -march=pentium2 -DNEON_ZLIB -DNEON_SSL -L/usr/local/lib -L/usr/local/lib/db43 -rpath /usr/local/lib -o libsvn_repos-1.la commit.lo delta.lo dump.lo fs-wrap.lo hooks.lo load.lo log.lo node_tree.lo replay.lo reporter.lo repos.lo rev_hunt.lo ../../subversion/libsvn_fs/libsvn_fs-1.la ../../subversion/libsvn_delta/libsvn_delta-1.la ../../subversion/libsvn_subr/libsvn_subr-1.la -L/usr/local/lib/apache2 -laprutil-0 -lldap -llber -ldb-4.3 -lexpat -liconv -L/usr/local/lib/apache2 -lapr-0 -lm -lcrypt -lpthread -lintl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Received on Tue Jun 21 16:49:27 2005

This is an archived mail posted to the Subversion Dev mailing list.