You are not logged in.

#1 2008-01-22 14:14:19

brihall
Member
Registered: 2008-01-21
Posts: 16

pacman-3.1.1-1-x86_64 upgrade from pacman-3.1.0-1-x86_64 segfaults

Last night (1/21/2008 ~ 2100 MDT) I did my daily pacman -Syu. I was informed a pacman upgrade was available, so I said no to my system upgrade, and went to upgrade just pacman with pacman -S pacman. All looked OK, but during the upgrade process, pacman itself segfaulted I now pacman doesn't work. I tried manually copying the pacman binaries over, that didn't help. Even pacman.static -Syf pacman fails now with:

warning: pacman-3.1.1-1 is up to date -- reinstalling
debug: package 'pacman' not found in sync
error: could not open file /var/lib/pacman/local//pacman-3.1.1-1/desc: No such file or directory
error: could not open file /var/lib/pacman/local//pacman-3.1.1-1/depends: No such file or directory
error: could not open file /var/lib/pacman/local//pacman-3.1.1-1/files: No such file or directory
error: could not open file /var/lib/pacman/local//pacman-3.1.1-1/files: No such file or directory
error: could not open file /var/lib/pacman/local//pacman-3.1.1-1/depends: No such file or directory
error: could not open file /var/lib/pacman/local//pacman-3.1.1-1/depends: No such file or directory
error: could not open file /var/lib/pacman/local//pacman-3.1.1-1/desc: No such file or directory
error: could not open file /var/lib/pacman/local//pacman-3.1.1-1/depends: No such file or directory
error: could not open file /var/lib/pacman/local//pacman-3.1.1-1/desc: No such file or directory
debug: adding target 'pacman' to the transaction set
resolving dependencies...
debug: resolving target's dependencies
debug: started resolving dependencies
debug: checkdeps: package pacman-3.1.1-1
debug: found package 'pacman-3.1.1-1' in sync
debug: started sorting dependencies
debug: sorting dependencies finished
looking for inter-conflicts...
debug: looking for conflicts
debug: check targets vs db
debug: check db vs targets
debug: check targets vs targets
debug: checking dependencies
debug: checkdeps: package pacman-3.1.1-1
error: could not open file /var/lib/pacman/local//pacman-3.1.1-1/depends: No such file or directory
error: could not open file /var/lib/pacman/local//pacman-3.1.1-1/depends: No such file or directory

The depends failure line is repeated many times.

I get the same failures with "pacman.static -Uf pacman-3.1.0-1-x86_64.pkg.tar.gz"

How do I fix this?

Offline

#2 2008-01-22 15:32:23

XazZ
Member
From: Munich, Germany
Registered: 2006-12-30
Posts: 72

Re: pacman-3.1.1-1-x86_64 upgrade from pacman-3.1.0-1-x86_64 segfaults

Hi

You could try pacman -Syy and after this pacman -S pacman

XazZ

Offline

#3 2008-01-23 01:42:49

brihall
Member
Registered: 2008-01-21
Posts: 16

Re: pacman-3.1.1-1-x86_64 upgrade from pacman-3.1.0-1-x86_64 segfaults

Thanks, but that didn't change anything.

BTW, when pacman segfaults it is leaving behind the /var/lib/pacman/db.lck

Could this problem only be on x86-64 arch?

Here's the tail end of what I get from strace:

# strace pacman.static -Sf pacman > /tmp/pacman.strace 2>&1

