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 348139 - xdgmime loops incessantly on certain file types (jar, javascript, matlab)
xdgmime loops incessantly on certain file types (jar, javascript, matlab)
Status: RESOLVED FIXED
Product: beagle
Classification: Other
Component: General
0.2.7
Other All
: Normal minor
: ---
Assigned To: Beagle Bugs
Beagle Bugs
: 353327 353618 363744 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-07-20 14:31 UTC by Sebastian Held
Modified: 2007-01-11 21:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
IndexHelper log file (67.96 KB, text/plain)
2006-07-20 15:36 UTC, Sebastian Held
Details
bowtie.m (1.90 KB, text/x-objcsrc)
2006-07-21 06:36 UTC, Sebastian Held
Details
lsof | grep beagle (37.62 KB, text/plain)
2006-07-28 06:20 UTC, Sebastian Held
Details
lsof | grep beagle (39.31 KB, text/plain)
2006-07-28 09:02 UTC, Sebastian Held
Details
IndexHelper logfile (126.81 KB, application/bzip2)
2006-07-28 09:04 UTC, Sebastian Held
Details

Description Sebastian Held 2006-07-20 14:31:24 UTC
Please describe the problem:
beagle runs fine up to the point, where IndexHelper reaches a directory with matlab files. Then beagled-helper uses all cpu power.

Steps to reproduce:
1. start beagled and wait (reproduceable every day)
2. 
3. 


Actual results:
see log; CPU is at 100%

Expected results:
normal operation

Does this happen every time?
yes

Other information:
yes, the log file, but how to attach!?
Comment 1 Sebastian Held 2006-07-20 15:36:22 UTC
Created attachment 69263 [details]
IndexHelper log file
Comment 2 Joe Shaw 2006-07-20 15:55:40 UTC
Looks like either your matlab files are really big, or our matlab filter is just really inefficient.  Can you please also attach a matlab file that triggers the problem?
Comment 3 Sebastian Held 2006-07-21 06:36:12 UTC
Thanks for the quick answer. I don't know which file triggers this behaviour, but I attached bowtie.m. All matlab files are very small files and even, if the filter is inefficient, it should not use all cpu cycles...
Comment 4 Sebastian Held 2006-07-21 06:36:41 UTC
Created attachment 69308 [details]
bowtie.m
Comment 5 Debajyoti Bera 2006-07-21 07:21:32 UTC
Matlab files are simple programs written in matlab scripting language. There is no reason for them to take huge CPU resources while indexing. I tried the attachment, and it was filtered very quickly w/out any noticeable CPU usage.

Can you try the following:
$ beagle-extract-content /path/to/bowtie.m

Observe CPU usage during this process and paste its output here.
Comment 6 Sebastian Held 2006-07-21 08:42:17 UTC
sebastian@yates ~ $ time beagle-extract-content "/home/sebastian/HFT/Doku/Skripte/Antenna and EM Modeling with Matlab/chapter07/mesh/bowtie.m"
Filename: file:///home/sebastian/HFT/Doku/Skripte/Antenna and EM Modeling with Matlab/chapter07/mesh/bowtie.m
Debug: Loaded 46 filters from /usr/lib/beagle/Filters/Filters.dll
Filter: Beagle.Filters.FilterMatlab
MimeType:

