Konqueror cannot sftp #276

Closed
opened 2 years ago by nmrugg · 19 comments
nmrugg commented 2 years ago

After upgrading to R14.0.12, konqueror will no longer work with sftp locations. It simply hangs. There is no console output.

Basic information

  • TDE version: R14.0.12
  • Distribution: Ubuntu 22.04 LTS
  • Hardware: amd64

Description

Konqueror will no longer work with sftp locations.

Steps to reproduce

  1. Open a location like sftp://localhost
  2. Konqueror just hangs.
After upgrading to R14.0.12, konqueror will no longer work with sftp locations. It simply hangs. There is no console output. ## Basic information - TDE version: R14.0.12 - Distribution: Ubuntu 22.04 LTS - Hardware: amd64 ## Description Konqueror will no longer work with sftp locations. ## Steps to reproduce 1. Open a location like sftp://localhost 2. Konqueror just hangs.
Collaborator

For me it works on 14.1.

For me it works on 14.1.
nmrugg commented 2 years ago
Poster

Any idea how I could debug this?

Are there any additional packages that need to be installed?

Any idea how I could debug this? Are there any additional packages that need to be installed?
Owner

Could this be caused by an update to some other packages at the same time? Or are you 100% sure it is due to konqueror new version?

Could this be caused by an update to some other packages at the same time? Or are you 100% sure it is due to konqueror new version?
Collaborator

Any idea how I could debug this?

Are there any additional packages that need to be installed?

What happens if you use command line SFTP client. Sometimes there are rules that prevent you connecting to localhost but it works on 127.0.0.1. Can you try latter

$ sftp emanoil@localhost
ssh: connect to host localhost port 22: Connection refused
Connection closed.
Connection closed

$ sftp emanoil@127.0.0.1
The authenticity of host '127.0.0.1 (127.0.0.1)' can't be established.
ECDSA key fingerprint is SHA256:BAbCB33OAegMj8kG4thbof61t6zcDch8v05DjpJAPGE.
Are you sure you want to continue connecting (yes/no/[fingerprint])?  

If I understand correctly the SFTP connection works well on remote IP, but does not work on localhost. If this is true, it is something related to the localhost settings and not to the tdeio_sftp.

BR

> Any idea how I could debug this? > > Are there any additional packages that need to be installed? What happens if you use command line SFTP client. Sometimes there are rules that prevent you connecting to localhost but it works on 127.0.0.1. Can you try latter ``` $ sftp emanoil@localhost ssh: connect to host localhost port 22: Connection refused Connection closed. Connection closed $ sftp emanoil@127.0.0.1 The authenticity of host '127.0.0.1 (127.0.0.1)' can't be established. ECDSA key fingerprint is SHA256:BAbCB33OAegMj8kG4thbof61t6zcDch8v05DjpJAPGE. Are you sure you want to continue connecting (yes/no/[fingerprint])? ``` If I understand correctly the SFTP connection works well on remote IP, but does not work on localhost. If this is true, it is something related to the localhost settings and not to the tdeio_sftp. BR
nmrugg commented 2 years ago
Poster

@MicheleC, I started having problems after upgrading to Ubuntu 22.04 and R14.0.12. I'm not sure which caused the problem.

@deloptes, thanks for the suggestion. I can run sftp successfully from the command line.

Is there any way to get konqueror to log more information to help debug?

@MicheleC, I started having problems after upgrading to Ubuntu 22.04 and R14.0.12. I'm not sure which caused the problem. @deloptes, thanks for the suggestion. I can run `sftp` successfully from the command line. Is there any way to get konqueror to log more information to help debug?
nmrugg commented 2 years ago
Poster

Another thing, if I try to connect to a computer that has server running, it still just hangs, instead of quiting with a "connection closed" error.

Another thing, if I try to connect to a computer that has server running, it still just hangs, instead of quiting with a "connection closed" error.
Collaborator

I think I can shed some light on the debug output:

[2022/06/14 11:57:29.134] [tdeio (KRun)] [3623]  new KRun 0x248c560 sftp://blu256@127.0.0.1:22 timer=0x248c610
[2022/06/14 11:57:29.205] [tdeio (KRun)] [3623] INIT called
[2022/06/14 11:57:29.205] [tdeio (KRun)] [3623] Testing directory (stating)
[2022/06/14 11:57:29.205] [tdeio (KRun)] [3623]  Job 0x2bf47b0 is about stating sftp://blu256@127.0.0.1:22
[2022/06/14 12:11:17.709] [tdeio_sftp] [3806] ERROR: KSshProcess::version(): pclose failed.
[2022/06/14 12:12:31.209] ASSERT: "it.node != node" in /usr/include/tqt/ntqvaluelist.h (296)
tdeioslave: ####### CRASH ###### protocol = tdeio_sftp pid = 3806 signal = 11
[
#0  0x00007f0309f24922 in kdBacktrace(int) from /usr/lib64/libtdecore.so.14:0x00124922
#1  0x00007f030aa2f830 in TDEIO::SlaveBase::sigsegv_handler(int) from /usr/lib64/libtdeio.so.14:0x0022f830
#2  0x00007f0308e40f10 in ?? from /lib64/libc.so.6:0x00040f10
#3  0x00007f0309b025dd in TQString::operator=(TQString const&) from /usr/lib64/libtqt-mt.so.3:0x005025dd
#4  0x00007f0308769f20 in KSshProcess::getLine() from /usr/lib64/tde/tdeio_sftp.so:0x0001ff20
#5  0x00007f030876a9e8 in KSshProcess::connect() from /usr/lib64/tde/tdeio_sftp.so:0x000209e8
#6  0x00007f030875c2a6 in sftpProtocol::openConnection() from /usr/lib64/tde/tdeio_sftp.so:0x000122a6
#7  0x00007f03087624eb in sftpProtocol::stat(KURL const&) from /usr/lib64/tde/tdeio_sftp.so:0x000184eb
#8  0x00007f030aa35eb0 in TDEIO::SlaveBase::dispatch(int, TQMemArray<char> const&) from /usr/lib64/libtdeio.so.14:0x00235eb0
#9  0x00007f030aa30f22 in TDEIO::SlaveBase::dispatchLoop() from /usr/lib64/libtdeio.so.14:0x00230f22
#10 0x00007f030875b50e in kdemain from /usr/lib64/tde/tdeio_sftp.so:0x0001150e
#11 0x0000000000408f43 in ?? from tdeio:0x00008f43
#12 0x000000000040a1db in ?? from tdeio:0x0000a1db
#13 0x000000000040a948 in ?? from tdeio:0x0000a948
#14 0x0000000000406f40 in main from tdeio:0x00006f40
#15 0x00007f0308e29a37 in ?? from /lib64/libc.so.6:0x00029a37
#16 0x00007f0308e29aec in __libc_start_main from /lib64/libc.so.6:0x00029aec
#17 0x0000000000407811 in _start from tdeio:0x00007811
]
munmap_chunk(): invalid pointer
tdeioslave: ####### CRASH ###### protocol = tdeio_sftp pid = 3806 signal = 6
[
#0  0x00007f0309f24922 in kdBacktrace(int) from /usr/lib64/libtdecore.so.14:0x00124922
#1  0x00007f030aa2f830 in TDEIO::SlaveBase::sigsegv_handler(int) from /usr/lib64/libtdeio.so.14:0x0022f830
#2  0x00007f0308e40f10 in ?? from /lib64/libc.so.6:0x00040f10
#3  0x00007f0308e91e3c in pthread_kill from /lib64/libc.so.6:0x00091e3c
#4  0x00007f0308e40e72 in raise from /lib64/libc.so.6:0x00040e72
#5  0x00007f0308e2849b in abort from /lib64/libc.so.6:0x0002849b
#6  0x00007f0308e85448 in ?? from /lib64/libc.so.6:0x00085448
#7  0x00007f0308e9b69a in ?? from /lib64/libc.so.6:0x0009b69a
#8  0x00007f0308e9b8bc in ?? from /lib64/libc.so.6:0x0009b8bc
#9  0x00007f0308e9fec8 in free from /lib64/libc.so.6:0x0009fec8
#10 0x000000000040acb6 in TQValueListPrivate<TQString>::~TQValueListPrivate() from tdeio:0x0000acb6
#11 0x00007f030a03dfd8 in TQStringList::~TQStringList() from /usr/lib64/libtdecore.so.14:0x0023dfd8
#12 0x00007f0308e439c5 in ?? from /lib64/libc.so.6:0x000439c5
#13 0x00007f0308e43b3a in ?? from /lib64/libc.so.6:0x00043b3a
#14 0x00007f030aa2f86a in TDEIO::SlaveBase::sigsegv_handler(int) from /usr/lib64/libtdeio.so.14:0x0022f86a
#15 0x00007f0308e40f10 in ?? from /lib64/libc.so.6:0x00040f10
#16 0x00007f0309b025dd in TQString::operator=(TQString const&) from /usr/lib64/libtqt-mt.so.3:0x005025dd
#17 0x00007f0308769f20 in KSshProcess::getLine() from /usr/lib64/tde/tdeio_sftp.so:0x0001ff20
#18 0x00007f030876a9e8 in KSshProcess::connect() from /usr/lib64/tde/tdeio_sftp.so:0x000209e8
#19 0x00007f030875c2a6 in sftpProtocol::openConnection() from /usr/lib64/tde/tdeio_sftp.so:0x000122a6
#20 0x00007f03087624eb in sftpProtocol::stat(KURL const&) from /usr/lib64/tde/tdeio_sftp.so:0x000184eb
#21 0x00007f030aa35eb0 in TDEIO::SlaveBase::dispatch(int, TQMemArray<char> const&) from /usr/lib64/libtdeio.so.14:0x00235eb0
#22 0x00007f030aa30f22 in TDEIO::SlaveBase::dispatchLoop() from /usr/lib64/libtdeio.so.14:0x00230f22
#23 0x00007f030875b50e in kdemain from /usr/lib64/tde/tdeio_sftp.so:0x0001150e
#24 0x0000000000408f43 in ?? from tdeio:0x00008f43
#25 0x000000000040a1db in ?? from tdeio:0x0000a1db
#26 0x000000000040a948 in ?? from tdeio:0x0000a948
#27 0x0000000000406f40 in main from tdeio:0x00006f40
#28 0x00007f0308e29a37 in ?? from /lib64/libc.so.6:0x00029a37
#29 0x00007f0308e29aec in __libc_start_main from /lib64/libc.so.6:0x00029aec
#30 0x0000000000407811 in _start from tdeio:0x00007811
]
[2022/06/14 12:12:31.305] [tdeio (KRun)] [3798] 0x18cefe0 slotTimeout called
[2022/06/14 11:58:38.714] [tdeio (KRun)] [3623] 0x248c560 slotTimeout called
[2022/06/14 11:58:38.714] [tdeio (KRun)] [3623] KRun::abort 0x248c560 m_showingError=false
[2022/06/14 11:58:38.714] [tdeio (KRun)] [3623] KRun::~KRun() 0x248c560
[2022/06/14 11:58:38.714] [tdeio (KRun)] [3623] KRun::~KRun() done 0x248c560

