Date: Fri, 6 Jun 2003 16:22:29 -0600 From: Mike Romberg <romberg@fsl.noaa.gov> To: freebsd-bugs@freebsd.org Subject: rpc/svc_tcp.c (readtcp) calls svc_getreqset2! Message-ID: <200306062222.h56MMTa3019148@smaug.fsl.noaa.gov>
next in thread | raw e-mail | index | archive | help
I'm attempting to port some code to a mac running os x. From what I have found on the net, it seems that os x uses a freebsd version of the rpc libraries. I'm not sure if this is a bug or not. But it sure is causing heck with the server I'm porting. The problem is that readtcp has it's own select loop in it which can call svc_getreqset2(). I think this was done for some kind of security related problem (a DOS attack). My application is an rpc server which is not threaded and is in no way prepared to deal with serving multiple requests at the same time. In fact it likes to dump core when this happens. The select loop in my code calls svc_getreqset() to process file descriptors that are ready. And then while doing the xdr processing for a single request, readtcp() is calling svc_getreqset2() and starting the dispatching of another request. This ends up causing my application to dump core because it is in the middle of one transaction when another starts. As far as I know, an RPC implementation is not supposed to do this. I'm wondering if there is some sort of workaround short of threading my application (which would be a big change)? Or is this a known bug? Thanks, Mike Romberg (romberg@fsl.noaa.gov)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200306062222.h56MMTa3019148>