On Sat, Jan 30, 2010 at 08:32:49PM -0800, bf wrote:
--- On Sat, 1/30/10, Jorge Arellano Cid <jcid@dillo.org> wrote:
From: Jorge Arellano Cid <jcid@dillo.org> Subject: Re: [Dillo-dev] Starting dpis on FreeBSD: blackhole(4) timeouts To: dillo-dev@dillo.org Date: Saturday, January 30, 2010, 9:08 AM On Sat, Jan 30, 2010 at 04:13:29AM -0800, bf wrote:
? I'm? using? dillo on FreeBSD 9-CURRENT, and ever since the dpi framework was converted to use Internet domain sockets, I've been plagued? by? long? delays? when? starting? dpis because I'm using blackhole(4)? by setting net.inet.tcp.blackhole to be nonzero. An example of the problem:
Nav_open_url: new url='dpi:/bm/' Dpi_check_dpid_ids: Operation timed out [dpid]: a_Misc_mksecret: e1ab7e05 Dpi_blocking_start_dpid: try 1 dpid started
[...]
? I? understand. Although please notice that it looks as expected behaviour: the check for a responsive dpid socket is delayed just as with any port scan.
? Simple solution: try something like this script to start dillo:
#!/bin/sh ST="`ps -ef|grep "[0-9] dpid"|wc -l`" if [ "$ST" = "1" ]; then ???echo "Dpid is running OK!" ???dillo else ???echo "Dpid is NOT running" ???dpid & ???dillo fi
Thanks, Jorge, for taking the time to consider this problem and to propose a workaround. But, as I think you have noticed from a remark in your second message, this only deals with the initial timeouts, and not those arising after a period of quiescence.
Yes, I notice...
Because blackhole(4) is a common security measure, and because this problem did not exist under the previous dpi framework, it must be considered a regression, even if, in hindsight, it is to be "expected". I was hoping for a solution that did not require me to either disable blackhole(4), or sit on my hands during periodic timeouts. Does anyone have any ideas?
and also notice an answer to this question there. Back to the problem: You can increase dpid's time to live: dpid/main.c:208 - int dpid_idle_timeout = 60 * 60; /* default, in seconds */ + int dpid_idle_timeout = 60 * 60 * 24; /* default, in seconds */ Or simply let it linger forever: dpid/main.c:207 - int i, n = 0, open_max; + int i, n = 0, linger = 1, open_max; dpid/main.c:295 - if (server_is_running("downloads")) + if (linger || server_is_running("downloads")) Please test both and send your feedback. Once we have a usable workaround, we may think of a good patch (e.g. a dillorc option). Last but not the least, IMHO, using verbs like "plagued" and expressions like "or sit on my hands" doesn't help in dillo-dev. -- Cheers Jorge.-