Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - mbuf leak (related to pppd): Page 1 of 2 (29 Items)
   
mbuf leak (related to pppd)  
I have discovered an mbuf memory leak (recognizable by netstat -m).

Each invocation of pppd "consumes" one mbuf. 

I have a small system (memory constrained) and it creates a problem for me.

Any ideas?

Thanks, Pavel Kycina
Re: mbuf leak (related to pppd)  
On Thu, Oct 22, 2009 at 11:53:57AM -0400, Pavol Kycina wrote:
> I have discovered an mbuf memory leak (recognizable by netstat -m).
> 
> Each invocation of pppd "consumes" one mbuf. 
> 
> I have a small system (memory constrained) and it creates a problem for me.

I've reproduced this.  I'll keep you posted...

-seanb
Re: mbuf leak (related to pppd)  
On Thu, Oct 22, 2009 at 11:53:57AM -0400, Pavol Kycina wrote:
> I have discovered an mbuf memory leak (recognizable by netstat -m).
> 
> Each invocation of pppd "consumes" one mbuf. 
> 
> I have a small system (memory constrained) and it creates a problem for me.
> 
> Any ideas?

Should be fixed now.

Regards,

-seanb
Re: mbuf leak (related to pppd)  
Thanks for good info.

As there is a message about maintenance of svn repository, would it be possible to send me built version of pppd?

Regards, PKY

> On Thu, Oct 22, 2009 at 11:53:57AM -0400, Pavol Kycina wrote:
> > I have discovered an mbuf memory leak (recognizable by netstat -m).
> > 
> > Each invocation of pppd "consumes" one mbuf. 
> > 
> > I have a small system (memory constrained) and it creates a problem for me.
> > 
> > Any ideas?
> 
> Should be fixed now.
> 
> Regards,
> 
> -seanb


Re: mbuf leak (related to pppd)  
On Mon, Oct 26, 2009 at 07:39:24AM -0400, Pavol Kycina wrote:
> Thanks for good info.
> 
> As there is a message about maintenance of svn repository, would it be possible to send me built version of pppd?

It's back up now.  These changes are therein.

-seanb
Re: mbuf leak (related to pppd)  
> On Mon, Oct 26, 2009 at 07:39:24AM -0400, Pavol Kycina wrote:
> > Thanks for good info.
> > 
> > As there is a message about maintenance of svn repository, would it be possible to send me built version of pppd?
> 
> It's back up now.  These changes are therein.

BTW the fix for this is in the stack, not pppd.

-seanb
Re: mbuf leak (related to pppd)  
It's probably back online, but I can't authorize to it. (though I am using the same password as to other repositories...
)

Could you please send me corrected io-pkt-v4?

Thanks, PKY

> > On Mon, Oct 26, 2009 at 07:39:24AM -0400, Pavol Kycina wrote:
> > > Thanks for good info.
> > > 
> > > As there is a message about maintenance of svn repository, would it be 
> possible to send me built version of pppd?
> > 
> > It's back up now.  These changes are therein.
> 
> BTW the fix for this is in the stack, not pppd.
> 
> -seanb


Re: mbuf leak (related to pppd)  
On Mon, Oct 26, 2009 at 09:50:22AM -0400, Pavol Kycina wrote:
> It's probably back online, but I can't authorize to it. (though I am using the same password as to other repositories.
..)
> 
> Could you please send me corrected io-pkt-v4?
> 

I checked with the powers that be and it should be up again.
Try checking it out to a new location rather than updating.

Regards,

-seanb
Re: mbuf leak (related to pppd)  
> On Mon, Oct 26, 2009 at 09:50:22AM -0400, Pavol Kycina wrote:
> > It's probably back online, but I can't authorize to it. (though I am using 
> the same password as to other repositories...)
> > 
> > Could you please send me corrected io-pkt-v4?
> > 
> 
> I checked with the powers that be and it should be up again.
> Try checking it out to a new location rather than updating.
> 
> Regards,
> 
> -seanb


Thanks, I have managed to check it out. 

But I have found these two problems:

First (I managed to solve):
/tmp/qnx_core_net2/lib/io-pkt/lib/socket/net/getpeereid.c
there is no header for the function in this file.

