On Jun 6, 2008, at 5:28 PM, Dan Nicholson wrote:
> Using rpm-5.1.2, I get a segfault when I do a query on an uninstalled
> package when the prefix of the package name matches an installed
> package.
>
> $ rpm -q foo
> package foo is not installed
> $ rpm -q foo-devel
> package foo-devel is not installed
> $ rpm -q libpaper
> libpaper-1.1.22-1.i686
> $ rpm -q libpaper-devel
Here's what I see on cvs HEAD (if I understand your reproducer)
[jbj@wellfleet tests]$ rpm --version
rpm (RPM) 5.2.DEVEL
[jbj@wellfleet tests]$ rpm -q rpm
rpm-4.4.2.3-2.fc9.i386
[jbj@wellfleet tests]$ rpm -q rpm-devel
package rpm-devel is not installed
I'll try same with rpm-5.1.3 later this evening ...
>
> Any ideas? I can run it under gdb, but I thought I'd ask here first
> before digging in.
>
If I can reproduce the problem, I can likely solve in minutes.
I may also be able to suggest something if you send <jbj@rpm5.org>
the -qvv output (so I can get oriented).
> Oh. Here's a different segfault under similar conditions.
>
> $ rpm -q linux
> linux-2.6.22.19-1.i686
> linux-2.6.25.4-1.i686
> $ rpm -q linux-devel
> error: ^devel$: regexec failed: No match(1)
Add --miredebug (mire == Match Iterator Regular Expression)
$ rpm -q --miredebug popt-foo
--> mireRegcomp(0xb95042e0, "i386-redhat-linux-gnu") rc 0
--> mire 0xb9543e68 ++ 1 mireNew at mire.c:130
--> mireRegcomp(0xb9543e68, "^foo$") rc 0
--> mireClean(0xb9543e68)
--> mire 0xb9543e68 -- 1 mireFree at mire.c:104
--> mireRegexec(0xb9543f00, 0xb9543e68[0]) rc -1 mode 2 ""
--> mireClean(0xb9543f00)
package popt-foo is not installed
--> mireClean(0xb95042e0)
In order to interpret query arguments, several attempts
need to be undertaken to distinguish whether you are
asking for a "linux-devel" package with any version,
or a "linux" package with "devel" as a version, the argument
"linux-devel" is ambiguous, and so failed lookups need to
be repeated to disambiguate the argument, and a pattern is used to
filter
the rpmdb results.
Again I'll try this evening with 5.1.3 ...
> *** glibc detected *** rpm: free(): invalid next size (fast):
> 0x80022898 ***
> ======= Backtrace: =========
> /lib/libc.so.6[0xb7cdef92]
> /lib/libc.so.6(__libc_free+0x90)[0xb7ce2400]
> /usr/lib/librpmio-5.0.so(mireClean+0xd4)[0xb7df8d84]
> /usr/lib/librpmdb-5.0.so(rpmdbFreeIterator+0xd6)[0xb7e6e4e6]
> /usr/lib/librpmdb-5.0.so[0xb7e7405f]
> /usr/lib/librpmdb-5.0.so[0xb7e741dc]
> /usr/lib/librpmdb-5.0.so(rpmdbInitIterator+0x363)[0xb7e71303]
> /usr/lib/librpm-5.0.so(rpmtsInitIterator+0x4d)[0xb7ee990d]
> /usr/lib/librpm-5.0.so(rpmQueryVerify+0xd4)[0xb7ec7cc4]
> /usr/lib/librpm-5.0.so(rpmcliArgIter+0x298)[0xb7ec89d8]
> /usr/lib/librpm-5.0.so(rpmcliQuery+0xd9)[0xb7ec8c29]
> rpm(main+0x1aaa)[0x8000491a]
> /lib/libc.so.6(__libc_start_main+0xd8)[0xb7c8c7c8]
> rpm[0x80002121]
>
I'm typically using PCRE regex's, perhaps there is an issue with
glibc regex's that
has not been noticed.
73 de Jeff
Received on Sat Jun 7 00:52:40 2008