RPM Community Forums

Mailing List Message of <rpm-devel>

Re: rpm 5.1 segfaults

From: Jeff Johnson <n3npq@mac.com>
Date: Wed 16 Apr 2008 - 00:47:38 CEST
Message-Id: <8AECBB95-426F-474E-94B9-3D3A3AD7B732@mac.com>

On Apr 15, 2008, at 6:43 PM, Jeff Johnson wrote:

>
> On Apr 15, 2008, at 5:23 PM, Per Øyvind Karlsen wrote:
>>>
>>>
>>> If the new assertion fires, then I'm not reading the rpmds iteration
>>> code correctly.
>>>
>>> If the old assertion fires, then there's a wild pointer somewhere.
>>>
>>> Thanks.
>> [root@localhost SPECS]# LC_ALL=C
>> rpm -Uvh /home/peroyvind/RPM/RPMS/x86_64/drakxtools- 
>> curses-10.29-1mdv2008.1.x86_64.rpm /home/peroyvind/RPM/RPMS/noarch/ 
>> drakx-net-*
>> error: Failed dependencies:
>>         drakxtools-backend = 10.29-1mdv2008.1 is needed by
>> drakxtools-curses-10.29-1mdv2008.1.x86_64
>>         libdrakx-net = 0.34 is needed by drakx- 
>> net-0.34-1mdv2008.1.noarch
>>         libdrakx-net = 0.34 is needed by drakx-net- 
>> text-0.34-1mdv2008.1.noarch
>>         drakxtools-curses = 10.22-1mdv2008.1 is needed by (installed)
>> harddrake-10.22-1mdv2008.1.x86_64
>>         drakxtools-curses = 10.22-1mdv2008.1 is needed by (installed)
>> drakxtools-10.22-1mdv2008.1.x86_64
>> rpm: depends.c:1776: zapRelation: Assertion `tsi->tsi_reqx >= 0 &&
>> tsi->tsi_reqx < rpmdsCount(requires)' failed.
>> Avbrutt (SIGABRT)
>>
>
> Old assertion == wild pointer (or other malloc issue).
>
> That's what I needed to know.
>
> FWIW, this patch likely avoids the free that is almost certainly  
> the primary
> cause of the segfault:
>
> Index:  
> depends.c============================================================= 
> ======RCS file: /v/rpm/cvs/rpm/lib/depends.c,vretrieving revision  
> 1.394diff -u -b -B -w -p -r1.394 depends.c--- depends.c   1 Apr  
> 2008 09:08:49 -0000       1.394+++ depends.c   15 Apr 2008 22:39:41  
> -0000@@ -2369,7 +2369,9 @@ rescan:                rpmlog(msglvl,  
> "    %-40s %s\n", (nevra ? nevra : "???"),                         
> (dp ? dp : "not found!?!")); +#if 0                dp = _free(dp); 
> +#endif            }             /* Walk (and erase) linear part of  
> predecessor chain as well. */
>
> I've been trying to understand the secondary cause that is snarled
> up with walking interlocked dependency loops and displaying the
> relations involved, but I will likely need to look at that first  
> hand by
> installing MDV 2008.1, todo++.
>
> Thanks for the help.
>
> 73 de Jeff
Received on Wed Apr 16 00:48:37 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.