Re: svn segfault when using svn+ssh schema

2017-01-16 Thread Sam Edge
On 16/01/2017 20:26, Jon Turney wrote:
> On 16/01/2017 20:07, Sam Edge wrote:
>> On 09/01/2017 19:07, Sam Edge wrote:
>>> On 09/01/2017 02:04, Eliot Moss wrote:
 On 1/8/2017 3:45 PM, David Rothenberger wrote:
> On 1/8/2017 6:12 AM, Sam Edge wrote:
>> I've seen a number of 'svn segfault' threads on the mailing list
>> archive
>> but none of them seem to cover this specific failure mode.
>> (Apologies if
>> one of them does!)
>>
>> I'm getting segfaults from svn but only when using ssh as the
>> schema.
>> The following three commands are all accessing the same server, the
>> name
>> of which has been changed to protect the guilty.
>>
>> 
>> SamEdge@thor ~
>> $ ssh cmserver.XX.com
>> ( success ( 2 2 ( ) ( edit-pipeline svndiff1 absent-entries
>> commit-revprops depth log-revprops atomic-revprops partial-replay
>> inherited-props ephemeral-txnprops file-revs-reverse ) ) )
>> SamEdge@thor ~
>> $ svn ls svn+ssh://cmserver.XX.com/edl/
>> Segmentation fault (core dumped)
 Assuming this is repeatable behavior, perhaps getting a trace using
 strace would reveal some more useful information.

 Regards - Eliot Moss

>>> Good idea.
>>>
>>> Strangely, on another Windows 7 64-bit machine svn+ssh to the same
>>> server is working fine for me. The most significant differences are
>>> that
>>> the 'working' machine is running Windows 7 Pro on an Intel CPU with
>>> Sophos AV and domain accounts whereas the 'failing' machine is
>>> Windows 7
>>> Home Premium on an AMD with MS Security Essentials and local accounts.
>>> These differences may or may not be relevant of course.
>>>
>>> Anyway, attached are the two strace outputs. Diffing them suggests that
>>> it's segfaulting in the fork() "system" call.
>
> Not quite, this strace has...
>
>> --- Process 5436 loaded C:\cygwin64\lib\sasl2_3\cygcrammd5-3.dll at
>> 0003EA09
>> --- Process 5436, exception c005 at 0003EA023780
>> --- Process 5436 unloaded DLL at 0003EA09
>>   333   52465 [main] svn 5436 seterrno_from_win_error:
>> /home/corinna/src/cygwin/cygwin-2.6.1/cygwin-2.6.1-1.x86_64/src/newlib-cygwin/winsup/cygwin/dlfcn.cc:304
>> windows error 998
>>24   52489 [main] svn 5436 geterrno_from_win_error: windows error
>> 998 == errno 14
>>20   52509 [main] svn 5436 dlopen: ret 0x0
>
> and then a bit later
>
>>21   91851 [main] svn 5436 fork: entering
>>   168   92019 [main] svn 5436 sig_send: sendsig 0x80, pid 5436,
>> signal -72, its_me 1
>>19   92038 [main] svn 5436 sig_send: wakeup 0x28C
>>24   92062 [main] svn 5436 sig_send: Waiting for pack.wakeup 0x28C
>>36   92098 [sig] svn 5436 wait_sig: signalling pack.wakeup 0x28C
>>27   92125 [main] svn 5436 sig_send: returning 0x0 from sending
>> signal -72
>> --- Process 5436, exception c005 at 000180053D3F
>
> So it looks like perhaps cygcrammd5 is faulting during it's DllMain,
> and perhaps this leaves things in a state that dll_list::topsort can't
> handle...
>
>>> I don't have time in the week to run it in a debug session but I'll try
>>> to do so at the weekend given the advice I've been given here. I will
>>> also do a rebaseall after I've tracked down the
>>>
>>> Thanks for the feedback folks. Much appreciated.
>>>
>>> BR
>>
>> Hi again.
>>
>> I've downloaded the debug symbols for subversion & the Cygwin dll and
>> run the command in gdb. Output attached. Not really giving me any clues
>> so far.
>
> You also need the symbols for the DLL loaded at the faulting address.
>
> From previous information I'd guess that is cyrus-sasl-debuginfo.
>
> (you can check this using gdb's 'info shared' command)
>
>> I've also run 'rebaseall' on the off chance that it would help - it
>> didn't!
>>
>> Still open to suggestions if anyone has any "light bulb" notions. :-)
>
Hi Jon. Thanks for the swift reply.

