Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Is there a limit of 128 shared memory segments on Solaris 10?

576 views
Skip to first unread message

Gary Mills

unread,
Oct 12, 2007, 12:41:20 PM10/12/07
to
This is on Solaris 10 8/07, but I assume it happens on earler versions
as well. I get this error message now when I run emacs:

(gemacs-22-1:22228): Gdk-WARNING **: shmget failed: error 28 (No space left on device)

When I check the number of shared memory segments, it's always 128:

$ ipcs -m | grep ^m | wc -l
128

I assume this is why emacs is complaining. When I look more closely
at my own shared memory, I see this:

IPC status from <running system> as of Friday, October 12, 2007 11:06:01 AM CDT
T ID KEY MODE OWNER GROUP CREATOR CGROUP NATTCH SEGSZ CPID LPID ATIME DTIME CTIME
m 570425461 0 --rw-rw-rw- mills cserv mills cserv 2 384000 24651 14129 10:51:07 19:57:51 10:51:07
m 1828716658 0 --rw-rw-rw- mills cserv mills cserv 2 262080 24651 14129 10:51:07 19:57:51 10:51:07
m 352321647 0 --rw-rw-rw- mills cserv mills cserv 0 384000 4931 22115 16:56:25 21:34:17 16:56:25
m 352321646 0 --rw-rw-rw- mills cserv mills cserv 0 262080 4931 22115 16:56:23 21:34:17 16:56:23

Only one of the processes still exists:

UID PID PPID C STIME TTY TIME CMD
mills 24651 24645 1 Oct 11 ? 48:52 /usr/lib/firefox/firefox-bin -UILocale en-CA -contentLocale CA

I assume that this means that an earlier instance of firefox has abandoned
that shared memory. Is this a result of a bug in firefox? Almost all of
the other shared memory segments, belonging to other users, do not have
corresponding processes. I assume they are of no further use. Can I just
run a script to delete them periodically? Are applications supposed to
remove these automatically?

Is this limit of 128 defined someplace? All I can get out of `rctladm'
is cryptic symbols like `no-basic'. Where is that defined?

--
-Gary Mills- -Unix Support- -U of M Academic Computing and Networking-

gerryt

unread,
Oct 12, 2007, 1:43:23 PM10/12/07
to
On Oct 12, 9:41 am, Gary Mills <mi...@cc.umanitoba.ca> wrote:
> This is on Solaris 10 8/07, but I assume it happens on earler versions
> as well. I get this error message now when I run emacs:
>
> (gemacs-22-1:22228): Gdk-WARNING **: shmget failed: error 28 (No space left on device)

See man shmget Notes: project.max-shm-ids

> When I check the number of shared memory segments, it's always 128:
> $ ipcs -m | grep ^m | wc -l
> 128
> I assume this is why emacs is complaining. When I look more closely
> at my own shared memory, I see this:
> IPC status from <running system> as of Friday, October 12, 2007 11:06:01 AM CDT
> T ID KEY MODE OWNER GROUP CREATOR CGROUP NATTCH SEGSZ CPID LPID ATIME DTIME CTIME
> m 570425461 0 --rw-rw-rw- mills cserv mills cserv 2 384000 24651 14129 10:51:07 19:57:51 10:51:07
> m 1828716658 0 --rw-rw-rw- mills cserv mills cserv 2 262080 24651 14129 10:51:07 19:57:51 10:51:07
> m 352321647 0 --rw-rw-rw- mills cserv mills cserv 0 384000 4931 22115 16:56:25 21:34:17 16:56:25
> m 352321646 0 --rw-rw-rw- mills cserv mills cserv 0 262080 4931 22115 16:56:23 21:34:17 16:56:23
>
> Only one of the processes still exists:
>
> UID PID PPID C STIME TTY TIME CMD
> mills 24651 24645 1 Oct 11 ? 48:52 /usr/lib/firefox/firefox-bin -UILocale en-CA -contentLocale CA
>
> I assume that this means that an earlier instance of firefox has abandoned
> that shared memory. Is this a result of a bug in firefox? Almost all of
> the other shared memory segments, belonging to other users, do not have
> corresponding processes. I assume they are of no further use. Can I just
> run a script to delete them periodically? Are applications supposed to
> remove these automatically?

Im running Oracle Grid Control on this box with Mozilla and firefox
and my count is "3"
Even after firing up xemacs from Studio 12
How the heck you managed 128 is baffling : >

> Is this limit of 128 defined someplace? All I can get out of `rctladm'
> is cryptic symbols like `no-basic'. Where is that defined?

maybe prctl will reveal something. With Oracle you need to bump a
number of
project resources up from the default of 128. Examples:
max-shm-ids,max-msg-ids,max-sem-ids etc

Gary Mills

unread,
Oct 12, 2007, 2:12:00 PM10/12/07
to

>On Oct 12, 9:41 am, Gary Mills <mi...@cc.umanitoba.ca> wrote:
>> This is on Solaris 10 8/07, but I assume it happens on earler versions
>> as well. I get this error message now when I run emacs:
>>
>> (gemacs-22-1:22228): Gdk-WARNING **: shmget failed: error 28 (No space left on device)

