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#1162 - Coding errors in db.c

Attached to Project: Pacman
Opened by Mircea Bardac (IceRAM) - Wednesday, 21 July 2004, 12:33 GMT
Last edited by Jason Chu (jason) - Saturday, 24 July 2004, 22:53 GMT
Task Type Bug Report
Category
Status Closed
Assigned To Judd Vinet (judd)
Architecture not specified
Severity Medium
Priority Normal
Reported Version 0.7 Wombat
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

Pacman v2.8.1

I've recently tried to update my system with -Syu but encountered some lines like this ones:

check3: !strncmp(/usr/lib/libldap-2.2.so.7.0.6, /usr/lib/libldap-2.2.so.7.0.6)
check3: !strncmp(/usr/lib/libldap_r-2.2.so.7.0.6, /usr/lib/libldap_r-2.2.so.7.0.6)
check1: is_in(usr/man/man3/lber-types.3.gza, openldap->files)
check1: is_in(usr/man/man3/lber-types.3.gz, openldap->files)
check1: is_in(usr/man/man3/lber-types.3.gze.3.gz, openldap->files)
check1: is_in(usr/man/man3/lber-types.3.gz3.gz, openldap->files)
check1: is_in(usr/man/man3/lber-types.3.gz.gz, openldap->files)

A short look through the code revealed that the resposible lines for the "checks" above belong to Jason's patch about symlinks.

Please note that the files/symlinks mentioned in the checks do not exist (eg:usr/man/man3/lber-types.3.gze.3.gz) - some kind of bad string manipulation is in the middle.

Maybe -v switch should be more verbose in the "Checking for conflicts" section.. or another switch could be usefull, because it's very difficult to debug the recent segfaults & errors caused right in this part of the update process.
   output-2.8.1.txt (51 KiB)
   output-2.8.2.txt (39.1 KiB)
(application/octet-stream)    bad-stuff.patch (1 KiB)
This task depends upon

Closed by  Judd Vinet (judd)
Tuesday, 27 July 2004, 15:22 GMT
Reason for closing:  Fixed
Comment by Judd Vinet (judd) - Wednesday, 21 July 2004, 18:11 GMT
Whoops, those "check:" lines are my fault, I forgot to remove them.

Jason, mind taking a look at those ".3gze.3.gz" strings? Looks like it's missing a properly-placed '\0' character in the string manipulation.
Comment by Jason Chu (jason) - Wednesday, 21 July 2004, 23:09 GMT
To get a little bit more information (I can't recreate this conceptually or on my system). What sorts of symlink setup do you have on your filesystem (specifically in the /usr/man/man3 path)?

Is it just openldap that's being upgraded or others as well?
Comment by Mircea Bardac (IceRAM) - Saturday, 24 July 2004, 10:58 GMT
I've attached the "pacman -Suv" output to this task (I did -y before), for both pacman 2.8.1(when I reported the bug) & for pacman 2.8.2(today).

I have to mention that pacman 2.8.2 took CPU(!!!) TIME:
- 7sec loading packages... etc
- 3m25sec checking for file conflicts (I'm sure that the pre-check for file conflicts didn't even take)
That's A LOT!.. Too much I can say...
Comment by Jason Chu (jason) - Saturday, 24 July 2004, 22:52 GMT
The attached patch will fix this problem. The issue is that the sym variable already contains the root variable. So strlen(sym)+strlen(root), if path+strlen(sym) is the \0 character of path, can push over into the old data in the path variable.

Loading...