lstat("/var/cache/pacman", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/var/cache/pacman/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/var/cache/pacman/pkg", {st_mode=S_IFDIR|0755, st_size=61440, ...}) = 0
stat("/var/cache/pacman/pkg/", {st_mode=S_IFDIR|0755, st_size=61440, ...}) = 0
utimensat(AT_FDCWD, "/usr/share/locale/pl_PL/LC_MESSAGES/", {{0, 0}, {1200861361, 0}}, AT_SYMLINK_NOFOLLOW) = 0
utimensat(AT_FDCWD, "/usr/share/locale/pl_PL/", {{0, 0}, {1200861360, 0}}, AT_SYMLINK_NOFOLLOW) = 0
utimensat(AT_FDCWD, "/etc/bash_completion.d/", {{0, 0}, {1200861362, 0}}, AT_SYMLINK_NOFOLLOW) = 0
close(8)                                = 0
chdir("/var/cache/pacman/pkg")          = 0
gettimeofday({1201052418, 271891}, NULL) = 0
umask(0)                                = 022
mkdir("/var/lib/pacman/local//pacman-3.1.1-1", 0755) = -1 EEXIST (File exists)
umask(022)                              = 0
open("/var/lib/pacman/local//pacman-3.1.1-1/desc", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 8
fstat(8, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b0fa9d68000
write(8, "%NAME%\npacman\n\n%VERSION%\n3.1.1-1"..., 291) = 291
close(8)                                = 0
munmap(0x2b0fa9d68000, 4096)            = 0
open("/var/lib/pacman/local//pacman-3.1.1-1/files", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 8
fstat(8, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b0fa9d68000
write(8, "%FILES%\netc/\netc/bash_completion"..., 2872) = 2872
close(8)                                = 0
munmap(0x2b0fa9d68000, 4096)            = 0
open("/var/lib/pacman/local//pacman-3.1.1-1/depends", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 8
fstat(8, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b0fa9d68000
write(8, "%DEPENDS%\ngcc-libs\nbash\nlibarchi"..., 61) = 61
close(8)                                = 0
munmap(0x2b0fa9d68000, 4096)            = 0
umask(022)                              = 022
stat("/var/lib/pacman/local/pacman-3.1.1-1/install", {st_mode=S_IFREG|0644, st_size=3920, ...}) = 0
stat("/bin/sh", {st_mode=S_IFREG|0755, st_size=602880, ...}) = 0
stat("/tmp/", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}) = 0
mkdir("/tmp/alpm_NiQyWJ", 0700)         = 0
open("/var/lib/pacman/local/pacman-3.1.1-1/install", O_RDONLY) = 8
open("/tmp/alpm_NiQyWJ/.INSTALL", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 9
fstat(8, {st_mode=S_IFREG|0644, st_size=3920, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b0fa9d68000
read(8, "# arg 1:  the new package versio"..., 4096) = 3920
read(8, "", 4096)                       = 0
fstat(9, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b0fa9d69000
read(8, "", 4096)                       = 0
close(8)                                = 0
munmap(0x2b0fa9d68000, 4096)            = 0
stat("/var/lib/pacman/local/pacman-3.1.1-1/install", {st_mode=S_IFREG|0644, st_size=3920, ...}) = 0
fchmod(9, 0100644)                      = 0
write(9, "# arg 1:  the new package versio"..., 3920) = 3920
close(9)                                = 0
munmap(0x2b0fa9d69000, 4096)            = 0
open("/tmp/alpm_NiQyWJ/.INSTALL", O_RDONLY) = 8
fstat(8, {st_mode=S_IFREG|0644, st_size=3920, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b0fa9d68000
read(8, "# arg 1:  the new package versio"..., 4096) = 3920
close(8)                                = 0
munmap(0x2b0fa9d68000, 4096)            = 0
getcwd("/var/cache/pacman/pkg", 4096)   = 22
chdir("/")                              = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x713900) = 13702
wait4(13702, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 13702
--- SIGCHLD (Child exited) @ 0 (0) ---
lstat("/tmp/alpm_NiQyWJ", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
open("/tmp/alpm_NiQyWJ", O_RDONLY|O_NONBLOCK|O_DIRECTORY|0x80000) = 8
fstat(8, {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
getdents(8, /* 3 entries */, 4096)      = 80
lstat("/tmp/alpm_NiQyWJ/.INSTALL", {st_mode=S_IFREG|0644, st_size=3920, ...}) = 0
unlink("/tmp/alpm_NiQyWJ/.INSTALL")     = 0
getdents(8, /* 0 entries */, 4096)      = 0
close(8)                                = 0
rmdir("/tmp/alpm_NiQyWJ")               = 0
chdir("/var/cache/pacman/pkg")          = 0
open("/var/log/pacman.log", O_WRONLY|O_CREAT|O_APPEND, 0666) = 8
fstat(8, {st_mode=S_IFREG|0644, st_size=173157, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b0fa9d68000
fstat(8, {st_mode=S_IFREG|0644, st_size=173157, ...}) = 0
lseek(8, 173157, SEEK_SET)              = 173157
gettimeofday({1201052418, 291303}, NULL) = 0
open("/etc/localtime", O_RDONLY)        = 9
fstat(9, {st_mode=S_IFREG|0644, st_size=2294, ...}) = 0
fstat(9, {st_mode=S_IFREG|0644, st_size=2294, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b0fa9d69000
read(9, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0\0\4\0\0\0\0"..., 4096) = 2294
lseek(9, -1457, SEEK_CUR)               = 837
read(9, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0\0\4\0\0\0\0"..., 4096) = 1457
close(9)                                = 0
munmap(0x2b0fa9d69000, 4096)            = 0
write(8, "[2008-01-22 18:40] upgraded pacm"..., 56) = 56
stat("/etc/ld.so.conf", {st_mode=S_IFREG|0644, st_size=133, ...}) = 0
stat("/sbin/ldconfig", {st_mode=S_IFREG|0755, st_size=669704, ...}) = 0
rt_sigaction(SIGINT, {SIG_IGN}, {0x4023f0, [INT], SA_RESTORER|SA_RESTART, 0x446170}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_IGN}, {SIG_DFL}, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
clone(child_stack=0, flags=CLONE_PARENT_SETTID|SIGCHLD, parent_tidptr=0x7fff0173a118) = 13708
wait4(13708, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 13708
rt_sigaction(SIGINT, {0x4023f0, [INT], SA_RESTORER|SA_RESTART, 0x446170}, NULL, 8) = 0
rt_sigaction(SIGQUIT, {SIG_DFL}, NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
--- SIGCHLD (Child exited) @ 0 (0) ---
brk(0)                                  = 0x96a000
brk(0)                                  = 0x96a000
brk(0x965000)                           = 0x965000
brk(0)                                  = 0x965000
close(7)                                = 0
unlink("/var/lib/pacman/db.lck")        = 0
close(3)                                = 0
close(4)                                = 0
close(5)                                = 0
close(6)                                = 0
close(8)                                = 0
munmap(0x2b0fa9d68000, 4096)            = 0
exit_group(0)                           = ?

Offline

#4 2008-01-23 01:55:37

brihall
Member
Registered: 2008-01-21
Posts: 16

Re: pacman-3.1.1-1-x86_64 upgrade from pacman-3.1.0-1-x86_64 segfaults

One more thing. This problem only occurs if I try to update pacman. I can do a "pacman -Syu" and install all the updates.
Pacman thinks it is already up to date so it doesn't try to install itself again, but I try trigger the segfault every time by forcing it.

# pacman -Q pacman
pacman 3.1.1-1

Hmm, wait a minute- while "pacman.static -Sf pacman" was still causing the error after the -Syy, after I upgraded everything else I was able to downgrade and then update pacman successfully. Maybe the problem was in something other than pacman? Dunno.

For the record, the update I just did included:
avahi boinc x264 ffmpeg imagemagick mplayer readline ttf-dejavu vbetool vi vim xorg-server

Maybe the readline library?

Anyway, seems to be OK now.

Offline

Board footer

Powered by FluxBB