>See man shmget Notes: project.max-shm-ids

As I suspected, it ran out of shared memory segments.

>> When I check the number of shared memory segments, it's always 128:
>> $ ipcs -m | grep ^m | wc -l
>> 128
>> I assume this is why emacs is complaining. When I look more closely
>> at my own shared memory, I see this:
>> IPC status from <running system> as of Friday, October 12, 2007 11:06:01 AM CDT
>> T ID KEY MODE OWNER GROUP CREATOR CGROUP NATTCH SEGSZ CPID LPID ATIME DTIME CTIME
>> m 570425461 0 --rw-rw-rw- mills cserv mills cserv 2 384000 24651 14129 10:51:07 19:57:51 10:51:07
>> m 1828716658 0 --rw-rw-rw- mills cserv mills cserv 2 262080 24651 14129 10:51:07 19:57:51 10:51:07
>> m 352321647 0 --rw-rw-rw- mills cserv mills cserv 0 384000 4931 22115 16:56:25 21:34:17 16:56:25
>> m 352321646 0 --rw-rw-rw- mills cserv mills cserv 0 262080 4931 22115 16:56:23 21:34:17 16:56:23
>>
>> Only one of the processes still exists:
>>
>> UID PID PPID C STIME TTY TIME CMD
>> mills 24651 24645 1 Oct 11 ? 48:52 /usr/lib/firefox/firefox-bin -UILocale en-CA -contentLocale CA
>>
>> I assume that this means that an earlier instance of firefox has abandoned
>> that shared memory. Is this a result of a bug in firefox? Almost all of
>> the other shared memory segments, belonging to other users, do not have
>> corresponding processes. I assume they are of no further use. Can I just
>> run a script to delete them periodically? Are applications supposed to
>> remove these automatically?

>Im running Oracle Grid Control on this box with Mozilla and firefox
>and my count is "3"
>Even after firing up xemacs from Studio 12
>How the heck you managed 128 is baffling : >

This box is a Sun Ray server with many users logging in and out
during the day. The segments belong to a whole variety of users,
not just me.

>> Is this limit of 128 defined someplace? All I can get out of `rctladm'
>> is cryptic symbols like `no-basic'. Where is that defined?

>maybe prctl will reveal something. With Oracle you need to bump a
>number of
>project resources up from the default of 128. Examples:
>max-shm-ids,max-msg-ids,max-sem-ids etc

I thought that most of those parameters were dynamic in Solaris 10.

gerryt

unread,
Oct 12, 2007, 5:39:44 PM10/12/07
to
On Oct 12, 11:12 am, Gary Mills <mi...@cc.umanitoba.ca> wrote:

> In <1192211003.702902.136...@z24g2000prh.googlegroups.com> gerryt <lepsys...@gmail.com> writes:
>
> >On Oct 12, 9:41 am, Gary Mills <mi...@cc.umanitoba.ca> wrote:
> >> This is on Solaris 10 8/07, but I assume it happens on earler versions
> >> as well. I get this error message now when I run emacs:
> >> (gemacs-22-1:22228): Gdk-WARNING **: shmget failed: error 28 (No space left on device)
> >See man shmget Notes: project.max-shm-ids

> As I suspected, it ran out of shared memory segments.

O so thats what "No space left on device" is supposed to mean.. right

Ah!

> >> Is this limit of 128 defined someplace? All I can get out of `rctladm'
> >> is cryptic symbols like `no-basic'. Where is that defined?
> >maybe prctl will reveal something. With Oracle you need to bump a
> >number of project resources up from the default of 128. Examples:
> >max-shm-ids,max-msg-ids,max-sem-ids etc
> I thought that most of those parameters were dynamic in Solaris 10.

Me too at first but Im guessing abything that shows up in a prtctl
dump
is not. Or not dynamic enough for Oracle : >

Tim Bradshaw

unread,
Oct 15, 2007, 3:05:25 PM10/15/07
to
On Oct 12, 7:12 pm, Gary Mills <mi...@cc.umanitoba.ca> wrote:

> >> Is this limit of 128 defined someplace? All I can get out of `rctladm'
> >> is cryptic symbols like `no-basic'. Where is that defined?
> >maybe prctl will reveal something. With Oracle you need to bump a
> >number of
> >project resources up from the default of 128. Examples:
> >max-shm-ids,max-msg-ids,max-sem-ids etc
>
> I thought that most of those parameters were dynamic in Solaris 10.

Dynamic means "limit is not defined once-and-for-all at boot time",
not "there is no limit". The latter is obviously not desirable since
it results in a trivial DoS attack.

--tim

Gary Mills

unread,
Oct 15, 2007, 3:26:59 PM10/15/07
to

I suppose then that I need to increase the limit. Now that it's no
longer in /etc/system, where do I change it? However, since most of
the shared memory segments are abandoned by their original owners,
are some applications forgetting to clean up properly when they exit?
Do I have to write a cleanup script that obtains all of the shared
memory segments, finds the ones with no active PIDs, and deletes them?

0 new messages