After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 62147 - crash on FTP timeout
crash on FTP timeout
Status: RESOLVED FIXED
Product: gnome-vfs
Classification: Deprecated
Component: Module: ftp
unspecified
Other Linux
: High critical
: 2.0
Assigned To: gnome-vfs maintainers
gnome-vfs maintainers
: 89046 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2001-10-11 12:39 UTC by Chris Heywood
Modified: 2005-08-15 01:48 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Chris Heywood 2001-10-11 12:39:41 UTC
when having an FTP view open to my university, if the connection times out
and then I attempt to continue the session, nautilus will crash.

reproduction:
1) connect to ftp site
2) leave for however long it takes for site to time out
3) attempt to continue the session (eg refresh)

setup:
nautilus, librsvg, eel, gnome-vfs - CVS
the rest - Debian Sid packages

In the end I had serious trouble getting a trace on it.  doesn't seem to
reproduce as easy as it was initially.  

I got this sometime in this process of attempting to find a trace.  there's
a chance it may not be from the crash, and may have been from a crash
produced from a call to quit.  hope it helps regardless.

trace:

(gdb) bt
  • #0 free
    from /lib/libc.so.6
  • #1 free
    from /lib/libc.so.6
  • #2 g_free
    from /usr/lib/libglib-1.2.so.0
  • #3 gnome_vfs_inet_connection_destroy
    at gnome-vfs-inet-connection.c line 100
  • #4 ftp_connection_destroy
    at ftp-method.c line 651
  • #5 ftp_connection_acquire
    at ftp-method.c line 748
  • #6 do_open_directory
    at ftp-method.c line 1138
  • #7 do_get_file_info
    at ftp-method.c line 1077
  • #8 gnome_vfs_get_file_info_uri_cancellable
    at gnome-vfs-cancellable-ops.c line 167
  • #9 gnome_vfs_get_file_info_uri
    at gnome-vfs-ops.c line 299
  • #10 gnome_vfs_visit_list
  • #11 count_items_and_size
    at gnome-vfs-xfer.c line 759
  • #12 gnome_vfs_xfer_delete_items
    at gnome-vfs-xfer.c line 1859
  • #13 gnome_vfs_xfer_private
    at gnome-vfs-xfer.c line 2193
  • #14 execute_xfer
    at gnome-vfs-job.c line 1513
  • #15 gnome_vfs_job_execute
    at gnome-vfs-job.c line 1595
  • #16 thread_routine
    at gnome-vfs-job-slave.c line 66
  • #17 thread_entry
    at gnome-vfs-thread-pool.c line 174
  • #18 pthread_start_thread
    from /lib/libpthread.so.0
  • #19 pthread_start_thread_event
    from /lib/libpthread.so.0

Comment 1 John Fleck 2001-10-12 03:04:11 UTC
This seems worth attending to for GNOME 2.

It will be useful if you can try 1.0.5 as soon as it's out the door
and let us know if this is still happening.
Comment 2 Chris Heywood 2001-10-12 03:32:40 UTC
Will do for sure (test with 1.0.5).  

But seeing as it's due out soon and I'm using CVS of everything
anyway, I can't see what difference that will make...
Comment 3 Maciej Stachowiak 2001-10-12 05:04:35 UTC
The crash is in gnome-vfs so I'm moving the bug there (but I'll keep
the 2.0 milestone)
Comment 4 Manuel Clos 2003-10-18 18:34:54 UTC
Chris, can you still reproduce this? if so, can you try adding #define
FTP_RESPONSE_DEBUG 1 at ftp-method.c and send the output?

Thanks.
Comment 5 Manuel Clos 2003-10-19 21:45:51 UTC
Maybe what I got is related. When we get a "421 Timeout" we keep
reading for a response. Something to do with GNOME_VFS_ERROR_CANCELLED.

I will look into it.

It will be great to know if the reporter can reproduce the crash (mine
is hang) with gnome-vfs 2.4.0.
Comment 6 Manuel Clos 2003-10-19 22:32:04 UTC
confirmed in nautilus,

it gets 100% cpu usage because keeps reading in:
read_response_line called from connection_create called from
do_open_directory.

the context is not cancelled, just doing that may help. I will check.
Comment 7 Manuel Clos 2003-10-22 20:55:30 UTC
in gnome_vfs_socket_buffer_read there is code that reads:

        if (result == GNOME_VFS_ERROR_EOF) {
              result = GNOME_VFS_OK;
        }

This doesn't look sane as the ftp method then keeps trying to read on
a ftp timeout because the result is alway GNOME_VFS_OK.

proposed patch :)

-        if (result == GNOME_VFS_ERROR_EOF) {
-              result = GNOME_VFS_OK;
-        }

Adding the patch keyword.
Comment 8 Alexander Larsson 2003-10-23 08:15:33 UTC
I think that makes sense. But if you change that then
read_response_line() in nntp-method.c and ftp-method.c has to be
changed to not call g_warning on EOF.
Comment 9 Manuel Clos 2003-10-23 21:22:39 UTC
Umh, I don't understand why.

If we get an EOF before we complete reading the response, it is an error.

While playing with this change, I never got the warning, since usually
when you do some ftp operation connection_acquire tries a "PWD"
command, and as it fails because the sockect is closed we never go to
read_response_line, but create a new connection. So I think it is good
to get the warning when you get an EOF in the middle of reading a
response line.

If you still want it as a cosmetic change, I will post a patch so that
it gets tested in 2.5.x.
Comment 10 Manuel Clos 2003-11-12 21:23:35 UTC
Alex, can you comment on my last post?

Thanks.
Comment 11 alexander.winston 2004-01-02 17:49:31 UTC
I'm changing the priority to high due to the patch and upping the
severity to critical due to this being a crasher.
Comment 12 Manuel Clos 2004-01-02 18:23:04 UTC
Hi, I'm waiting on Alexander Larsson to comment:

"I think that makes sense. But if you change that then
read_response_line() in nntp-method.c and ftp-method.c has to be
changed to not call g_warning on EOF."

I think that the g_warning makes sense, since it is an EOF while
reading a response line.
Comment 13 Alexander Larsson 2004-01-15 09:56:23 UTC
All right. I commited this.
Comment 14 Luis Villa 2004-02-22 18:42:36 UTC
*** Bug 89046 has been marked as a duplicate of this bug. ***