LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 04-28-2006, 06:58 PM   #1
sixerjman
Member
 
Registered: Sep 2004
Distribution: Debian Tesing / Unstable
Posts: 166
Blog Entries: 1

Rep: Reputation: 30
Debian swapd package stopped working after Kernel 2.6.8


This is driving me nuts because I had swapd working with kernel 2.4.27, but I remember I had to do some tweaking to get it going...but I can't remember what the tweaks were.
Now I've had at least one instance where the system ran out of memory and started thrashing which resulted in a VERY non-graceful shutdown (had to pull the plug).

I seem to remember seeing that the util-linux package had to be downgraded for swapd to work but am not sure.

Symptoms are as follows:

1. Increased "memlimit" in /etc/swapd.conf from 32K to 128K to test.
2. In Gnome crank up a bunch of Mozilla processes including some web pages with Java.
3. See free memory using 'free' fall below 128K, no swap files created.

I guess I'll compile it with debug set to yes and see what
happens. Also, do the mkswap that it (should) do manually
and see what happens.

I know I'm not the only person that's had this problem...I've had it twice and I'm a much different person than when I had the problem originally lol.

Any tips on this would be greatly appreciated.
 
Old 04-30-2006, 03:22 PM   #2
sixerjman
Member
 
Registered: Sep 2004
Distribution: Debian Tesing / Unstable
Posts: 166
Blog Entries: 1

Original Poster
Rep: Reputation: 30
Things started moving, i.e. swap files created, removed, after I 'primed' it by manually creating one swap file with:

1. dd if=/dev/zero of=/swap/linux0.swp bs=1024 count=8192
2. mkswap /swap/linux0.swp
3. swapon /swap/linux0.swp

swapd should do this anyway so I don't know why it didn't. Got close to the 'production' 32Mb free limit just now so I'm going to prime again and see what happens. Other thing it (swapd) is supposed to do (and has in the past) is reuse swap files it finds already there at init time, so I'll test this too.
 
Old 05-02-2006, 05:08 PM   #3
sixerjman
Member
 
Registered: Sep 2004
Distribution: Debian Tesing / Unstable
Posts: 166
Blog Entries: 1

Original Poster
Rep: Reputation: 30
Talking FOUND and FIXED the bug

function usedswaps() is returning an incorrect count of the number of lines in /proc/swaps. Subsequently the line
that determines

if (mem < memlimit && (!maxswaps || kswaps < maxswaps))

always fails if no swap files existed and maxswaps (from the config file /etc/swapd.conf) was non-zero.

Fix was to set 'count' equal to zero in usedswaps() function (previously it was set to -1).

All bugs must be killed.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ALSA stopped working after kernel panic RemusX2 Linux - Software 2 07-09-2005 01:10 AM
Debian sound stopped working HalfDiminished Debian 7 03-07-2005 12:25 PM
2.6.9 kernel upgrade, Bluez stopped working 0pal_t0ad Linux - Hardware 1 12-11-2004 02:04 PM
LAN stopped working, XP/Debian ImperiestroMary Linux - Networking 5 12-06-2004 01:49 AM
SMP kernel stopped working thedeud Linux - Hardware 0 03-06-2003 05:48 PM


All times are GMT -5. The time now is 10:54 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration