Bug 212370 - beagled hangs few minutes after it was started
beagled hangs few minutes after it was started
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: beagle (Show other bugs)
6
All Linux
medium Severity medium
: ---
: ---
Assigned To: Alexander Larsson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-10-26 11:30 EDT by Stefan Schwandter
Modified: 2007-11-30 17:11 EST (History)
14 users (show)

See Also:
Fixed In Version: beagle-0.2.10-7.fc6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-11-22 15:00:48 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
beagle log (3.80 KB, text/plain)
2006-10-26 11:30 EDT, Stefan Schwandter
no flags Details
index helper log (10.67 KB, text/plain)
2006-10-26 11:31 EDT, Stefan Schwandter
no flags Details
index helper exceptions log (1.79 KB, text/plain)
2006-10-26 11:31 EDT, Stefan Schwandter
no flags Details
Possible fix (1.96 KB, patch)
2006-11-08 11:42 EST, Alexander Larsson
no flags Details | Diff

  None (edit)
Description Stefan Schwandter 2006-10-26 11:30:26 EDT
Description of problem:

Beagled hangs after it has been running for a few minutes.

Version-Release number of selected component (if applicable):
0.2.10-5.fc6


How reproducible:

Always

Steps to Reproduce:
1. start beagled
2. wait a few minutes

  
Actual results:

beagled hangs, commands like beagle-status that are executed afterwards hang too.

When I start beagled manually from the command line, I see the following in the
moment it hangs:

Xlib: unexpected async reply (sequence 0x15)!

The sequence number changes from time to time.


I've attached the logs from beagled --debug.
Comment 1 Stefan Schwandter 2006-10-26 11:30:26 EDT
Created attachment 139472 [details]
beagle log
Comment 2 Stefan Schwandter 2006-10-26 11:31:13 EDT
Created attachment 139473 [details]
index helper log
Comment 3 Stefan Schwandter 2006-10-26 11:31:50 EDT
Created attachment 139474 [details]
index helper exceptions log
Comment 4 Jens Lautenbacher 2006-10-27 05:22:17 EDT
the same symptom here: neiter beagle-ping nor any of the status stuff works
anymore some minutes after beagle is started.
Comment 5 drago01 2006-10-28 03:18:17 EDT
the same happens here on 3 different boxes
Comment 6 zingale 2006-10-28 09:54:37 EDT
I have the same problem.  Nothing is ever indexed even though beagled is
running.  Just after rebooting if I do:

beagle-info --status

I get:

Scheduler:
Count: 0
Status: Waiting for the next trigger time

Pending Tasks:
Scheduler queue is empty.

Future Tasks:
Maintenance 0 (10/28/2006 9:46:43 AM)
Optimize KMailIndex
Hold until 10/28/2006 9:56:43 AM

Maintenance 0 (10/28/2006 9:46:43 AM)
Optimize FileSystemIndex
Hold until 10/28/2006 9:56:43 AM

Maintenance 0 (10/28/2006 9:46:45 AM)
Optimize GaimLogIndex
Hold until 10/28/2006 9:56:45 AM

Maintenance 0 (10/28/2006 9:46:45 AM)
Optimize IndexingServiceIndex
Hold until 10/28/2006 9:56:45 AM

Maintenance 0 (10/28/2006 9:46:45 AM)
Optimize TomboyIndex
Hold until 10/28/2006 9:56:45 AM

Maintenance 0 (10/28/2006 9:46:45 AM)
Optimize BlamIndex
Hold until 10/28/2006 9:56:45 AM

Maintenance 0 (10/28/2006 9:46:45 AM)
Optimize LifereaIndex
Hold until 10/28/2006 9:56:45 AM

Maintenance 0 (10/28/2006 9:46:45 AM)
Optimize AkregatorIndex
Hold until 10/28/2006 9:56:45 AM

Maintenance 0 (10/28/2006 9:46:45 AM)
Optimize KonqHistoryIndex
Hold until 10/28/2006 9:56:45 AM

Maintenance 0 (10/28/2006 9:46:46 AM)
Optimize KopeteIndex
Hold until 10/28/2006 9:56:46 AM


but then shortly thereafter, this command no longer works, but simply hangs.

Comment 7 zingale 2006-10-28 10:02:14 EDT
I am also seening the Xlib error when beagled hangs:

Xlib: unexpected async reply (sequence 0x9)!
Comment 8 Andreas Tunek 2006-10-30 18:27:01 EST
I also have the same problem, but for some reason Beagle indexes web pages for me.
Comment 9 drago01 2006-10-31 02:56:45 EST
(In reply to comment #7)
> I am also seening the Xlib error when beagled hangs:
> 
> Xlib: unexpected async reply (sequence 0x9)!
> 

why does beagled use xlib?
Comment 10 Russell Harrison 2006-11-01 17:48:51 EST
I am also seeing this problem.  beagle-status, fails after a few minutes but
queries still work.  After a longer period of time searches will also start failing.
Comment 11 Eric Davis 2006-11-02 02:09:10 EST
I'm seeing problems with Beagle as well.  

I deleted the .Beagle directory and then forced an immediate index build.  Able
to search web and IM logs initial, but fails after short period of time.
Comment 12 drago01 2006-11-02 02:17:50 EST
(In reply to comment #11)
> I'm seeing problems with Beagle as well.  
> 
> I deleted the .Beagle directory and then forced an immediate index build.  Able
> to search web and IM logs initial, but fails after short period of time.
> 

that was the first thing I tryed same result
Comment 13 Michael Lausch 2006-11-02 03:09:22 EST
(In reply to comment #9)
> (In reply to comment #7)
> > I am also seening the Xlib error when beagled hangs:
> > 
> > Xlib: unexpected async reply (sequence 0x9)!
> > 
> 
> why does beagled use xlib?

checking screensaver status si that it can tune to the load of the workstation.
Comment 14 Hans de Goede 2006-11-03 07:13:44 EST
Do you happen to be using the proprietary ATI driver? I've received a similar
(although different) bug report against gkrellm on FC-6 which seems related to
the use of the proprietary ATI driver.
Comment 15 Vladimir Mosgalin 2006-11-03 07:16:50 EST
I have the same problem and I'm using fglrx driver. I don't have much choice,
having Radeon X1K series card..
Comment 16 Ralph Angenendt 2006-11-03 07:18:01 EST
(In reply to comment #14)
> Do you happen to be using the proprietary ATI driver? 

Nope, same thing happens with the radeon driver from XOrg.

Comment 17 Jens Lautenbacher 2006-11-03 08:46:13 EST
and with the i810 driver, too
Comment 18 zingale 2006-11-03 08:47:19 EST
yep, i810 here too, and I get the Xlib error (i945 integrated graphics)
Comment 19 Michael Lausch 2006-11-03 08:53:56 EST
I'm rather sure it's the screensaver checking code.

hint 1: It does not crash if the DISPLAY enviuronment variable is *not* set.
        Quick fix: unset DISPLAY in the /usr/bin/beagled shell script

hint2: setting  MONO_EXTRA_ARGS environment variable to 
       --trace=T:Beagle.Util.SystemInformation 
       shows the following output:

ENTER: Beagle.Util.SystemInformation:get_InputIdleTime ()()
. ENTER: Beagle.Util.SystemInformation:CheckScreenSaver ()()
. . ENTER: (wrapper managed-to-native) 
Beagle.Util.SystemInformation:screensaver_info 
(Beagle.Util.SystemInformation/ScreenSaverState*,Beagle.Util.SystemInformation/ScreenSaverKind*,ulong*,ulong*)
        (0xb68cec68, 0xb68cec64, 0xb68cec5c, 0xb68cec54, )
Xlib: unexpected async reply (sequence 0x9)!
Comment 20 Michael Lausch 2006-11-03 09:43:00 EST
The real problem is in the patch to the screensaver-glue.c file which tries to
detect X Connection errors by reading X Events from the display in a glib IO
callback. The callback is initialized in the main thread and therefore accesses
the X display from the main thread. the screensaver information, which also 
accesses the X display is called from the Scheduler thread. This leads to a 
situation where two threads are reading X Events from the same X display,
without locking and without a call to XInitThreads. 

Solution: 
Maybe the patch xconnection-exit is not necessary at all. the connection to the
X display is checked everytime the screensaver_info function is called. Polling
the display may make the process of detecting a broken X display connection
faster, but being threadsafe is even much more overhead. Or simple register the
g_io callback for G_IO_ERR and G_IO_HUP. Then the callback is only called when
the X display lost it's connection (AFAIK, i may be wrong here). 
Comment 21 drago01 2006-11-04 05:04:37 EST
unset DISPLAY isn't really a solution, because beagle will not be killed after
logout or X restart.
Comment 22 Alexander Larsson 2006-11-08 11:34:51 EST
without the xconnection-exit patch we were leaving beagle processes alive after
logout, so that is certanly needed.

A simple lock should solve the problem though, right?
Comment 23 Alexander Larsson 2006-11-08 11:42:54 EST
Created attachment 140665 [details]
Possible fix

Anyone want to try this patch and see if it helps?
(it replaces beagle-0.2.10-xconnection-exit.patch in the rpm)
Comment 24 Santiago Martinez 2006-11-09 15:58:18 EST
(In reply to comment #23)
> Created an attachment (id=140665) [edit]
> Possible fix
> 
> Anyone want to try this patch and see if it helps?
> (it replaces beagle-0.2.10-xconnection-exit.patch in the rpm)

Hi, I tested this patch over four hours and works fine for me. 
Beagle daemon don't hangs anymore. And no more  "Xlib: unexpected async reply"
when beagled is started from command line. 
Comment 25 Fedora Update System 2006-11-10 10:06:22 EST
beagle-0.2.10-7.fc6 has been pushed for fc6, which should resolve this issue.  If these problems are still present in this version, then please make note of it in this bug report.
Comment 26 drago01 2006-11-11 03:48:32 EST
works fine here
thx for the fix ;)
Comment 27 Raoul 2006-11-20 11:32:47 EST
seems to work fine here too.
Thanks :)
Comment 28 Fedora Update System 2006-11-20 11:47:59 EST
beagle-0.2.10-7.fc6 has been pushed for fc6, which should resolve this issue.  If these problems are still present in this version, then please make note of it in this bug report.

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