Bug 503085 - gam_server crashes and restarts every couple of hours
Summary: gam_server crashes and restarts every couple of hours
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: gamin
Version: 5.3
Hardware: i386
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Tomáš Bžatek
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks: 668957 719046
TreeView+ depends on / blocked
 
Reported: 2009-05-28 18:47 UTC by James Stephens
Modified: 2018-11-27 21:46 UTC (History)
12 users (show)

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.
Clone Of:
Environment:
Last Closed: 2011-12-05 03:44:17 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1537 0 normal SHIPPED_LIVE gamin bug fix update 2011-12-05 08:43:12 UTC

Description James Stephens 2009-05-28 18:47:34 UTC
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 18:49:15 UTC
Created attachment 345817 [details]
Strace

Comment 2 Tomáš Bžatek 2009-06-02 09:52:23 UTC
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 13:44:31 UTC
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 13:57:15 UTC
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 14:33:20 UTC
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 14:45:10 UTC
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 Program Management 2009-11-06 18:57:57 UTC
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 15:59:38 UTC
Created attachment 396573 [details]
gdb output

Comment 11 Colin.Simpson 2010-02-26 16:01:39 UTC
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 14:35:35 UTC
Created attachment 413779 [details]
gam_server.core.gz

Comment 13 Alan Matsuoka 2010-05-13 14:37:52 UTC
Created attachment 413780 [details]
sosreport-lcarstensen.308454-460048-47fa81.tar.bz2

Comment 14 Colin.Simpson 2010-07-26 15:24:12 UTC
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 Program Management 2010-08-09 19:48:03 UTC
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 17:40:41 UTC
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 14:59:15 UTC
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 13:39:00 UTC
(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 15:58:57 UTC
    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 16:11:59 UTC
    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 10:49:47 UTC
    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-05 03:44:17 UTC
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.