James Vega a écrit :

On Fri, Jun 20, 2008 at 11:45:29AM -0400, Xavier Douville wrote:
The command "mimedb -fd .txt" works fine (and for most other extensions I guess) but it doesn't works for .doc. It takes 100% CPU forever.

This works fine for me.  Could you install the fish-dbg package and
provide a backtrace[0] of the mimedb process when this happens as well
as a log of running this through strace[1].

[0] - "gdb /usr/bin/mimedb (pidof mimedb)" and then run "bt"
[1] - strace mimedb -fd .doc

Hi

I attached the output of the two commands.
Thanks for your help.

Xavier Douville





[EMAIL PROTECTED] ~> strace mimedb -fd .doc
execve("/usr/bin/mimedb", ["mimedb", "-fd", ".doc"], [/* 29 vars */]) = 0
brk(0)                                  = 0x1dfe000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x7f080c911000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x7f080c90f000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=101251, ...}) = 0
mmap(NULL, 101251, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f080c8f6000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libncurses.so.5", O_RDONLY)  = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P$\1\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=248032, ...}) = 0
mmap(NULL, 2344896, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 
0x7f080c4bb000
mprotect(0x7f080c4f4000, 2093056, PROT_NONE) = 0
mmap(0x7f080c6f3000, 20480, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x38000) = 0x7f080c6f3000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\342"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1330480, ...}) = 0
mmap(NULL, 3437144, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 
0x7f080c173000
mprotect(0x7f080c2b1000, 2097152, PROT_NONE) = 0
mmap(0x7f080c4b1000, 20480, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13e000) = 0x7f080c4b1000
mmap(0x7f080c4b6000, 16984, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f080c4b6000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libdl.so.2", O_RDONLY)       = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 \16\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=14624, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x7f080c8f5000
mmap(NULL, 2109728, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 
0x7f080bf6f000
mprotect(0x7f080bf71000, 2097152, PROT_NONE) = 0
mmap(0x7f080c171000, 8192, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f080c171000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x7f080c8f4000
arch_prctl(ARCH_SET_FS, 0x7f080c8f46e0) = 0
mprotect(0x7f080c4b1000, 12288, PROT_READ) = 0
munmap(0x7f080c8f6000, 101251)          = 0
brk(0)                                  = 0x1dfe000
brk(0x1e1f000)                          = 0x1e1f000
open("/usr/lib/locale/locale-archive", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=1282736, ...}) = 0
mmap(NULL, 1282736, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f080c7ba000
close(3)                                = 0
stat("/home/xavier/.local/share//mime/globs", 0x7fff14910360) = -1 ENOENT (No 
such file or directory)
stat("/home/xavier/.local/share//mime/magic", 0x7fff14910360) = -1 ENOENT (No 
such file or directory)
stat("/usr/local/share//mime/globs", 0x7fff14910360) = -1 ENOENT (No such file 
or directory)
stat("/usr/local/share//mime/magic", 0x7fff14910360) = -1 ENOENT (No such file 
or directory)
stat("/usr/share//mime/globs", {st_mode=S_IFREG|0644, st_size=19810, ...}) = 0
stat("/home/xavier/.local/share//mime/globs", 0x7fff14910390) = -1 ENOENT (No 
such file or directory)
stat("/home/xavier/.local/share//mime/magic", 0x7fff14910390) = -1 ENOENT (No 
such file or directory)
open("/home/xavier/.local/share//mime/aliases", O_RDONLY) = -1 ENOENT (No such 
file or directory)
open("/home/xavier/.local/share//mime/subclasses", O_RDONLY) = -1 ENOENT (No 
such file or directory)
stat("/usr/local/share//mime/globs", 0x7fff14910390) = -1 ENOENT (No such file 
or directory)
stat("/usr/local/share//mime/magic", 0x7fff14910390) = -1 ENOENT (No such file 
or directory)
open("/usr/local/share//mime/aliases", O_RDONLY) = -1 ENOENT (No such file or 
directory)
open("/usr/local/share//mime/subclasses", O_RDONLY) = -1 ENOENT (No such file 
or directory)
stat("/usr/share//mime/globs", {st_mode=S_IFREG|0644, st_size=19810, ...}) = 0
open("/usr/share//mime/globs", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=19810, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x7f080c90e000
read(3, "# This file was automatically ge"..., 4096) = 4096
read(3, "\nimage/x-kde-raw:*.erf\napplicati"..., 4096) = 4096
read(3, "-kontour:*.kon\ntext/x-ssa:*.ssa\n"..., 4096) = 4096
read(3, "x-install:INSTALL\napplication/x-"..., 4096) = 4096
read(3, "el:*.nsc\napplication/x-mimearchi"..., 4096) = 3426
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x7f080c90e000, 4096)            = 0
stat("/usr/share//mime/magic", {st_mode=S_IFREG|0644, st_size=18197, ...}) = 0
open("/usr/share//mime/magic", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=18197, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x7f080c90e000
read(3, "MIME-Magic\0\n[90:application/docb"..., 4096) = 4096
read(3, ".oasis.opendocument.image]\n>0=\0\4"..., 4096) = 4096
read(3, "0:application/x-font-pcf]\n>0=\0\4\1"..., 4096) = 4096
brk(0x1e40000)                          = 0x1e40000
read(3, ">0=\0\4ajkg\n[50:application/x-sqli"..., 4096) = 4096
read(3, "dn: mail=\n[50:text/x-lua]\n>0=\0\10/"..., 4096) = 1813
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x7f080c90e000, 4096)            = 0
open("/usr/share//mime/aliases", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=4134, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x7f080c90e000
read(3, "application/cdr application/vnd."..., 4096) = 4096
read(3, "nassoc-cdr application/vnd.corel"..., 4096) = 38
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x7f080c90e000, 4096)            = 0
open("/proc/meminfo", O_RDONLY)         = 3
fstat(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x7f080c90e000
read(3, "MemTotal:      2564544 kB\nMemFre"..., 1024) = 630
close(3)                                = 0
munmap(0x7f080c90e000, 4096)            = 0
open("/usr/share//mime/subclasses", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=9308, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x7f080c90e000
read(3, "application/x-cue text/plain\ntex"..., 4096) = 4096
read(3, "+ogg video/ogg\napplication/x-cbr"..., 4096) = 4096
read(3, "x-perl text/plain\ntext/mathml ap"..., 4096) = 1116
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x7f080c90e000, 4096)            = 0
open("/usr/lib/gconv/gconv-modules.cache", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=25700, ...}) = 0
mmap(NULL, 25700, PROT_READ, MAP_SHARED, 3, 0) = 0x7f080c908000
close(3)                                = 0
stat("/home/xavier/.local/share/mime/application/msword.xml", 0x7fff149103e0) = 
-1 ENOENT (No such file or directory)
stat("/usr/local/share/mime/application/msword.xml", 0x7fff149103e0) = -1 
ENOENT (No such file or directory)
stat("/usr/share/mime/application/msword.xml", {st_mode=S_IFREG|0644, 
st_size=1590, ...}) = 0
open("/usr/share/mime/application/msword.xml", O_RDONLY) = 3
stat("/usr/share/mime/application/msword.xml", {st_mode=S_IFREG|0644, 
st_size=1590, ...}) = 0
read(3, "<?xml version=\"1.0\" encoding=\"ut"..., 1590) = 1590
close(3)                                = 0
brk(0x1e61000)                          = 0x1e61000
[EMAIL PROTECTED] ~> gdb /usr/bin/mimedb (pidof mimedb)
GNU gdb 6.7.1-debian
Copyright (C) 2007 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 "x86_64-linux-gnu"...
Using host libthread_db library "/lib/libthread_db.so.1".
Attaching to program: /usr/bin/mimedb, process 6652
Reading symbols from /lib/libncurses.so.5...done.
Loaded symbols for /lib/libncurses.so.5
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/ld-linux-x86-64.so.2...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
0x00007f86930c02f3 in ?? () from /lib/libc.so.6
(gdb) bt
#0  0x00007f86930c02f3 in ?? () from /lib/libc.so.6
#1  0x00007f86930c173a in regexec () from /lib/libc.so.6
#2  0x0000000000403ba9 in main (argc=3, argv=<value optimized out>) at 
mimedb.c:583
#3  0x00007f86930321c4 in __libc_start_main () from /lib/libc.so.6
#4  0x0000000000402529 in _start ()

Reply via email to