This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 503085 - gam_server crashes and restarts every couple of hours
gam_server crashes and restarts every couple of hours
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: gamin (Show other bugs)
5.3
i386 Linux
medium Severity medium
: rc
: ---
Assigned To: Tomáš Bžatek
Desktop QE
:
Depends On:
Blocks: 719046 668957
  Show dependency treegraph
 
Reported: 2009-05-28 14:47 EDT by James Stephens
Modified: 2015-03-03 17:40 EST (History)
12 users (show)

See Also:
Fixed In Version: gamin-0.1.7-10.el5
Doc Type: Bug Fix
Doc Text:
Due to an assertion check, the Gamin server terminated unexpectedly after a certain amount of time. With this update, the assertion has been silenced so that the Gamin server now works as expected.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-12-04 22:44:17 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Strace (1.73 MB, text/plain)
2009-05-28 14:49 EDT, James Stephens
no flags Details
gdb output (3.84 KB, text/plain)
2010-02-26 10:59 EST, Colin.Simpson
no flags Details
gam_server.core.gz (214.77 KB, application/x-gzip)
2010-05-13 10:35 EDT, Alan Matsuoka
no flags Details
sosreport-lcarstensen.308454-460048-47fa81.tar.bz2 (5.36 MB, application/x-bzip2)
2010-05-13 10:37 EDT, Alan Matsuoka
no flags Details
gdb debug of latest core file (9.00 KB, text/plain)
2010-07-26 11:24 EDT, Colin.Simpson
no flags Details
patch (399 bytes, patch)
2010-12-27 09:59 EST, ritz
no flags Details | Diff

  None (edit)
Description James Stephens 2009-05-28 14:47:34 EDT
Description of problem:
gam_server crashes every couple of hours, creates a coredump, and restarts.

Version-Release number of selected component (if applicable):
gamin-0.1.7-8.el5

How reproducible:
Highly reproducible, but only on one particular system.

Steps to Reproduce:
None it just happens.
  
Actual results:
Crashes.

Expected results:
Not to crash.

Additional info:
Strace attached.
Comment 1 James Stephens 2009-05-28 14:49:15 EDT
Created attachment 345817 [details]
Strace
Comment 2 Tomáš Bžatek 2009-06-02 05:52:23 EDT
The strace output shows some details but full gdb backtrace would be much more useful. Also gamin config file would be useful (if not using defaults).
Comment 3 James Stephens 2009-06-02 09:44:31 EDT
Tomas,

Thanks. There's no config file either in /etc or in the users hoem directory.

Here is a core analysis and backtrace:

bpr014[1002] gdb /usr/libexec/gam_server /home/jns/gam_core/core.9288 
GNU gdb Fedora (6.8-27.el5)
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...
(no debugging symbols found)