Content:
BOWTIE Bowtie mesh in the xy plane     The following parameters need to be specified:     Discretization parameter            N    Half-height of bowtie               h    Width of the feeding neck           d    Bowtie flare angle                  flareangle     Change(decrease) the width of the feeding neck     if inaccurate results are obtained     Copyright 2002 AEMM. Revision 2002/03/25    Chapter 7 clear all N Discretization parameter h Half-height of bowtie d Width of the feeding neck  flareangle pi Bowtie flare angle StepY h N TAN tan flareangle Set y grid (from -h to h) j N y j h j StepY Set x grid (from d/2 to upper boundary) i N Vector i TAN y N i d Set left and right boundary XLeft Vector N Vector N XRight Vector N Vector N Initialize amd plot polygon, which encloses bowtie Xpol XLeft XRight N Ypol y y N fill Xpol Ypol g axis equal pause hold on Initialize vertexes inside bowtie L j N M j abs j N StepX XRight j XLeft j M j i M j X L XLeft j i StepX Y L y j L L Use Delaunay triangulation TRI delaunay X Y t ; p=[X; Y; zeros(1,length(X))]; q=trimesh(t X Y zeros size X pause hold off Remove unnecessary triangles m length t Center m sum p t m IN inpolygon Center Center Xpol Ypol TrianglesTotal length t Triangle m TrianglesTotal IN m Triangle Triangle t m clear t t Triangle TrianglesTotal length t t Save result save bowtie p t viewer bowtie view

(no hot content)

real    0m0.498s
user    0m0.434s
sys     0m0.041s

It's to fast, to observe cpu utilization. Maybe it's only by accident; internal structures in beagled-helper may be the cause and this file has nothing to do with it.

Is there a way to tell beagled, that it should terminate the beagled-helper more often?
Comment 7 Sebastian Held 2006-07-21 12:27:46 UTC
now I think it has nothing to do with matlab files. Here is why:

sebastian@yates ~ $ top
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                                                   23040 sebastia   0   0  124m  62m  43m S 98.0  6.1  43:59.44 beagled-helper

sebastian@yates ~ $ strace -p 23040
Process 23040 attached - interrupt to quit
poll([{fd=20, events=POLLIN}], 1, -1)   = -1 EINTR (Interrupted system call)
--- SIGPWR (Power failure) @ 0 (0) ---
futex(0x81c6eac, FUTEX_WAKE, 3)         = 0
rt_sigsuspend(~[INT QUIT ABRT TERM XCPU RTMIN RT_1]) = ? ERESTARTNOHAND (To be restarted)
--- SIGXCPU (CPU time limit exceeded) @ 0 (0) ---
sigreturn()                             = ? (mask now ~[INT QUIT ABRT KILL TERM STOP RTMIN])
futex(0x81c6eac, FUTEX_WAKE, 3)         = 0
sigreturn()                             = ? (mask now [])
poll(

The process hangs on this unfinished "poll(" system call. After quite some time it return with the above "-1 EINTR (Interrupted system call)".

yates ~ # lsof | grep 23040
COMMAND     PID       USER   FD      TYPE     DEVICE       SIZE       NODE NAME
beagled-h 23040  sebastian   20r     FIFO        0,5                304922 pipe


beagled-helper tries to read from a pipe! I thought 0.2.7 doesn't do this anymore. Am I able to instruct beagled not to read from pipes?
Comment 8 Debajyoti Bera 2006-07-28 06:03:56 UTC
The pipe might be due to some internal mechanism. I doubt the problem is with matlab files. It will be very helpful if you can narrow down the bug. Does the high CPU utilization happen everytime beagled-helper reaches that directory ?
Comment 9 Sebastian Held 2006-07-28 06:18:00 UTC
The high CPU utilization happens every day. I just started beagled (through kerry) and everything is alright.

# ps ax
10483 ?        Sl     0:04 beagled --debug /usr/lib/beagle/BeagleDaemon.exe --bg --autostarted

beagled-helper takes only very little cpu.
I don't know enough about beagled to get any further.
Attached you'll find the output of lsof of beagle processes in known good state.
Comment 10 Sebastian Held 2006-07-28 06:20:13 UTC
Created attachment 69787 [details]
lsof | grep beagle

beagle is running fine and not consuming much cpu power
Comment 11 Sebastian Held 2006-07-28 09:01:01 UTC
It happened again:

# top
top - 10:57:17 up  2:54,  1 user,  load average: 1.41, 1.45, 1.42
Tasks: 159 total,   1 running, 158 sleeping,   0 stopped,   0 zombie
Cpu(s): 33.2% us,  4.6% sy,  1.3% ni, 24.6% id, 35.3% wa,  0.2% hi,  0.9% si
Mem:   1035884k total,  1010164k used,    25720k free,    77796k buffers
Swap:   506036k total,      256k used,   505780k free,   488628k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
16693 sebastia   0   0  125m  63m  42m S 84.5  6.2  30:55.66 beagled-helper



logfiles attached...
Comment 12 Sebastian Held 2006-07-28 09:02:12 UTC
Created attachment 69806 [details]
lsof | grep beagle

now beagle-helper consumes nearly all cpu power
Comment 13 Sebastian Held 2006-07-28 09:04:39 UTC
Created attachment 69807 [details]
IndexHelper logfile

beagle-helper consumes nearly all cpu power
Comment 14 Debajyoti Bera 2006-07-28 20:57:07 UTC
Comment on attachment 69807 [details]
IndexHelper logfile

Fixed mimetype.
Comment 15 Joe Shaw 2006-08-29 19:36:45 UTC
*** Bug 348874 has been marked as a duplicate of this bug. ***
Comment 16 Joe Shaw 2006-08-29 19:36:57 UTC
*** Bug 353327 has been marked as a duplicate of this bug. ***
Comment 17 Joe Shaw 2006-08-29 19:38:22 UTC
I can't duplicate this all the time, and never with beagle-extract-content, but this sometimes happens to me, usually with javascript files but also the occasional matlab file.  I'm not sure why yet.
Comment 18 alejandro vera 2006-08-30 23:46:11 UTC
I filled bug 353618

It seems related to this bug
Comment 19 Joe Shaw 2006-08-31 18:14:21 UTC
*** Bug 353618 has been marked as a duplicate of this bug. ***
Comment 20 Joe Shaw 2006-09-12 21:45:30 UTC
I just checked in a fix for this.
Comment 21 Joe Shaw 2006-10-25 20:39:58 UTC
*** Bug 363744 has been marked as a duplicate of this bug. ***