SegFault using deque in 2.4b3 - Oh well, make that 2.4-a-3 ... (NT)

Stefan Behnel behnel_ml at dvs1.informatik.tu-darmstadt.de
Thu Sep 30 09:12:41 EDT 2004


> In Python 2.4-a-3, the deque is causing a segfault on two different 
> machines I tested on.
> 
> With deque, my program runs fine for a while (at least some tens of 
> seconds up to minutes) and then suddenly segfaults.
> 
> I'm sorry I can't tell exactly when, but I'm running an application that 
> uses a few hundred deques where elements are appendleft()ed and pop()ed 
> (simple queue). As the application is rather complex (and I didn't read 
> about this error before anywhere), I guess it could be quite a bit of 
> work for me to come up with a test case.
> 
> At least I couldn't reproduce it with simple loops running interleaved 
> pop/appendleft and my machine has enough memory, so that's not the 
> problem. I'm not using things like Psyco either, which BTW (in 2.4) 
> segfaults as well (1.2 and CVS).
> 
> Anyway, when I replace the deque with this:
> 
>     class deque(list):
>         def appendleft(self, item):
>             self.insert(0, item)
> 
> the segfault disappears, so it's definitely deque's fault.
> 
> Has anyone else observed this problem?
> 
> Stefan



More information about the Python-list mailing list