I've installed the debug as you suggested but it doesn't shed much light
to me. The attached gdb output doesn't seem any more enlightening. I'm a
little (!) out of my depth I think.

-- 
Sam Edge

SamEdge@thor ~
$ gdb svn
GNU gdb (GDB) (Cygwin 7.10.1-1) 7.10.1
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
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-pc-cygwin".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from svn...Reading symbols from 
/usr/lib/debug//usr/bin/svn.exe.dbg...done.
done.
(gdb) set cygwin-excep

Re: svn segfault when using svn+ssh schema

2017-01-16 Thread Jon Turney

On 16/01/2017 20:07, Sam Edge wrote:

On 09/01/2017 19:07, Sam Edge wrote:

On 09/01/2017 02:04, Eliot Moss wrote:

On 1/8/2017 3:45 PM, David Rothenberger wrote:

On 1/8/2017 6:12 AM, Sam Edge wrote:

I've seen a number of 'svn segfault' threads on the mailing list
archive
but none of them seem to cover this specific failure mode.
(Apologies if
one of them does!)

I'm getting segfaults from svn but only when using ssh as the schema.
The following three commands are all accessing the same server, the
name
of which has been changed to protect the guilty.


SamEdge@thor ~
$ ssh cmserver.XX.com
( success ( 2 2 ( ) ( edit-pipeline svndiff1 absent-entries
commit-revprops depth log-revprops atomic-revprops partial-replay
inherited-props ephemeral-txnprops file-revs-reverse ) ) )
SamEdge@thor ~
$ svn ls svn+ssh://cmserver.XX.com/edl/
Segmentation fault (core dumped)

Assuming this is repeatable behavior, perhaps getting a trace using
strace would reveal some more useful information.

Regards - Eliot Moss


Good idea.

Strangely, on another Windows 7 64-bit machine svn+ssh to the same
server is working fine for me. The most significant differences are that
the 'working' machine is running Windows 7 Pro on an Intel CPU with
Sophos AV and domain accounts whereas the 'failing' machine is Windows 7
Home Premium on an AMD with MS Security Essentials and local accounts.
These differences may or may not be relevant of course.

Anyway, attached are the two strace outputs. Diffing them suggests that
it's segfaulting in the fork() "system" call.


Not quite, this strace has...


--- Process 5436 loaded C:\cygwin64\lib\sasl2_3\cygcrammd5-3.dll at 
0003EA09
--- Process 5436, exception c005 at 0003EA023780
--- Process 5436 unloaded DLL at 0003EA09
  333   52465 [main] svn 5436 seterrno_from_win_error: 
/home/corinna/src/cygwin/cygwin-2.6.1/cygwin-2.6.1-1.x86_64/src/newlib-cygwin/winsup/cygwin/dlfcn.cc:304
 windows error 998
   24   52489 [main] svn 5436 geterrno_from_win_error: windows error 998 == 
errno 14
   20   52509 [main] svn 5436 dlopen: ret 0x0


and then a bit later


   21   91851 [main] svn 5436 fork: entering
  168   92019 [main] svn 5436 sig_send: sendsig 0x80, pid 5436, signal -72, 
its_me 1
   19   92038 [main] svn 5436 sig_send: wakeup 0x28C
   24   92062 [main] svn 5436 sig_send: Waiting for pack.wakeup 0x28C
   36   92098 [sig] svn 5436 wait_sig: signalling pack.wakeup 0x28C
   27   92125 [main] svn 5436 sig_send: returning 0x0 from sending signal -72
--- Process 5436, exception c005 at 000180053D3F


So it looks like perhaps cygcrammd5 is faulting during it's DllMain, and 
perhaps this leaves things in a state that dll_list::topsort can't handle...



I don't have time in the week to run it in a debug session but I'll try
to do so at the weekend given the advice I've been given here. I will
also do a rebaseall after I've tracked down the

Thanks for the feedback folks. Much appreciated.

BR


Hi again.

I've downloaded the debug symbols for subversion & the Cygwin dll and
run the command in gdb. Output attached. Not really giving me any clues
so far.


You also need the symbols for the DLL loaded at the faulting address.

From previous information I'd guess that is cyrus-sasl-debuginfo.

(you can check this using gdb's 'info shared' command)


I've also run 'rebaseall' on the off chance that it would help - it didn't!

Still open to suggestions if anyone has any "light bulb" notions. :-)


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: svn segfault when using svn+ssh schema

2017-01-16 Thread Sam Edge
On 09/01/2017 19:07, Sam Edge wrote:
> On 09/01/2017 02:04, Eliot Moss wrote:
>> On 1/8/2017 3:45 PM, David Rothenberger wrote:
>>> On 1/8/2017 6:12 AM, Sam Edge wrote:
 I've seen a number of 'svn segfault' threads on the mailing list
 archive
 but none of them seem to cover this specific failure mode.
 (Apologies if
 one of them does!)

 I'm getting segfaults from svn but only when using ssh as the schema.
 The following three commands are all accessing the same server, the
 name
 of which has been changed to protect the guilty.

 
 SamEdge@thor ~
 $ ssh cmserver.XX.com
 ( success ( 2 2 ( ) ( edit-pipeline svndiff1 absent-entries
 commit-revprops depth log-revprops atomic-revprops partial-replay
 inherited-props ephemeral-txnprops file-revs-reverse ) ) )
 SamEdge@thor ~
 $ svn ls svn+ssh://cmserver.XX.com/edl/
 Segmentation fault (core dumped)
>> Assuming this is repeatable behavior, perhaps getting a trace using
>> strace would reveal some more useful information.
>>
>> Regards - Eliot Moss
>>
> Good idea.
>
> Strangely, on another Windows 7 64-bit machine svn+ssh to the same
> server is working fine for me. The most significant differences are that
> the 'working' machine is running Windows 7 Pro on an Intel CPU with
> Sophos AV and domain accounts whereas the 'failing' machine is Windows 7
> Home Premium on an AMD with MS Security Essentials and local accounts.
> These differences may or may not be relevant of course.
>
> Anyway, attached are the two strace outputs. Diffing them suggests that
> it's segfaulting in the fork() "system" call.
>
> I don't have time in the week to run it in a debug session but I'll try
> to do so at the weekend given the advice I've been given here. I will
> also do a rebaseall after I've tracked down the
>
> Thanks for the feedback folks. Much appreciated.
>
> BR

Hi again.

I've downloaded the debug symbols for subversion & the Cygwin dll and
run the command in gdb. Output attached. Not really giving me any clues
so far.

I've also run 'rebaseall' on the off chance that it would help - it didn't!

Still open to suggestions if anyone has any "light bulb" notions. :-)

-- 
Sam Edge

SamEdge@thor ~
$ gdb svn
GNU gdb (GDB) (Cygwin 7.10.1-1) 7.10.1
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
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-pc-cygwin".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from svn...Reading symbols from 
/usr/lib/debug//usr/bin/svn.exe.dbg...done.
done.
(gdb) set cygwin-exceptions on
(gdb) run ls svn+ssh://cmserver.XX.com/edl/
Starting program: /usr/bin/svn ls svn+ssh://cmserver.XX.com/edl/
[New Thread 2096.0xf4c]
[New Thread 2096.0x157c]
[New Thread 2096.0x1264]
[New Thread 2096.0x15d8]

Program received signal SIGSEGV, Segmentation fault.
0x0003e9f63780 in ?? ()
(gdb) bt
#0  0x0003e9f63780 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) info threads
  Id   Target Id Frame
  4Thread 2096.0x15d8 0x76cfd63a in 
ntdll!ZwWaitForWorkViaWorkerFactory () from 
/cygdrive/c/Windows/SYSTEM32/ntdll.dll
  3Thread 2096.0x1264 0x76cfc2ea in ntdll!ZwWaitForMultipleObjects
() from /cygdrive/c/Windows/SYSTEM32/ntdll.dll
  2Thread 2096.0x157c 0x76cfbd9a in ntdll!ZwReadFile ()
   from /cygdrive/c/Windows/SYSTEM32/ntdll.dll
* 1Thread 2096.0xf4c 0x0003e9f63780 in ?? ()
(gdb) list
3098  err, _("When using svn+ssh:// URLs, keep in mind that 
the "
3099 "--username and --password options are ignored 
"
3100 "because authentication is performed by SSH, 
not "
3101 "Subversion"));
3102}
3103
3104  return err;
3105}
3106
3107  return SVN_NO_ERROR;
(gdb)

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple

Re: svn segfault when using svn+ssh schema

2017-01-08 Thread Eliot Moss

On 1/8/2017 3:45 PM, David Rothenberger wrote:

On 1/8/2017 6:12 AM, Sam Edge wrote:

I've seen a number of 'svn segfault' threads on the mailing list archive
but none of them seem to cover this specific failure mode. (Apologies if
one of them does!)

I'm getting segfaults from svn but only when using ssh as the schema.
The following three commands are all accessing the same server, the name
of which has been changed to protect the guilty.


SamEdge@thor ~
$ ssh cmserver.XX.com
( success ( 2 2 ( ) ( edit-pipeline svndiff1 absent-entries
commit-revprops depth log-revprops atomic-revprops partial-replay
inherited-props ephemeral-txnprops file-revs-reverse ) ) )
SamEdge@thor ~
$ svn ls svn+ssh://cmserver.XX.com/edl/
Segmentation fault (core dumped)


Assuming this is repeatable behavior, perhaps getting a trace using
strace would reveal some more useful information.

Regards - Eliot Moss

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: svn segfault when using svn+ssh schema

2017-01-08 Thread Jon Turney

On 08/01/2017 20:45, David Rothenberger wrote:

On 1/8/2017 6:12 AM, Sam Edge wrote:

[...]


I've attached cygcheck & the segfault stackdump.

I'm at a loss. Any ideas?


[Cygwin subversion maintainer here.]

Sorry, I have no further ideas. svn+ssh is working fine for me here
using both Cygwin and Debian as the server. Debian is running Subversion
1.8.10.

I personally lack the technical skills to decode the stack trace. Maybe
someone else can. Alternatively, you could theoretically download the


The script at [1] shows how to do this. Unfortunately...


$ stackdump2backtrace svn.stackdump
0x000180053d3fdll_list::populate_deps(dll*)dll_init.cc:271
0x000180053f9adll_list::topsort()  dll_init.cc:309
0x0001800ab62dfork fork.cc:597
0x00018011882bxc   sigfe.s:43
0x0003fa778644xc   ??:0
0x0003ed275773xc   ??:0
0x0003ed275e3dxc   ??:0
0x0003ed2d41f4xc   ??:0
0x0003ed40fc0fxc   ??:0
0x0003ed41079exc   ??:0
0x0003ed3f2d59xc   ??:0
0x0003ed3f3320xc   ??:0
0x00010040b9f9svn_cl__list list-cmd.c:387
0x0001004178fdsub_main svn.c:3042
0x00010041b755main svn.c:3126
0x000180047902dll_crt0_1(void*)dcrt0.cc:1018


... this is a crash in the cygwin DLL.

Also unfortunately, the stackdump doesn't record the DLLs loaded and 
their bases addresses, so we can only guess which one ended up at 
0x0003e000



subversion debug package and reproduce the error in gdb to get a
backtrace. Again, my C/gdb skills are rusty, so I can't provide any
details about how to do that.


So see also [2] and note well the point about 'set cygwin-exceptions on'

[1] https://cygwin.com/ml/cygwin/2015-08/msg00311.html
[2] https://cygwin.com/faq.html#faq.programming.debugging-cygwin


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: svn segfault when using svn+ssh schema

2017-01-08 Thread David Rothenberger

On 1/8/2017 6:12 AM, Sam Edge wrote:

I've seen a number of 'svn segfault' threads on the mailing list archive
but none of them seem to cover this specific failure mode. (Apologies if
one of them does!)

I'm getting segfaults from svn but only when using ssh as the schema.
The following three commands are all accessing the same server, the name
of which has been changed to protect the guilty.


SamEdge@thor ~
$ ssh cmserver.XX.com
( success ( 2 2 ( ) ( edit-pipeline svndiff1 absent-entries
commit-revprops depth log-revprops atomic-revprops partial-replay
inherited-props ephemeral-txnprops file-revs-reverse ) ) )
SamEdge@thor ~
$ svn ls svn+ssh://cmserver.XX.com/edl/
Segmentation fault (core dumped)

SamEdge@thor ~
$ svn ls https://cmserver.XX.com/edl/
branches/
tags/
trunk/

SamEdge@thor ~
$


Access using TortoiseSVN using either schema is working fine, as is
access from Linux svn.

The server is Ubuntu 14.04.5 LTS with package subversion
1.8.8-1ubuntu3.2, openssh-server 1:6.6p1-2ubuntu2.8 and openssl
1.0.1f-1ubuntu2.21.

The secure shell access is using public key authentication.

I've attached cygcheck & the segfault stackdump.

I'm at a loss. Any ideas?


[Cygwin subversion maintainer here.]

Sorry, I have no further ideas. svn+ssh is working fine for me here 
using both Cygwin and Debian as the server. Debian is running Subversion 
1.8.10.


I personally lack the technical skills to decode the stack trace. Maybe 
someone else can. Alternatively, you could theoretically download the 
subversion debug package and reproduce the error in gdb to get a 
backtrace. Again, my C/gdb skills are rusty, so I can't provide any 
details about how to do that.


--
David Rothenberger    daver...@acm.org

Doubt is not a pleasant condition, but certainty is absurd.
-- Voltaire

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple