Solaris 7 msgQ limit stuck at 32

Solaris 7 msgQ limit stuck at 32

Post by Greg Owen Walk » Thu, 22 Jul 1999 04:00:00

Hi, I'm trying to run a multi-threaded program on Solaris 7
(x86 and sparc) that requires more than 32 POSIX message
queues. I haven't been having good luck raising the system
msgQ limit above 32.

Dan Anderson's and Casper Dik's FAQs described the relevant
/etc/system parameters:

set msgsys:msginfo_msgseg = <value>
set msgsys:msginfo_msgssz = <value>
set msgsys:msginfo_msgtql = <value>
set msgsys:msginfo_msgmap = <value>
set msgsys:msginfo_msgmax = <value>
set msgsys:msginfo_msgmnb = <value>
set msgsys:msginfo_msgmni = <value>

Unfortunately, changing these (and rebooting) doesn't change
the 32 msgQ limit. I don't have this problem with
semaphores: The program also opens a lot of POSIX
semaphores, and setting the semaphore parameters in
/etc/system does change the system limits after a reboot.

Wierdly, /etc/sysdef -i shows the msgQ parameters as all
equal to zero even though /etc/system sets the params all
nonzero. Despite the zero valued params, I can still
mq_open() 32 message queues before getting an EMFILE error
("Too many open files"). Both x86 and sparc display this

I also tried raising the file descriptor limit by raising
the rlim_fd_max and rlim_fd_cur params in /etc/system. This
successfully raised the fd limit, but did nothing for the
msgQ limit.

/usr/include/sys/param.h defines _MQ_OPEN_MAX to equal 32.
This seems to be the root of the problem. Is there a dynamic
way to raise the system msgQ limit, or does the kernel need to
be recompiled after changing param.h?

Thanks a lot,
Greg W.

FWIW, The intel machine is running:
Solaris 2.7 3/99 on Pentium laptop
The ultra sparc is running 2.7.


               Greg O. Walker



1. Solaris 8 (32-bit) and 2GB file size limit


I am working on a system (Solaris 8, 108528-08 booted with 32-bit kernel
modules) that is running Oracle 8.1.6 and Veritas Volume Manager 3.0.4.
There are two Oracle index files that are just greater than 2GB:

# ls -l
total 8392768
-rw-------   1 oracle   dba      2147491840 Aug 14 04:43 cisindex_i01.dbf
-rw-------   1 oracle   dba      2147491840 Aug 14 04:43 cisindex_i02.dbf

The problem is that Oracle cannot access these files and I cannot even use
the "largefile" aware commands like cp and file to perform file operations
on these files. Doing a 'file cisindex_i01.dbf' and a truss output from
'file cisindex_i01.dbf' showed this:

# file cisindex_i01.dbf
cisindex_i01.dbf:       cannot open: Value too large for defined data type

# truss file cisindex_i01.dbf
stat64("cisindex_i01.dbf", 0xFFBEFA98)          = 0
open64("cisindex_i01.dbf", O_RDONLY)            Err#79 EOVERFLOW
cisindex_i01.dbf:       cannot open: Value too large for defined data type

It looks like the file command is using the open64 function but the file
offset seems to be limited to 32 bits. Attempting to make a file 2GB or
greater also fails:

# mkfile 2000m test_file
Could not set length of test_file: File too large

(# mkfile 1999m test_file  -> was successful)

None of these operations fail with files less than 2GB. The veritas volume
has a ufs filesystem and is mounted with the 'largefiles' options. I tried
the above commands on an older Solaris 2.6 system and another Solaris 8
system with no problems. On the other Solaris 8 system, I even booted to
32-bits and the operations still succeeded. Checking through the patches and
packages using Sun's patchcheck utility showed the system has the recent

It looks like the open64() function is failing when trying to open a file
problem or encountered a similar situation? Any insight into this problem
would be appreciated. Thank you.


2. SSI with #exec cgi only?

3. Solaris 9 installed with 32 & 64 bit supports but boots in 32 bit mode

4. file manipulation

5. 32 groups per user limit

6. Question

7. ** POSIX signals limited to 32 signals?

8. Can't post news using INN-1.4 ... any help ?

9. Device driver and 2GB limit (32 vs. 64 Bit)

10. Has the limit of 32 disks per volume group gone away?


12. IPC: POSIX signals limited to 32 under Linux?

13. 32 telnet sessions needed - limit 8 or 9 ???