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 319697 - gamin segfault: glibc detected: free(): invalid pointer
gamin segfault: glibc detected: free(): invalid pointer
Status: RESOLVED FIXED
Product: gamin
Classification: Other
Component: general
unspecified
Other Linux
: Normal major
: ---
Assigned To: Gamin Maintainer(s)
Gamin Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2005-10-25 02:29 UTC by Ed Catmur
Modified: 2005-10-27 11:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch gam_listener.c (778 bytes, patch)
2005-10-26 20:12 UTC, Ed Catmur
none Details | Review

Description Ed Catmur 2005-10-25 02:29:19 UTC
In an empty X session, run gam_server from one terminal and nautilus from another:

$ GAM_DEBUG= GAM_CLIENT_ID= /usr/libexec/gam_server
added /media/*,1 to excludes
added /mnt/*,1 to excludes
added /dev/*,1 to excludes
added /proc/*,1 to excludes
Updating list of mounted filesystems
g_n_n: node for / using kernel with poll timeout of 0
basic poll backend initialized
inotify backend initialized
Using inotify as backend
Ready listening to socket /tmp/fam-prometheus- : 4
No more active connections
gam_incoming_conn_read called
accepted incoming connection: 5
Created connection 5
gam_client_conn_read called
read credentials byte
Credentials: s_uid 1003, c_uid 1003, c_gid 100, c_pid 31507
gam_client_conn_read called
MONFILE request: from nautilus, seq 1, type 1 options 0
nautilus listening for
/home/prometheus/.local/share/applications/mimeinfo.cacheg_a_s:
/home/prometheus/.local/share/applications/mimeinfo.cache using poll monitoring
Adding sub /home/prometheus/.local/share/applications/mimeinfo.cache to listener
nautilus
g_n_n: node for /home using poll with poll timeout of 5
g_n_n: node for /home/prometheus using poll with poll timeout of 5
g_n_n: node for /home/prometheus/.local using poll with poll timeout of 5
g_n_n: node for /home/prometheus/.local/share using poll with poll timeout of 5
g_n_n: node for /home/prometheus/.local/share/applications using poll with poll
timeout of 5
g_n_n: node for /home/prometheus/.local/share/applications/mimeinfo.cache using
poll with poll timeout of 5
poll-basic: 0 && 1130207136 < 5
Poll: poll_file for /home/prometheus/.local/share/applications/mimeinfo.cache called
Poll: file is new
New file subscription: /home/prometheus/.local/share/applications/mimeinfo.cache
event 64
Poll: adding missing node /home/prometheus/.local/share/applications/mimeinfo.cache
Poll: Adding node /home/prometheus/.local/share/applications/mimeinfo.cache
Poll: added subscription for
/home/prometheus/.local/share/applications/mimeinfo.cache
gam_client_conn_read called
MONFILE request: from nautilus, seq 2, type 1 options 0
nautilus listening for /home/prometheus/.local/share/applications/defaults.list
g_a_s: /home/prometheus/.local/share/applications/defaults.list using poll
monitoring
Adding sub /home/prometheus/.local/share/applications/defaults.list to listener
nautilus
g_n_n: node for /home/prometheus/.local/share/applications/defaults.list using
poll with poll timeout of 5
poll-basic: 0 && 1130207136 < 5
Poll: poll_file for /home/prometheus/.local/share/applications/defaults.list called
Poll: file is new
New file subscription: /home/prometheus/.local/share/applications/defaults.list
event 0
Poll: Adding node /home/prometheus/.local/share/applications/defaults.list
Poll: added subscription for
/home/prometheus/.local/share/applications/defaults.list
gam_client_conn_read called
MONFILE request: from nautilus, seq 3, type 1 options 0
nautilus listening for /usr/local/share/applications/mimeinfo.cache
g_a_s: /usr/local/share/applications/mimeinfo.cache using kernel monitoring
inotify: success adding watch for /usr/local/share/applications/mimeinfo.cache
(wd = 1)
Adding sub /usr/local/share/applications/mimeinfo.cache to listener nautilus
inotify: Sending initial events for
/usr/local/share/applications/mimeinfo.cacheMONFILE request: from nautilus, seq
4, type 1 options 0
nautilus listening for /usr/local/share/applications/defaults.list
g_a_s: /usr/local/share/applications/defaults.list using kernel monitoring
inotify: failed to add watch for /usr/local/share/applications/defaults.list
inotify: reason 2 = No such file or directory
inotify: could not add watch for /usr/local/share/applications/defaults.list
inotify: adding /usr/local/share/applications/defaults.list to missing list MISSING
inotify-missing: add - /usr/local/share/applications/defaults.list
Adding sub /usr/local/share/applications/defaults.list to listener nautilus
inotify: Sending initial events for /usr/local/share/applications/defaults.list
-- WAS_MISSING
MONFILE request: from nautilus, seq 5, type 1 options 0
nautilus listening for /usr/share/applications/mimeinfo.cache
g_a_s: /usr/share/applications/mimeinfo.cache using kernel monitoring
inotify: success adding watch for /usr/share/applications/mimeinfo.cache (wd = 2)
Adding sub /usr/share/applications/mimeinfo.cache to listener nautilus
inotify: Sending initial events for /usr/share/applications/mimeinfo.cache
MONFILE request: from nautilus, seq 6, type 1 options 0
nautilus listening for /usr/share/applications/defaults.list
g_a_s: /usr/share/applications/defaults.list using kernel monitoring
inotify: failed to add watch for /usr/share/applications/defaults.list
inotify: reason 2 = No such file or directory
inotify: could not add watch for /usr/share/applications/defaults.list
inotify: adding /usr/share/applications/defaults.list to missing list MISSING
inotify-missing: add - /usr/share/applications/defaults.list
Adding sub /usr/share/applications/defaults.list to listener nautilus
inotify: Sending initial events for /usr/share/applications/defaults.list --
WAS_MISSING
Event to nautilus : 1, 2,
/home/prometheus/.local/share/applications/mimeinfo.cache Deleted
Event to nautilus : 1, 9,
/home/prometheus/.local/share/applications/mimeinfo.cache None
Event to nautilus : 2, 8,
/home/prometheus/.local/share/applications/defaults.list Exists
Event to nautilus : 2, 9,
/home/prometheus/.local/share/applications/defaults.list None
Event to nautilus : 3, 8, /usr/local/share/applications/mimeinfo.cache Exists
Event to nautilus : 3, 9, /usr/local/share/applications/mimeinfo.cache None
Event to nautilus : 4, 2, /usr/local/share/applications/defaults.list Deleted
Event to nautilus : 4, 9, /usr/local/share/applications/defaults.list None
Event to nautilus : 5, 8, /usr/share/applications/mimeinfo.cache Exists
Event to nautilus : 5, 9, /usr/share/applications/mimeinfo.cache None
Event to nautilus : 6, 2, /usr/share/applications/defaults.list Deleted
Event to nautilus : 6, 9, /usr/share/applications/defaults.list None
poll-basic: not enough time passed for
/home/prometheus/.local/share/applications/defaults.list
poll-basic: not enough time passed for
/home/prometheus/.local/share/applications/mimeinfo.cache
Checking missing file /home/prometheus/.local/share/applications/mimeinfo.cache
poll-basic: not enough time passed for
/home/prometheus/.local/share/applications/mimeinfo.cache
New active connection
gam_incoming_conn_read called
accepted incoming connection: 6
Created connection 6
gam_client_conn_read called
read credentials byte
Credentials: s_uid 1003, c_uid 1003, c_gid 100, c_pid 31514
gam_client_conn_read called
MONFILE request: from /usr/libexec/gnome-vfs-daemon, seq 1, type 1 options 0
/usr/libexec/gnome-vfs-daemon listening for /etc/fstab
g_a_s: /etc/fstab using kernel monitoring
inotify: success adding watch for /etc/fstab (wd = 3)
Adding sub /etc/fstab to listener /usr/libexec/gnome-vfs-daemon
inotify: Sending initial events for /etc/fstab
gam_client_conn_read called
MONFILE request: from /usr/libexec/gnome-vfs-daemon, seq 2, type 1 options 0
/usr/libexec/gnome-vfs-daemon listening for /etc/mtab
g_a_s: /etc/mtab using kernel monitoring
inotify: success adding watch for /etc/mtab (wd = 4)
Adding sub /etc/mtab to listener /usr/libexec/gnome-vfs-daemon
inotify: Sending initial events for /etc/mtab
Event to /usr/libexec/gnome-vfs-daemon : 1, 8, /etc/fstab Exists
Event to /usr/libexec/gnome-vfs-daemon : 1, 9, /etc/fstab None
Event to /usr/libexec/gnome-vfs-daemon : 2, 8, /etc/mtab Exists
Event to /usr/libexec/gnome-vfs-daemon : 2, 9, /etc/mtab None
poll-basic: not enough time passed for
/home/prometheus/.local/share/applications/defaults.list
poll-basic: not enough time passed for
/home/prometheus/.local/share/applications/mimeinfo.cache
Checking missing file /home/prometheus/.local/share/applications/mimeinfo.cache
poll-basic: not enough time passed for
/home/prometheus/.local/share/applications/mimeinfo.cache
inotify recieved 4 events
inotify: moved 4 events to event queue
inotify: resource /usr/local/share/applications/mimeinfo.cache went away. Adding
it to missing list
inotify: Emitting Deleted on /usr/local/share/applications/mimeinfo.cache
inotify-missing: add - /usr/local/share/applications/mimeinfo.cache
inotify: got IGNORED event for unknown wd 1
inotify: resource /usr/share/applications/mimeinfo.cache went away. Adding it to
missing list
inotify: Emitting Deleted on /usr/share/applications/mimeinfo.cache
inotify-missing: add - /usr/share/applications/mimeinfo.cache
inotify: got IGNORED event for unknown wd 2
Event to nautilus : 3, 2, /usr/local/share/applications/mimeinfo.cache Deleted
Event to nautilus : 5, 2, /usr/share/applications/mimeinfo.cache Deleted
gam_client_conn_read called
MONFILE request: from nautilus, seq 7, type 1 options 0
nautilus listening for /home/prometheus/.gtk-bookmarks
g_a_s: /home/prometheus/.gtk-bookmarks using poll monitoring
Adding sub /home/prometheus/.gtk-bookmarks to listener nautilus
g_n_n: node for /home/prometheus/.gtk-bookmarks using poll with poll timeout of 5
poll-basic: 0 && 1130207138 < 5
Poll: poll_file for /home/prometheus/.gtk-bookmarks called
Poll: file is new
New file subscription: /home/prometheus/.gtk-bookmarks event 64
Poll: adding missing node /home/prometheus/.gtk-bookmarks
Poll: Adding node /home/prometheus/.gtk-bookmarks
Poll: added subscription for /home/prometheus/.gtk-bookmarks
inotify: success adding watch for /usr/share/applications/mimeinfo.cache (wd = 5)
inotify: Missing resource /usr/share/applications/mimeinfo.cache exists now
inotify: Sending initial events for /usr/share/applications/mimeinfo.cache --
WAS_MISSING
inotify-missing: rm - /usr/share/applications/mimeinfo.cache
poll-basic: not enough time passed for /home/prometheus/.gtk-bookmarks
poll-basic: not enough time passed for
/home/prometheus/.local/share/applications/defaults.list
poll-basic: not enough time passed for
/home/prometheus/.local/share/applications/mimeinfo.cache
Checking missing file /home/prometheus/.gtk-bookmarks
poll-basic: not enough time passed for /home/prometheus/.gtk-bookmarks
Checking missing file /home/prometheus/.local/share/applications/mimeinfo.cache
poll-basic: not enough time passed for
/home/prometheus/.local/share/applications/mimeinfo.cache
Event to nautilus : 7, 2, /home/prometheus/.gtk-bookmarks Deleted
Event to nautilus : 7, 9, /home/prometheus/.gtk-bookmarks None
Event to nautilus : 5, 5, /usr/share/applications/mimeinfo.cache Created
gam_client_conn_read called
MONDIR request: from nautilus, seq 8, type 2 options 0
nautilus listening for /home/prometheus/Desktop
g_a_s: /home/prometheus/Desktop using poll monitoring
Adding sub /home/prometheus/Desktop to listener nautilus
g_n_n: node for /home/prometheus/Desktop using poll with poll timeout of 5
Looking for existing files in: /home/prometheus/Desktop
poll-basic: 0 && 1130207139 < 5
Poll: poll_file for /home/prometheus/Desktop called
Poll: file is new
Unregistered node /home/prometheus/Desktop/starthere.desktop
g_n_n: node for /home/prometheus/Desktop/starthere.desktop using poll with poll
timeout of 5
Unregistered node /home/prometheus/Desktop/imperial.lyx
g_n_n: node for /home/prometheus/Desktop/imperial.lyx using poll with poll
timeout of 5
Unregistered node /home/prometheus/Desktop/Downloads
g_n_n: node for /home/prometheus/Desktop/Downloads using poll with poll timeout of 5
Done scanning /home/prometheus/Desktop
Poll: Adding node /home/prometheus/Desktop
Poll: added subscription for /home/prometheus/Desktop
gam_client_conn_read called
CANCEL request: from nautilus, seq 8, type 3 options 0
Cancelling subscription with reqno 8
Removing sub /home/prometheus/Desktop from listener nautilus
nautilus not listening for /home/prometheus/Desktop
Tree has 12 nodes
Removing node /home/prometheus/Desktop
remove_directory_subscription /home/prometheus/Desktop
  => remove_dir /home/prometheus/Desktop
Tree has 8 nodes
Poll: removed subscription for /home/prometheus/Desktop
*** glibc detected *** /usr/libexec/gam_server: free(): invalid pointer:
0x080678b0 ***
======= Backtrace: =========
/lib/libc.so.6[0x41843c51]
/lib/libc.so.6(__libc_free+0x89)[0x418446a9]
/usr/lib/libglib-2.0.so.0(g_free+0x26)[0xb7f08355]
/usr/libexec/gam_server[0x804a716]
/usr/libexec/gam_server[0x80507cd]
/usr/libexec/gam_server[0x8050b65]
/usr/libexec/gam_server[0x804f417]
/usr/lib/libglib-2.0.so.0[0xb7f2e75f]
/usr/lib/libglib-2.0.so.0[0xb7f00d93]
/usr/lib/libglib-2.0.so.0(g_main_context_dispatch+0x79)[0xb7f0204d]
/usr/lib/libglib-2.0.so.0[0xb7f024f8]
/usr/lib/libglib-2.0.so.0(g_main_loop_run+0x371)[0xb7f02c54]
/usr/libexec/gam_server[0x804bc1e]
/lib/libc.so.6(__libc_start_main+0xec)[0x417f755c]
/usr/libexec/gam_server[0x804a5f1]
======= Memory map: ========
08048000-0805d000 r-xp 00000000 03:02 23174      /usr/libexec/gam_server
0805d000-0805e000 rw-p 00015000 03:02 23174      /usr/libexec/gam_server
0805e000-0807f000 rw-p 0805e000 00:00 0          [heap]
41000000-41019000 r-xp 00000000 03:02 8494       /lib/ld-2.3.90.so
41019000-4101a000 r--p 00018000 03:02 8494       /lib/ld-2.3.90.so
4101a000-4101b000 rw-p 00019000 03:02 8494       /lib/ld-2.3.90.so
417e2000-418f4000 r-xp 00000000 03:02 8505       /lib/libc-2.3.90.so
418f4000-418f6000 r--p 00112000 03:02 8505       /lib/libc-2.3.90.so
418f6000-418f8000 rw-p 00114000 03:02 8505       /lib/libc-2.3.90.so
418f8000-418fa000 rw-p 418f8000 00:00 0
42203000-4220b000 r-xp 00000000 03:02 37729     
/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/libgcc_s.so.1
4220b000-4220c000 rw-p 00007000 03:02 37729     
/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/libgcc_s.so.1
42691000-426a2000 r-xp 00000000 03:02 8526       /lib/libnsl-2.3.90.so
426a2000-426a3000 r--p 00010000 03:02 8526       /lib/libnsl-2.3.90.so
426a3000-426a4000 rw-p 00011000 03:02 8526       /lib/libnsl-2.3.90.so
426a4000-426a6000 rw-p 426a4000 00:00 0
b7d00000-b7d21000 rw-p b7d00000 00:00 0
b7d21000-b7e00000 ---p b7d21000 00:00 0
b7e79000-b7eba000 rw-p b7e79000 00:00 0
b7eba000-b7ec2000 r-xp 00000000 03:02 8529       /lib/libnss_files-2.3.90.so
b7ec2000-b7ec3000 r--p 00007000 03:02 8529       /lib/libnss_files-2.3.90.so
b7ec3000-b7ec4000 rw-p 00008000 03:02 8529       /lib/libnss_files-2.3.90.so
b7ec4000-b7ecc000 r-xp 00000000 03:02 8531       /lib/libnss_nis-2.3.90.so
b7ecc000-b7ecd000 r--p 00007000 03:02 8531       /lib/libnss_nis-2.3.90.so
b7ecd000-b7ece000 rw-p 00008000 03:02 8531       /lib/libnss_nis-2.3.90.so
b7ece000-b7ed4000 r-xp 00000000 03:02 8527       /lib/libnss_compat-2.3.90.so
b7ed4000-b7ed5000 r--p 00006000 03:02 8527       /lib/libnss_compat-2.3.90.so
b7ed5000-b7ed6000 rw-p 00007000 03:02 8527       /lib/libnss_compat-2.3.90.so
b7ed6000-b7ed7000 rw-p b7ed6000 00:00 0
b7ed7000-b7f64000 r-xp 00000000 03:02 63519     
/usr/lib/libglib-2.0.so.0.800.3b7f64000-b7f65000 rw-p 0008d000 03:02 63519     
/usr/lib/libglib-2.0.so.0.800.3b7f65000-b7f66000 rw-p b7f65000 00:00 0
b7f7e000-b7f84000 r--s 00000000 03:02 38011      /usr/lib/gconv/gconv-modules.cache
bf86f000-bf884000 rw-p bf86f000 00:00 0          [stack]
ffffe000-fffff000 ---p 00000000 00:00 0          [vdso]
Aborted

$ nautilus
Initializing nautilus-open-terminal extension
Initializing nautilus-share extension
Initializing bulldozer extension
seahorse nautilus module initialized
failed to read() from server connection

Resulting behaviour is as in bug 313606 etc.: massive CPU hogging as gam_server
continually restarts and clients spin.
Comment 1 Ed Catmur 2005-10-25 02:35:27 UTC
backtrace:

  • #0 __kernel_vsyscall
  • #1 raise
    from /lib/libc.so.6
  • #2 abort
    from /lib/libc.so.6
  • #3 __libc_message
    from /lib/libc.so.6
  • #4 malloc_printerr
    from /lib/libc.so.6
  • #5 free
    from /lib/libc.so.6
  • #6 IA__g_free
    at gmem.c line 187
  • #7 gam_subscription_free
    at gam_subscription.c line 107
  • #8 gam_connection_request
    at gam_connection.c line 391
  • #9 gam_connection_data
    at gam_connection.c line 491
  • #10 gam_client_conn_read
    at gam_channel.c line 283
  • #11 g_io_unix_dispatch
    at giounix.c line 162
  • #12 g_main_dispatch
    at gmain.c line 1934
  • #13 IA__g_main_context_dispatch
    at gmain.c line 2484
  • #14 g_main_context_iterate
    at gmain.c line 2565

How do I turn GAM_SUB_VERBOSE on - pass it in CFLAGS?
Comment 2 Ed Catmur 2005-10-25 02:57:20 UTC
gdb session:

(gdb) b gam_subscription_free
Breakpoint 1 at 0x804a701: file gam_subscription.c, line 100.
(gdb) r
...
Removing node /home/prometheus/Desktop
remove_directory_subscription /home/prometheus/Desktop
  => remove_dir /home/prometheus/Desktop
Tree has 8 nodes
Poll: removed subscription for /home/prometheus/Desktop

Breakpoint 1, gam_subscription_free (sub=0x8064740) at gam_subscription.c:100
100         if (sub == NULL)
(gdb) p *sub
$1 = {path = 0x8064768 "/home/prometheus/Desktop", events = 1008, reqno = 8,
  pathlen = 24, options = 0, is_dir = 1, cancelled = 1, listener = 0x8062bd0}
(gdb) c
Continuing.

Breakpoint 1, gam_subscription_free (sub=0x8064740) at gam_subscription.c:100
100         if (sub == NULL)
(gdb) p *sub
$2 = {path = 0x8064760 "", events = 1008, reqno = 8, pathlen = 24,
  options = 0, is_dir = 1, cancelled = 1, listener = 0x8062bd0}

Note this is a double free - I hit c here and got

(gdb) c
Continuing.
*** glibc detected *** /usr/libexec/gam_server: double free or corruption (out):
0x08064760 ***
======= Backtrace: =========
/lib/libc.so.6[0x41843c51]
/lib/libc.so.6(__libc_free+0x89)[0x418446a9]
/usr/lib/libglib-2.0.so.0(g_free+0x26)[0xb7e94355]
/usr/libexec/gam_server[0x804a716]
/usr/libexec/gam_server[0x80507cd]
/usr/libexec/gam_server[0x8050b65]
/usr/libexec/gam_server[0x804f417]
/usr/lib/libglib-2.0.so.0[0xb7eba75f]
/usr/lib/libglib-2.0.so.0[0xb7e8cd93]
/usr/lib/libglib-2.0.so.0(g_main_context_dispatch+0x79)[0xb7e8e04d]
/usr/lib/libglib-2.0.so.0[0xb7e8e4f8]
/usr/lib/libglib-2.0.so.0(g_main_loop_run+0x371)[0xb7e8ec54]
/usr/libexec/gam_server[0x804bc1e]
/lib/libc.so.6(__libc_start_main+0xec)[0x417f755c]
/usr/libexec/gam_server[0x804a5f1]
======= Memory map: ========
08048000-0805d000 r-xp 00000000 03:02 69512      /usr/libexec/gam_server
0805d000-0805e000 rw-p 00015000 03:02 69512      /usr/libexec/gam_server
0805e000-0807f000 rw-p 0805e000 00:00 0          [heap]
41000000-41019000 r-xp 00000000 03:02 8494       /lib/ld-2.3.90.so
41019000-4101a000 r--p 00018000 03:02 8494       /lib/ld-2.3.90.so
4101a000-4101b000 rw-p 00019000 03:02 8494       /lib/ld-2.3.90.so
417e2000-418f4000 r-xp 00000000 03:02 8505       /lib/libc-2.3.90.so
418f4000-418f6000 r--p 00112000 03:02 8505       /lib/libc-2.3.90.so
418f6000-418f8000 rw-p 00114000 03:02 8505       /lib/libc-2.3.90.so
418f8000-418fa000 rw-p 418f8000 00:00 0
42203000-4220b000 r-xp 00000000 03:02 37729     
/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/libgcc_s.so.1
4220b000-4220c000 rw-p 00007000 03:02 37729     
/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/libgcc_s.so.1
42691000-426a2000 r-xp 00000000 03:02 8526       /lib/libnsl-2.3.90.so
426a2000-426a3000 r--p 00010000 03:02 8526       /lib/libnsl-2.3.90.so
426a3000-426a4000 rw-p 00011000 03:02 8526       /lib/libnsl-2.3.90.so
426a4000-426a6000 rw-p 426a4000 00:00 0
b7d00000-b7d21000 rw-p b7d00000 00:00 0
b7d21000-b7e00000 ---p b7d21000 00:00 0
b7e46000-b7e4e000 r-xp 00000000 03:02 8529       /lib/libnss_files-2.3.90.so
b7e4e000-b7e4f000 r--p 00007000 03:02 8529       /lib/libnss_files-2.3.90.so
b7e4f000-b7e50000 rw-p 00008000 03:02 8529       /lib/libnss_files-2.3.90.so
b7e50000-b7e58000 r-xp 00000000 03:02 8531       /lib/libnss_nis-2.3.90.so
b7e58000-b7e59000 r--p 00007000 03:02 8531       /lib/libnss_nis-2.3.90.so
b7e59000-b7e5a000 rw-p 00008000 03:02 8531       /lib/libnss_nis-2.3.90.so
b7e5a000-b7e60000 r-xp 00000000 03:02 8527       /lib/libnss_compat-2.3.90.so
b7e60000-b7e61000 r--p 00006000 03:02 8527       /lib/libnss_compat-2.3.90.so
b7e61000-b7e62000 rw-p 00007000 03:02 8527       /lib/libnss_compat-2.3.90.so
b7e62000-b7e63000 rw-p b7e62000 00:00 0
b7e63000-b7ef0000 r-xp 00000000 03:02 63519     
/usr/lib/libglib-2.0.so.0.800.3b7ef0000-b7ef1000 rw-p 0008d000 03:02 63519     
/usr/lib/libglib-2.0.so.0.800.3b7ef1000-b7ef2000 rw-p b7ef1000 00:00 0
b7f0a000-b7f10000 r--s 00000000 03:02 38011      /usr/lib/gconv/gconv-modules.cache
bfefb000-bff10000 rw-p bfefb000 00:00 0          [stack]
ffffe000-fffff000 ---p 00000000 00:00 0          [vdso]

Program received signal SIGABRT, Aborted.
0xffffe410 in __kernel_vsyscall ()

Now to work out why that sub is getting freed twice.
Comment 3 Ed Catmur 2005-10-25 03:00:41 UTC
First free has bt:

(gdb) bt
  • #0 gam_subscription_free
    at gam_subscription.c line 100
  • #1 gam_poll_basic_remove_subscription
    at gam_poll_basic.c line 223
  • #2 gam_poll_remove_subscription
    at gam_server.c line 487
  • #3 gam_remove_subscription
    at gam_server.c line 253
  • #4 gam_connection_request
    at gam_connection.c line 388
  • #5 gam_connection_data
    at gam_connection.c line 491
  • #6 gam_client_conn_read
    at gam_channel.c line 283
  • #7 g_io_unix_dispatch
    at giounix.c line 162
  • #8 g_main_dispatch
    at gmain.c line 1934
  • #9 IA__g_main_context_dispatch
    at gmain.c line 2484
  • #10 g_main_context_iterate
    at gmain.c line 2565
  • #11 IA__g_main_loop_run
    at gmain.c line 2769
  • #12 main
    at gam_server.c line 584
  • #0 gam_subscription_free
    at gam_subscription.c line 100
  • #1 gam_connection_request
    at gam_connection.c line 391
  • #2 gam_connection_data
    at gam_connection.c line 491
  • #3 gam_client_conn_read
    at gam_channel.c line 283
  • #4 g_io_unix_dispatch
    at giounix.c line 162
  • #5 g_main_dispatch
    at gmain.c line 1934
  • #6 IA__g_main_context_dispatch
    at gmain.c line 2484
  • #7 g_main_context_iterate
    at gmain.c line 2565
  • #8 IA__g_main_loop_run
    at gmain.c line 2769
  • #9 main
    at gam_server.c line 584

Comment 5 Daniel Veillard 2005-10-25 08:15:04 UTC
What filesystem is /home ? What version of gamin ? What version of the kernel ?

Daniel
Comment 6 Ed Catmur 2005-10-25 20:29:09 UTC
NFS, 0.1.6, 2.16.13-gentoo-r4.

Patching gam_connection.c with the commits linked in comment 4 seems to have
fixed the bug. Assuming this is correct, perhaps a release would be in order?

Marking FIXED.
Comment 7 Daniel Veillard 2005-10-25 23:04:09 UTC
yes, a release should be done :-)

Daniel
Comment 8 Ed Catmur 2005-10-26 19:55:10 UTC
Reopening, due to a very similar bug.

With the patch applied, if nautilus is killed with INT the subscription is again
freed twice.

Output below is from gdb:

(gdb) b gam_subscription_free
Breakpoint 1 at 0x804a701: file gam_subscription.c, line 100.
(gdb) commands
Type commands for when breakpoint 1 is hit, one per line.
End with a line saying just "end".
>bt full
>c
>end
(gdb) set pagination off
(gdb) r
...
gam_client_conn_read called
end from client connection
Shutting down client socket 8
nautilus not listening for /home/prometheus
Tree has 60 nodes
Removing node /home/prometheus
remove_directory_subscription /home/prometheus
Tree has 20 nodes
Poll: removed subscription for /home/prometheus

Breakpoint 1, gam_subscription_free (sub=0x8064730) at gam_subscription.c:100
100     in gam_subscription.c
  • #0 gam_subscription_free
    at gam_subscription.c line 100
  • #1 gam_poll_basic_remove_subscription
    at gam_poll_basic.c line 223
  • #2 gam_poll_remove_subscription
    at gam_server.c line 487
  • #3 gam_remove_subscription
    at gam_server.c line 253
  • #4 gam_listener_free_subscription
    at gam_listener.c line 95
  • #5 gam_listener_free
    at gam_listener.c line 118
  • #6 gam_connection_close
    at gam_connection.c line 115
  • #7 gam_client_conn_shutdown
    at gam_channel.c line 686
  • #8 gam_client_conn_read
    at gam_channel.c line 270
  • #9 g_io_unix_dispatch
    at giounix.c line 162
  • #10 g_main_dispatch
    at gmain.c line 1934
  • #11 IA__g_main_context_dispatch
    at gmain.c line 2484
  • #12 g_main_context_iterate
    at gmain.c line 2565
  • #13 IA__g_main_loop_run
    at gmain.c line 2769
  • #14 main
    at gam_server.c line 584
  • #0 gam_subscription_free
    at gam_subscription.c line 100
  • #1 gam_listener_free_subscription
    at gam_listener.c line 98
  • #2 gam_listener_free
    at gam_listener.c line 118
  • #3 gam_connection_close
    at gam_connection.c line 115
  • #4 gam_client_conn_shutdown
    at gam_channel.c line 686
  • #5 gam_client_conn_read
    at gam_channel.c line 270
  • #6 g_io_unix_dispatch
    at giounix.c line 162
  • #7 g_main_dispatch
    at gmain.c line 1934
  • #8 IA__g_main_context_dispatch
    at gmain.c line 2484
  • #9 g_main_context_iterate
    at gmain.c line 2565
  • #10 IA__g_main_loop_run
    at gmain.c line 2769
  • #11 main
    at gam_server.c line 584

Program received signal SIGABRT, Aborted.
0xffffe410 in __kernel_vsyscall ()
Comment 9 Ed Catmur 2005-10-26 20:12:31 UTC
Created attachment 53923 [details] [review]
patch gam_listener.c

Patch gam_listener.c gam_listener_free_subscription() with logic as in above
commit.
Comment 10 Ed Catmur 2005-10-26 20:18:10 UTC
The above patch seems to work.

crossreference redhat bug
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=168744
Comment 11 Daniel Veillard 2005-10-27 11:17:47 UTC
Excellent !
That's probably the problem that some people have mysteriously experienced and
could not be reproduced... Patch applied and commited, it didn't introduced 
regressions. 

  Seems a new release is really in order now, I will try to steal a bit of time
for it !

  thanks a lot !

Daniel