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

Segmentation fault in Serf during merge_tests.py 61 ("merge fails if subtree is deleted on src")

From: Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA_at_GMail.Com>
Date: Sun, 14 Dec 2008 01:57:07 +0100

Serf segfaults during Subversion's test merge_tests.py 61 ("merge fails if subtree is deleted on src").
I use Subversion trunk r34706 and Serf trunk r1203.

GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
(gdb) b calculate_remaining_ranges
Function "calculate_remaining_ranges" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (calculate_remaining_ranges) pending.
(gdb) r
Starting program: /usr/bin/svn merge -r1:5 --force http://localhost/svn-test-work/repositories/merge_tests-61/A svn-test-work/working_copies/merge_tests-61/A_copy --config-dir /home/Arfrever/subversion_trunk/subversion/tests/cmdline/svn-test-work/local_tmp/config --password rayjandom --no-auth-cache --username jrandom
[Thread debugging using libthread_db enabled]
[New Thread 0xb7c80700 (LWP 30485)]
[Switching to Thread 0xb7c80700 (LWP 30485)]

Breakpoint 1, calculate_remaining_ranges (parent=0x0, child=0x992d2b0, source_root_url=0x9894838 "http://localhost/svn-test-work/repositories/merge_tests-61",
    url1=0x98f9a68 "http://localhost/svn-test-work/repositories/merge_tests-61/A", revision1=1, url2=0x98f9b00 "http://localhost/svn-test-work/repositories/merge_tests-61/A", revision2=5,
    target_mergeinfo=0x0, implicit_mergeinfo=0x9951008, is_subtree=0, ra_session=0x98c4158, entry=0x9887ec0, ctx=0x98795b8, pool=0x98932d0) at subversion/libsvn_client/merge.c:2867
2867 const char *primary_url = (revision1 < revision2) ? url2 : url1;
(gdb) cont
Continuing.

Breakpoint 1, calculate_remaining_ranges (parent=0x992d2b0, child=0x992d320, source_root_url=0x9894838 "http://localhost/svn-test-work/repositories/merge_tests-61",
    url1=0x98f9a70 "http://localhost/svn-test-work/repositories/merge_tests-61/A/D/gamma", revision1=1, url2=0x98f9b18 "http://localhost/svn-test-work/repositories/merge_tests-61/A/D/gamma", revision2=5,
    target_mergeinfo=0x9965180, implicit_mergeinfo=0x998c518, is_subtree=1, ra_session=0x98c4158, entry=0x989ba78, ctx=0x98795b8, pool=0x98932d0) at subversion/libsvn_client/merge.c:2867
2867 const char *primary_url = (revision1 < revision2) ? url2 : url1;
(gdb) b serf_linebuf_fetch
Breakpoint 2 at 0x438dd60c: file buckets/buckets.c, line 420.
(gdb) cont
Continuing.

Breakpoint 2, serf_linebuf_fetch (linebuf=0x9998058, bucket=0x99967c0, acceptable=7) at buckets/buckets.c:420
420 buckets/buckets.c: No such file or directory.
        in buckets/buckets.c
(gdb)
Continuing.

Breakpoint 2, serf_linebuf_fetch (linebuf=0x9998058, bucket=0x99967c0, acceptable=7) at buckets/buckets.c:420
420 in buckets/buckets.c
(gdb)
Continuing.

Breakpoint 2, serf_linebuf_fetch (linebuf=0x9998058, bucket=0x99967c0, acceptable=7) at buckets/buckets.c:420
420 in buckets/buckets.c
(gdb)
Continuing.

Breakpoint 2, serf_linebuf_fetch (linebuf=0x9998058, bucket=0x99967c0, acceptable=7) at buckets/buckets.c:420
420 in buckets/buckets.c
(gdb)
Continuing.

Breakpoint 2, serf_linebuf_fetch (linebuf=0x9998058, bucket=0x99967c0, acceptable=7) at buckets/buckets.c:420
420 in buckets/buckets.c
(gdb)
Continuing.

Breakpoint 2, serf_linebuf_fetch (linebuf=0x9998058, bucket=0x99967c0, acceptable=7) at buckets/buckets.c:420
420 in buckets/buckets.c
(gdb)
Continuing.

Breakpoint 2, serf_linebuf_fetch (linebuf=0x99a4080, bucket=0x9996640, acceptable=2) at buckets/buckets.c:420
420 in buckets/buckets.c
(gdb)
Continuing.

Breakpoint 2, serf_linebuf_fetch (linebuf=0x99a4080, bucket=0x9996640, acceptable=2) at buckets/buckets.c:420
420 in buckets/buckets.c
(gdb)
Continuing.

Breakpoint 2, serf_linebuf_fetch (linebuf=0x9998058, bucket=0x99967c0, acceptable=7) at buckets/buckets.c:420
420 in buckets/buckets.c
(gdb) b 512
Breakpoint 3 at 0x438dd78c: file buckets/buckets.c, line 512.
(gdb) cont
Continuing.

