You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Lev Serebryakov <le...@FreeBSD.org> on 2013/06/21 20:08:44 UTC

sunversion 1.8.0 crash on FreeBSD when WC path is symlink (regression)

Hello, Users.

  Here is way to crash subversion 1.8.0 release on FreeBSD -- try to
update WC which is symlink to real WC. It worked in 1.7.x. Repository
and access scheme and repo's content doesn't matter, "serf" repo is
used for illustration, but it crashes with any repo and any scheme
(https, svn, etc).

=======================================================================
# svn --version
svn, version 1.8.0 (r1490375)
   compiled Jun 21 2013, 21:51:41 on amd64-portbld-freebsd9.1

Copyright (C) 2013 The Apache Software Foundation.
This software consists of contributions made by many people;
see the NOTICE file for more information.
Subversion is open source software, see http://subversion.apache.org/

The following repository access (RA) modules are available:

* ra_svn : Module for accessing a repository using the svn network protocol.
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme
* ra_serf : Module for accessing a repository via WebDAV protocol using serf.
  - handles 'http' scheme
  - handles 'https' scheme
# ls -la
total 8
drwxr-xr-x   2 lev  lev   512 21 июн 21:59 .
drwxr-xr-x  33 lev  lev  2048 21 июн 21:49 ..
# mkdir wc
# svn co -q http://serf.googlecode.com/svn wc/
# svn up wc/
Updating 'wc':
At revision 1938.
# ln -s wc wc-symlink
# ls -la
total 12
drwxr-xr-x   3 lev  lev   512 21 июн 22:00 .
drwxr-xr-x  33 lev  lev  2048 21 июн 21:49 ..
drwxr-xr-x   7 lev  lev   512 21 июн 21:59 wc
lrwxr-xr-x   1 lev  lev     2 21 июн 22:00 wc-symlink -> wc
# svn up wc-symlink/
Updating 'wc-symlink':
Segmentation fault (core dumped)
# gdb `which svn` svn.core
>> SKIP startup gdb output
(gdb) bt
#0  0x0000000800b6005c in insert_base_node (pibb=0x7fffffffbeb0, wcroot=0x8048c7ab0, local_relpath=0x0, scratch_pool=0x804ae5028)
    at subversion/libsvn_wc/wc_db.c:666
#1  0x0000000800b63c89 in svn_wc__db_base_add_directory (db=0x8048bf530, local_abspath=0x8048786f8 "/usr/home/lev/test/wc-symlink",
    wri_abspath=0x80489a218 "/usr/home/lev/test/wc", repos_relpath=0x804ae5158 "", repos_root_url=0x80489f0d8 "http://serf.googlecode.com/svn",
    repos_uuid=0x80489f0f8 "61a7d7f5-40b7-0310-9c16-bb0ea8cb1845", revision=1938, props=0x804ae55e0, changed_rev=1938, changed_date=1371123107641582,
    changed_author=0x804ae56b0 "lieven.govaerts@gmail.com", children=0x0, depth=svn_depth_infinity, dav_cache=0x804ae32f0, conflict=0x0,
    update_actual_props=0, new_actual_props=0x0, new_iprops=0x0, work_items=0x0, scratch_pool=0x804ae5028) at subversion/libsvn_wc/wc_db.c:1704
#2  0x0000000800b50f36 in close_directory (dir_baton=0x804ae50a0, pool=0x804ae3028) at subversion/libsvn_wc/update_editor.c:2878
#3  0x000000080290e8f4 in close_directory (dir_baton=0x804ae30a0, pool=0x804ae3028) at subversion/libsvn_delta/cancel.c:261
#4  0x0000000801ed8114 in close_dir (dir=0x804add0c8) at subversion/libsvn_ra_serf/update.c:806
#5  0x0000000801ed94c5 in maybe_close_dir_chain (dir=0x804add0c8) at subversion/libsvn_ra_serf/update.c:1394
#6  0x0000000801edbc7c in end_report (parser=0x80489fb48, name={namespace = 0x804ad90c0 "svn:", name = 0x804cc64e2 "open-directory"},
    scratch_pool=0x804adb028) at subversion/libsvn_ra_serf/update.c:2237
#7  0x0000000801ee110c in end_xml (userData=0x80489fb48, raw_name=0x804cc64e0 "S:open-directory") at subversion/libsvn_ra_serf/util.c:1314
#8  0x00000008036b41c1 in doContent () from /usr/local/lib/libexpat.so.6
#9  0x00000008036b4f64 in contentProcessor () from /usr/local/lib/libexpat.so.6
#10 0x00000008036b5bc3 in doProlog () from /usr/local/lib/libexpat.so.6
#11 0x00000008036b70db in prologProcessor () from /usr/local/lib/libexpat.so.6
#12 0x00000008036ae0f1 in XML_ParseBuffer () from /usr/local/lib/libexpat.so.6
#13 0x0000000801ee13c4 in inject_to_parser (ctx=0x80489fb48,
    data=0x8048960f6 "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<S:update-report xmlns:S=\"svn:\" xmlns:V=\"http://subversion.tigris.org/xmlns/dav/\" xmlns:D=\"DAV:\" send-all=\"true\">\n<S:target-revision rev=\"1938\"/>\n<S:open-directo"..., len=648, sl=0x7fffffffc8e0) at subversion/libsvn_ra_serf/util.c:1395
