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

Crash in translated_stream_read

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2005-12-09 15:09:27 CET

As of a few days ago, I'm getting seg. faults when trying to "svn update" my
Subversion WC. They occur at various places in the tree, and can also occur
during "svn cleanup".

I'm running r17559 of Subversion trunk, as near as I can tell. The commits
since then don't look relevant.

Here's an example ("gdb-svn up" just runs "svn up" in GDB):

~/src/subversion/doc/tools/dtd/docbook41> svn cleanup; rm *; gdb-svn up
rm: cannot remove `ent': Is a directory
GNU gdb 6.3
[...]
Restored 'soextblx.dtd'
Restored 'docbookx.dtd'
Restored 'dbhierx.mod'
A dbpoolx.mod
A dbcentx.mod
A calstblx.dtd
A docbook.cat
A dbnotnx.mod
A dbgenent.ent

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1079584672 (LWP 1986)]
0x404dd58c in memcpy () from /lib/tls/libc.so.6

(gdb) up
#1 0x40134635 in translated_stream_read (baton=0x8138c80, buffer=0x80f3bf8 "",
len=0xbff3cb3c)
     at /home/julianfoad/src/subversion/subversion/libsvn_subr/subst.c:1068
warning: Source file is more recent than executable.
[but I've got what I think is the matching version of the source file]

1068 memcpy (buffer + off, b->readbuf->data + b->readbuf_off, to_copy);

(gdb) p to_copy
$1 = 100927

(gdb) bt
#0 0x404dd58c in memcpy () from /lib/tls/libc.so.6
#1 0x40134635 in translated_stream_read (baton=0x8138c80,
     buffer=0x80f3bf8 "", len=0xbff3cb3c)
     at /home/julianfoad/src/subversion/subversion/libsvn_subr/subst.c:1068
#2 0x40132315 in svn_stream_read (stream=0x8138ca0, buffer=0x80f3bf8 "",
     len=0xbff3cb3c)
     at /home/julianfoad/src/subversion/subversion/libsvn_subr/stream.c:98
#3 0x401325cf in svn_stream_copy (from=0x8138ca0, to=0x8138c70,
     pool=0x80cfec0)
     at /home/julianfoad/src/subversion/subversion/libsvn_subr/stream.c:220
#4 0x401353c4 in svn_subst_copy_and_translate3 (
     src=0x80cfef8 ".svn/tmp/text-base/dbpoolx.mod.svn-base",
     dst=0x80ccf38 ".svn/tmp/dbpoolx.mod.tmp", eol_str=0x40141f93 "\n",
     repair=0, keywords=0x0, expand=1, special=0, pool=0x80cfec0)
     at /home/julianfoad/src/subversion/subversion/libsvn_subr/subst.c:1513
#5 0x40060edf in svn_wc_translated_file2 (xlated_path=0xbff3cc34,
     src=0x80cfef8 ".svn/tmp/text-base/dbpoolx.mod.svn-base",
     versioned_file=0x80cff20 "dbpoolx.mod", adm_access=0x80b4c20, flags=8,
     pool=0x80cfec0)
     at /home/julianfoad/src/subversion/subversion/libsvn_wc/translate.c:94
#6 0x400542ca in file_xfer_under_path (adm_access=0x80b4c20,
     name=0x8143545 ".svn/tmp/text-base/dbpoolx.mod.svn-base",
     dest=0x8143539 "dbpoolx.mod", action=svn_wc__xfer_cp_and_translate,
     special_only=0, rerun=0, pool=0x80cfec0)
     at /home/julianfoad/src/subversion/subversion/libsvn_wc/log.c:248
#7 0x40054a62 in log_do_file_xfer (loggy=0x80ca440,
     name=0x8143545 ".svn/tmp/text-base/dbpoolx.mod.svn-base",
     action=svn_wc__xfer_cp_and_translate, atts=0x8142108)
     at /home/julianfoad/src/subversion/subversion/libsvn_wc/log.c:510
#8 0x40056c38 in start_handler (userData=0x80ca440,
     eltname=0x8143528 "cp-and-translate", atts=0x8142108)
     at /home/julianfoad/src/subversion/subversion/libsvn_wc/log.c:1458
#9 0x4013a429 in expat_start_handler (userData=0x80cdef0,
     name=0x8143528 "cp-and-translate", atts=0x8142108)
     at /home/julianfoad/src/subversion/subversion/libsvn_subr/xml.c:311
#10 0x40266288 in XML_Parse () from /usr/lib/libexpat.so.0
#11 0x4026715e in XML_Parse () from /usr/lib/libexpat.so.0
#12 0x4025f97c in XML_ParseBuffer () from /usr/lib/libexpat.so.0
#13 0x40262195 in XML_Parse () from /usr/lib/libexpat.so.0
#14 0x4013a5ee in svn_xml_parse (svn_parser=0x80cdef0,
     buf=0xbff3ce80 "<mv\n dest=\".svn/props/dbpoolx.mod.svn-work\"\n nam
                       oolx.mod.svn-work\"/>\n<readonly\n
name=\".svn/props/dbpoolx.mod.svn-work\
vn/prop-base/dbpoolx.mod.svn-base\"\n "..., len=1220, is_final=0)
     at /home/julianfoad/src/subversion/subversion/libsvn_subr/xml.c:393
#15 0x4005734e in run_log (adm_access=0x80b4c20, rerun=0, diff3_cmd=0x0,
     pool=0x80c9ea8)
     at /home/julianfoad/src/subversion/subversion/libsvn_wc/log.c:1636
#16 0x400575e7 in svn_wc__run_log (adm_access=0x80b4c20, diff3_cmd=0x0,
     pool=0x80c9ea8)
     at /home/julianfoad/src/subversion/subversion/libsvn_wc/log.c:1698
#17 0x400631ef in close_directory (dir_baton=0x80c7ee0, pool=0x80c7ea0)
     at /home/julianfoad/src/subversion/subversion/libsvn_wc/update_editor.c:
#18 0x4010fe91 in close_directory (dir_baton=0x80c7ed8, pool=0x80c7ea0)
     at /home/julianfoad/src/subversion/subversion/libsvn_delta/cancel.c:266
#19 0x40100223 in end_element (userdata=0x80b7698, state=238,
     nspace=0x80bf738 "svn:", elt_name=0x80bf800 "open-directory")
     at /home/julianfoad/src/subversion/subversion/libsvn_ra_dav/fetch.c:2627
#20 0x402f4613 in end_element ()
    from /home/julianfoad/build/subversion/neon/src/.libs/libneon.so.24
#21 0x4032b621 in xmlSkipBlankChars () from /usr/lib/libxml2.so.2
#22 0x40337711 in xmlParseChunk () from /usr/lib/libxml2.so.2
#23 0x402f469f in ne_xml_parse ()
    from /home/julianfoad/build/subversion/neon/src/.libs/libneon.so.24
#24 0x402f4763 in ne_xml_parse_v ()
    from /home/julianfoad/build/subversion/neon/src/.libs/libneon.so.24
#25 0x402f3638 in do_inflate ()
    from /home/julianfoad/build/subversion/neon/src/.libs/libneon.so.24
#26 0x402eb15c in ne_read_response_block ()
    from /home/julianfoad/build/subversion/neon/src/.libs/libneon.so.24
#27 0x402eb33d in ne_request_dispatch ()
    from /home/julianfoad/build/subversion/neon/src/.libs/libneon.so.24
#28 0x40108fcc in parsed_request (sess=0x80c3d78,
     method=0x4010a065 "REPORT",
     url=0x811c0a8 "/repos/svn/!svn/vcc/default", body=0x0,
     body_file=0x80b77d8, set_parser=0, elements=0x0, use_neon_shim=0,
     validate_compat_cb=0, startelm_compat_cb=0, endelm_compat_cb=0,
     startelm_cb=0x400fec21 <start_element>,
     cdata_cb=0x400ffe7a <cdata_handler>,
     endelm_cb=0x400fffe8 <end_element>, baton=0x80b7698,
     extra_headers=0x0, status_code=0x0, spool_response=0, pool=0x80b4a40)
     at /home/julianfoad/src/subversion/subversion/libsvn_ra_dav/util.c:715
#29 0x401093a5 in svn_ra_dav__parsed_request (sess=0x80c3d78,
     method=0x4010a065 "REPORT",
     url=0x811c0a8 "/repos/svn/!svn/vcc/default", body=0x0,
     body_file=0x80b77d8, set_parser=0,
     startelm_cb=0x400fec21 <start_element>,
     cdata_cb=0x400ffe7a <cdata_handler>,
     endelm_cb=0x400fffe8 <end_element>, baton=0x80b7698,
     extra_headers=0x0, status_code=0x0, spool_response=0, pool=0x80b4a40)
     at /home/julianfoad/src/subversion/subversion/libsvn_ra_dav/util.c:850
#30 0x40100e83 in reporter_finish_report (report_baton=0x80b7698,
     pool=0x80b4a40)
     at /home/julianfoad/src/subversion/subversion/libsvn_ra_dav/fetch.c:2977
#31 0x40044e68 in svn_wc_crawl_revisions2 (path=0x80b2f00 "",
     adm_access=0x80b4c20, reporter=0x4010d300, report_baton=0x80b7698,
     restore_files=1, recurse=1, use_commit_times=0,
     notify_func=0x80528f0 <notify>, notify_baton=0x80b2f08,
     traversal_info=0x80b4a78, pool=0x80b4a40)
     at /home/julianfoad/src/subversion/subversion/libsvn_wc/adm_crawler.c:588
#32 0x40039c88 in svn_client__update_internal (result_rev=0xbff3f50c,
     path=0x80b2f00 "", revision=0xbff3f650, recurse=1, ignore_externals=0,
     timestamp_sleep=0xbff3f510, ctx=0x806e790, pool=0x80b4a40)
     at /home/julianfoad/src/subversion/subversion/libsvn_client/update.c:149
#33 0x40039e6d in svn_client_update2 (result_revs=0x0, paths=0x80b2ed0,
     revision=0xbff3f650, recurse=1, ignore_externals=0, ctx=0x806e790,
     pool=0x806e230)
     at /home/julianfoad/src/subversion/subversion/libsvn_client/update.c:223
#34 0x08056556 in svn_cl__update (os=0x806e348, baton=0xbff3f628,
     pool=0x806e230)
     at /home/julianfoad/src/subversion/subversion/clients/cmdline/update-cmd.c:54
#35 0x08051e92 in main (argc=2, argv=0xbff3f7b4)
     at /home/julianfoad/src/subversion/subversion/clients/cmdline/main.c:1377

I'm investigating, would be glad if Erik would too.

This is reproducible for me.

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Dec 9 15:20:49 2005

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