Breakpoint 3, serf_linebuf_fetch (linebuf=0x9998058, bucket=0x99967c0, acceptable=7) at buckets/buckets.c:512
512 in buckets/buckets.c
(gdb) p *linebuf
$1 = {state = SERF_LINEBUF_READY, used = 0,
  line = "Content-Type: text/xml; charset=\"utf-8\"", '\0' <repeats 61 times>, "@\200\231\t K\216CH\200\231\t��\226\t", '\0' <repeats 112 times>, "�\200\231\t�\200\231\t8_\231\t", '\0' <repeats 116 times>, "@\204\231\t\000\000\000\0005�׷", '\0' <repeats 12 times>, "����", '\0' <repeats 100 times>, "�\201\231\t K\216C�\201\231\t��\226\t", '\0' <repeats 112 times>, "@\202\231\tH\202\231\tH\201\231\t", '\0' <repeats 116 times>, "�\205\231\t\000\000\000\000��׷", '\0' <repeats 12 times>...}
(gdb) p *bucket
$2 = {type = 0x438e4de0, data = 0x99962c0, allocator = 0x98e69c8}
(gdb) p *bucket.type
$3 = {name = 0x438e3216 "BARRIER", read = 0x438e2996 <serf_barrier_read>, readline = 0x438e29d0 <serf_barrier_readline>, read_iovec = 0x438dce07 <serf_default_read_iovec>,
  read_for_sendfile = 0x438dce66 <serf_default_read_for_sendfile>, read_bucket = 0x438dcec0 <serf_default_read_bucket>, peek = 0x438e2a11 <serf_barrier_peek>, destroy = 0x438e2a44 <serf_barrier_destroy>,
  snapshot = 0x438dcf32 <serf_default_snapshot>, restore_snapshot = 0x438dcf3c <serf_default_restore_snapshot>, is_snapshot_set = 0x438dcf46 <serf_default_is_snapshot_set>}
(gdb) p *bucket.data
Attempt to dereference a generic pointer.
(gdb) p *bucket.allocator
$4 = {pool = 0x98e6988, allocator = 0x98780f0, unfreed = 0, unfreed_baton = 0x0, num_alloc = 25, freelist = 0x9996038, blocks = 0x9996020, track = 0x0}
(gdb) p data
$5 = 0xbfda1034 "?!\231\t"
(gdb) p len
$6 = 4294967295
(gdb) cont
Continuing.

Program received signal SIGSEGV, Segmentation fault.
0x4373b1b6 in memcpy () from /lib/libc.so.6
(gdb) bt
#0 0x4373b1b6 in memcpy () from /lib/libc.so.6
#1 0x0989ba78 in ?? ()
#2 0x438dd7b1 in serf_linebuf_fetch (linebuf=0x9998058, bucket=0x99967c0, acceptable=7) at buckets/buckets.c:512
#3 0x438de438 in fetch_line (ctx=0x9998048, acceptable=7) at buckets/response_buckets.c:99
#4 0x438de578 in fetch_headers (bkt=0x9996a40, ctx=0x9998048) at buckets/response_buckets.c:140
#5 0x438de9d3 in run_machine (bkt=0x9996a40, ctx=0x9998048) at buckets/response_buckets.c:277
#6 0x438dea56 in wait_for_body (bkt=0x9996a40, ctx=0x9998048) at buckets/response_buckets.c:303
#7 0x438deb5a in serf_response_read (bucket=0x9996a40, requested=8000, data=0xbfda1034, len=0xbfda1030) at buckets/response_buckets.c:362
#8 0xb7d784ea in svn_ra_serf__handle_xml_parser (request=0x98e4a08, response=0x9996a40, baton=0x9972758, pool=0x9994030) at subversion/libsvn_ra_serf/util.c:1050
#9 0xb7d78b21 in handle_response (request=0x98e4a08, response=0x9996a40, baton=0x9972710, pool=0x9994030) at subversion/libsvn_ra_serf/util.c:1275
#10 0x438dbfec in read_from_connection (conn=0x98f49c0) at context.c:835
#11 0x438dc1b6 in process_connection (conn=0x98f49c0, events=1) at context.c:944
#12 0x438dc595 in serf_event_trigger (s=0x98e2a50, serf_baton=0x98f49c0, desc=0x98e2b90) at context.c:1100
#13 0x438dc64c in serf_context_run (ctx=0x98e2a50, duration=2000000000, pool=0x9971fc0) at context.c:1133
#14 0xb7d7782d in svn_ra_serf__context_run_wait (done=0x99720b0, sess=0x98c4168, pool=0x9971fc0) at subversion/libsvn_ra_serf/util.c:572
#15 0xb7d6605c in svn_ra_serf__get_location_segments (ra_session=0x98c4158, path=0x9972048 "D/gamma", peg_revision=5, start_rev=5, end_rev=1, receiver=0xb7f943a6 <gls_receiver>, receiver_baton=0xbfda12a0,
    pool=0x9971fc0) at subversion/libsvn_ra_serf/getlocationsegments.c:205
#16 0xb7f0736c in svn_ra_get_location_segments (session=0x98c4158, path=0x9972048 "D/gamma", peg_revision=5, start_rev=5, end_rev=1, receiver=0xb7f943a6 <gls_receiver>, receiver_baton=0xbfda12a0,
    pool=0x9971fc0) at subversion/libsvn_ra/ra_loader.c:861
#17 0xb7f94509 in svn_client__repos_location_segments (segments=0xbfda1308, ra_session=0x98c4158, path=0x9972048 "D/gamma", peg_revision=5, start_revision=5, end_revision=1, ctx=0x98795b8, pool=0x9971fc0)
    at subversion/libsvn_client/ra.c:565
#18 0xb7f83b9e in adjust_deleted_subtree_ranges (child=0x992d320, parent=0x992d2b0, mergeinfo_path=0x998c6a0 "/A/D/gamma", revision1=1, revision2=5,
    primary_url=0x98f9b18 "http://localhost/svn-test-work/repositories/merge_tests-61/A/D/gamma", ra_session=0x98c4158, ctx=0x98795b8, pool=0x98932d0) at subversion/libsvn_client/merge.c:2475
#19 0xb7f844a6 in calculate_remaining_ranges (parent=0x992d2b0, child=0x992d320, source_root_url=0x9894838 "http://localhost/svn-test-work/repositories/merge_tests-61",
    url1=0x98f9a70 "http://localhost/svn-test-work/repositories/merge_tests-61/A/D/gamma", revision1=1, url2=0x98f9b18 "http://localhost/svn-test-work/repositories/merge_tests-61/A/D/gamma", revision2=5,
    target_mergeinfo=0x9965180, implicit_mergeinfo=0x998c518, is_subtree=1, ra_session=0x98c4158, entry=0x989ba78, ctx=0x98795b8, pool=0x98932d0) at subversion/libsvn_client/merge.c:2899
#20 0xb7f84e86 in populate_remaining_ranges (children_with_mergeinfo=0x9894110, source_root_url=0x9894838 "http://localhost/svn-test-work/repositories/merge_tests-61",
    url1=0x98c3bc8 "http://localhost/svn-test-work/repositories/merge_tests-61/A", revision1=1, url2=0x98c3c68 "http://localhost/svn-test-work/repositories/merge_tests-61/A", revision2=5, inheritable=1,
    honor_mergeinfo=1, ra_session=0x98c4158, parent_merge_src_canon_path=0x9894898 "/A", adm_access=0x9887df8, merge_b=0xbfda175c) at subversion/libsvn_client/merge.c:3234
#21 0xb7f898ca in do_directory_merge (url1=0x98c3bc8 "http://localhost/svn-test-work/repositories/merge_tests-61/A", revision1=1,
    url2=0x98c3c68 "http://localhost/svn-test-work/repositories/merge_tests-61/A", revision2=5, target_entry=0x9887ec0, adm_access=0x9887df8, depth=svn_depth_infinity, notify_b=0xbfda172c,
    merge_b=0xbfda175c, pool=0x98932d0) at subversion/libsvn_client/merge.c:5948
#22 0xb7f8ae77 in do_merge (merge_sources=0x98b5af0, target=0x988c1b8 "svn-test-work/working_copies/merge_tests-61/A_copy", target_entry=0x9887ec0, adm_access=0x9887df8, sources_ancestral=1,
    sources_related=1, same_repos=1, ignore_ancestry=0, force=1, dry_run=0, record_only=0, depth=svn_depth_infinity, merge_options=0x0, use_sleep=0xbfda185c, ctx=0x98795b8, pool=0x9878178)
    at subversion/libsvn_client/merge.c:6625
#23 0xb7f8defc in svn_client_merge_peg3 (source=0x988c010 "http://localhost/svn-test-work/repositories/merge_tests-61/A", ranges_to_merge=0x9878300, peg_revision=0xbfda1928,
    target_wcpath=0x988c1b8 "svn-test-work/working_copies/merge_tests-61/A_copy", depth=svn_depth_unknown, ignore_ancestry=0, force=1, record_only=0, dry_run=0, merge_options=0x0, ctx=0x98795b8,
    pool=0x9878178) at subversion/libsvn_client/merge.c:7947
#24 0x0805768a in svn_cl__merge (os=0x9878320, baton=0xbfda1a90, pool=0x9878178) at subversion/svn/merge-cmd.c:307
#25 0x08056c40 in main (argc=13, argv=0xbfda1cb4) at subversion/svn/main.c:2021
(gdb)

-- 
Arfrever Frehtes Taifersar Arahesis
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=983930
Received on 2008-12-14 02:03:23 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.