Discussion:
POSIX Message Queues
Shay, Daniel
2005-11-17 23:40:19 UTC
Permalink
We have been running a FC4/PPC64 machine where we have run into the
following issues with POSIX message queues.

-An application fails to close/unlink queues, allowing the machine the
reach the /proc/sys/fs/mqueue/queues_max limit. I don't know how to
cleanup message queues let open after process dies. Note: ipcs doesn't
seem to work with POSIX message queues.

-The default /proc/sys/fs/mqueue/msg_max is set to 10, we would like to
have this set to 100 when the machine is rebooted

I've noticed POSIX message queues are relatively new to the Linux 2.6
kernel, is the support just not finished?


Thanks,
Daniel
Rick Stevens
2005-11-17 23:53:49 UTC
Permalink
Post by Shay, Daniel
We have been running a FC4/PPC64 machine where we have run into the
following issues with POSIX message queues.
-An application fails to close/unlink queues, allowing the machine the
reach the /proc/sys/fs/mqueue/queues_max limit. I don't know how to
cleanup message queues let open after process dies. Note: ipcs doesn't
seem to work with POSIX message queues.
It should. "ipcrm -Q" or "ipcrm -q" should do it.
Post by Shay, Daniel
-The default /proc/sys/fs/mqueue/msg_max is set to 10, we would like to
have this set to 100 when the machine is rebooted
Edit /etc/sysctl.conf and add the lines:

# Increase message queue
fs.mqueue.msg_max = 100
Post by Shay, Daniel
I've noticed POSIX message queues are relatively new to the Linux 2.6
kernel, is the support just not finished?
I think it's done. I could be wrong.

----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer rstevens at vitalstream.com -
- VitalStream, Inc. http://www.vitalstream.com -
- -
- Tempt not the dragons of fate, since thou art crunchy and taste -
- good with ketchup. -
----------------------------------------------------------------------
Sam Varshavchik
2005-11-18 00:06:24 UTC
Permalink
Post by Shay, Daniel
I've noticed POSIX message queues are relatively new to the Linux 2.6
kernel, is the support just not finished?
Nobody really cared about posix message queues for at least a decade.
They're broken by design.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.fedoraproject.org/pipermail/users/attachments/20051117/a48c8545/attachment.bin
Mike McCarty
2005-11-18 05:36:23 UTC
Permalink
Post by Sam Varshavchik
Post by Shay, Daniel
I've noticed POSIX message queues are relatively new to the Linux 2.6
kernel, is the support just not finished?
Nobody really cared about posix message queues for at least a decade.
They're broken by design.
Care to support that statement? (Though it is topic drift.)

I'm no POSIX expert, though I have written some POSIX compliant
multithreaded programs using real time signals. I like the way
the POSIX stuff generally works, with deferred operations
being done in a consistent manner, and I liked the way
the real time signals work. I also have used the shared memory,
and found it to be very easy to use.

What is wrong with the way POSIX message queues work?

Mike
--
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
This message made from 100% recycled bits.
You have found the bank of Larn.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!
Mike McCarty
2005-11-18 05:36:23 UTC
Permalink
Post by Sam Varshavchik
Post by Shay, Daniel
I've noticed POSIX message queues are relatively new to the Linux 2.6
kernel, is the support just not finished?
Nobody really cared about posix message queues for at least a decade.
They're broken by design.
Care to support that statement? (Though it is topic drift.)

I'm no POSIX expert, though I have written some POSIX compliant
multithreaded programs using real time signals. I like the way
the POSIX stuff generally works, with deferred operations
being done in a consistent manner, and I liked the way
the real time signals work. I also have used the shared memory,
and found it to be very easy to use.

What is wrong with the way POSIX message queues work?

Mike
--
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
This message made from 100% recycled bits.
You have found the bank of Larn.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!
Shay, Daniel
2005-11-18 16:22:12 UTC
Permalink
Post by Rick Stevens
Post by Shay, Daniel
We have been running a FC4/PPC64 machine where we have run into the
following issues with POSIX message queues.
-An application fails to close/unlink queues, allowing the machine
the
Post by Rick Stevens
Post by Shay, Daniel
reach the /proc/sys/fs/mqueue/queues_max limit. I don't know how to
cleanup message queues let open after process dies. Note: ipcs
doesn't
Post by Rick Stevens
Post by Shay, Daniel
seem to work with POSIX message queues.
It should. "ipcrm -Q" or "ipcrm -q" should do it.
When I run a simple test program where a posix queue is opened while I
issue the command 'ipcs' I do not see any message queues listed. It is
my understanding from the man pages this utility along with the ipc*
commands, was written for SysV constructs. I cannot find the posix
equivalent.

