[Mono-bugs] [Bug 588689] New: shm_semaphores_init: semget error: No space left on device - memory leak?

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Mar 16 11:29:37 EDT 2010



           Summary: shm_semaphores_init: semget error: No space left on
                    device - memory leak?
    Classification: Mono
           Product: Mono: Runtime
           Version: 2.6.x
          Platform: x86-64
        OS/Version: Ubuntu
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: misc
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: apenn at hchb.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---

Created an attachment (id=348672)
 --> (http://bugzilla.novell.com/attachment.cgi?id=348672)
strace of one failing application

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2)
Gecko/20100115 Firefox/3.6 (.NET CLR 3.5.30729)

Our monitoring system runs a number of Mono apps day in and day out.
Periodically, all Mono apps begin to fail with "Unknown error code" and we have
to reboot the system to clear the condition. This time, I grabbed straces of a
few of the apps that were failing. The problem seems to be some sort of memory
leak; in one run, I found the following message:

shm_semaphores_init: semget error: No space left on device.  Try deleting some
semaphores with ipcs and ipcrm

I have attached straces from two failing applications. I don't believe this is
a "normal" resource issue from a memory or disk space perspective:

Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda1            135818824  36388696  92585236  29% /
tmpfs                  1992040         0   1992040   0% /lib/init/rw
varrun                 1992040       380   1991660   1% /var/run
varlock                1992040         0   1992040   0% /var/lock
udev                   1992040       140   1991900   1% /dev
tmpfs                  1992040        24   1992016   1% /dev/shm
lrm                    1992040      2560   1989480   1%

             total       used       free     shared    buffers     cached
Mem:       3984080    2438544    1545536          0     184636    1007736
-/+ buffers/cache:    1246172    2737908
Swap:      5831552      53508    5778044

The critical section of the strace may be as follows:

uname({sys="Linux", node="pmon02", ...}) = 0
uname({sys="Linux", node="pmon02", ...}) = 0
0x7fff6e4f88b0) = -1 ENOENT (No such file or directory)
semget(0xffffffff, 8, IPC_CREAT|IPC_EXCL|0600) = -1 EEXIST (File exists)
semget(IPC_PRIVATE, 8, IPC_CREAT|IPC_EXCL|0600) = -1 ENOSPC (No space left on
write(2, "\n** ERROR **: shm_semaphores_init"..., 195) = 195
rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0

Reproducible: Always

Steps to Reproduce:
1. Start our monitoring application that calls Mono apps on a schedule.
2. Wait; the condition does not immediately occur, but within a week or two, we
are in a position that we have to reboot. 

Actual Results:  
Mono apps begin to err as above.

Expected Results:  
Should work.

Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list