On Sun, 27 Sep 1998, Vesselin Mladenov wrote:
> About 2 mounths ago I installed a RocketPort card (it's kind of multiport
> card) that is connected with a 16 ports USRobotics modem pool.
> I installed mgetty-1.0.0 and pppd-2.2.0f with radiusclient patch.
> I have some problems with making pppd interact poperly with Cistron RADIUS
> but in the end I have quite stable system that works.
> The problem is that sometimes (2%-5% probability) pppd hangs, do not
> respond to any system signals but only to KILL signal. When it hangs init
> process is unable to respawn mgetty and the port to which the pppd has been
> attached is dead.
> I spend lots of hours in viewing and debuging pppd but nothing came up so
> far and I really need help what to do. Most of the times when this happens
> when I type
> ps aux
> the hung pppd shows more than 30% CPU usage.
I used to see that happen occasionally on linux dialup servers with
RocketPort or Cyclades cards. I still see occasional hangs, but the
solution for that sort of hang was to insert some setrlimit() calls in
pppd such that if it uses unreasonable amounts of memory or CPU time, it
dies. I know thats just a hack, but it met my needs.
I still see occasional hangs (pppd 2.2.0 (f or g) with radius-client
patches) where CPU time and memory are not beeing eaten. In these cases,
if I try to strace the process, it immediately dies. Maybe that's a clue
for someone.
My setrlimit hack is small...so here's most of the code:
[add this to the end of pppd/main.c]
/*
* setresourcelimit - set the requested resource limit. Complain to
* syslog on errors.
*/
void
setresourcelimit(resource,value)
int resource,value;
{
struct rlimit rl;
if (getrlimit(resource, &rl) < 0) {
syslog(LOG_ALERT, "cant getrlimit(%d) %m", resource);
return;
}
rl.rlim_cur = value;
rl.rlim_max = value;
if (setrlimit(resource, &rl) < 0) {
syslog(LOG_ALERT, "cant setrlimit(%d) %d %m", resource, value);
return;
}
}
[add these (tune as desired) to pppd/main.c function main after variable
declarations]
setresourcelimit(RLIMIT_RSS,1024*1024*2);
setresourcelimit(RLIMIT_DATA,1024*1024);
setresourcelimit(RLIMIT_STACK,1024*256);
setresourcelimit(RLIMIT_CPU,120);
------------------------------------------------------------------
Jon Lewis <[EMAIL PROTECTED]> | Spammers will be winnuked or
Network Administrator | drawn and quartered...whichever
Florida Digital Turnpike | is more convenient.
______http://inorganic5.fdt.net/~jlewis/pgp for PGP public key____
-
To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
the body of a message to [EMAIL PROTECTED]