CAPS bug

Dave Leimbach leimySPAM2k at mac.com
Sun Apr 25 23:38:47 PDT 2004


I can't send a message larger than 128K

Hiten helped me find it.  I have a test that showed it and fought me all day.

include/param.h:119:#define MAXPHYS             (128 * 1024)    /* max raw I/O t

XIO_INTERNAL_PAGES is MAXPHYS and "xio_init_ubuf" is using it as the upper
limit on a for loop :).  

Apparently there is an error but it never makes it back to the user 
because caps_load_ccr is called which calls xio_init_ubuf unchecked.

In this case it's failing as I am sending 128K+1 bytes and I had no way to 
know about it at the user level.


The test I used is a simple server that waits for 2 messages...  The client
connects to it and sends the atoi of argv[1] as the "length to expect" for
the second message.  Then it mallocs and memsets the values to "1" in the 
contiguous buffer I allocate.  It then caps_sys_put's this buffer and is 
always successful.

The server side checks for the 1s and has been failing at the 128K+1 bit.

This might be a good test for /usr/src/test/caps btw.  I'd like to clean it
up and submit it if you are interested.

Also I am trying my hand at diagraming the behavior of CAPS and a typical
client/server connect/put situation.  I don't know where that will be published
but I hope to get it out to the dragonfly community as the #dfinstaller 
folks might be able to refer to it.

I am also working on a little walkthrough paper (just started the outline
tonight) for CAPS system call interface.  I hope to make progress before
I move in a few weeks to Seattle [ a 4 day drive ].  It will take a while
for me to get back in gear then.

Dave






More information about the Bugs mailing list