Bug 1615060
| Summary: | libssh upgrade 0.8.0-1 causes dnf to issue warning that ssh is still initialized after each application | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | George R. Goffe <grgoffe> |
| Component: | libssh | Assignee: | Anderson Sasaki <ansasaki> |
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 29 | CC: | alciregi, asn, berrange, bojan, dhill, dmach, gbcox, jbowen, jfch, jpokorny, kdudka, knutjbj, lslebodn, lsm5, mblaha, mhatina, negativo17, packaging-team-maint, plautrba, prd-fedora, quentin, rdieter, rpm-software-management, sgallagh, vmukhame |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | libssh-0.8.1-1 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2018-08-16 08:08:49 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
George R. Goffe
2018-08-12 00:06:35 UTC
*** Bug 1615069 has been marked as a duplicate of this bug. *** I also started getting this error. It is displayed at the end of every dnf command I enter - regardless of the syntax. Problem appears to be caused by upgrade of libssh-0.7.5-7 to 0.8.0-1
I backed out:
Packages Altered:
Downgrade libssh-0.7.5-7.fc28.x86_64 @fedora
Downgraded 0.8.0-1.fc28.x86_64 @updates-testing
and problem was circumvented - so I'm assigning this to libssh to resolve.
Changing bug summary.
Gerald, Thanks for your help. George... This is printed because of libcurl calling ssh_init() but not ssh_finalize(). libcurl calls ssh_finalize() if curl_global_cleanup() is called, which librepo does not do: https://github.com/rpm-software-management/librepo/blob/27211463/librepo/util.c#L89 Minimal example: # python -c 'import librepo' Warning: ssh still initialized; probably ssh_init() was called more than once (init count: 1) Explicitly *not* calling finalize/cleanup functions is a normal/desirable thing to do, because it is very difficult to decide when it is safe to invoke global cleanup code. This is particularly true of libssh, since the calls to ssh_init/ssh_finalize are not counted historically, so you can never safely call ssh_finalize as you've no idea what other libraries might still be using it. Any app that follows the suggestion to add matching calls to ssh_finalize will be broken if ever built against libssh < 0.8.0, so is pretty undesirable. Allowing the OS to cleanup on normal process exit/execve is simpler & safer. Printing these warnings to stderr has impacted the libvirt build, as our test suite is validating messages that appear on stderr and these are unexpected. IMHO these warnings messages on stderr should just be removed. One of the changes brought in libssh-0.8.0 is exactly to address the need of explicitly call ssh_init()/ssh_finalize(): now both are unnecessary if the library is dynamic linked, since such calls are made on the constructor/destructor. The warning would not show up if the applications were calling the same amount of inits/finalizes. Anyway, the warning has been removed in current upstream master and will be in Fedora as soon as possible. 0.8.1-1 LGTM on f28. Thanks This bug appears to have been reported against 'rawhide' during the Fedora 29 development cycle. Changing version to '29'. (In reply to Lokesh Mandvekar from comment #9) > 0.8.1-1 LGTM on f28. Thanks I can confirm this as well. (In reply to Lokesh Mandvekar from comment #9) > 0.8.1-1 LGTM on f28. Thanks I can confirm this as well. *** Bug 1615975 has been marked as a duplicate of this bug. *** ditto Hi, I'm not sure that the "fix" has propagated. I found a f30 version of libssh and installed it. This resolved the message problem but I'm not sure it didn't cause another problem. When I run "dnf remove --duplicates" I get these messages... Is this part of the same bug or do I need to make a new bug report? I could try to fix this by using rpm: rpm --nodeps -e libssh-0.8.0-1.fc29.x86_64 but this may break dnf since I believe that dnf relies on the ssh library. Yes? No? George... Error: Transaction check error: file /usr/lib64/libssh.so.4 from install of libssh-0.8.1-4.fc30.x86_64 conflicts with file from package libssh-0.8.0-1.fc29.x86_64 file /usr/share/doc/libssh/ChangeLog from install of libssh-0.8.1-4.fc30.x86_64 conflicts with file from package libssh-0.8.0-1.fc29.x86_64 |