Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: Broken apt-get
PostPosted: Tue Dec 16, 2003 3:38 pm 
Offline
Newbie

Joined: Tue Oct 21, 2003 11:41 am
Posts: 2
ICQ: 684123
Website: http://jasonslaughter.com
Location: Toronto
I'm having a problem with my debian-based linode. It seems that my /var/lib/dpkg/status file has become too big for apt-get/apt-cache.

When I try to apt-get update or apt-get install anything, I get the following error:

Code:
Reading Package Lists... Error!
E: Unable to parse package file /var/lib/dpkg/status (1)
E: The package lists or status file could not be parsed or opened.


Sure I can revert to a backup status file (like the ones in /var/backups), but the problem will re-surface. The problem is that the /var/lib/dpkg/status file isn't corrupted, it's just too big for apt-cache!

For instance: if I remove (manually) some text from /var/lib/dpkg/status (to bring it down a few kB), it will allow me to install a new package. However after that the problem will resurface. Similarly, if I delete some text from the status file and run apt-cache, it works fine, but when the status file get just a little bit bigger, I get the following:

Code:
# apt-cache stats
Segmentation fault


So it seems that apt-cache is dying when my status file gets over a certain size.

I have the 32MB Linnode -- not large, but I have more than enough swap memory. What can I do about this? /var/lib/dpkg/status is not that big:

Code:
# wc -l status
   3404 status


Does anybody know what I can do to get apt-get/apt-cache to stop crashing on my >3,400-line status file?


Top
   
 Post subject:
PostPosted: Tue Dec 16, 2003 5:35 pm 
Offline
Senior Member
User avatar

Joined: Mon Jun 23, 2003 1:25 pm
Posts: 260
Hi,

Just to be picky, last time I check there was no Linode 32 on the products page.

But anyway my status file is 3945 lines long and I do not have a problem downloading stuff with apt-get.

So it appears that it could be another problem.

Have you tried to reboot your linode after you get the apt-get error just to ensure that it is not been locked by anything.

Adam


Top
   
 Post subject: Re: Broken apt-get
PostPosted: Tue Dec 16, 2003 6:41 pm 
Offline
Junior Member

Joined: Thu Sep 18, 2003 1:44 pm
Posts: 46
Website: http://www.officemechanic.com
AOL: schof@mac.com
Location: Los Angeles
jslaughter wrote:
I have the 32MB Linnode -- not large, but I have more than enough swap memory.


The other folks here are smart enough to ask the insightful questions...leaving me to ask the "is it plugged in" questions...

How big is your swap? Are you using the stock /etc/apt/sources.list or have you added a bunch of mirrors?

I'm using Debian on a Linode 64, and have no problems, at least of the kind you're describing.

_________________
John Schofield
Apple Certified Technical Coordinator
Office Mechanic Consulting
Mac, Unix, and PC Computer Support
www.officemechanic.com


Top
   
 Post subject:
PostPosted: Wed Dec 17, 2003 1:54 pm 
Offline
Senior Member

Joined: Sun Nov 30, 2003 2:28 pm
Posts: 245
Known problem with woody apt. Try adding a line like

APT::Cache-Limit "241943904";

to your /etc/apt/apt.conf (creating the file if necessary).

_________________
The irony is that Bill Gates claims to be making a stable operating system and Linus Torvalds claims to be trying to take over the world.
-- seen on the net


Top
   
 Post subject:
PostPosted: Wed Dec 17, 2003 4:28 pm 
Offline
Newbie

Joined: Tue Oct 21, 2003 11:41 am
Posts: 2
ICQ: 684123
Website: http://jasonslaughter.com
Location: Toronto
Quote:
Just to be picky, last time I check there was no Linode 32 on the products page.


That's because I came to Linode from GlobalRAID.net. Linode took all of GlobalRAID's customers when they closed shop and GlobalRAID did have a 32MB virtual server.

Quote:
Known problem with woody apt. Try adding a line like


Unfortunately that didn't do it. I have searched the 'net and found that this option is sometimes added to /etc/apt/apt.conf.d/70debconf as well, but putting the "APT::Cache-Limit" line in either or both of /etc/apt/apt.conf or /etc/apt/apt.conf/d/70debconf does not work. I'm still getting (for exampe):

Code:
# apt-get upgrade
Reading Package Lists... Error!
E: Unable to parse package file /var/lib/dpkg/status (1)
E: The package lists or status file could not be parsed or opened.


and apt-cache is still segfaulting. Of course if I bring the status file down a few K it works fine until it grows too big again.

Quote:
How big is your swap? Are you using the stock /etc/apt/sources.list or have you added a bunch of mirrors?


I was running with some mirrors in there, but it doesn't seem to help if I revert back to the defaults. I'm running with the defaults now. My swap is 256MB. See below:

Code:
# cat /proc/meminfo
        total:    used:    free:  shared: buffers:  cached:
Mem:  27889664 27086848   802816        0  1937408 20221952
Swap: 269475840 46616576 222859264
MemTotal:        27236 kB
MemFree:           784 kB
MemShared:           0 kB
Buffers:          1892 kB
Cached:           8292 kB
SwapCached:      11456 kB
Active:           3520 kB
Inactive:        18224 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:        27236 kB
LowFree:           784 kB
SwapTotal:      263160 kB
SwapFree:       217636 kB


sigh. I looks like there may not be a good solution to this. It could be related to memory (32 MB of real RAM is not a lot) but I'm hesitant to upgrade as the 32MB Linode price I have carried over from GlobalRAID is a great deal. I guess it's time to head over to the Debian developer's list and fight the barrage of RTFM!! mail responses. If only the debian lists could be as friendly as the Gentoo forum! :) But there's no way Gentoo would work on a 32MB box--it would take 9 years to compile libc6.

Thanks for your help guys! If anybody else has any suggestions I would love to hear them!


Top
   
 Post subject:
PostPosted: Wed Dec 17, 2003 7:24 pm 
Offline
Senior Member

Joined: Sun Nov 30, 2003 2:28 pm
Posts: 245
Hmmm. You might try running 'strace -o strace.out apt-cache _whatever_' to see what the last system call is*where* it's segfaulting. If you're running out of memory, it shouldn't segfault...if it does, it's a bug. Hmmm, instead of debian-devel, you might try debian-deity...Jason Gunthorpe can be impatient, but you won't get all the random hangers' on.

Oh, and you might try running 'vmstat 1' in one session while running
the apt-* commands in the other. to see if the VM is under pressure.

[Edit: had once again confused dpkg maintainer with apt maintainer]

_________________
The irony is that Bill Gates claims to be making a stable operating system and Linus Torvalds claims to be trying to take over the world.

-- seen on the net


Top
   
 Post subject:
PostPosted: Thu Dec 18, 2003 5:43 pm 
Offline
Junior Member

Joined: Fri Sep 12, 2003 10:10 am
Posts: 33
just for reference, i'm using debian on a laptop with 16M ram, and it runs fine with a 25246 line status file (486 DX/4, if you must know)


Top
   
 Post subject:
PostPosted: Thu Dec 18, 2003 5:45 pm 
Offline
Linode Staff
User avatar

Joined: Tue Apr 15, 2003 6:24 pm
Posts: 3090
Website: http://www.linode.com/
Location: Galloway, NJ
I've noticed lots of things segfaulting with 2.4.23 -- not sure if this is UML related or straight 2.4.23's fault. I do know that they removed the OOM killer, and has something to do with page_alloc messages appearing in console.

It might be worth rebooting into the latest 2.4.23-linode18-7um kernel and giving that a try.

-Chris


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group