FS#10773 - Pacman segfaulted during package download
Attached to Project:
Pacman
Opened by Andrew Eikum (ColdPie) - Saturday, 28 June 2008, 02:06 GMT
Last edited by Xavier (shining) - Monday, 17 August 2009, 16:09 GMT
Opened by Andrew Eikum (ColdPie) - Saturday, 28 June 2008, 02:06 GMT
Last edited by Xavier (shining) - Monday, 17 August 2009, 16:09 GMT
|
Details
Summary and Info:
While trying to install artwiz-fonts from extra, Pacman segfaulted: [root@lenarch andrew]# pacman -S artwiz-fonts resolving dependencies... looking for inter-conflicts... Targets: artwiz-fonts-1.3-3 Total Download Size: 0.04 MB Total Installed Size: 0.20 MB Proceed with installation? [Y/n] y :: Retrieving packages from extra... error: segmentation fault 10.0K 0.3K/s 00:01:22 [#####----------------] 26% error: Internal pacman error: Segmentation fault. Please submit a full bug report with --debug if appropriate. [root@lenarch andrew]# Trying to do the same operation reported that the database is locked. Removing the lock and trying again warned about and deleted the corrupt package (since it was only partially downloaded). Running it a third time worked fine. Steps to Reproduce: Don't know, never seen this happen before and it wasn't reproducable. |
This task depends upon
Closed by Xavier (shining)
Monday, 17 August 2009, 16:09 GMT
Reason for closing: None
Additional comments about closing: see last comment
Monday, 17 August 2009, 16:09 GMT
Reason for closing: None
Additional comments about closing: see last comment
I would like to ask you to do so.
So can we track this down at all? It was in the middle of a (very slow) download so what could this have hit?
Apologies for not including this info in the first place.
That said, I don't think it is high severity as it isn't leaving a package half-installed or anything, and it is easy to work around.
FS#11100provided a partial backtrace for this bug, but otherwise contains no new information. Please post all relevant info on this bug as that one will be closed as a dupe.debug: using 'community.db.tar.gz' for download progress
debug: existing file found, using it
debug: HTTP_PROXY: (null)
debug: http_proxy: (null)
debug: FTP_PROXY: (null)
debug: ftp_proxy: (null)
debug: connected to ftp.surfnet.nl successfully
downloading community.db.tar.gz...
Program received signal SIGSEGV, Segmentation fault.
0x00007f732d63cddb in mempcpy () from /lib/libc.so.6
#0 0x00007f732d63cddb in mempcpy () from /lib/libc.so.6
#1 0x00007f732d631553 in _IO_default_xsgetn_internal () from /lib/libc.so.6
#2 0x00007f732d62415f in fread () from /lib/libc.so.6
#3 0x00007f732e58f451 in download_internal () from /usr/lib/libalpm.so.3
#4 0x00007f732e58fcdf in _alpm_download_single_file () from /usr/lib/libalpm.so.3
#5 0x00007f732e58967d in alpm_db_update () from /usr/lib/libalpm.so.3
#6 0x0000000000409727 in pacman_sync ()
#7 0x0000000000407104 in main ()
If you feel motivated, you could try out pacman-git which also uses a more recent version of the download library. You will have to install libfetch from the testing repo :
ftp://ftp.archlinux.org/testing/os/i686/libfetch-2.20-1-i686.pkg.tar.gz
Then you can add dan's repo :
[pacman-git]
Server = http://dev.archlinux.org/~dan/pacman-git/
Then install pacman-git, and see if it solves the issue. Otherwise, post again the gdb backtrace, this version should have debug symbols so it could be more helpful.
[root@xxxxxxxx xxxx]# pacman -Syu
:: Synchronizing package databases...
error: segmentation fault 10.0K 0.3K/s 00:01:06 [#############----------------------------] 31%
Internal pacman error: Segmentation fault.
Please submit a full bug report with --debug if appropriate.
[root@xxxxxxxx xxxx]#
Again after rm /var/lib/pacman/db.lck
[root@xxxxxxxx xxxx]# pacman -Syu --debug
debug: config: attempting to read file /etc/pacman.conf
debug: config: new section 'options'
debug: config: HoldPkg: pacman
debug: config: HoldPkg: glibc
debug: config: IgnorePkg: brasero
debug: config: IgnorePkg: libbeagle
debug: config: IgnorePkg: kernel26
debug: config: IgnorePkg: splix
debug: config: new section 'core'
debug: setlibpaths() called
debug: option 'cachedir' = /var/cache/pacman/pkg/
debug: registering sync database 'core'
debug: opening database 'core'
debug: opening database from path '/var/lib/pacman/sync/core/'
debug: config: including /etc/pacman.d/mirrorlist
debug: config: attempting to read file /etc/pacman.d/mirrorlist
debug: adding new server URL to database 'core': ftp://mirror.cs.vt.edu/pub/ArchLinux/core/os/x86_64
debug: config: finished parsing /etc/pacman.d/mirrorlist
debug: config: new section 'extra'
debug: registering sync database 'extra'
debug: opening database 'extra'
debug: opening database from path '/var/lib/pacman/sync/extra/'
debug: config: including /etc/pacman.d/mirrorlist
debug: config: attempting to read file /etc/pacman.d/mirrorlist
debug: adding new server URL to database 'extra': ftp://mirror.cs.vt.edu/pub/ArchLinux/extra/os/x86_64
debug: config: finished parsing /etc/pacman.d/mirrorlist
debug: config: new section 'community'
debug: registering sync database 'community'
debug: opening database 'community'
debug: opening database from path '/var/lib/pacman/sync/community/'
debug: config: including /etc/pacman.d/mirrorlist
debug: config: attempting to read file /etc/pacman.d/mirrorlist
debug: adding new server URL to database 'community': ftp://mirror.cs.vt.edu/pub/ArchLinux/community/os/x86_64
debug: config: finished parsing /etc/pacman.d/mirrorlist
debug: config: finished parsing /etc/pacman.conf
debug: registering local database
debug: opening database 'local'
debug: opening database from path '/var/lib/pacman/local/'
:: Synchronizing package databases...
debug: using 'core.db.tar.gz' for download progress
debug: existing file found, using it
debug: HTTP_PROXY: (null)
debug: http_proxy: (null)
debug: FTP_PROXY: (null)
debug: ftp_proxy: (null)
debug: connected to mirror.cs.vt.edu successfully
downloading core.db.tar.gz...
error: segmentation fault
Internal pacman error: Segmentation fault.
Please submit a full bug report with --debug if appropriate.
[root@xxxxxxxx xxxx]#
I switched the mirror to ftp.archlinux.org and all is well...
Last -Syu:
[2009-02-15 00:57] starting full system upgrade
[root@xxxxxxxx xxxx]# pacman -Q glibc kernel26 pacman
glibc 2.9-4
kernel26 2.6.28.6-1
pacman 3.2.2-1
Last -Syu:
[2009-02-15 00:57] starting full system upgrade
[root@xxxxxxxx xxxx]# pacman -Q glibc kernel26 pacman
glibc 2.9-4
kernel26 2.6.28.6-1
pacman 3.2.2-1
It seems to be working fine now at home.
If I can reproduce this segfault tomorrow I would be glad to help out and do a backtrace (I'll need instructions though).
i686 :
pacman -U ftp://ftp.archlinux.org/testing/os/i686/libfetch-2.23-1-i686.pkg.tar.gz
add dan's repo :
[pacman-git]
Server = http://dev.archlinux.org/~dan/pacman-git/
x86-64 :
pacman -U ftp://ftp.archlinux.org/testing/os/x86_64/libfetch-2.23-1-x86_64.pkg.tar.gz
add dan's repo :
[pacman-git-64]
Server = http://dev.archlinux.org/~dan/pacman-git/
Then pacman -S pacman-git
Yes, segmentation fault occurs during download. Pacman can download 1-2 packages correctly and crash on the 3rd. Or it can crash on the first package. Always on downloading. Now I have more than 10 packages for update, so on my system this bug is reproducable :-)) I see segfault every time I launch pacman. Tell me what debug tools I should use and I'll send you detailed info.
libfetch : source PKGBUILD && mksource && makepkg -i
pacman : makepkg -i
gdb pacman
(gdb) run -S foo
...
(gdb) bt full
pacman-3.3.0-3.src.tar.gz (4.4 KiB)
... a screen of cvs output ...
==> Making package: libfetch 2.24-1 i686 (Fri Aug 7 22:36:19 NOVST 2009)
==> Checking Runtime Dependencies...
==> Checking Buildtime Dependencies...
==> Retrieving Sources...
-> Found Makefile in build dir
-> Found libfetch-2.24.tar.gz in build dir
==> Validating source files with md5sums...
Makefile ... Passed
libfetch-2.24.tar.gz ... FAILED
==> ERROR: One or more files did not pass the validity check!
I fixed version number in PKGBUILD to 2.23-1 and receive the same error. Should I enable [testing] repos for libfetch?
I didnt know which one to test first, the current 2.23 version arch is using or the new 2.24
to use 2.23 : just use the source from ftp.archlinux.org and fix the integrity check
to use 2.24 : you have to create the source with : source PKGBUILD && mksource
"libfetch-2.24:
Fix a bug in the line reading optimisation, which could get confused if
the byte following the new line is a NUL. Adresses Arch Linux problem
report #15845."
Actually when I compared the code of libdownload and libfetch, one of the main difference I saw was this line optimisation stuff. But well this code was not trivial so I never found the bug :)
However, the bad news is that this original bug was reported against libdownload, so it should have been a different issue. But maybe this issue no longer exists with libfetch.
So I will close this bug because I think it's too old and no longer valid. The current discussion follows in
FS#15845, we will push a new libfetch package with a fix.