Second (stopper for me):

make -j 1 -Cx86 -fMakefile
make[3]: Entering directory `/tmp/qnx_core_net2/lib/io-pkt/lib/dns/x86'
make -j 1 -Ca -fMakefile
make[4]: Entering directory `/tmp/qnx_core_net2/lib/io-pkt/lib/dns/x86/a'
make[4]: Nothing to be done for `first'.
make[4]: Leaving directory `/tmp/qnx_core_net2/lib/io-pkt/lib/dns/x86/a'
make[3]: Leaving directory `/tmp/qnx_core_net2/lib/io-pkt/lib/dns/x86'
make[2]: Leaving directory `/tmp/qnx_core_net2/lib/io-pkt/lib/dns'
make -j 1 -Cedit -fMakefile
make[2]: Entering directory `/tmp/qnx_core_net2/lib/io-pkt/lib/edit'
make -j 1 -Cx86 -fMakefile
make[3]: Entering directory `/tmp/qnx_core_net2/lib/io-pkt/lib/edit/x86'
make -j 1 -Ca -fMakefile
make[4]: Entering directory `/tmp/qnx_core_net2/lib/io-pkt/lib/edit/x86/a'
/usr/qnx641/host/qnx6/x86/usr/bin/qcc -Vgcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses
-O -DNDEBUG   -I. -I/tmp/qnx_core_net2/lib/io-pkt/lib/edit -I/usr/qnx641/target/qnx6/u
sr/include        -DVARIANT_a -DBUILDENV_qss  /tmp/qnx_core_net2/lib/io-pkt/lib/edit/r
eadline.c
In file included from /tmp/qnx_core_net2/lib/io-pkt/lib/edit/el.h:105,
                 from /tmp/qnx_core_net2/lib/io-pkt/lib/edit/readline.c:60:
/tmp/qnx_core_net2/lib/io-pkt/lib/edit/map.h:59: error: expected specifier-qualifier-l
ist before 'el_func_t'
/tmp/qnx_core_net2/lib/io-pkt/lib/edit/map.h:73: error: expected declaration specifier
s or '...' before 'el_func_t'
/tmp/qnx_core_net2/lib/io-pkt/lib/edit/readline.c: In function 'rl_bind_key':
/tmp/qnx_core_net2/lib/io-pkt/lib/edit/readline.c:1568: error: 'ED_INSERT' undeclared
(first use in this function)
/tmp/qnx_core_net2/lib/io-pkt/lib/edit/readline.c:1568: error: (Each undeclared identi
fier is reported only once
/tmp/qnx_core_net2/lib/io-pkt/lib/edit/readline.c:1568: error: for each function it ap
pears in.)
cc: /usr/qnx641/host/qnx6/x86/usr/lib/gcc/i386-pc-nto-qnx6.4.0/4.3.3/cc1 error 1
make[4]: *** [readline.o] Error 1
make[4]: Leaving directory `/tmp/qnx_core_net2/lib/io-pkt/lib/edit/x86/a'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/tmp/qnx_core_net2/lib/io-pkt/lib/edit/x86'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/tmp/qnx_core_net2/lib/io-pkt/lib/edit'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/tmp/qnx_core_net2/lib/io-pkt/lib'
make: *** [all] Error 2

Any idea what went wrong?

Thanks, PKY
Re: mbuf leak (related to pppd)  
The second problem was caused by not having executable permissions on makelist in that dir.

But soon after that in 
/tmp/qnx_core_net2/lib/io-pkt/lib/io-pkt/crypto/dist2/openssl/ssl/ it was unable to compile bio_ssl.c, with many errors 
in ssl.h

Any idea?

Thanks, PKY