There seems to be a crash. In the GUI, this is visible as a hang after the password prompt, and then a "io slave died unexpectedly" type of error. sftp connects fine.

I think I can shed some light on the debug output: ``` [2022/06/14 11:57:29.134] [tdeio (KRun)] [3623] new KRun 0x248c560 sftp://blu256@127.0.0.1:22 timer=0x248c610 [2022/06/14 11:57:29.205] [tdeio (KRun)] [3623] INIT called [2022/06/14 11:57:29.205] [tdeio (KRun)] [3623] Testing directory (stating) [2022/06/14 11:57:29.205] [tdeio (KRun)] [3623] Job 0x2bf47b0 is about stating sftp://blu256@127.0.0.1:22 [2022/06/14 12:11:17.709] [tdeio_sftp] [3806] ERROR: KSshProcess::version(): pclose failed. [2022/06/14 12:12:31.209] ASSERT: "it.node != node" in /usr/include/tqt/ntqvaluelist.h (296) tdeioslave: ####### CRASH ###### protocol = tdeio_sftp pid = 3806 signal = 11 [ #0 0x00007f0309f24922 in kdBacktrace(int) from /usr/lib64/libtdecore.so.14:0x00124922 #1 0x00007f030aa2f830 in TDEIO::SlaveBase::sigsegv_handler(int) from /usr/lib64/libtdeio.so.14:0x0022f830 #2 0x00007f0308e40f10 in ?? from /lib64/libc.so.6:0x00040f10 #3 0x00007f0309b025dd in TQString::operator=(TQString const&) from /usr/lib64/libtqt-mt.so.3:0x005025dd #4 0x00007f0308769f20 in KSshProcess::getLine() from /usr/lib64/tde/tdeio_sftp.so:0x0001ff20 #5 0x00007f030876a9e8 in KSshProcess::connect() from /usr/lib64/tde/tdeio_sftp.so:0x000209e8 #6 0x00007f030875c2a6 in sftpProtocol::openConnection() from /usr/lib64/tde/tdeio_sftp.so:0x000122a6 #7 0x00007f03087624eb in sftpProtocol::stat(KURL const&) from /usr/lib64/tde/tdeio_sftp.so:0x000184eb #8 0x00007f030aa35eb0 in TDEIO::SlaveBase::dispatch(int, TQMemArray<char> const&) from /usr/lib64/libtdeio.so.14:0x00235eb0 #9 0x00007f030aa30f22 in TDEIO::SlaveBase::dispatchLoop() from /usr/lib64/libtdeio.so.14:0x00230f22 #10 0x00007f030875b50e in kdemain from /usr/lib64/tde/tdeio_sftp.so:0x0001150e #11 0x0000000000408f43 in ?? from tdeio:0x00008f43 #12 0x000000000040a1db in ?? from tdeio:0x0000a1db #13 0x000000000040a948 in ?? from tdeio:0x0000a948 #14 0x0000000000406f40 in main from tdeio:0x00006f40 #15 0x00007f0308e29a37 in ?? from /lib64/libc.so.6:0x00029a37 #16 0x00007f0308e29aec in __libc_start_main from /lib64/libc.so.6:0x00029aec #17 0x0000000000407811 in _start from tdeio:0x00007811 ] munmap_chunk(): invalid pointer tdeioslave: ####### CRASH ###### protocol = tdeio_sftp pid = 3806 signal = 6 [ #0 0x00007f0309f24922 in kdBacktrace(int) from /usr/lib64/libtdecore.so.14:0x00124922 #1 0x00007f030aa2f830 in TDEIO::SlaveBase::sigsegv_handler(int) from /usr/lib64/libtdeio.so.14:0x0022f830 #2 0x00007f0308e40f10 in ?? from /lib64/libc.so.6:0x00040f10 #3 0x00007f0308e91e3c in pthread_kill from /lib64/libc.so.6:0x00091e3c #4 0x00007f0308e40e72 in raise from /lib64/libc.so.6:0x00040e72 #5 0x00007f0308e2849b in abort from /lib64/libc.so.6:0x0002849b #6 0x00007f0308e85448 in ?? from /lib64/libc.so.6:0x00085448 #7 0x00007f0308e9b69a in ?? from /lib64/libc.so.6:0x0009b69a #8 0x00007f0308e9b8bc in ?? from /lib64/libc.so.6:0x0009b8bc #9 0x00007f0308e9fec8 in free from /lib64/libc.so.6:0x0009fec8 #10 0x000000000040acb6 in TQValueListPrivate<TQString>::~TQValueListPrivate() from tdeio:0x0000acb6 #11 0x00007f030a03dfd8 in TQStringList::~TQStringList() from /usr/lib64/libtdecore.so.14:0x0023dfd8 #12 0x00007f0308e439c5 in ?? from /lib64/libc.so.6:0x000439c5 #13 0x00007f0308e43b3a in ?? from /lib64/libc.so.6:0x00043b3a #14 0x00007f030aa2f86a in TDEIO::SlaveBase::sigsegv_handler(int) from /usr/lib64/libtdeio.so.14:0x0022f86a #15 0x00007f0308e40f10 in ?? from /lib64/libc.so.6:0x00040f10 #16 0x00007f0309b025dd in TQString::operator=(TQString const&) from /usr/lib64/libtqt-mt.so.3:0x005025dd #17 0x00007f0308769f20 in KSshProcess::getLine() from /usr/lib64/tde/tdeio_sftp.so:0x0001ff20 #18 0x00007f030876a9e8 in KSshProcess::connect() from /usr/lib64/tde/tdeio_sftp.so:0x000209e8 #19 0x00007f030875c2a6 in sftpProtocol::openConnection() from /usr/lib64/tde/tdeio_sftp.so:0x000122a6 #20 0x00007f03087624eb in sftpProtocol::stat(KURL const&) from /usr/lib64/tde/tdeio_sftp.so:0x000184eb #21 0x00007f030aa35eb0 in TDEIO::SlaveBase::dispatch(int, TQMemArray<char> const&) from /usr/lib64/libtdeio.so.14:0x00235eb0 #22 0x00007f030aa30f22 in TDEIO::SlaveBase::dispatchLoop() from /usr/lib64/libtdeio.so.14:0x00230f22 #23 0x00007f030875b50e in kdemain from /usr/lib64/tde/tdeio_sftp.so:0x0001150e #24 0x0000000000408f43 in ?? from tdeio:0x00008f43 #25 0x000000000040a1db in ?? from tdeio:0x0000a1db #26 0x000000000040a948 in ?? from tdeio:0x0000a948 #27 0x0000000000406f40 in main from tdeio:0x00006f40 #28 0x00007f0308e29a37 in ?? from /lib64/libc.so.6:0x00029a37 #29 0x00007f0308e29aec in __libc_start_main from /lib64/libc.so.6:0x00029aec #30 0x0000000000407811 in _start from tdeio:0x00007811 ] [2022/06/14 12:12:31.305] [tdeio (KRun)] [3798] 0x18cefe0 slotTimeout called [2022/06/14 11:58:38.714] [tdeio (KRun)] [3623] 0x248c560 slotTimeout called [2022/06/14 11:58:38.714] [tdeio (KRun)] [3623] KRun::abort 0x248c560 m_showingError=false [2022/06/14 11:58:38.714] [tdeio (KRun)] [3623] KRun::~KRun() 0x248c560 [2022/06/14 11:58:38.714] [tdeio (KRun)] [3623] KRun::~KRun() done 0x248c560 ``` There seems to be a crash. In the GUI, this is visible as a hang after the password prompt, and then a "io slave died unexpectedly" type of error. `sftp` connects fine.
Collaborator

