Pacman

Historical bug tracker for the Pacman package manager.

The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues

This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
Tasklist

FS#5362 - Pacman segfault

Attached to Project: Pacman
Opened by Askadar (askadar) - Wednesday, 06 September 2006, 12:49 GMT
Last edited by Simo Leone (neotuli) - Friday, 08 September 2006, 00:22 GMT
Task Type Bug Report
Category
Status Closed
Assigned To Jan de Groot (JGC)
Architecture not specified
Severity Critical
Priority Normal
Reported Version 1.2.9
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Pacman crashes on me. I don't know why. It is reproducable. I have a tarball of /var/lib/pacman; if that is of any help I could post it here (~50Mb).

[bb@DS-12 ~]$ pac -Syu
:: Synchronizing package databases...
current [################] 100% 69K 89.3K/s 00:00:00
:: extra is up to date
community [################] 100% 130K 127.5K/s 00:00:01
:: kernel26-2.6.16.19-1: ignoring package upgrade (2.6.17.11-1)
:: Above packages will be skipped. To manually upgrade use 'pacman -S <pkg>'

Targets: libmtp-0.0.16-1 libnjb-2.2.5-1 mysql-clients-5.0.24-1 mysql-5.0.24-2
amarok-base-mysqlfree-1.4.2-1 amarok-engine-xine-1.4.2-1
cairomm-1.2.2-1 gtkmm-2.10.1-1 musicbrainz-2.1.4-1 openssl-0.9.8c-1

Total Package Size: 33.2 MB

Proceed with upgrade? [Y/n] y

:: Retrieving packages from extra...
warning: failed to get filesize for amarok-base-mysqlfree-1.4.2-1.pkg.tar.gz

failed downloading amarok-base-mysqlfree-1.4.2-1.pkg.tar.gz from ftp.tu-chemnitz.de: 550 Failed to open file.


warning: failed to get filesize for amarok-engine-xine-1.4.2-1.pkg.tar.gz

failed downloading amarok-engine-xine-1.4.2-1.pkg.tar.gz from ftp.tu-chemnitz.de: 550 Failed to open file.


error: anonymous login failed
Control socket read failed: Success
warning: failed to get filesize for amarok-base-mysqlfree-1.4.2-1.pkg.tar.gz

failed downloading amarok-base-mysqlfree-1.4.2-1.pkg.tar.gz from ftp.archlinux.org: 550 Failed to open file.


amarok-engine-xine-1.4.2 [################] 100% 69K 82.5K/s 00:00:00
warning: failed to get filesize for amarok-base-mysqlfree-1.4.2-1.pkg.tar.gz

failed downloading amarok-base-mysqlfree-1.4.2-1.pkg.tar.gz from ftp-linux.cc.gatech.edu: 550 Failed to open file.


warning: failed to get filesize for amarok-base-mysqlfree-1.4.2-1.pkg.tar.gz

failed downloading amarok-base-mysqlfree-1.4.2-1.pkg.tar.gz from ftp.ibiblio.org: 550 amarok-base-mysqlfree-1.4.2-1.pkg.tar.gz: No such file or directory


connect: Connection refused
error: cannot connect to archlinux.antesis.org
*** glibc detected *** pacman: double free or corruption (!prev): 0x0864d830 ***
======= Backtrace: =========
/lib/libc.so.6[0xb7eafab0]
/lib/libc.so.6(__libc_free+0x84)[0xb7eb10f4]
pacman[0x80604ee]
pacman[0x805b731]
pacman[0x805bdeb]
pacman[0x80523c6]
pacman[0x8055335]
/lib/libc.so.6(__libc_start_main+0xd8)[0xb7e62808]
pacman[0x804a0a1]
======= Memory map: ========
08048000-0806b000 r-xp 00000000 03:05 133793 /usr/bin/pacman
0806b000-0806c000 rw-p 00023000 03:05 133793 /usr/bin/pacman
0806c000-08661000 rw-p 0806c000 00:00 0 [heap]
b7c00000-b7c21000 rw-p b7c00000 00:00 0
b7c21000-b7d00000 ---p b7c21000 00:00 0
b7e1d000-b7e2b000 r-xp 00000000 03:05 98320 /lib/libresolv-2.4.so
b7e2b000-b7e2d000 rw-p 0000d000 03:05 98320 /lib/libresolv-2.4.so
b7e2d000-b7e2f000 rw-p b7e2d000 00:00 0
b7e46000-b7e4d000 rw-p b7e46000 00:00 0
b7e4d000-b7f64000 r-xp 00000000 03:05 98334 /lib/libc-2.4.so
b7f64000-b7f66000 r--p 00116000 03:05 98334 /lib/libc-2.4.so
b7f66000-b7f68000 rw-p 00118000 03:05 98334 /lib/libc-2.4.so
b7f68000-b7f6b000 rw-p b7f68000 00:00 0
b7f6b000-b7f7c000 r-xp 00000000 03:05 134866 /usr/lib/libz.so.1.2.3
b7f7c000-b7f7d000 rw-p 00011000 03:05 134866 /usr/lib/libz.so.1.2.3
b7f7d000-b7f87000 r-xp 00000000 03:05 135542 /usr/lib/libgcc_s.so.1
b7f87000-b7f88000 rw-p 00009000 03:05 135542 /usr/lib/libgcc_s.so.1
b7f88000-b7f8c000 r-xp 00000000 03:05 98311 /lib/libnss_dns-2.4.so
b7f8c000-b7f8e000 rw-p 00003000 03:05 98311 /lib/libnss_dns-2.4.so
b7f8e000-b7f96000 r-xp 00000000 03:05 98326 /lib/libnss_files-2.4.so
b7f96000-b7f98000 rw-p 00007000 03:05 98326 /lib/libnss_files-2.4.so
b7f98000-b7f9b000 rw-p b7f98000 00:00 0
b7f9b000-b7fb5000 r-xp 00000000 03:05 98349 /lib/ld-2.4.so
b7fb5000-b7fb6000 r--p 00019000 03:05 98349 /lib/ld-2.4.so
b7fb6000-b7fb7000 rw-p 0001a000 03:05 98349 /lib/ld-2.4.so
bfd9f000-bfdb5000 rw-p bfd9f000 00:00 0 [stack]
ffffe000-fffff000 ---p 00000000 00:00 0 [vdso]
Abgebrochen
This task depends upon

Closed by  Aaron Griffin (phrakture)
Thursday, 09 November 2006, 20:58 GMT
Reason for closing:  Fixed
Additional comments about closing:  This is from the antesis mirror and due to ftplib. Pacman 3 uses libfetch, and the antesis mirror is not an issue.
While this is still a current issue, removing the antesis mirror fixes this until pacman 3 is released
Comment by Askadar (askadar) - Wednesday, 06 September 2006, 12:58 GMT
I now have a backtrace:

Program received signal SIGABRT, Aborted.
0xffffe410 in __kernel_vsyscall ()
(gdb) bt
#0 0xffffe410 in __kernel_vsyscall ()
#1 0xb7e905a1 in raise () from /lib/libc.so.6
#2 0xb7e91c09 in abort () from /lib/libc.so.6
#3 0xb7ec50cb in __libc_message () from /lib/libc.so.6
#4 0xb7ecaab0 in malloc_printerr () from /lib/libc.so.6
#5 0xb7ecc0f4 in free () from /lib/libc.so.6
#6 0x0806395e in HttpQuit ()
#7 0x0805ea9e in downloadfiles_forreal (servers=0x8077560, localpath=0xbf8ccd34 "/var/cache/pacman/pkg", files=0x8651ce8,
mtime1=0x0, mtime2=0x0) at src/pacsync.c:462
#8 0x0805d8f3 in downloadfiles (servers=0x8077560, localpath=0xbf8ccd34 "/var/cache/pacman/pkg", files=0x8651ce8)
at src/pacsync.c:143
#9 0x0804e62e in pacman_sync (db=0x8077038, targets=0x0) at src/pacman.c:1293
#10 0x0804aa6b in main (argc=2, argv=0xbf8cf214) at src/pacman.c:272
Comment by Askadar (askadar) - Wednesday, 06 September 2006, 13:33 GMT
Ok, I found it. The problem is that pacman tries to HttpQuit a connection that was never established because the server refused the connection. That leads to a free() in HttpQuit for non-allocated memory. This patch fixes it:

--- pacman-2.9.8/src/pacsync.c 2006-01-30 19:27:43.000000000 -0500
+++ pacman-2.9.8_fix/src/pacsync.c 2006-09-06 09:31:23.000000000 -0400
@@ -385,6 +385,7 @@
}
if(!HttpConnect(host, port, &control)) {
fprintf(stderr, "error: cannot connect to %s\n", host);
+ control = NULL;
continue;
}
/* set up our progress bar's callback (and idle timeout) */
@@ -455,7 +456,7 @@
fflush(stdout);
}
}
- if(!pmo_xfercommand) {
+ if(!pmo_xfercommand && control) {
if(!strcmp(server->protocol, "ftp") && !pmo_proxyhost) {
FtpQuit(control);
} else if(!strcmp(server->protocol, "http") || (pmo_proxyhost && strcmp(server->protocol, "file"))) {
Comment by William Rea (willysilly) - Thursday, 07 September 2006, 23:52 GMT
Um, this is the wrong place for this bug report
Comment by Simo Leone (neotuli) - Friday, 08 September 2006, 00:22 GMT
moved
Comment by Johannes Jordan (FoPref) - Thursday, 12 October 2006, 22:04 GMT
I also encountered and being able to reproduce a segfault, although it doesn't hurt that much:
Starting an update, and then while wget downloads, pressing and holding ctrl+c to stop the process.
After all mirrors were tried out, pacman should just exit or whatever, instead it crashes.

Workaround: Ignore the crash ;-)
Comment by Björn Martensen (baze) - Thursday, 19 October 2006, 20:05 GMT
i get this segfault too, sometimes.
will it be fixed in a future pacman release?

Loading...