> > On Mon, Oct 26, 2009 at 09:50:22AM -0400, Pavol Kycina wrote:
> > > It's probably back online, but I can't authorize to it. (though I am using
>  
> > the same password as to other repositories...)
> > > 
> > > Could you please send me corrected io-pkt-v4?
> > > 
> > 
> > I checked with the powers that be and it should be up again.
> > Try checking it out to a new location rather than updating.
> > 
> > Regards,
> > 
> > -seanb
> 
> 
> Thanks, I have managed to check it out. 
> 
> But I have found these two problems:
> 
> First (I managed to solve):
> /tmp/qnx_core_net2/lib/io-pkt/lib/socket/net/getpeereid.c
> there is no header for the function in this file.
> 
> Second (stopper for me):
> 
> make -j 1 -Cx86 -fMakefile
> make[3]: Entering directory `/tmp/qnx_core_net2/lib/io-pkt/lib/dns/x86'
> make -j 1 -Ca -fMakefile
> make[4]: Entering directory `/tmp/qnx_core_net2/lib/io-pkt/lib/dns/x86/a'
> make[4]: Nothing to be done for `first'.
> make[4]: Leaving directory `/tmp/qnx_core_net2/lib/io-pkt/lib/dns/x86/a'
> make[3]: Leaving directory `/tmp/qnx_core_net2/lib/io-pkt/lib/dns/x86'
> make[2]: Leaving directory `/tmp/qnx_core_net2/lib/io-pkt/lib/dns'
> make -j 1 -Cedit -fMakefile
> make[2]: Entering directory `/tmp/qnx_core_net2/lib/io-pkt/lib/edit'
> make -j 1 -Cx86 -fMakefile
> make[3]: Entering directory `/tmp/qnx_core_net2/lib/io-pkt/lib/edit/x86'
> make -j 1 -Ca -fMakefile
> make[4]: Entering directory `/tmp/qnx_core_net2/lib/io-pkt/lib/edit/x86/a'
> /usr/qnx641/host/qnx6/x86/usr/bin/qcc -Vgcc_ntox86 -c -Wc,-Wall -Wc,-Wno-
> parentheses
> -O -DNDEBUG   -I. -I/tmp/qnx_core_net2/lib/io-pkt/lib/edit -I/usr/qnx641/
> target/qnx6/u
> sr/include        -DVARIANT_a -DBUILDENV_qss  /tmp/qnx_core_net2/lib/io-pkt/
> lib/edit/r
> eadline.c
> In file included from /tmp/qnx_core_net2/lib/io-pkt/lib/edit/el.h:105,
>                  from /tmp/qnx_core_net2/lib/io-pkt/lib/edit/readline.c:60:
> /tmp/qnx_core_net2/lib/io-pkt/lib/edit/map.h:59: error: expected specifier-
> qualifier-l
> ist before 'el_func_t'
> /tmp/qnx_core_net2/lib/io-pkt/lib/edit/map.h:73: error: expected declaration 
> specifier
> s or '...' before 'el_func_t'
> /tmp/qnx_core_net2/lib/io-pkt/lib/edit/readline.c: In function 'rl_bind_key':
> /tmp/qnx_core_net2/lib/io-pkt/lib/edit/readline.c:1568: error: 'ED_INSERT' 
> undeclared
> (first use in this function)
> /tmp/qnx_core_net2/lib/io-pkt/lib/edit/readline.c:1568: error: (Each 
> undeclared identi
> fier is reported only once
> /tmp/qnx_core_net2/lib/io-pkt/lib/edit/readline.c:1568: error: for each 
> function it ap
> pears in.)
> cc: /usr/qnx641/host/qnx6/x86/usr/lib/gcc/i386-pc-nto-qnx6.4.0/4.3.3/cc1 error
>  1
> make[4]: *** [readline.o] Error 1
> make[4]: Leaving directory `/tmp/qnx_core_net2/lib/io-pkt/lib/edit/x86/a'
> make[3]: *** [all] Error 2
> make[3]: Leaving directory `/tmp/qnx_core_net2/lib/io-pkt/lib/edit/x86'
> make[2]: *** [all] Error 2
> make[2]: Leaving directory `/tmp/qnx_core_net2/lib/io-pkt/lib/edit'
> make[1]: *** [all] Error 2
> make[1]: Leaving directory `/tmp/qnx_core_net2/lib/io-pkt/lib'
> make: *** [all] Error 2
> 
> Any idea what went wrong?
> 
> Thanks, PKY


Re: mbuf leak (related to pppd)  
On Tue, Oct 27, 2009 at 06:32:47AM -0400, Pavol Kycina wrote:
> The second problem was caused by not having executable permissions on makelist in that dir.
> 
> But soon after that in 
> /tmp/qnx_core_net2/lib/io-pkt/lib/io-pkt/crypto/dist2/openssl/ssl/ it was unable to compile bio_ssl.c, with many 
errors in ssl.h
> 
> Any idea?

You're probably trying to compile for arm
with an old compiler.  You can:

- exclude arm
  # make EXCLUDE_CPULIST="arm"
  # make CPULIST="x86 ppc"
- compile that particular file for arm with -O0
  # cd lib/ssl/arm && make CCOPTS=-O0 bio_ssl.o
  then continue with your previous lower level make

-seanb
Re: mbuf leak (related to pppd)  
Even the first time I was making it for x86 only,

make CPULIST="x86"

Now I have tried 

make EXCLUDE_CPULIST="arm"

And the result is the same: not possible to compile bio_ssl.c

My qconfig says:

QNX SDP 6.4.1


Thanks, PKY

> On Tue, Oct 27, 2009 at 06:32:47AM -0400, Pavol Kycina wrote:
> > The second problem was caused by not having executable permissions on 
> makelist in that dir.
> > 
> > But soon after that in 
> > /tmp/qnx_core_net2/lib/io-pkt/lib/io-pkt/crypto/dist2/openssl/ssl/ it was 
> unable to compile bio_ssl.c, with many errors in ssl.h
> > 
> > Any idea?
> 
> You're probably trying to compile for arm
> with an old compiler.  You can:
> 
> - exclude arm
>   # make EXCLUDE_CPULIST="arm"
>   # make CPULIST="x86 ppc"
> - compile that particular file for arm with -O0
>   # cd lib/ssl/arm && make CCOPTS=-O0 bio_ssl.o
>   then continue with your previous lower level make
> 
> -seanb


RE: mbuf leak (related to pppd)  
Please post the errors.

Thanks,

-seanb

-----Original Message-----
From: Pavol Kycina [mailto:community-noreply@qnx.com] 
Sent: Tuesday, October 27, 2009 10:57 AM
To: general-networking
Subject: Re: mbuf leak (related to pppd)

Even the first time I was making it for x86 only,

make CPULIST="x86"

Now I have tried 

make EXCLUDE_CPULIST="arm"

And the result is the same: not possible to compile bio_ssl.c

My qconfig says:

QNX SDP 6.4.1
Re: RE: mbuf leak (related to pppd)  
Attached file is the output of:

 make CPULIST=x86 2>/tmp/qnx_corenet.log_err

PKY

> Please post the errors.
> 
> Thanks,
> 
> -seanb
> 
> -----Original Message-----
> From: Pavol Kycina [mailto:community-noreply@qnx.com] 
> Sent: Tuesday, October 27, 2009 10:57 AM
> To: general-networking
> Subject: Re: mbuf leak (related to pppd)
> 
> Even the first time I was making it for x86 only,
> 
> make CPULIST="x86"
> 
> Now I have tried 
> 
> make EXCLUDE_CPULIST="arm"
> 
> And the result is the same: not possible to compile bio_ssl.c
> 
> My qconfig says:
> 
> QNX SDP 6.4.1


Attachment: Text qnx_corenet.log_err 37.58 KB
Re: RE: mbuf leak (related to pppd)  
On Tue, Oct 27, 2009 at 11:10:02AM -0400, Pavol Kycina wrote:
> Attached file is the output of:
> 
>  make CPULIST=x86 2>/tmp/qnx_corenet.log_err

You need to do a 'make CPULIST=x86 install'
from the root.  I believe this should be
solved if libcrypto is built beforehand
(which it should be by default) and installed
to your stage.

-seasnb
Re: RE: mbuf leak (related to pppd)  
Thanks,

Now I have compiled executable.

But at the same time I have development system in "non defined" state, as make install didn't work on stageing area, but
 on real system.

I have followed:
http://community.qnx.com/sf/wiki/do/viewPage/projects.core_os/wiki/BuildTheOSSource 

this is the state of my system:

# pwd
/tmp/qnx_core_net2/lib/io-pkt
#
# set | grep QCONF
QCONF_OVERRIDE=/tmp/qnx_core_net2/lib/io-pkt/qconf-override.mk
#
# cat qconf_override.mk
USE_INSTALL_ROOT=1
INSTALL_ROOT_nto=/tmp/qnx_core_net2/lib/io-pkt/stage
#
# ls -D
.           common      dist        external    services    sys
..          crypto      dist2       lib         stage       utils
#
#
 
After make CPULIST=x86 hinstall and also make CPULIST=x86 install the stage directory is empty.

All cp commands invoked by make were copying to real system.

Any idea why?

Thanks, PKY



> On Tue, Oct 27, 2009 at 11:10:02AM -0400, Pavol Kycina wrote:
> > Attached file is the output of:
> > 
> >  make CPULIST=x86 2>/tmp/qnx_corenet.log_err
> 
> You need to do a 'make CPULIST=x86 install'
> from the root.  I believe this should be
> solved if libcrypto is built beforehand
> (which it should be by default) and installed
> to your stage.
> 
> -seasnb


Re: RE: mbuf leak (related to pppd)  
On Wed, Oct 28, 2009 at 02:53:07AM -0400, Pavol Kycina wrote:
> Thanks,
> 
> Now I have compiled executable.
> 
> But at the same time I have development system in "non defined" state, as make install didn't work on stageing area, 
but on real system.
> 
> I have followed:
> http://community.qnx.com/sf/wiki/do/viewPage/projects.core_os/wiki/BuildTheOSSource 
> 
> this is the state of my system:
> 
> # pwd
> /tmp/qnx_core_net2/lib/io-pkt
> #
> # set | grep QCONF
> QCONF_OVERRIDE=/tmp/qnx_core_net2/lib/io-pkt/qconf-override.mk
> #
> # cat qconf_override.mk

You've exported 'qconf-override.mk' but setup 'qconf_override.mk'
('-' vs '_').  This is why you shouldn't 'make install' as root
(at least the first time).  :)


-seanb
Re: RE: mbuf leak (related to pppd)  
Thanks for all the assistance.

PKY

> On Wed, Oct 28, 2009 at 02:53:07AM -0400, Pavol Kycina wrote:
> > Thanks,
> > 
> > Now I have compiled executable.
> > 
> > But at the same time I have development system in "non defined" state, as 
> make install didn't work on stageing area, but on real system.
> > 
> > I have followed:
> > http://community.qnx.com/sf/wiki/do/viewPage/projects.core_os/wiki/
> BuildTheOSSource 
> > 
> > this is the state of my system:
> > 
> > # pwd
> > /tmp/qnx_core_net2/lib/io-pkt
> > #
> > # set | grep QCONF
> > QCONF_OVERRIDE=/tmp/qnx_core_net2/lib/io-pkt/qconf-override.mk
> > #
> > # cat qconf_override.mk
> 
> You've exported 'qconf-override.mk' but setup 'qconf_override.mk'
> ('-' vs '_').  This is why you shouldn't 'make install' as root
> (at least the first time).  :)
> 
> 
> -seanb


Re: RE: mbuf leak (related to pppd)  
But back to the original problem.

Now I have "home compiled" version, which leaks 1 mbuf at pppd start, and 2 mbufs when pppd terminates.

This is the information about the source code:
http://community.qnx.com/svn/repos/core_networking/trunk
ff24a42e-91d7-4d6b-b188-f2e9bd5c50fa
Rev. 2, author seanb

PKY


> Thanks for all the assistance.
> 
> PKY
> 
> > On Wed, Oct 28, 2009 at 02:53:07AM -0400, Pavol Kycina wrote:
> > > Thanks,
> > > 
> > > Now I have compiled executable.
> > > 
> > > But at the same time I have development system in "non defined" state, as 
> 
> > make install didn't work on stageing area, but on real system.
> > > 
> > > I have followed:
> > > http://community.qnx.com/sf/wiki/do/viewPage/projects.core_os/wiki/
> > BuildTheOSSource 
> > > 
> > > this is the state of my system:
> > > 
> > > # pwd
> > > /tmp/qnx_core_net2/lib/io-pkt
> > > #
> > > # set | grep QCONF
> > > QCONF_OVERRIDE=/tmp/qnx_core_net2/lib/io-pkt/qconf-override.mk
> > > #
> > > # cat qconf_override.mk
> > 
> > You've exported 'qconf-override.mk' but setup 'qconf_override.mk'
> > ('-' vs '_').  This is why you shouldn't 'make install' as root
> > (at least the first time).  :)
> > 
> > 
> > -seanb
> 
> 


Re: RE: mbuf leak (related to pppd)  
On Wed, Oct 28, 2009 at 10:14:20AM -0400, Pavol Kycina wrote:
> But back to the original problem.
> 
> Now I have "home compiled" version, which leaks 1 mbuf at pppd start, and 2 mbufs when pppd terminates.
> 

You're sure you're actually running the one you
compiled?  Using one at start is OK but it should
now be reaped on cleanup.

-seanb
Re: RE: mbuf leak (related to pppd)  
I have triple checked, that I am running new compiled version.

> On Wed, Oct 28, 2009 at 10:14:20AM -0400, Pavol Kycina wrote:
> > But back to the original problem.
> > 
> > Now I have "home compiled" version, which leaks 1 mbuf at pppd start, and 2 
> mbufs when pppd terminates.
> > 
> 
> You're sure you're actually running the one you
> compiled?  Using one at start is OK but it should
> now be reaped on cleanup.
> 
> -seanb


Re: RE: mbuf leak (related to pppd)  
Is your inhouse version working fine?

If so, could you please send me the binary?

Thanks, PKY 

> I have triple checked, that I am running new compiled version.
> 
> > On Wed, Oct 28, 2009 at 10:14:20AM -0400, Pavol Kycina wrote:
> > > But back to the original problem.
> > > 
> > > Now I have "home compiled" version, which leaks 1 mbuf at pppd start, and 
> 2 
> > mbufs when pppd terminates.
> > > 
> > 
> > You're sure you're actually running the one you
> > compiled?  Using one at start is OK but it should
> > now be reaped on cleanup.
> > 
> > -seanb
> 
> 


Re: RE: mbuf leak (related to pppd)  
Ping?

> Is your inhouse version working fine?
> 
> If so, could you please send me the binary?
> 
> Thanks, PKY 
> 
> > I have triple checked, that I am running new compiled version.
> > 
> > > On Wed, Oct 28, 2009 at 10:14:20AM -0400, Pavol Kycina wrote:
> > > > But back to the original problem.
> > > > 
> > > > Now I have "home compiled" version, which leaks 1 mbuf at pppd start, 
> and 
> > 2 
> > > mbufs when pppd terminates.
> > > > 
> > > 
> > > You're sure you're actually running the one you
> > > compiled?  Using one at start is OK but it should
> > > now be reaped on cleanup.
> > > 
> > > -seanb
> > 
> > 
> 
> 


Re: RE: mbuf leak (related to pppd)  
On Mon, Nov 02, 2009 at 08:30:44AM -0500, Pavol Kycina wrote:
> Ping?
> 
> > Is your inhouse version working fine?
> > 
> > If so, could you please send me the binary?
> > 

Mine appears to be working fine.  It should
be the same as what's on the foundry.  How
exactly are you still creating a leak?

-seanb
Re: RE: mbuf leak (related to pppd)  
I start io-pkt with these params:

io-pkt-v4 -dspeedo name=en -ptcpip -ppppmgr

And pppd:

pppd lcp-echo-failure 5 lcp-echo-interval 5 /dev/ser4 115200 nodetach defaultroute debug

There's nothing connected to ser4, so it timeouts.

I am monitoring mbuf count by netstart -m

When pppd starts, one mbuf is consumed and 2 mbufs are consumed "a second before" pppd terminates (probably doing some 
cleanup before exiting). 

As soon as pppd terminates, it's restarted with the same args. 

It tekes approx. 1/2 minute for one "cycle".

Regards, PKY

> On Mon, Nov 02, 2009 at 08:30:44AM -0500, Pavol Kycina wrote:
> > Ping?
> > 
> > > Is your inhouse version working fine?
> > > 
> > > If so, could you please send me the binary?
> > > 
> 
> Mine appears to be working fine.  It should
> be the same as what's on the foundry.  How
> exactly are you still creating a leak?
> 
> -seanb