Occasional Assertion Failure causing crash in dispose_chunk in chunk.c
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
polipo (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Ubuntu version:
Description: Ubuntu 12.04.2 LTS
Release: 12.04
Polipo version 1.0.4.1-1.1
With index fix patch in bug #988780
Compiled with -g and -rdynamic
Well, like many others, I got the (or rather, a) random crash bug.
So, I went ahead and compiled it with extra debug info.
I think I need to compile it with -g3 as there are no line numbers in the stack trace, but hopefully this is enough to track down a little further.
I know that dispose_chunk is in chunk.c from previous experience.
The only assertion in dispose_chunk (both of them) seems to be a null pointer check in an assert. Somehow, the caller of this function is erronously giving it a null pointer sometimes.
A potential, short-term workaround would be to have it simply ignore the free chunk request (by returning early), and maybe log a warning, if a null is passed in, instead of crashing.
For some reason, apport is not letting upload the report, so I am just going to attach the output from the crash repport as given by apport-cli.
There seems to be another form of an assertion failure, so I think this is not the only thing causing the random crashes.
I will also try to see if I can upload a patch implementing the suggested workaround for chunk.c, until the true reason for the bug is found.