2008年12月15日月曜日

[Linux]yum process hangs and stacks without erroring out

  • References
    Yum hangs(http://www.windley.com/archives/2007/04/yum_hangs.shtml)
  • Description
    yum process sometimes hangs and stacks without erroring out. No error messages are outputted. I get the result of strace for the command "yum clear all" as follows.
    > strace -f -F yum clear all
    ......
    stat64("/var/lib/rpm/DB_CONFIG", 0xbf93281c) = -1 ENOENT (No such file or directory)
    open("/var/lib/rpm/DB_CONFIG", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
    stat64("/var/lib/rpm/__db.001", {st_mode=S_IFREG|0644, st_size=24576, ...}) = 0
    open("/var/lib/rpm/__db.001", O_RDWR|O_LARGEFILE) = 3
    fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
    fstat64(3, {st_mode=S_IFREG|0644, st_size=24576, ...}) = 0
    close(3) = 0
    open("/var/lib/rpm/__db.001", O_RDWR|O_LARGEFILE) = 3
    fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
    mmap2(NULL, 24576, PROT_READ|PROT_WRITE, MAP_SHARED, 3, 0) = 0xb7a17000
    close(3) = 0
    stat64("/var/lib/rpm/__db.002", {st_mode=S_IFREG|0644, st_size=1318912, ...}) = 0
    open("/var/lib/rpm/__db.002", O_RDWR|O_LARGEFILE) = 3
    fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
    mmap2(NULL, 1318912, PROT_READ|PROT_WRITE, MAP_SHARED, 3, 0) = 0xb78d5000
    close(3) = 0
    stat64("/var/lib/rpm/__db.003", {st_mode=S_IFREG|0644, st_size=450560, ...}) = 0
    open("/var/lib/rpm/__db.003", O_RDWR|O_LARGEFILE) = 3
    fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
    mmap2(NULL, 450560, PROT_READ|PROT_WRITE, MAP_SHARED, 3, 0) = 0xb7867000
    close(3) = 0
    stat64("/var/lib/rpm/Packages", {st_mode=S_IFREG|0644, st_size=19869696, ...}) = 0
    open("/var/lib/rpm/Packages", O_RDONLY|O_LARGEFILE) = 3
    fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
    read(3, "\0\0\0\0\1\0\0\0\0\0\0\0a\25\6\0\10\0\0\0\0\20\0\0\0\10"..., 512) = 512
    close(3) = 0
    open("/var/lib/rpm/Packages", O_RDONLY|O_LARGEFILE) = 3
    fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
    fstat64(3, {st_mode=S_IFREG|0644, st_size=19869696, ...}) = 0
    futex(0xb78c587c, FUTEX_WAIT, 1, NULL
  • Solution
    remove the __db.* files under the /var/lib/rpm and retry running the yum command.

0 件のコメント: