On Fri, May 05, 2017 at 04:33:02PM +0200, Florian Ermisch wrote: > > > Am 5. Mai 2017 16:05:09 MESZ schrieb Maxim Bourmistrov > <m...@alumni.chalmers.se>: > > > >> 5 maj 2017 kl. 15:55 skrev Maxim Bourmistrov > ><m...@alumni.chalmers.se>: > >> > >> > >>> 5 maj 2017 kl. 14:41 skrev Hiltjo Posthuma <hil...@codemadness.org>: > >>> > >>> On Fri, May 05, 2017 at 12:30:56PM +0200, Maxim Bourmistrov wrote: > >>>> […] > >>>> Changing ’prefork’ from 15 to 3 makes it work. > >>>> > >>>> Is this a bug? > >>>> > >>>> Br > >>> > >>> Hey, > >>> > >>> This is a random guess since you haven't posted the whole config, > >>> but I think > >>> it has bitten me too sometime: > >>> > >>> Do you have the global options such as prefork defined before your > >>> relays and routes or not? > >>> > >>> The order of the global options matter. If the global options are > >>> set after > >>> the table they are not initialized on the tables and can actually > >>> crash relayd. > >>> This is because the health checking uses a different prefork value > >and checks > >>> the "wrong" amount. > >>> > >>> I'm not sure, but I think it is not a bug: it is documented in > >>> relayd.conf(5). > >>> > >>> Thinking about it: would it be acceptable if `relayd -n` shows a > >>> warning if > >>> global options are defined in the wrong order? I can write the patch > >>> for it > >>> if it makes sense. > >>> > >>> I hope this helps you in some way, > >>> > >>> -- > >>> Kind regards, > >>> Hiltjo > >> > >> The whole config is like this: > >> > >> […] > >> > >> Note, config layout exactly the same which runs already on > >6.0-stable. > >> > >> My original question is why I can’t fork more than 3 procs any more > >> and why relayd starts then prefork > 3 > >> and does not do a health check. > >> > >> Br > > > >Hm, I tried this out - re-ordering the layout of the config. > >You are, indeed, correct here. > > > >Strange that this runs on 6.0. > > > >Case closed. > >Sorry for the noise. > > > >Br > > I would still say it's worth the patch > Hiltjo offered to write. Or At least have > the warning printed when testing the > config with `-v -n`. > > Regards, Florian >
An idea: Maybe in parse.y in the main rule it can be checked something like this: if (last_table_id || last_host_id || last_relay_id || last_proto_id || last_rt_id || last_nr_id || last_key_id) { yyerror("global option used after non-global option"); YYERROR; } Sorry, I'm not a yacc guru :) -- Kind regards, Hiltjo