Re: Fwd: Re: System V msg queue bugs in latest kernels

2001-02-17 Thread Andries . Brouwer
From [EMAIL PROTECTED] Sat Feb 17 22:45:36 2001 I'm sending this to you with the hope that lines like this (in ipcs.c) can be modified to report proper values: printf ("%-10o%-12ld%-12ld\n", ipcp->mode & 0777, /* * gli

Re: System V msg queue bugs in latest kernels

2001-02-17 Thread Christopher Allen Wing
Manfred: > If you want to access values > 65535 from your app you have 2 options: > > 1) use the new msqid64_ds structure. You must pass IPC_64 to the msgctl > call. This is the only option if you need correct 32-bit uids. glibc 2.2 will support this natively without needing any changes to your

Re: System V msg queue bugs in latest kernels

2001-02-17 Thread Manfred Spraul
Manfred Spraul wrote: > > Mark Swanson wrote: > > > > Hello, > > > > ipcs (msg) gives incorrect results if used-bytes is above 65536. It > > stays at 65536 even though messages are being read and removed from the > > msg queue. > > Ok, does the value stay at 65536 or 65535? It should stay at 655

Re: System V msg queue bugs in latest kernels

2001-02-17 Thread Mark Swanson
The exact error is in /usr/include/linux/msg.h The three unsigned shorts should be unsigned int instead. Would too many things break if this was changed? Should user-space tools like ipcs be rewritten to use /proc/sysvipc instead? (I notice that my old 2.2.14 kernel doesn't have /proc/sysvipc...)

Re: System V msg queue bugs in latest kernels

2001-02-17 Thread Mark Swanson
You are right. /proc/sysvipc/msg is correct. It shows: cbytes: 1048575 qnum: 95325 ipcs shows: used-bytes: 65535 messages: 65535 It's a 16-bit number issue. --- Manfred Spraul <[EMAIL PROTECTED]> wrote: > Mark Swanson wrote: > > > > Hello, > > > > ipcs (msg) gives incorrect results if used-by

Re: System V msg queue bugs in latest kernels

2001-02-17 Thread Manfred Spraul
Mark Swanson wrote: > > Hello, > > ipcs (msg) gives incorrect results if used-bytes is above 65536. It > stays at 65536 even though messages are being read and removed from the > msg queue. > I'm testing it. Could you check /proc/sysvipc/msg? I know that several API's have 16-bit numbers, perh

System V msg queue bugs in latest kernels

2001-02-17 Thread Mark Swanson
Hello, ipcs (msg) gives incorrect results if used-bytes is above 65536. It stays at 65536 even though messages are being read and removed from the msg queue. The sysv msg queue either ignores the /proc/sys/kernel/msgmnb value if it is above 65536 or simply gets it wrong. Proof: I can place more