#14 0x0000000801ee1d6a in svn_ra_serf__handle_xml_parser (request=0x804892038, response=0x804acf6b8, baton=0x80489fb48, pool=0x804ad3028)
    at subversion/libsvn_ra_serf/util.c:1681
#15 0x0000000801ee29a9 in handle_response (request=0x804892038, response=0x804acf6b8, handler=0x80489faa8, serf_status=0x7fffffffca34,
    scratch_pool=0x804ad3028) at subversion/libsvn_ra_serf/util.c:2058
#16 0x0000000801ee2a9c in handle_response_cb (request=0x804892038, response=0x804acf6b8, baton=0x80489faa8, scratch_pool=0x804ad3028)
    at subversion/libsvn_ra_serf/util.c:2091
#17 0x00000008021047bc in serf__process_connection (conn=0x804a74028, events=<value optimized out>) at outgoing.c:865
#18 0x00000008020fc375 in serf_event_trigger (s=<value optimized out>, serf_baton=<value optimized out>, desc=<value optimized out>) at context.c:239
#19 0x00000008020fc54f in serf_context_run (ctx=0x80488a0a0, duration=<value optimized out>, pool=<value optimized out>) at context.c:307
#20 0x0000000801edd639 in finish_report (report_baton=0x80489f610, pool=0x804878028) at subversion/libsvn_ra_serf/update.c:2850
#21 0x0000000800afaf2b in svn_wc_crawl_revisions5 (wc_ctx=0x8048bf518, local_abspath=0x804878170 "/usr/home/lev/test/wc-symlink", reporter=0x8020f1620,
    report_baton=0x80489f610, restore_files=1, depth=svn_depth_unknown, honor_depth_exclude=1, depth_compatibility_trick=0, use_commit_times=0,
    cancel_func=0x424800 <svn_cl__check_cancel>, cancel_baton=0x0, notify_func=0x41c9c0 <svn_cl__check_externals_failed_notify_wrapper>,
    notify_baton=0x7fffffffd440, scratch_pool=0x804878028) at subversion/libsvn_wc/adm_crawler.c:845
#22 0x00000008008d2105 in update_internal (result_rev=0x7fffffffd3a0, conflicted_paths=0x804878190,
    local_abspath=0x804878170 "/usr/home/lev/test/wc-symlink", anchor_abspath=0x8048786f8 "/usr/home/lev/test/wc-symlink", revision=0x7fffffffd2a0,
    depth=svn_depth_unknown, depth_is_sticky=0, ignore_externals=0, allow_unver_obstructions=0, adds_as_modification=1, timestamp_sleep=0x7fffffffd3a8,
    notify_summary=1, ctx=0x8048bf460, pool=0x804878028) at subversion/libsvn_client/update.c:459
#23 0x00000008008d26cd in svn_client__update_internal (result_rev=0x7fffffffd3a0, local_abspath=0x804878170 "/usr/home/lev/test/wc-symlink",
    revision=0x7fffffffd648, depth=svn_depth_unknown, depth_is_sticky=0, ignore_externals=0, allow_unver_obstructions=0, adds_as_modification=1,
    make_parents=0, innerupdate=0, timestamp_sleep=0x7fffffffd3a8, ctx=0x8048bf460, pool=0x804878028) at subversion/libsvn_client/update.c:595
#24 0x00000008008d2920 in svn_client_update4 (result_revs=0x7fffffffd438, paths=0x8048c0280, revision=0x7fffffffd648, depth=svn_depth_unknown,
    depth_is_sticky=0, ignore_externals=0, allow_unver_obstructions=0, adds_as_modification=1, make_parents=0, ctx=0x8048bf460, pool=0x80486a028)
    at subversion/libsvn_client/update.c:667
#25 0x000000000042868b in svn_cl__update (os=0x80486a520, baton=0x7fffffffd620, scratch_pool=0x80486a028) at subversion/svn/update-cmd.c:166
#26 0x000000000042768f in sub_main (argc=3, argv=0x7fffffffda70, pool=0x80486a028) at subversion/svn/svn.c:2866
#27 0x0000000000427968 in main (argc=3, argv=0x7fffffffda70) at subversion/svn/svn.c:2957
(gdb)
=======================================================================

-- 
// Black Lion AKA Lev Serebryakov <le...@FreeBSD.org>


Re: sunversion 1.8.0 crash on FreeBSD when WC path is symlink (regression) (not a FreeBSD specific!)

