This forum has been archived. All content is frozen. Please use KDE Discuss instead.

sftp kio gives "Out of memory" in KDE SC 4.4.0

Tags: None
(comma "," separated)
haakon
Registered Member
Posts
10
Karma
0
After upgrading to KDE SC 4.4 in Kubuntu, sftp:// URLs no longer works in Dolphin or Konqueror. Both gives an error message saying "Out of memory". It seems to do this on every sftp URL, regardless of whether they should work.

Is this a known bug in KDE, or perhaps Kubuntu-specific? Any known workaround?
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Could you please try the following in Konsole, and post the output?

Code: Select all
kioclient copy sftp://user@host/path/to/file ./


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
haakon
Registered Member
Posts
10
Karma
0
Code: Select all
$ kioclient copy sftp://my.server/path/to/some/file.txt ./
<unknown program name>(27666)/ ClientApp::doIt: Creating ClientApp
kioclient(27666) KSharedUiServerProxy::KSharedUiServerProxy: kuiserver registered
kioclient(27666)/kdecore (KSycoca) KSycocaPrivate::openDatabase: Trying to open ksycoca from  "/var/tmp/kdecache-haakon/ksycoca4"
kioclient(27666)/kio (Slave) KIO::Slave::createSlave: createSlave "file" for KUrl("file:///home/haakon/")
kioclient(27666)/kio (KIOConnection) KIO::ConnectionServer::listenForRemote: Listening on  "local:/tmp/ksocket-haakon/kioclienth27666.slave-socket"
kioclient(27666)/kio (Slave) KIO::Slave::createSlave: createSlave "sftp" for KUrl("sftp://my.server/path/to/some/file.txt")
kioclient(27666)/kio (KIOConnection) KIO::ConnectionServer::listenForRemote: Listening on  "local:/tmp/ksocket-haakon/kioclientn27666.slave-socket"
kioclient(27666)/kio (KIOJob) KIO::SlaveInterface::dispatch: error  144   ""
kioclient(27666)/kio (KIOJob) KIO::CopyJobPrivate::slotResultStating: Error while stating source. Activating hack
kioclient(27666)/kio (KIOConnection) KIO::ConnectionServer::listenForRemote: Listening on  "local:/tmp/ksocket-haakon/kioclientT27666.slave-socket"
kioclient(27666)/kio (KIOJob) KIO::SlaveInterface::dispatch: error  144   ""
kioclient(27666)/kio (Slave) KIO::Slave::kill: killing slave pid 19286 ( "file://" )


Then I get a GUI dialogue box saying "Error. Out of memory." with a Cancel button and window title "Information".

If I try to copy the other way, the same thing happens.
pinotree
KDE Developer
Posts
222
Karma
7
OS
Since KDE 4.4 kio_sftp uses libssh >= 0.4 for the job.
Yesterday libssh 0.4.1 was released, so you could try to update it and see whether the problem persists.


Pino Toscano
Polytheus
Registered Member
Posts
3
Karma
0
OS
I have the same error and I'am using libssh 4.1.
My system is Gentoo and I have recompiled libssh, dolphin and kdebase-kioslaves various times without change in behavior.
Dolphin and kdebase-kioslaves are at version 4.4.0.
The 4.3.* versions have worked without problems.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
libssh 4.1 doesn't exist... please make sure you are using the correct sources..

Note that following the recompile, you may wish to run the following ( as your user ):

Code: Select all
kbuildsycoca4 --noincremental
kdeinit4 &


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
Polytheus
Registered Member
Posts
3
Karma
0
OS
I'm sorry, of course I mean libssh 0.4.1.
I tried the commands given, and seeing the output of kdeinit4 showed the following:
Code: Select all
kio_sftp(10192) sftpProtocol::openConnection: Creating the SSH session and setting options
Unsupported option: ServerAliveInterval, line: 1
Unsupported option: ServerAliveCountMax, line: 2
Unsupported option: ForwardX11, line: 5
Unsupported option: ForwardX11Trusted, line: 6
ERROR - unimplemented opcode: 5

My .ssh/config file is
Code: Select all
ServerAliveInterval 10
ServerAliveCountMax 3

Host ########
    ForwardX11 yes
    ForwardX11Trusted yes
Host #########
    IdentityFile ~/.ssh/id_rsa2_%r
    Cipher blowfish-cbc

Which works perfectly with the commandline sftp client from openssh.
When I change my config to
Code: Select all
ServerAliveInterval 10
ServerAliveCountMax 3

Host ########
    ForwardX11 yes
    ForwardX11Trusted yes
Host #########
    IdentityFile ~/.ssh/id_rsa2_%r
#    Cipher blowfish-cbc

The "Out of memory" error disappears and I can connect and browse the remote host. But dolphin asks for a password, where the commandline sftp client doesn't. The keyfile has no password associated and I'm not using any keyagent, so it seems that the sftp kio ignores the IdentityFile line.
The other lines still give an "Unsupported option" warning, but the "Out of memory" error seems to come from the "Cipher blowfish-cbc" line.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Can you please report these issues to the libssh developers so they can correct them?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
Polytheus
Registered Member
Posts
3
Karma
0
OS
jimbo99
Registered Member
Posts
45
Karma
0
I have a similar problem where I get 50+ entries of kio_http each using 16mb of ram showing in the system monitor. Given enough time this will increment to the point of being out of memory or in a failure of the ability to launch applications.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
@jimbo99: That is a completely different issue altogether. And how did you arrive at that statistic? It is likely you used top or free which are known to incorrectly calculate memory usage. KSysGuard and Exmap are some of the few utilities which get it correct.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
FRidh
Registered Member
Posts
1
Karma
0
OS
I also get an Out of memory error when using sftp with Dolphin. I run Debian Sid with KDE SC 4.4.2

In contrary to Polytheus I do not have a SSH config file thus it cannot be the origin of the problem for me. Now I do have id files for authentication by certificates
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Authentication by SSH Key works fine here, so it should work in your case.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
spikyjt
Registered Member
Posts
2
Karma
0
OS
I had this problem too, although only on accessing certain servers. I then came across this post.

I remembered I had a ~/bin folder which is added to the path automatically via ~/.profile these days in (k)ubuntu. I renamed that folder to test and re-logged in and the problem is solved.

Not sure why this has suddenly started occurring, but it is a good opportunity for me to sort through all my custom scripts and make a .deb that installs them properly!

Hope this helps, will provide more info if required.


Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], Google [Bot], Yahoo [Bot]