GNOME Bugzilla – Bug 653042
gvfsd-ftp crashed with SIGSEGV in g_io_stream_get_input_stream()
Last modified: 2015-03-11 23:20:14 UTC
this report has been filed here: https://bugs.launchpad.net/ubuntu/+source/gvfs/+bug/797253 "crashed while accessing a remote FTP site. The FTP site required a login (not anonymous FTP)." ".
+ Trace 227537
Thread 1 (Thread 15574)
Also appears in Fedora 15/Gnome 3 Backtrace: [New LWP 7857] [New LWP 7850] [New LWP 7852] [New LWP 7848] [Thread debugging using libthread_db enabled] Core was generated by `/usr/libexec/gvfsd-ftp --spawner :1.4 /org/gtk/gvfs/exec_spaw/5'. Program terminated with signal 11, Segmentation fault.
+ Trace 227645
From To Syms Read Shared Object Library 0x41581c60 0x4158d47c Yes /usr/lib/libgvfscommon.so.0 0x416d8040 0x416f1c7c Yes /lib/libexpat.so.1 0x41419c50 0x414d640c Yes /lib/libgio-2.0.so.0 0x413abfe0 0x413df72c Yes /lib/libgobject-2.0.so.0 0x413f5bd0 0x413f6d4c Yes /lib/libgmodule-2.0.so.0 0x4139ef30 0x413a070c Yes /lib/libgthread-2.0.so.0 0x415356a0 0x41564cfc Yes /lib/libdbus-1.so.3 0x411b95f0 0x411c4d3c Yes /lib/libpthread.so.0 0x411d9880 0x411dd39c Yes /lib/librt.so.1 0x4f8ba2f0 0x4f8cc40c Yes /usr/lib/libgnome-keyring.so.0 0x41279770 0x413173dc Yes /lib/libglib-2.0.so.0 0x42909a20 0x4290a42c Yes /lib/libutil.so.1 0x4103ed10 0x4115cc84 Yes /lib/libc.so.6 0x411d1a60 0x411d2a8c Yes /lib/libdl.so.2 0x413845f0 0x4139464c Yes /lib/libresolv.so.2 0x4122f670 0x4123caac Yes /lib/libz.so.1 0x4124a490 0x4125bd9c Yes /lib/libselinux.so.1 0x41007850 0x4101eaff Yes /lib/ld-linux.so.2 0x4f818280 0x4f86b61c Yes /lib/libgcrypt.so.11 0x4f7a3630 0x4f7a3c3c Yes /lib/libgpg-error.so.0 0x41ca6760 0x41d19fdb Yes /usr/lib/libstdc++.so.6 0x411e6470 0x41201b4c Yes /lib/libm.so.6 0x41210f30 0x41227c5c Yes /lib/libgcc_s.so.1 0x00b682c0 0x00b698dc Yes /usr/lib/gio/modules/libgiognomeproxy.so 0x0029cdc0 0x002a0a8c Yes /usr/lib/gio/modules/libdconfsettings.so 0x0032da40 0x00334f3c Yes /lib/libnss_files.so.2 0x00b48810 0x00b4972c Yes /lib/libnss_mdns4_minimal.so.2 0x00344c00 0x00348d8c Yes /lib/libnss_dns.so.2 $1 = 0x0 $2 = 0x0 eax 0x0 0 ecx 0xb5800030 -1249902544 edx 0x0 0 ebx 0x80791ac 134713772 esp 0xb61ff24c 0xb61ff24c ebp 0x876dae8 0x876dae8 esi 0x876dae8 142007016 edi 0x876daa0 142006944 eip 0x0 0 eflags 0x10246 [ PF ZF IF RF ] cs 0x73 115 ss 0x7b 123 ds 0x7b 123 es 0x7b 123 fs 0x0 0 gs 0x33 51 No function contains program counter for selected frame.
(In reply to comment #1) > Also appears in Fedora 15/Gnome 3 Can you please tell us how to reproduce this issue?
Cannot. Because when I start ftp connection from "Places->Connect to server" nautilus now opens FTP connections in web browser (i.e. google chrome) and not in Nautilus window. Don't know why.
*** Bug 664649 has been marked as a duplicate of this bug. ***
Created attachment 298216 [details] [review] ftp: Prevent segfault when unmounting If a job is waiting for a connection in g_vfs_ftp_task_acquire_connection and the backend is force unmounted, the queue is freed, and the function neither gets a connection nor sets an error message which causes an issue later. To fix this, set an error message if the queue is freed.
This was reported also in Fedora downstream: https://bugzilla.redhat.com/show_bug.cgi?id=1130172 https://bugzilla.redhat.com/show_bug.cgi?id=1124544
Review of attachment 298216 [details] [review]: Seems good, can I test it somehow?
I tested it by: Forcing max_connections to one. Mount a ftp site and wait for the ftp connection to become idle and unusable (you can set a short timeout on the ftp server). Then run: $ gvfs-ls ftp://../.. & gvfs-ls ftp://../.. so that at least one thread waits for a new connection in g_vfs_ftp_task_acquire_connection(). In another terminal, force unmount the backend and without the patch it will segfault with a similar backtrace.
Review of attachment 298216 [details] [review]: Please push it... ::: daemon/gvfsftptask.c @@ +275,2 @@ g_mutex_unlock (&ftp->mutex); + but the whitespace isn't necessary...
Would be good to push it also at least for gnome-3-14...
Pushed to master as d603ba4983d249349e7384f31fd2ed921e65e869 and gnome-3-14 as 1ac59714428a8a4267396b45d62532f40fa77120. Thanks for the review. The whitespace change was intentional to more clearly separate the locked section from the unlocked section.