Posted by Victor Snezhko <vi...@gmail.com>.
Stefan Sperling <stsp <at> apache.org> writes:



> Fix committed: http://svn.apache.org/r1496007

> I'll nominate this fix for backport to 1.8.1.

> 

> Thanks for your report!



Thanks!



For the record, on Windows that new wcroot abspath behaviour caused the 
following error in the described case: svn: E200007: Symbolic links are not 
supported on this platform.



--

Victor Snezhko










Re: sunversion 1.8.0 crash on FreeBSD when WC path is symlink (regression) (not a FreeBSD specific!)

Posted by Stefan Sperling <st...@apache.org>.
On Sun, Jun 23, 2013 at 02:46:29PM +0200, Stefan Sperling wrote:
> On Sun, Jun 23, 2013 at 04:28:25PM +0400, Lev Serebryakov wrote:
> > Hello, Lev.
> > You wrote 21 июня 2013 г., 22:08:44:
> > 
> > LS>   Here is way to crash subversion 1.8.0 release on FreeBSD -- try to
> > LS> update WC which is symlink to real WC. It worked in 1.7.x. Repository
> > LS> and access scheme and repo's content doesn't matter, "serf" repo is
> > LS> used for illustration, but it crashes with any repo and any scheme
> > LS> (https, svn, etc).
> >  Problem is not FreeBSD-specific, here is output on CentOS 6 x86_64
> 
> I can reproduce this on OpenBSD, too.
> 
> Can you please file an issue?

Fix committed: http://svn.apache.org/r1496007
I'll nominate this fix for backport to 1.8.1.

Thanks for your report!

Re: sunversion 1.8.0 crash on FreeBSD when WC path is symlink (regression) (not a FreeBSD specific!)

Posted by Stefan Sperling <st...@apache.org>.
On Sun, Jun 23, 2013 at 04:28:25PM +0400, Lev Serebryakov wrote:
> Hello, Lev.
> You wrote 21 июня 2013 г., 22:08:44:
> 
> LS>   Here is way to crash subversion 1.8.0 release on FreeBSD -- try to
> LS> update WC which is symlink to real WC. It worked in 1.7.x. Repository
> LS> and access scheme and repo's content doesn't matter, "serf" repo is
> LS> used for illustration, but it crashes with any repo and any scheme
> LS> (https, svn, etc).
>  Problem is not FreeBSD-specific, here is output on CentOS 6 x86_64

I can reproduce this on OpenBSD, too.

Can you please file an issue?
See http://subversion.apache.org/reporting-issues.html

Thanks!

Re: sunversion 1.8.0 crash on FreeBSD when WC path is symlink (regression) (not a FreeBSD specific!)

Posted by Lev Serebryakov <le...@FreeBSD.org>.
Hello, Lev.
You wrote 21 июня 2013 г., 22:08:44:

LS>   Here is way to crash subversion 1.8.0 release on FreeBSD -- try to
LS> update WC which is symlink to real WC. It worked in 1.7.x. Repository
LS> and access scheme and repo's content doesn't matter, "serf" repo is
LS> used for illustration, but it crashes with any repo and any scheme
LS> (https, svn, etc).
 Problem is not FreeBSD-specific, here is output on CentOS 6 x86_64

[root@centos6 tmp]# llh | grep svn
[root@centos6 tmp]# mkdir svn
[root@centos6 tmp]# svn co -q svn://svn.freebsd.org/base/releng/9.1/ svn/
[root@centos6 tmp]# svn up svn/
Updating 'svn':
At revision 252113.
[root@centos6 tmp]# ln -s svn svn2
[root@centos6 tmp]# llh | grep svn
drwxr-xr-x 23 root root 4,0K Июн 23 14:54 svn
lrwxrwxrwx 1 root root 3 Июн 23 14:56 svn2 -> svn
[root@centos6 tmp]# svn up svn2/
Updating 'svn2':
Ошибка сегментирования (core dumped)
[root@centos6 tmp]# uname -a
Linux centos6.local 2.6.32-358.11.1.el6.centos.plus.x86_64 #1 SMP Wed
Jun 12 19:12:17 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
[root@centos6 tmp]# gdb
GNU gdb (GDB) Red Hat Enterprise Linux (7.2-60.el6_4.1)
Copyright (C) 2010 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 "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
(gdb) core core.8284
Missing separate debuginfo for the main executable file
Try: yum --disablerepo='*' --enablerepo='*-debug*' install
/usr/lib/debug/.build-id/09/cc47f079f7a61aa6453cf81ccf093da013bd2d
[New Thread 8284]
Core was generated by `svn up svn2/'.
Program terminated with signal 11, Segmentation fault.
#0 0x00007f6110bd67b0 in ?? ()
(gdb) bt
#0 0x00007f6110bd67b0 in ?? ()
#1 0x0000000000000000 in ?? ()



-- 
// Black Lion AKA Lev Serebryakov <le...@FreeBSD.org>