Skip to content

Conversation

@Jakuje
Copy link
Contributor

@Jakuje Jakuje commented Apr 24, 2025

SUMMARY

Call to connect() after close() crashed, likely because the NULL pointer was passed somewhere it should not.

The session should really be freed only in the destructor so removing the offending code.

Fixes: #702

ISSUE TYPE
  • Bugfix Pull Request

@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Apr 24, 2025
@packit-as-a-service
Copy link

Congratulations! One of the builds has completed. 🍾

You can install the built RPMs by following these steps:

  • sudo yum install -y dnf-plugins-core on RHEL 8
  • sudo dnf install -y dnf-plugins-core on Fedora
  • dnf copr enable packit/ansible-pylibssh-709
  • And now you can install the packages.

Please note that the RPMs should be used only in a testing environment.

Copy link
Member

@webknjaz webknjaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Jakuje does this make it so the underlying session object could persist and would then be reused on reconnect? I guess that's useful. Another way could be having some flag on the session for whether it's still usable.

P.S. I dropped Ubuntu 20.04 on devel so it would be a good idea to rebase now.

@Jakuje
Copy link
Contributor Author

Jakuje commented Apr 24, 2025

@Jakuje does this make it so the underlying session object could persist and would then be reused on reconnect? I guess that's useful. Another way could be having some flag on the session for whether it's still usable.

I think the libssh session should be reusable. But I know we had some bugs in the past that were making some operations fail so if we want to be sure, we should add some more extensive tests.

P.S. I dropped Ubuntu 20.04 on devel so it would be a good idea to rebase now.

Will do.

Jakuje added 3 commits April 24, 2025 17:35
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
@sonarqubecloud
Copy link

@codecov
Copy link

codecov bot commented Apr 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.75%. Comparing base (65ea3a7) to head (a7131a1).
Report is 84 commits behind head on devel.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@webknjaz webknjaz merged commit 90c6590 into ansible:devel Apr 25, 2025
72 of 77 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:chronographer:provided There is a change note present in this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SIGSEGV when running session.connect() for closed session

2 participants