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

Re: Note regarding --disable-static on trunk

From: Stefan Sperling <stsp_at_elego.de>
Date: Mon, 23 Mar 2009 16:34:03 +0000

On Mon, Mar 23, 2009 at 12:02:09PM +0000, Stefan Sperling wrote:
> Now, my svn binary suddenly is a dynamically linked one, and picks up
> APR from /usr/local/lib at runtime (this is where the APR version
> provided by the operating system's package manager is living).
> It is using tons of wrong shared libs, not the ones I want it to use
> (e.g. sqlite and neon are also wrong, it's not just APR).
 
> This seems to be the reason for crashes like this one:

Justin, I just read back in the thread and saw that you already
described a fix in English, and asked for a patch. I will [have to]
tackle to fix this as soon as I am going to do some coding on svn
again. But it would of course be much more convenient for me if the
problem was fixed before then.

Another note for clarity:

My self-compiled APR is 1.3.3.
The OS-provided one is 1.2.11.

The crashing code is #ifdef'd for 1.3.0 and upwards:

   * N.B. If we have APR 1.3+, we can unbuffer the file to let us use mmap
   * and zero-copy the PUT body. However, on older APR versions, we can't
   * check the buffer status; but serf will fall through and create a file
   * bucket for us on the buffered svndiff handle.
   */
   apr_file_flush(ctx->svndiff);
#if APR_VERSION_AT_LEAST(1, 3, 0)
   apr_file_buffer_set(ctx->svndiff, NULL, 0);
#endif

At compile time the compiler sees APR 1.3.3, but at run time
1.2.11 is loaded. Hence the crash.

Stefan

> GNU gdb 6.3
> Copyright 2004 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 "i386-unknown-openbsd4.5"...
> Core was generated by `svn'.
> Program terminated with signal 11, Segmentation fault.
> Reading symbols from /usr/lib/libpthread.so.11.1...done.
> Loaded symbols for /usr/lib/libpthread.so.11.1
> Reading symbols from /usr/local/lib/libsasl2.so.2.22...done.
> Loaded symbols for /usr/local/lib/libsasl2.so.2.22
> Reading symbols from /home/stsp/svn/prefix/serf/lib/libserf-0.so.0.0...done.
> Loaded symbols for /home/stsp/svn/prefix/serf/lib/libserf-0.so.0.0
> Reading symbols from /usr/local/lib/libaprutil-1.so.2.11...done.
> Loaded symbols for /usr/local/lib/libaprutil-1.so.2.11
> Reading symbols from /usr/local/lib/libapr-1.so.3.0...done.
> Loaded symbols for /usr/local/lib/libapr-1.so.3.0
> Reading symbols from /usr/local/lib/libsqlite3.so.13.0...done.
> Loaded symbols for /usr/local/lib/libsqlite3.so.13.0
> Reading symbols from /usr/local/lib/libdb.so.5.0...done.
> Loaded symbols for /usr/local/lib/libdb.so.5.0
> Symbols already loaded for /usr/lib/libpthread.so.11.1
> Reading symbols from /usr/local/lib/libneon.so.27.0...done.
> Loaded symbols for /usr/local/lib/libneon.so.27.0
> Reading symbols from /usr/lib/libasn1.so.16.0...done.
> Loaded symbols for /usr/lib/libasn1.so.16.0
> Reading symbols from /usr/lib/libkrb5.so.16.0...done.
> Loaded symbols for /usr/lib/libkrb5.so.16.0
> Reading symbols from /usr/lib/libgssapi.so.5.0...done.
> Loaded symbols for /usr/lib/libgssapi.so.5.0
> Reading symbols from /usr/local/lib/libiconv.so.5.0...done.
> Loaded symbols for /usr/local/lib/libiconv.so.5.0
> Reading symbols from /usr/local/lib/libintl.so.4.0...done.
> Loaded symbols for /usr/local/lib/libintl.so.4.0
> Reading symbols from /usr/lib/libssl.so.14.0...done.
> Loaded symbols for /usr/lib/libssl.so.14.0
> Reading symbols from /usr/lib/libcrypto.so.17.0...done.
> Loaded symbols for /usr/lib/libcrypto.so.17.0
> Reading symbols from /usr/lib/libz.so.4.1...done.
> Loaded symbols for /usr/lib/libz.so.4.1
> Reading symbols from /usr/lib/libexpat.so.9.0...done.
> Loaded symbols for /usr/lib/libexpat.so.9.0
> Reading symbols from /usr/lib/libc.so.50.1...done.
> Loaded symbols for /usr/lib/libc.so.50.1
> Reading symbols from /usr/libexec/ld.so...done.
> Loaded symbols for /usr/libexec/ld.so
> #0 pthread_mutex_lock (mutex=0x706d7433)
> at /usr/src/lib/libpthread/uthread/uthread_mutex.c:674
> 674 else if ((*mutex != NULL) || ((ret = init_static(mutex)) == 0))
> (gdb) bt
> #0 pthread_mutex_lock (mutex=0x706d7433)
> at /usr/src/lib/libpthread/uthread/uthread_mutex.c:674
> #1 0x1c13c945 in apr_file_buffer_set (file=0x896010b0,
> buffer=0x16 <Address 0x16 out of bounds>, bufsize=0)
> at /home/stsp/svn/src/apr-1.3.3/file_io/unix/buffer.c:34
> #2 0x1c104496 in create_put_body (baton=0x82e7fcd0, alloc=0x80dc9050,
> pool=0x80dc9018) at subversion/libsvn_ra_serf/commit.c:786
> #3 0x1c10066f in setup_request (request=0x7f8cd0a0, setup_baton=0x8641d348,
> req_bkt=0x7f8cd0ac, acceptor=0x7f8cd0b8, acceptor_baton=0x7f8cd0bc,
> handler=0x7f8cd0c0, handler_baton=0x7f8cd0c4, pool=0x80dc9018)
> at subversion/libsvn_ra_serf/util.c:1311
> #4 0x00ef0e5f in write_to_connection ()
> from /home/stsp/svn/prefix/serf/lib/libserf-0.so.0.0
> #5 0x00ef137d in process_connection ()
> from /home/stsp/svn/prefix/serf/lib/libserf-0.so.0.0
> #6 0x00ef1695 in serf_event_trigger ()
> from /home/stsp/svn/prefix/serf/lib/libserf-0.so.0.0
> #7 0x00ef1746 in serf_context_run ()
> from /home/stsp/svn/prefix/serf/lib/libserf-0.so.0.0
> #8 0x1c0ff34c in svn_ra_serf__context_run_wait (done=0x8641d398,
> sess=0x87aae8f8, pool=0x8899b018) at subversion/libsvn_ra_serf/util.c:539
> #9 0x1c10659e in close_file (file_baton=0x82e7fcd0,
> text_checksum=0x8641d320 "4a6af6406870dd13fb81047cedf462c1",
> pool=0x8899b018) at subversion/libsvn_ra_serf/commit.c:1913
> #10 0x1c04b96d in svn_wc_transmit_text_deltas2 (tempfile=0xcfbe4998,
> digest=0xcfbe49f0 "Jjö@hpÝ\023û\201\004|íôbÁ«\200(\230\030",
> path=0x81b7a150 "/home/stsp/svn/svn-trunk/www/svn_1.6_releasenotes.html",
> adm_access=0x7decb360, fulltext=0, editor=0x81274f28,
> file_baton=0x82e7fcd0, pool=0x8899b018)
> at subversion/libsvn_wc/adm_crawler.c:1013
> #11 0x1c021db9 in svn_client__do_commit (
> base_url=0x87aae6f0 "https://svn.collab.net/repos/svn/trunk/www",
> commit_items=0x81b7a0f0, adm_access=0x89338250, editor=0x81274f28,
> edit_baton=0x81274cf8,
> notify_path_prefix=0x8946a938 "/home/stsp/svn/svn-trunk",
> tempfiles=0xcfbe4ae8, checksums=0xcfbe4ae4, ctx=0x7c5c2940,
> pool=0x7c5c2018) at subversion/libsvn_client/commit_util.c:1659
> #12 0x1c01f3ac in svn_client_commit4 (commit_info_p=0xcfbe4b74,
> targets=0x82b83738, depth=svn_depth_infinity, keep_locks=0,
> keep_changelists=0, changelists=0x7c5c21f8, revprop_table=0x0,
> ctx=0x7c5c2940, pool=0x7c5c2018) at subversion/libsvn_client/commit.c:1669
> #13 0x1c008033 in svn_cl__commit (os=0x7c5c21b8, baton=0xcfbe4c60,
> pool=0x7c5c2018) at subversion/svn/commit-cmd.c:112
> #14 0x1c00fc8d in main (argc=2, argv=0xcfbe4e44) at subversion/svn/main.c:2099
Received on 2009-03-23 17:34:58 CET

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.