Description of problem: Updated this system today and started getting these warnings from dnf (I guess): Warning: ssh still initialized; probably ssh_init() was called more than once (init count: 1) Version-Release number of selected component (if applicable): dnf-3.2.0-2.fc29.noarch How reproducible: always Steps to Reproduce: 1.just use the dnf command 2. 3. Actual results: see below Expected results: Additional info: dnf downgrade libglvnd'*' Last metadata expiration check: 0:26:22 ago on Sat 11 Aug 2018 04:36:24 PM PDT. Package libglvnd-opengl of lowest version already installed, cannot downgrade it. Package libglvnd of lowest version already installed, cannot downgrade it. Package libglvnd-core-devel of lowest version already installed, cannot downgrade it. Package libglvnd-glx of lowest version already installed, cannot downgrade it. Package libglvnd-devel of lowest version already installed, cannot downgrade it. Package libglvnd-egl of lowest version already installed, cannot downgrade it. Package libglvnd-gles of lowest version already installed, cannot downgrade it. Error: No packages marked for downgrade. Warning: ssh still initialized; probably ssh_init() was called more than once (init count: 1)
*** 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.
*** 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