|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79409 ssh2_sftp() _libssh2_channel_free: Assertion `session' failed
Submitted: 2020-03-23 19:51 UTC Modified: 2021-02-21 04:22 UTC
From: ricardo at banak dot com Assigned: cmb (profile)
Status: No Feedback Package: ssh2 (PECL)
PHP Version: 7.4.4 OS: Centos 7.7.1908
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: ricardo at banak dot com
New email:
PHP Version: OS:


 [2020-03-23 19:51 UTC] ricardo at banak dot com
When trying to use $sftp=ssh2_sftp($connection) the script aborts with:
"ool www: channel.c:2466: _libssh2_channel_free: Assertion `session' failed."

I'm using:
- php-pecl-ssh2.x86_64  1.2-1.el7.remi.7.4
- libssh2.x86_64        1.8.0-3.el7
- openssl.x86_64        1:1.0.2k-19.el7 

Test script:
$connection = ssh2_connect('', 22);
ssh2_auth_password($connection, 'username', 'password');

$sftp = ssh2_sftp($connection);


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2021-02-10 14:43 UTC]
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-02-10 14:43 UTC]
I cannot reproduce this assertion failure with the given test
script (neither with ssh2 1.2 nor with current tip of master;
libssh 1.9.0).  However, I can reproduce the assertion failure, if
I add


at the end of the script.  This would be a duplicate of bug #79631

Please confirm whether you had called ssh2_disconnect() or not.
 [2021-02-21 04:22 UTC] pecl-dev at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Aug 04 10:01:23 2021 UTC