Daniel
Ulrich Drepper
2005-11-19 23:33:56 UTC
Permalink
Post by Shay, Daniel
I don't know how to
cleanup message queues let open after process dies. Note: ipcs doesn't
seem to work with POSIX message queues.
The necessary step is to mount the mqueue file system. I have filed a
bug in bugzilla a long time ago to mount it by default but this hasn't
happened yet.

Just do by hand

mkdir /dev/mqueue
mount -t mqueue none /dev/mqueue

and then remove all the unused message queues using 'rm' from /dev/mqueue.
--
? Ulrich Drepper ? Red Hat, Inc. ? 444 Castro St ? Mountain View, CA ?
Shay, Daniel
2005-11-17 23:40:19 UTC
Permalink
We have been running a FC4/PPC64 machine where we have run into the
following issues with POSIX message queues.

-An application fails to close/unlink queues, allowing the machine the
reach the /proc/sys/fs/mqueue/queues_max limit. I don't know how to
cleanup message queues let open after process dies. Note: ipcs doesn't
seem to work with POSIX message queues.

-The default /proc/sys/fs/mqueue/msg_max is set to 10, we would like to
have this set to 100 when the machine is rebooted

I've noticed POSIX message queues are relatively new to the Linux 2.6
kernel, is the support just not finished?


Thanks,
Daniel
Rick Stevens
2005-11-17 23:53:49 UTC
Permalink
Post by Shay, Daniel
We have been running a FC4/PPC64 machine where we have run into the
following issues with POSIX message queues.
-An application fails to close/unlink queues, allowing the machine the
reach the /proc/sys/fs/mqueue/queues_max limit. I don't know how to
cleanup message queues let open after process dies. Note: ipcs doesn't
seem to work with POSIX message queues.
It should. "ipcrm -Q" or "ipcrm -q" should do it.
Post by Shay, Daniel
-The default /proc/sys/fs/mqueue/msg_max is set to 10, we would like to
have this set to 100 when the machine is rebooted
Edit /etc/sysctl.conf and add the lines:

# Increase message queue
fs.mqueue.msg_max = 100
Post by Shay, Daniel
I've noticed POSIX message queues are relatively new to the Linux 2.6
kernel, is the support just not finished?
I think it's done. I could be wrong.

----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer rstevens at vitalstream.com -
- VitalStream, Inc. http://www.vitalstream.com -
- -
- Tempt not the dragons of fate, since thou art crunchy and taste -
- good with ketchup. -
----------------------------------------------------------------------
Sam Varshavchik
2005-11-18 00:06:24 UTC
Permalink
Post by Shay, Daniel
I've noticed POSIX message queues are relatively new to the Linux 2.6
kernel, is the support just not finished?
Nobody really cared about posix message queues for at least a decade.
They're broken by design.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.fedoraproject.org/pipermail/users/attachments/20051117/a48c8545/attachment-0002.bin
Shay, Daniel
2005-11-18 16:22:12 UTC
Permalink
Post by Rick Stevens
Post by Shay, Daniel
We have been running a FC4/PPC64 machine where we have run into the
following issues with POSIX message queues.
-An application fails to close/unlink queues, allowing the machine
the
Post by Rick Stevens
Post by Shay, Daniel
reach the /proc/sys/fs/mqueue/queues_max limit. I don't know how to
cleanup message queues let open after process dies. Note: ipcs
doesn't
Post by Rick Stevens
Post by Shay, Daniel
seem to work with POSIX message queues.
It should. "ipcrm -Q" or "ipcrm -q" should do it.
When I run a simple test program where a posix queue is opened while I
issue the command 'ipcs' I do not see any message queues listed. It is
my understanding from the man pages this utility along with the ipc*
commands, was written for SysV constructs. I cannot find the posix
equivalent.

Daniel
Ulrich Drepper
2005-11-19 23:33:56 UTC
Permalink
Post by Shay, Daniel
I don't know how to
cleanup message queues let open after process dies. Note: ipcs doesn't
seem to work with POSIX message queues.
The necessary step is to mount the mqueue file system. I have filed a
bug in bugzilla a long time ago to mount it by default but this hasn't
happened yet.

Just do by hand

mkdir /dev/mqueue
mount -t mqueue none /dev/mqueue

and then remove all the unused message queues using 'rm' from /dev/mqueue.
--
? Ulrich Drepper ? Red Hat, Inc. ? 444 Castro St ? Mountain View, CA ?
Loading...