[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Synaptic-devel] Strange segfault

From: Andrey Tarassov
Subject: Re: [Synaptic-devel] Strange segfault
Date: Fri, 16 Apr 2004 13:17:45 +0100
User-agent: Mozilla Thunderbird 0.5 (X11/20040208)

Panu Matilainen wrote:
On Fri, 16 Apr 2004, Andrey Tarassov wrote:

Panu Matilainen wrote:

On Thu, 2004-04-15 at 20:56, Andrey Tarassov wrote:


I have encountered a very strange problem with synaptic? Namely, we have a repository that may be accessed from both http and ftp using the same address and the repository is signed with GPG.

Now, the problem is that if you press the refresh button on startup (after some time this is not even required) and edit repositories, pressing refresh again causes synaptic to crash.

There is only one thing I am editing in repositories: ftp -> http and vice versa. Nothing else. I also encountered this problem before with some other changes, but know I have found a possibility to reproduce the bug easily.

I looked deeper into the problem and tried to trace the problem with gdb. I found that the segfault appeared in pkgAcqIndexRel::Done(), but could not find why it was happening as everything seemed to be ok.

Have you heard about such a problem and does anyone know about how to solve it?

FYI, I am using synaptic-0.48.1 and apt-rpm 0.15.5cnc6.

That sounds a whole lot like a longstanding problem I'm seeing with
apt-shell together with signed repositories:

When running "update" from apt-shell, by the time it gets to pkgAcqIndexRel::Done(), Repository->Vendor->FingerPrint has turned into garbage, causing the segfault on comparison to Release fingerprint.
Actually most of the Vendor stucture gets overwritten by something, it
seems consistent that the corruption begins at the last character of
Vendor->Description (but not 100% sure about that), anyway the entire
Vendor Repository->Vendor struct get garbled useless.

Doesn't happen with synaptic in my environment but it sounds all too
familiar - can you post the entire backtrace of the crash so we can see
whether it's the same problem or something else?

Yes, sure. Here we go:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -150645536 (LWP 22413)]
pkgAcqIndexRel::Done (this=0x908b960, Message=Cannot access memory at address 0x0
) at basic_string.h:257
257           { return &((reinterpret_cast<_Rep*> (_M_data()))[-1]); }
(gdb) bt
#0 pkgAcqIndexRel::Done (this=0x908b960, Message=Cannot access memory at address 0x0

Hmm, that's not quite the same as my problem though it happens at the same spot (pkgAcqIndexRel::Done): in my case the Message is ok, it's the Repository entry which gets garbled.

Well, actually message seems to be ok, but it may get garbled exactly in that block that checks for autentication. I added some returns and test outputs from that place and found that segfault was caused when trying to access Repository->Vendor->FingerPrint, just like you described.

In general I believe that you described the situation quite correctly.

..or maybe not :-/ Does it only happen if you have repository authentication on? If that's the case it's probably same issue in a slightly different disguise. FWIW I'm not able to reproduce the crash in synaptic (same versions used) no matter what I do.

Yes, this only happens in case of authenticated repositories. I will still try to look into it, but if you fix this somehow, that would be perfect! :-)

Best wishes,


Andrey Tarasov
Software Engineer

OÜ SOT Finnish Software Engineering
Kreutzwaldi 7-4, 10124 TALLINN, ESTONIA

Phone: +372 641 9975
Fax:   +372 641 9876

reply via email to

[Prev in Thread] Current Thread [Next in Thread]