bugThe GNU Hurd - Bugs: bug #29206, /proc/meminfo says swap is full...

 
 

bug #29206: /proc/meminfo says swap is full when it's not

Submitted by:  Emilio Pozuelo Monfort <pochu>
Submitted on:  Fri 12 Mar 2010 01:03:05 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: FixedPrivacy: Public
Assigned to: NoneOriginator Name: 
Open/Closed: ClosedReproducibility: None
Size (loc): NonePlanned Release: None
Effort: 0.00
Wiki-like text discussion box: 

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 31 May 2010 12:27:09 AM UTC, comment #3:

Applied, thanks

Samuel Thibault <sthibaul>
Project Member
Tue 25 May 2010 11:58:23 AM UTC, comment #2:

I successfully tested this patch:

diff -u -r1.1.2.5 procfs_nonpid_files.c
--- procfs_nonpid_files.c 12 Dec 2008 00:48:54 -0000 1.1.2.5
+++ procfs_nonpid_files.c 25 May 2010 11:57:14 -0000
@@ -412,8 +414,8 @@
"HighFree:\t%lu kB\n"
"LowTotal:\t%lu kB\n"
"LowFree:\t%lu kB\n"
- "SwapTotal:\t%lu kB\n"
- "SwapFree:\t%lu kB\n",
+ "SwapTotal:\t%lli kB\n"
+ "SwapFree:\t%lli kB\n",
mem_size, (PAGES_TO_BYTES(vmstats.free_count)) / 1024 , 0, 0, 0,
(PAGES_TO_BYTES(vmstats.active_count)) / 1024,
(PAGES_TO_BYTES(vmstats.inactive_count)) / 1024, 0, 0, 0, 0,

Emilio Pozuelo Monfort <pochu>
Project Member
Fri 12 Mar 2010 01:59:31 PM UTC, comment #1:

It seems like the issue is that val_t is a long long but the format is
just a long, thus bogus size on the stack for the parameters. Changing
the format or casting to long should fix it (the code is still in the
hurd CVS, madhusudancs-soc2008-procfs-branch branch)

Samuel Thibault <sthibaul>
Project Member
Fri 12 Mar 2010 01:03:05 PM UTC, original submission:

I've logged in to strauss.debian.net and checked the memory status:

pochu@strauss:~$ cat /proc/meminfo | grep Swap
SwapCached: 0 kB
SwapTotal: 1959892 kB
SwapFree: 0 kB
pochu@strauss:~$ vmstat | grep swap
swap size: 1.87G
swap free: 1.86G
pochu@strauss:~$

So meminfo says the swap is full, but vmstat says it's empty. I've checked my Hurd virtual machine right after boot and I got similar results, so meminfo is most likely wrong.

Emilio Pozuelo Monfort <pochu>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by sthibaul (Posted a comment)
  • -unavailable- added by pochu (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 31 May 2010 12:27:09 AM UTCsthibaulStatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1