Re: Getting an error display, vp_freepkt: Bad file descriptor.
Hi all,
Thanks to X.Tang for his valuable information.
I am using vp_attach() and vp_detach() only once in our code & providing
proper FD to vp_attach() (even tried vp_attach with -1 option) and nowhere
closing that FD.
And I am not doing any fork() in my code.
I am creating a thread in our code and using VPI library functions across
the thread. ( I found, none of the VPI library functions are thread safe.
Will this be the problem?)
But I feel, once when I was doing a stress test on VPI using a program
(without thread), I got he same error (vp_freepkt: Bad file descriptor.) If
I get that program I will let u all know.
BTW, what is this vp_freepkt() function? Can I get any implementation
document of the VPI?
Thanks
Jith.
----- Original Message -----
From: Xiaodan Tang <xtang@...>
To: Prajith <prajith@...>; Frank Liu <gfrankliu@...>
Sent: Tuesday, October 05, 2004 11:42 PM
Subject: RE: [Openqnx-developer] Getting an error display, vp_freepkt: Bad
file descriptor.
When you call vp_mfree(), it will then call vp_freepkt(), this end up
to Sendmx(v->sock, ...), which is a message send to Tcpip.
The EBADF seems indicating the v->sock is not right. The
v->sock is comming from vp_attach(). If you pass in one,
then it will dup() it; if you pass in -1, it will create one use
socket() call.
I don't know why that socket fd would be bad, but things
to think about is, are you vp_attach()/detach() a lot?
Did you fork()'d your process after attach()? If you passed
in a fd in vp_attach(), did you accidently closed it?
-xtang
> -----Original Message-----
> From: openqnx-developer-admin@...
> [mailto:openqnx-developer-admin@...] On
> Behalf Of Prajith
> Sent: Tuesday, October 05, 2004 8:57 AM
> To: Frank Liu
> Cc: OpenQNX
> Subject: Re: [Openqnx-developer] Getting an error display,
> vp_freepkt: Bad file descriptor.
>
> Hi all.
>
> Our Bandwidth Manager is showing around 20 times the error message
> "vp_freepkt: Bad file descriptor." while transfering a 5MB
> file at a bandwidth regulation of 1Mbits/sec, irespective of
> the available no.of file descripters/process.(even I have
> tied with Proc32 -f 16 10240 20480, then too I got around 20
> error messages.).
>
> We have implemented a queueing discipline (CBQ) in the
> application space, where we are getting network packets using
> the VPI (Virtual Packet
> Interface) as a IP FILTER. These queueing disciplines keeps
> the netwoks packets for a while and send them back in a
> random order(not in the sequeuece in which packets are
> received). Will this make any problem in VPI (keeping packets
> for a while in memory and send them back in a random order)?
> Or is there any way to configure the Virtual Packet Interface?
>
> Please give us some solution/suggestion/comments.
>
> Thanks in advance
> Jith.
>
>
> ----- Original Message -----
> From: Frank Liu <gfrankliu@...>
> To: Prajith <prajith@...>
> Sent: Friday, October 01, 2004 10:54 PM
> Subject: Re: [Openqnx-developer] Getting an error display,
> vp_freepkt: Bad file descriptor.
>
>
> Maybe you ran out of file descriptors, and possibly other resources.
> Try to increase that (make a new boot image).
>
> Frank
>
>
> ----- Original Message -----
> From: Prajith <prajith@...>
> Date: Fri, 1 Oct 2004 20:54:55 +0530
> Subject: [Openqnx-developer] Getting an error display, vp_freepkt:
> Bad file descriptor.
> To: openqnx-developer@...
>
>
> Hello all,
>
> We have developed a bandwidth regulating software in
> QNX4.25(In application space). We are getting the network
> packets into the application space using the Virtual Packet
> Interface(VPI) and regulating them and send it back using the
> same VPI.
>
> It's working fine with moderate network traffic. But in the
> case of heavy traffic, it's working but displays the
> following error message continuously.
>
> vp_freepkt: Bad file descriptor.
>
> If anybody have any idea about this, please let me know.
>
> Thanks in advance
> Jith.
> «·´`·.(*·.¸(`·.¸ ¸.·´)¸.·*).·´`·»
> «..........Prajith P.K..............»
> «·´`·.(¸.·*(¸.·´ `·.¸)*·.¸).·´`·»
> GlobalEdge Software Ltd.
> Bangalore 560003
> Cell : 9886171652
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: IT Product Guide on
> ITManagersJournal Use IT products in your business? Tell us
> what you think of them. Give us Your Opinions, Get Free
> ThinkGeek Gift Certificates! Click to find out more
> http://productguide.itmanagersjournal.com/guidepromo.tmpl
> _______________________________________________
> openqnx-developer mailing list
> openqnx-developer@...
> https://lists.sourceforge.net/lists/listinfo/openqnx-developer
>
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl