rTorrent + FreeBSD + pf = freeze?

cpghost cpghost at cordula.ws
Fri Oct 23 18:16:49 UTC 2009

On Thu, Oct 22, 2009 at 03:20:20PM -0800, Henrik Hudson wrote:
> On Wed, 21 Oct 2009, cpghost wrote:
> > I'm experiencing frequent crashes on my soekris net4801 home router
> > for some months now, and I'm wondering if it could be some kind of
> > pf-related bug similar to this on OpenBSD:
> > 
> >   http://www.mail-archive.com/misc@openbsd.org/msg58042.html
> > 
> > More precisely, when I fire up rtorrent-devel on some *other* machine
> > (not the router!), everything runs fine at first.  It could also run
> > very fine for many days. BUT should I start a torrent with a large
> > number of seeders which could saturate my link for an extended period
> > of time, the soekris router would suddenly freeze... but not
> > immediately: more like a few hours (3 to 6) or so of relatively heavy
> > traffic. Only a hard reboot of the router would help.  Please note
> > that rtorrent is NOT running on the router, only its traffic is being
> > redirected through the router.
> > 
> > So I'm suspecting some bug / resource leak in pf that would bring the
> > kernel down somehow. What kind of resources should I monitor (and
> > how)? Maybe that could bring some clues?
> > 
> > Oh, before anybody asks: I have no crashdumps, the router freezes
> > totally without panicking. And it doesn't recover automatically
> > even after many hours.
> Possibly a heat issue? I've seen many a little dlink style or
> similar router work fine until it has to churn through a lot of
> packets and then it just can't handle it, starts getting warm
> doing all the computation and then eventually freezes. I'm not
> ruling out a memory leak or similar, but I'm currently doing the
> same with a little atom ITX board and it handles all the torrents
> for myself and the roomies without issue. I'm using rtorrent myself with
> pf and 8.0-RC1-stable.  I believe the pf code is backported to 7.
> Also, if it was just a memory leak it will still happen with
> non-torrent traffic, just most likely slower. Have you tried
> throttling back the amount of connections and speed that rtorrent
> makes?

I've suspected a heat issue too, but sysutils/env4801 logging every
1 minute didn't show anything suspicious prior to the crashes.

The system crashes ONLY on bittorrent traffic. Saturating the link (in
one or both directions) even for many days in a row with 5 to 10
concurrent TCP streams to fixed destinations didn't cause any crashes.

Yes, I've played with bandwidth and nr. of connections in rtorrent,
and, if at all, I have a feeling (but I can't proove it) that the
number of concurrent connections doesn't harm, but that the higher
the output bandwidth, the more likely the crash.

The only thing I didn't test yet was to replace the original DC
transformer with another one that is a tad better dimensioned.  Those
transformers that are sent with the net4801(s) tend to degrade over
the years for some reason (drying capacitors?). If it's not a software
issue, this could be the cause of the crashes.

> henrik

Thanks for the hints,

Cordula's Web. http://www.cordula.ws/

More information about the freebsd-questions mailing list