warning: Can't read pathname for load map: Input/output error.
Reading symbols from /lib/libglib-2.0.so.0...(no debugging symbols found)...done.
Loaded symbols for /lib/libglib-2.0.so.0
Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/librt.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/librt.so.1
Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /lib/libpthread.so.0...(no debugging symbols found)...done.
Loaded symbols for /lib/libpthread.so.0
(no debugging symbols found)
Core was generated by `/usr/libexec/gam_server'.
Program terminated with signal 6, Aborted.
[New process 9288]
#0  0x00e5b402 in __kernel_vsyscall ()
(gdb) bt
#0  0x00e5b402 in __kernel_vsyscall ()
#1  0x00b3fd80 in raise () from /lib/libc.so.6
#2  0x00b41691 in abort () from /lib/libc.so.6
#3  0x062b5b32 in g_logv () from /lib/libglib-2.0.so.0
#4  0x062b5b69 in g_log () from /lib/libglib-2.0.so.0
#5  0x062b5be6 in g_assert_warning () from /lib/libglib-2.0.so.0
#6  0x0804bf82 in g_str_equal ()
#7  0x00000000 in ?? ()
(gdb)
Comment 4 Tomáš Bžatek 2009-06-02 09:57:15 EDT
Can you please install debuginfo packages and attach full backtrace here? (t a a bt full).
https://fedoraproject.org/wiki/StackTraces#What_are_debuginfo_rpms.2C_and_how_do_i_get_them.3F
Comment 5 James Stephens 2009-06-02 10:33:20 EDT
Tomas,

Ok. here you go:

gdb) thread apply all bt full

Thread 1 (process 9288):
#0  0x00e5b402 in __kernel_vsyscall ()
No symbol table info available.
#1  0x00b3fd80 in raise () from /lib/libc.so.6
No symbol table info available.
#2  0x00b41691 in abort () from /lib/libc.so.6
No symbol table info available.
#3  0x062b5b32 in g_logv () from /lib/libglib-2.0.so.0
No symbol table info available.
#4  0x062b5b69 in g_log () from /lib/libglib-2.0.so.0
No symbol table info available.
#5  0x062b5be6 in g_assert_warning () from /lib/libglib-2.0.so.0
No symbol table info available.
#6  0x0804bf82 in gam_node_add_subscription (node=0x9a856e0, sub=0x9a83860) at gam_node.c:178
	__PRETTY_FUNCTION__ = "gam_node_add_subscription"
#7  0x0804cbe7 in gam_poll_basic_add_subscription (sub=0x9a83860) at gam_poll_basic.c:85
	path = 0x9a83aa8 "/work/cschan/.Trash-cschan"
	node = (GamNode *) 0x9a856e0
	node_is_dir = 0
	__FUNCTION__ = "gam_poll_basic_add_subscription"
#8  0x0804b661 in gam_poll_add_subscription (sub=0x9a83860) at gam_server.c:489
No locals.
#9  0x0804b20c in gam_add_subscription (sub=0x9a83860) at gam_server.c:215
	type = GFS_MT_POLL
	path = 0x9a83aa8 "/work/cschan/.Trash-cschan"
	__FUNCTION__ = "gam_add_subscription"
#10 0x080505ff in gam_connection_request (conn=0x9a83e18, req=0x9a83e34) at gam_connection.c:376
	sub = (GamSubscription *) 0x9a83860
	events = 496
	is_dir = 1
	byte_save = 36 '$'
	type = 2
	options = 0
	__PRETTY_FUNCTION__ = "gam_connection_request"
	__FUNCTION__ = "gam_connection_request"
#11 0x08050b09 in gam_connection_data (conn=0x9a83e18, len=36) at gam_connection.c:509
	req = (GAMPacketPtr) 0x9a83e34
---Type <return> to continue, or q <return> to quit---
	__PRETTY_FUNCTION__ = "gam_connection_data"
	__FUNCTION__ = "gam_connection_data"
#12 0x0804f332 in gam_client_conn_read (source=0x9a83190, condition=G_IO_IN, info=0x9a83e18) at gam_channel.c:283
	data = 0x9a83e34 "$"
	size = 4106
	fd = 7
	ret = 36
	conn = (GamConnDataPtr) 0x9a83e18
	__FUNCTION__ = "gam_client_conn_read"
#13 0x062d68dd in ?? () from /lib/libglib-2.0.so.0
No symbol table info available.
#14 0x062ad1a2 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
No symbol table info available.
#15 0x062b0196 in ?? () from /lib/libglib-2.0.so.0
No symbol table info available.
#16 0x062b0557 in g_main_loop_run () from /lib/libglib-2.0.so.0
No symbol table info available.
#17 0x0804bb3d in main (argc=1, argv=0xbf94dfb4) at gam_server.c:647
	loop = (GMainLoop *) 0x9a83638
	i = -1080762584
	__FUNCTION__ = "main"
Comment 6 Tomáš Bžatek 2009-06-02 10:45:10 EDT
Thanks, looks like we shouldn't abort on assert and only ignore the subscription:
    g_assert(!g_list_find(node->subs, sub));

Requesting further review from our Program Management.
Comment 9 RHEL Product and Program Management 2009-11-06 13:57:57 EST
This request was evaluated by Red Hat Product Management for
inclusion, but this component is not scheduled to be updated in
the current Red Hat Enterprise Linux release. If you would like
this request to be reviewed for the next minor release, ask your
support representative to set the next rhel-x.y flag to "?".
Comment 10 Colin.Simpson 2010-02-26 10:59:38 EST
Created attachment 396573 [details]
gdb output
Comment 11 Colin.Simpson 2010-02-26 11:01:39 EST
I think we are seeing the same issue. Can you confirm from the gdb output.
If so, is this one going to make it into a update soon?

Thanks
Comment 12 Alan Matsuoka 2010-05-13 10:35:35 EDT
Created attachment 413779 [details]
gam_server.core.gz
Comment 13 Alan Matsuoka 2010-05-13 10:37:52 EDT
Created attachment 413780 [details]
sosreport-lcarstensen.308454-460048-47fa81.tar.bz2
Comment 14 Colin.Simpson 2010-07-26 11:24:12 EDT
Created attachment 434448 [details]
gdb debug of latest core file

We are seeing this all the time just now. I'm going to go and open a support request on this (which I'm assuming my gdb out matches this bug).
Comment 17 RHEL Product and Program Management 2010-08-09 15:48:03 EDT
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.
Comment 18 Colin.Simpson 2010-12-03 12:40:41 EST
Just for anyone else's information, we raised this as a support ticket with RHEL support. The issue seems to occur when you have an NFS mounts on the system. The Workaround that works for us provided by support.

Disable the polling of NFS mount points by doing the following setup :

1. Create the file /etc/gamin/gaminrc

2. Add the following statement in the file 
fsset nfs none

3. Kill the gam_server process so it gets restarted with new parameters: 

# killall gam_server
Comment 19 ritz 2010-12-27 09:59:15 EST
Created attachment 470855 [details]
patch

Hi @Tomáš   

based on comment https://bugzilla.redhat.com/show_bug.cgi?id=503085#c6 , I have attached the patch. We never do check for the return value, but FALSE seems to be a logical return value.

-- ritz
Comment 33 Vladimir Benes 2011-08-31 09:39:00 EDT
(In reply to comment #32)
 actually this bug fix *can* be delivered via fastrack so acking it now.. marking this bug OtherQA
-> qa_ack+
Comment 34 Tomáš Bžatek 2011-10-04 11:58:57 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause: code contains pratically unneeded assertion check

Consequence: the gamin server part aborts after some time

Fix: the assertion has been silenced

Result: the gamin server continues working as expected
Comment 36 Petr Kovar 2011-10-05 12:11:59 EDT
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1,7 +1 @@
-Cause: code contains pratically unneeded assertion check
+Due to an assertion check, the Gamin server terminated unexpectedly after certain amount of time. With this update, the assertion has been silenced so that the Gamin server now works as expected.-
-Consequence: the gamin server part aborts after some time
-
-Fix: the assertion has been silenced
-
-Result: the gamin server continues working as expected
Comment 37 Petr Kovar 2011-10-06 06:49:47 EDT
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-Due to an assertion check, the Gamin server terminated unexpectedly after certain amount of time. With this update, the assertion has been silenced so that the Gamin server now works as expected.+Due to an assertion check, the Gamin server terminated unexpectedly after a certain amount of time. With this update, the assertion has been silenced so that the Gamin server now works as expected.
Comment 39 errata-xmlrpc 2011-12-04 22:44:17 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2011-1537.html

Note You need to log in before you can comment on or make changes to this bug.