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


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

Submitter:  Emilio Pozuelo Monfort <pochu>
Submitted:  Fri 12 Mar 2010 01:03:05 PM UTC
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Privacy:  Public
Assigned to:  None Originator Name: 
Open/Closed:  Closed Reproducibility:  None
Size (loc):  None Planned Release:  None
Effort:  0.00
Wiki-like text discussion box: 
* Mandatory Fields

Add a New Comment (Rich Markup)

Comment Type & Canned Response:
       No canned response available


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

Applied, thanks

Samuel Thibault <sthibaul>
Project Administrator
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
+++ 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 Administrator
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

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 Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.





    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-05-31 sthibaul StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.9