tdeio_sftp does not seem to use the sftp program itself, but ssh instead (see here).

Update: the command is actually of this kind:
/usr/bin/ssh -p <port> -o ForwardX11=no -o ForwardAgent=no -e none -l <user> -v 127.0.0.1 -s sftp, which indeed hangs after entering the password, and it looks like the problem is in the -s switch because a more minimal command of the type ssh -p <port> -l <user> -s sftp also hangs.

`tdeio_sftp` does not seem to use the `sftp` program itself, but `ssh` instead [(see here)](https://mirror.git.trinitydesktop.org/gitea/TDE/tdebase/src/branch/master/tdeioslave/sftp/ksshprocess.cpp#L757). Update: the command is actually of this kind: `/usr/bin/ssh -p <port> -o ForwardX11=no -o ForwardAgent=no -e none -l <user> -v 127.0.0.1 -s sftp`, which indeed hangs after entering the password, and it looks like the problem is in the `-s` switch because a more minimal command of the type `ssh -p <port> -l <user> -s sftp` also hangs.
Collaborator
Actually, looks like it is not supposed to work this way: https://stackoverflow.com/questions/40042140/ssh-invocation-of-a-subsystem-sftp-using-command-line
Collaborator

The sftp IOslave looks quite dated. Compare with this cleaner approarch (and the KDE5 approach) which both use libssh/sftp.h instead.

The sftp IOslave looks quite dated. Compare with [this cleaner approarch](https://invent.kde.org/sandsmark/kde2-kio-sftp/-/blob/master/kio_sftp.cpp) (and the [KDE5 approach](https://invent.kde.org/network/kio-extras/-/blob/master/sftp/kio_sftp.cpp)) which both use `libssh/sftp.h` instead.
Owner

The sftp IOslave looks quite dated. Compare with this cleaner approarch (and the KDE5 approach) which both use libssh/sftp.h instead.

@blu.256 maybe an opportunity for backporting and improvement? there were some other emails about sftp not working recently, so this may actually be a very good idea.

> The sftp IOslave looks quite dated. Compare with this cleaner approarch (and the KDE5 approach) which both use libssh/sftp.h instead. @blu.256 maybe an opportunity for backporting and improvement? there were some other emails about sftp not working recently, so this may actually be a very good idea.
Collaborator

maybe an opportunity for backporting and improvement? there were some other emails about sftp not working recently, so this may actually be a very good idea.

@MicheleC Indeed it is, but I'm not sure I can undertake it :(

> maybe an opportunity for backporting and improvement? there were some other emails about sftp not working recently, so this may actually be a very good idea. @MicheleC Indeed it is, but I'm not sure I can undertake it :(
Owner

It seems the code in the link you posted is somehow derived from the original KDE3 code, but I also see a lot of more files in tdebase/tdeioslave/sftp, so we will need to understand what is included and what not in both version and why.
I will add to one of my TODO lists, but if you want to give it a go first, feel free to go ahead (@blu.256)

It seems the code in the link you posted is somehow derived from the original KDE3 code, but I also see a lot of more files in tdebase/tdeioslave/sftp, so we will need to understand what is included and what not in both version and why. I will add to one of my TODO lists, but if you want to give it a go first, feel free to go ahead (@blu.256)
Owner

somehow derived from the original KDE3 code

actually looking at the project name on the link given, I wonder if that was derived from the KDE2 code. That may also explain why there are less files in the initial import of the code.

> somehow derived from the original KDE3 code actually looking at the project name on the link given, I wonder if that was derived from the KDE2 code. That may also explain why there are less files in the initial import of the code.
Collaborator

but I also see a lot of more files in tdebase/tdeioslave/sftp, so we will need to understand what is included and what not in both version and why.

I think that's simple. Most of the KDE3/TDE code is related to interacting with the SSH process it spawns. The post-KDE4 versions, which has only a single C++ file and a single header, use LibSSH instead so they don't reinvent the wheel.

actually looking at the project name on the link given, I wonder if that was derived from the KDE2 code. That may also explain why there are less files in the initial import of the code.

Looks like it's related to this repo: https://github.com/sandsmark/kde2-kio-sftp-kde4

Looks like a port of the KDE4 version to KDE2 (notably, the author also tried to backport the KDE3 version, probably unsuccessfully).

> but I also see a lot of more files in tdebase/tdeioslave/sftp, so we will need to understand what is included and what not in both version and why. I think that's simple. Most of the KDE3/TDE code is related to interacting with the SSH process it spawns. The post-KDE4 versions, which has only a single C++ file and a single header, use LibSSH instead so they don't reinvent the wheel. > actually looking at the project name on the link given, I wonder if that was derived from the KDE2 code. That may also explain why there are less files in the initial import of the code. Looks like it's related to this repo: https://github.com/sandsmark/kde2-kio-sftp-kde4 Looks like a port of the KDE4 version to KDE2 (notably, the author also tried to [backport the KDE3 version](https://github.com/sandsmark/kde2-kio-sftp), probably unsuccessfully).
Owner

The post-KDE4 versions, which has only a single C++ file and a single header, use LibSSH instead so they don't reinvent the wheel.

ah ah, interesting. That explains it and could make the backporting effort easier :-) Thanks for the valuable info.

> The post-KDE4 versions, which has only a single C++ file and a single header, use LibSSH instead so they don't reinvent the wheel. ah ah, interesting. That explains it and could make the backporting effort easier :-) Thanks for the valuable info.
blu.256 added this to the R14.0.13 release milestone 2 years ago
Collaborator

The new SFTP ioslave has been merged and will go into R14.0.13. Meanwhile (and let @SlavekB correct me if I'm wrong) you will be able to use the Preliminary Stable Builds repository to get the update, as soon as the update is available.

The new SFTP ioslave has been merged and will go into R14.0.13. Meanwhile (and let @SlavekB correct me if I'm wrong) you will be able to use the [Preliminary Stable Builds repository](https://wiki.trinitydesktop.org/Preliminary_Stable_Builds) to get the update, as soon as the update is available.
Owner

@nmrugg are you able to install the updated package (when avail) and confirm whether this issue is resolved?

@nmrugg are you able to install the updated package (when avail) and confirm whether this issue is resolved?
nmrugg commented 2 years ago
Poster

Yes! It's working perfectly! Thanks, guys!

Yes! It's working perfectly! Thanks, guys!
nmrugg closed this issue 2 years ago
Sign in to join this conversation.
No Milestone
No Assignees
4 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: TDE/tdebase#276
Loading…
There is no content yet.