python-apt segfaults when listing priorities on Hardy

Bug #196233 reported by Marc Tardif
8
Affects Status Importance Assigned to Milestone
Debian
New
Undecided
Unassigned
Ubuntu
Invalid
Undecided
Unassigned

Bug Description

When I list the priority of packages using the apt.cache module, I reliably get a segfault on the latest update of Hardy:

Python 2.5.2 (r252:60911, Feb 26 2008, 14:43:53)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from apt.cache import Cache
/usr/lib/python2.5/site-packages/apt/__init__.py:18: FutureWarning: apt API not stable yet
  warnings.warn("apt API not stable yet", FutureWarning)
>>> for i in Cache(): j = i.priority
...
Segmentation fault (core dumped)

Tags: hwct
Revision history for this message
Brian Murray (brian-murray) wrote :

It would be helpful to know what specific version of the package you have installed rather than latest update which isn't that informative a week or a month down the line. I have apt version 0.7.9ubuntu12 and python2.5 version 2.5.2-0ubuntu4 have been unable to recreate this bug report using the steps you have provided. This is the case on my desktop with 2GB of memory and my laptop with 1GB of memory.

Revision history for this message
Marc Tardif (cr3) wrote :

The status is still incomplete, would you happen to need more information?

Revision history for this message
Brian Murray (brian-murray) wrote :

Could you please provide the package versions of apt and python2.5 that you have installed? Additionally how much memory do you have on the system you found this bug on?

Revision history for this message
Brian Murray (brian-murray) wrote :

Any news here?

Revision history for this message
Brian Murray (brian-murray) wrote :

We are closing this bug report as it lacks the information, described in the previous comments, we need to investigate the problem further. However, please reopen it if you can give us the missing information and feel free to submit bug reports in the future.

Revision history for this message
Sita Krishnakumar (sita-krishnakumar) wrote :

Hi,
I get the same seg fault on a Debian 5 machine. My version info as follows:

python 2.5.2
python-apt 0.7.7.1+nmu1

This happened all on a sudden since today feb 2, 2012.

i have been running it w/o any issues for past few months. initially i thought it was due to lack of no updates available, but further digging proved it to be due to accessing of priorities. And now it consistently happens. Not sure if the repository against which apt checks has been handed over to a new machine, for it used to list updates earlier. Without my upgrading, how come there are 0 updates available now?

Anyways here is a simple python script to test out the same.

import apt

cache = apt.Cache()
cache.update()
cache.open(None)
cache.upgrade()

for pkg in cache:
    print pkg.name
    print pkg.priority

I look forward to some responses. Thanks,
Sita

Revision history for this message
Sita Krishnakumar (sita-krishnakumar) wrote :

To add to the above, I am running debian 5 as a VM on my laptop.
-Sita

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.