Why does PPP failed at adding default route every other time?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Why does PPP failed at adding default route every other time?

Weili Yao
Does anybody know why PPP failed to add default route every other time?

The failure is at file net/ppp/current/src/sys-ecos.c, function
dodefaultroute(). It failed at write().

When PPP is successfully established at the first time, the default
route can be successfully added. Then I disconnected the PPP, and
established the PPP again at the second time, then the default route
adding failed. If I re-established the PPP at the third time, the
default route adding is success. The default route adding failed at
every other time.

I noticed that when I disconnected PPP, the default route got correctly
deleted.

Thank you very much for your help.

Weili Yao


--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

Reply | Threaded
Open this post in threaded view
|

Re: Why does PPP failed at adding default route every other time?

Matt Jerdonek
What are you getting for the errno?

--- Weili Yao <[hidden email]> wrote:

> Does anybody know why PPP failed to add default
> route every other time?
>
> The failure is at file
> net/ppp/current/src/sys-ecos.c, function
> dodefaultroute(). It failed at write().
>
> When PPP is successfully established at the first
> time, the default
> route can be successfully added. Then I disconnected
> the PPP, and
> established the PPP again at the second time, then
> the default route
> adding failed. If I re-established the PPP at the
> third time, the
> default route adding is success. The default route
> adding failed at
> every other time.
>
> I noticed that when I disconnected PPP, the default
> route got correctly
> deleted.
>
> Thank you very much for your help.
>
> Weili Yao
>
>
> --
> Before posting, please read the FAQ:
> http://ecos.sourceware.org/fom/ecos
> and search the list archive:
> http://ecos.sourceware.org/ml/ecos-discuss
>
>



               
__________________________________
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

Reply | Threaded
Open this post in threaded view
|

RE: Why does PPP failed at adding default route every other time?

Weili Yao
In reply to this post by Weili Yao
The errno is 355 after the write() function got executed.
Thanks!

Weili

-----Original Message-----
From: Matt Jerdonek [mailto:[hidden email]]
Sent: Thursday, November 17, 2005 3:46 PM
To: Weili Yao; [hidden email]
Subject: Re: [ECOS] Why does PPP failed at adding default route every
other time?

What are you getting for the errno?

--- Weili Yao <[hidden email]> wrote:

> Does anybody know why PPP failed to add default
> route every other time?
>
> The failure is at file
> net/ppp/current/src/sys-ecos.c, function
> dodefaultroute(). It failed at write().
>
> When PPP is successfully established at the first
> time, the default
> route can be successfully added. Then I disconnected
> the PPP, and
> established the PPP again at the second time, then
> the default route
> adding failed. If I re-established the PPP at the
> third time, the
> default route adding is success. The default route
> adding failed at
> every other time.
>
> I noticed that when I disconnected PPP, the default
> route got correctly
> deleted.
>
> Thank you very much for your help.
>
> Weili Yao
>
>
> --
> Before posting, please read the FAQ:
> http://ecos.sourceware.org/fom/ecos
> and search the list archive:
> http://ecos.sourceware.org/ml/ecos-discuss
>
>



               
__________________________________
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

Reply | Threaded
Open this post in threaded view
|

RE: Why does PPP failed at adding default route every other time?

Matt Jerdonek
From packages/error/current/include/codes.h, 355 means
ENOBUFS.  My guess is that the malloc is failing in
rtrequest, but unfortunately I'm not sure about that,
nor can I tell you why the malloc is failing.  You'll
probably have to step through it to find exactly where
the failure is.

-- Matt

--- Weili Yao <[hidden email]> wrote:

> The errno is 355 after the write() function got
> executed.
> Thanks!
>
> Weili
>
> -----Original Message-----
> From: Matt Jerdonek [mailto:[hidden email]]
> Sent: Thursday, November 17, 2005 3:46 PM
> To: Weili Yao; [hidden email]
> Subject: Re: [ECOS] Why does PPP failed at adding
> default route every
> other time?
>
> What are you getting for the errno?
>
> --- Weili Yao <[hidden email]> wrote:
>
> > Does anybody know why PPP failed to add default
> > route every other time?
> >
> > The failure is at file
> > net/ppp/current/src/sys-ecos.c, function
> > dodefaultroute(). It failed at write().
> >
> > When PPP is successfully established at the first
> > time, the default
> > route can be successfully added. Then I
> disconnected
> > the PPP, and
> > established the PPP again at the second time, then
> > the default route
> > adding failed. If I re-established the PPP at the
> > third time, the
> > default route adding is success. The default route
> > adding failed at
> > every other time.
> >
> > I noticed that when I disconnected PPP, the
> default
> > route got correctly
> > deleted.
> >
> > Thank you very much for your help.
> >
> > Weili Yao
> >
> >
> > --
> > Before posting, please read the FAQ:
> > http://ecos.sourceware.org/fom/ecos
> > and search the list archive:
> > http://ecos.sourceware.org/ml/ecos-discuss
> >
> >
>
>
>
>
> __________________________________
> Yahoo! FareChase: Search multiple travel sites in
> one click.
> http://farechase.yahoo.com
>



       
               
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

Reply | Threaded
Open this post in threaded view
|

RE: Why does PPP failed at adding default route every other time?

Weili Yao
In reply to this post by Weili Yao
Matt:
   Thanks for the info.
   I traced the error path and found that I hit the ENOBUFS at the
following place:
Packages/net/bsd_tcpip/current/src/sys/net/rtsock.c line 351
   Error = rtrequest(RTM_ADD, dst, gate, netmask,
                                        rtm->rtm_flags, &saved_nrt);

   Here rtrequest() is defined in
packages/net/bsd_tcpip/current/src/sys/net/route.c line 656:
     :
    R_Malloc(rt, struct rtentry *, sizeof(*rt));
    if (rt == 0)
                senderr(ENOBUFS);

   In our .ecc file, we have defined CYG_NET_MEM_USAGE to 400000 (i.e.,
256K). We suspected that maybe this memory size is too small, so I
simply double the size to 800000 (512KB), and my problem is gone.

   Now the questions are:
   Before the increase of CYG_NET_MEM_USAGE, where is the memory used?
Why did I get successful malloc() every other time? What is typical
value of CYG_NET_MEM_USAGE? How to turn on log(LOG_MDEBUG, ...) so that
I can print out memory usage trace?

   Thank you!

Weili

   

-----Original Message-----
From: Matt Jerdonek [mailto:[hidden email]]
Sent: Thursday, November 17, 2005 6:40 PM
To: Weili Yao; [hidden email]
Subject: RE: [ECOS] Why does PPP failed at adding default route every
other time?

From packages/error/current/include/codes.h, 355 means
ENOBUFS.  My guess is that the malloc is failing in
rtrequest, but unfortunately I'm not sure about that,
nor can I tell you why the malloc is failing.  You'll
probably have to step through it to find exactly where
the failure is.

-- Matt

--- Weili Yao <[hidden email]> wrote:

> The errno is 355 after the write() function got
> executed.
> Thanks!
>
> Weili
>
> -----Original Message-----
> From: Matt Jerdonek [mailto:[hidden email]]
> Sent: Thursday, November 17, 2005 3:46 PM
> To: Weili Yao; [hidden email]
> Subject: Re: [ECOS] Why does PPP failed at adding
> default route every
> other time?
>
> What are you getting for the errno?
>
> --- Weili Yao <[hidden email]> wrote:
>
> > Does anybody know why PPP failed to add default
> > route every other time?
> >
> > The failure is at file
> > net/ppp/current/src/sys-ecos.c, function
> > dodefaultroute(). It failed at write().
> >
> > When PPP is successfully established at the first
> > time, the default
> > route can be successfully added. Then I
> disconnected
> > the PPP, and
> > established the PPP again at the second time, then
> > the default route
> > adding failed. If I re-established the PPP at the
> > third time, the
> > default route adding is success. The default route
> > adding failed at
> > every other time.
> >
> > I noticed that when I disconnected PPP, the
> default
> > route got correctly
> > deleted.
> >
> > Thank you very much for your help.
> >
> > Weili Yao
> >
> >
> > --
> > Before posting, please read the FAQ:
> > http://ecos.sourceware.org/fom/ecos
> > and search the list archive:
> > http://ecos.sourceware.org/ml/ecos-discuss
> >
> >
>
>
>
>
> __________________________________
> Yahoo! FareChase: Search multiple travel sites in
> one click.
> http://farechase.yahoo.com
>



       
               
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss