Subject: Re: libssh crash on Mac

Re: libssh crash on Mac

From: Leo <leo.r_at_rogers.com>
Date: Fri, 9 Aug 2019 22:34:59 -0400

On 8/8/19 11:24 PM, Jan Ehrhardt wrote:
> Leo in gmane.network.ssh.libssh2.devel (Thu, 8 Aug 2019 22:43:51 -0400):
>> Now when I try to connect to SFTP site, the crash produces the following
>> output in Xcode debugger:
>>
>> openssl.c > _libssh2_openssl_crypto_init()
>>
>>
>> #if OPENSSL_VERSION_NUMBER >= 0x10100000L && \
>> !defined(LIBRESSL_VERSION_NUMBER)
>> #ifndef OPENSSL_NO_ENGINE
>> ENGINE_load_builtin_engines(); <-- Thread 8: EXC_BAD_ACCESS (code=1, address=0x116)
>> ENGINE_register_all_complete();
>> #endif
> libssh2 version 1.8.0 needs a patch to compile with OpenSSL 1.1.1. See
> https://github.com/Frugghi/iSSH2/issues/7
> and the patch in
> https://github.com/Jan-E/iSSH2/commit/6b2b61d56fc43642980aacc529c9d9d14263cebf#diff-47bf3a78aa165576c6c85a942ddf572bR6
>
> You'd better upgradeto libssh2 1.9.0. It compiles fine in Xcode.
> https://github.com/Frugghi/iSSH2 will create the necessary binaries for
> Xcode.

Thanks Jan,

Here's more info regarding the issue and my configurations:

-I did build the latest version, libssh2 1.9.0

-I have no problem compiling my app in Xcode using libssh2.a; the app
crashes on attempt to connect to any SFTP server.

-The app that crashes is quite a complex app that connects to various
type of servers and does tons of other stuff. It worked with no issues
for years. SFTP crashes started, apparently, after one of updates quite
some time ago by now. By this time I have no way to know which update
caused it (if that was the case at all).

On the other hand, I also have a simple app for my internal needs, which
keeps working with libssh2 with no issues. This app, whose only task is
to connect to SFTP, is a subset of the aforementioned large app. And
when it comes to SFTP connection, both apps are pretty much identical.
While trying to isolate the issue, I made those apps even more identical
making sure that every line of Cocoa code that leads to SFTP is the same.

And yet one app crashes - and another doesn't.

There are no errors, exceptions or anything like this on the Cocoa part
of code. Cocoa errors I'd be able to investigate further.

But the crash happens when the operation is passed to libssh2. So my
only hope that someone here will be able to decipher the errors I see in
Xcode debugger.

Cheers,
Leo

_______________________________________________
libssh2-devel https://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2019-08-10