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 170947 - [PATCH] gnome-vfs can crash when calling xdg_mime* functions
[PATCH] gnome-vfs can crash when calling xdg_mime* functions
Status: RESOLVED FIXED
Product: gnome-vfs
Classification: Deprecated
Component: MIME and file/program mapping
2.9.x
Other All
: High critical
: ---
Assigned To: gnome-vfs maintainers
gnome-vfs maintainers
: 315702 316740 317202 317274 318009 318284 319792 324188 326377 332614 334619 370486 407612 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-03-20 00:15 UTC by Joe Marcus Clarke
Modified: 2007-02-14 18:09 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
Wrap all xdg_mime* functions withoin mime_mutex (1.06 KB, patch)
2005-03-20 00:16 UTC, Joe Marcus Clarke
committed Details | Review
fix the rest of the cases (4.73 KB, patch)
2005-08-31 11:01 UTC, Alexander Larsson
committed Details | Review

Description Joe Marcus Clarke 2005-03-20 00:15:52 UTC
Steps to reproduce:
1. Right-click on an icon in Nautilus
2. The crash is not 100% reproducible, as it is caused by reentrancy into xdgmime
3. 


Stack trace:


Other information:
While all of the xdg_mime* functions called xdg_mime_init(), not all of them are
protected with mime_mutex in gnome-vfs-mime.c.  The attached patch wraps all of
the xdg_mime* functions inside mime_mutex, and seems to stop the crashes.
Comment 1 Joe Marcus Clarke 2005-03-20 00:16:33 UTC
Created attachment 38952 [details] [review]
Wrap all xdg_mime* functions withoin mime_mutex
Comment 2 Alexander Larsson 2005-06-23 11:21:32 UTC
Good catch! Thanks a lot!
Commited.
Comment 3 Alexander Larsson 2005-06-23 11:28:59 UTC
also commited to 2-10 branch
Comment 4 Alexander Larsson 2005-08-31 11:01:02 UTC
Actually, there seems to be some places where this was missed.
Comment 5 Alexander Larsson 2005-08-31 11:01:45 UTC
Created attachment 51603 [details] [review]
fix the rest of the cases
Comment 6 Alexander Larsson 2005-08-31 13:19:00 UTC
commited.
Comment 7 Christian Kirbach 2005-09-11 20:00:28 UTC
*** Bug 315702 has been marked as a duplicate of this bug. ***
Comment 8 oll 2005-09-22 11:43:03 UTC
First patch solves 95% of the problems for my 50 gnome 2.10  users. (see #306143)


But even  applied , users have sometimes a related gnome crash (see bt below).
The second patch ( id=51603 ) seems to strenghten the first one. Unfortuntly, I
didn't succeed in applying it with gnome-vfs-2.10.1. I guess it's for 2.12.

Is there a chance to have the same patch for 2.10 ?

Using host libthread_db library "/lib/tls/libthread_db.so.1".
Core was generated by `/opt/STools/gnome-2.10/bin/nautilus'.

Thread 7 (process 5065)

  • #0 _dl_sysinfo_int80
    from /lib/ld-linux.so.2
  • #1 __waitpid_nocancel
    from /lib/tls/libpthread.so.0
  • #2 libgnomeui_segv_handle
    from /opt/STools/gnome-2.10/lib/libgnomeui-2.so.0
  • #3 <signal handler called>
  • #4 free
    from /lib/tls/libc.so.6
  • #5 _xdg_glob_list_free
    from /opt/STools/gnome-2.10/lib/libgnomevfs-2.so.0
  • #6 _gnome_vfs_xdg_hash_free
    from /opt/STools/gnome-2.10/lib/libgnomevfs-2.so.0
  • #7 _gnome_vfs_xdg_shutdown
    from /opt/STools/gnome-2.10/lib/libgnomevfs-2.so.0
  • #8 xdg_mime_init
    from /opt/STools/gnome-2.10/lib/libgnomevfs-2.so.0
  • #9 _gnome_vfs_xdg_get_mime_type_from_file_name
    from /opt/STools/gnome-2.10/lib/libgnomevfs-2.so.0
  • #10 gnome_vfs_mime_type_from_name_or_default
    from /opt/STools/gnome-2.10/lib/libgnomevfs-2.so.0
  • #11 _gnome_vfs_get_mime_type_internal
    from /opt/STools/gnome-2.10/lib/libgnomevfs-2.so.0
  • #12 gnome_vfs_get_file_mime_type_internal
    from /opt/STools/gnome-2.10/lib/libgnomevfs-2.so.0
  • #13 get_mime_type
    from /opt/STools/gnome-2.10/lib/gnome-vfs-2.0/modules/libfile.so
  • #14 do_get_file_info
    from /opt/STools/gnome-2.10/lib/gnome-vfs-2.0/modules/libfile.so
  • #15 gnome_vfs_get_file_info_uri_cancellable
    from /opt/STools/gnome-2.10/lib/libgnomevfs-2.so.0
  • #16 _gnome_vfs_job_execute
    from /opt/STools/gnome-2.10/lib/libgnomevfs-2.so.0
  • #17 thread_routine
    from /opt/STools/gnome-2.10/lib/libgnomevfs-2.so.0
  • #18 thread_entry
    from /opt/STools/gnome-2.10/lib/libgnomevfs-2.so.0
  • #19 g_thread_create_proxy
    at gthread.c line 561
  • #20 start_thread
    from /lib/tls/libpthread.so.0
  • #21 clone
    from /lib/tls/libc.so.6

Comment 9 Christian Neumair 2005-09-28 10:48:06 UTC
*** Bug 317274 has been marked as a duplicate of this bug. ***
Comment 10 Christian Neumair 2005-10-01 20:53:19 UTC
*** Bug 317202 has been marked as a duplicate of this bug. ***
Comment 11 Christian Neumair 2005-10-03 16:34:44 UTC
*** Bug 316740 has been marked as a duplicate of this bug. ***
Comment 12 Christian Neumair 2005-10-05 16:43:03 UTC
*** Bug 318009 has been marked as a duplicate of this bug. ***
Comment 13 Christian Neumair 2005-10-08 14:20:37 UTC
*** Bug 318284 has been marked as a duplicate of this bug. ***
Comment 14 Christian Neumair 2005-10-28 15:50:15 UTC
*** Bug 319792 has been marked as a duplicate of this bug. ***
Comment 15 Martin Wehner 2005-12-18 17:34:31 UTC
*** Bug 324188 has been marked as a duplicate of this bug. ***
Comment 16 Christian Neumair 2006-02-26 12:11:28 UTC
*** Bug 332614 has been marked as a duplicate of this bug. ***
Comment 17 Sergej Kotliar 2006-03-15 10:49:34 UTC
*** Bug 334619 has been marked as a duplicate of this bug. ***
Comment 18 Fabio Bonelli 2006-04-03 00:44:28 UTC
*** Bug 326377 has been marked as a duplicate of this bug. ***
Comment 19 André Klapper 2006-11-04 17:13:19 UTC
*** Bug 370486 has been marked as a duplicate of this bug. ***
Comment 20 André Klapper 2007-02-14 18:09:53 UTC
*** Bug 407612 has been marked as a duplicate of this bug. ***