Bug 161951 - fish:// stalls when uploading
Summary: fish:// stalls when uploading
Status: RESOLVED NOT A BUG
Alias: None
Product: kio
Classification: Unmaintained
Component: fish (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Jörg Walter
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-11 13:05 UTC by Thorsten Staerk
Modified: 2009-01-04 20:06 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
testcase that should upload a file to localhost (1013 bytes, text/x-c++src)
2008-05-11 13:07 UTC, Thorsten Staerk
Details
CMakeLists.txt needed to compile the test case (247 bytes, text/plain)
2008-05-11 13:08 UTC, Thorsten Staerk
Details
working, as I added #include lines (1.86 KB, text/x-c++src)
2008-05-11 13:30 UTC, Thorsten Staerk
Details
trace file when stalling (48.66 KB, application/x-gzip)
2008-05-11 13:42 UTC, Thorsten Staerk
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thorsten Staerk 2008-05-11 13:05:22 UTC
Version:            (using Devel)
Installed from:    Compiled sources
OS:                Linux

When I upload something via fish://, the process stalls. It does not ask for a password, does not terminate and the file on the remote computer does not change. I attach a test case.
Comment 1 Thorsten Staerk 2008-05-11 13:07:44 UTC
Created attachment 24710 [details]
testcase that should upload a file to localhost

Before calling this test case, you need to 
 useradd -m fishuser
 passwd fishuser

And do a cmake . && make to compile the test case. I add an attachment.
Comment 2 Thorsten Staerk 2008-05-11 13:08:17 UTC
Created attachment 24712 [details]
CMakeLists.txt needed to compile the test case
Comment 3 Thorsten Staerk 2008-05-11 13:30:02 UTC
The interesting thing is that it does work if I add some #include lines.
Comment 4 Thorsten Staerk 2008-05-11 13:30:36 UTC
Created attachment 24713 [details]
working, as I added #include lines
Comment 5 Thorsten Staerk 2008-05-11 13:36:17 UTC
It just works sometimes, and sometimes I get EAGAIN.
Comment 6 Thorsten Staerk 2008-05-11 13:42:38 UTC
Created attachment 24715 [details]
trace file when stalling

note the part

socket(PF_FILE, SOCK_STREAM, 0) 	= 7
connect(7, {sa_family=AF_FILE, path="/tmp/.X11-unix/X0"}, 110) = 0
getpeername(7, {sa_family=AF_FILE, path="/tmp/.X11-unix/X0"},
[8371910236600008724]) = 0
uname({sys="Linux", node="tweedleburg", ...}) = 0
access("/root/.Xauthority", R_OK)	= 0
open("/root/.Xauthority", O_RDONLY)	= 8
fstat(8, {st_mode=S_IFREG|0600, st_size=386, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x2ae1a8f0a000
read(8, "\0\0\0\4\300\250\0\5\0\0010\0\22MIT-MAGIC-COOKIE-1\0"..., 4096) = 386
close(8)				= 0
munmap(0x2ae1a8f0a000, 4096)		= 0
fcntl(7, F_GETFL)			= 0x2 (flags O_RDWR)
fcntl(7, F_SETFL, O_RDWR|O_NONBLOCK)	= 0
fcntl(7, F_SETFD, FD_CLOEXEC)		= 0
select(8, [7], [7], NULL, NULL) 	= 1 (out [7])
writev(7, [{"l\0\v\0\0\0\22\0\20\0", 10}, {"\0\0", 2}, {"MIT-MAGIC-COOKIE-1",
18}, {"\0\0", 2}, {"z\222\317?\371R\333\331\'\37\311\16A\231\213M", 16}, {"",
0}], 6) = 48
read(7, 0x6294d0, 8)			= -1 EAGAIN (Resource temporarily
unavailable)
Comment 7 Thorsten Staerk 2008-05-11 13:49:30 UTC
Adding debugging output I find that the command 
      if (!KIO::NetAccess::upload( tmpFile.fileName(), url, 0 )) err=QString::fromLatin1("Could not upload");
does not return.
Comment 8 Albert Astals Cid 2008-05-12 14:50:30 UTC
This is on kde4 right? Can you test after r806784?
Comment 9 Thorsten Staerk 2009-01-04 20:06:00 UTC
It all works correctly now and I describe how on http://www.staerk.de/thorsten/index.php/Using_a_kioslave_in_KDE_4#kio_fish
One problem is that I did not understand kio_fish's signal/slot mechanism, so I set this to invalid.