You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by Igor Galić <i....@brainsware.org> on 2013/07/27 14:40:40 UTC
Re: git commit: TS-1487: More startup order tweaking, based on
reported crash.
----- Original Message -----
> Updated Branches:
> refs/heads/master 95c8f3893 -> 6a70e5abf
>
>
> TS-1487: More startup order tweaking, based on reported crash.
>
> http://git-wip-us.apache.org/repos/asf/trafficserver/blob/6a70e5ab/proxy/Main.cc
> ----------------------------------------------------------------------
> diff --git a/proxy/Main.cc b/proxy/Main.cc
> index e9c281c..438242e 100644
> --- a/proxy/Main.cc
> +++ b/proxy/Main.cc
> @@ -1559,12 +1559,19 @@ main(int /* argc ATS_UNUSED */, char **argv)
> SplitDNSConfig::startup();
> #endif
>
> + // Load HTTP port data. getNumSSLThreads depends on this.
> + if (!HttpProxyPort::loadValue(http_accept_port_descriptor))
> + HttpProxyPort::loadConfig();
> + HttpProxyPort::loadDefaultIfEmpty();
>
> if (!accept_mss)
> TS_ReadConfigInteger(accept_mss,
> "proxy.config.net.sock_mss_in");
>
> NetProcessor::accept_mss = accept_mss;
> netProcessor.start(0, stacksize);
> +
> + sslNetProcessor.start(getNumSSLThreads(), stacksize);
> +
> #ifndef INK_NO_HOSTDB
> dnsProcessor.start(0, stacksize);
> if (hostDBProcessor.start() < 0)
> @@ -1575,15 +1582,15 @@ main(int /* argc ATS_UNUSED */, char **argv)
> clusterProcessor.init();
> #endif
>
> - // Plugins can get callbacks for very early events, so
> initialize even earlier.
> +#ifndef INK_NO_LOG
again one of those options that's from TS_IS_MICRO_BUILD
I'm understand there's people out there who don't want logging, but
isn't the easiest way to achieve that to simply have that around the
logging functions themselves / or turning them into macros that evaluate
to nothingness?
Rather than have this (potentially) incomplete mess that we have here.
> + // initialize logging (after event and net processor)
> + Log::init(remote_management_flag ? 0 :
> Log::NO_REMOTE_MANAGEMENT);
> +#endif
> +
> + // Init plugins as soon as logging is ready.
> plugin_init(system_config_directory); // plugin.config
> pmgmt->registerPluginCallbacks(global_config_cbs);
>
> - // Load HTTP port data. getNumSSLThreads depends on this.
> - if (!HttpProxyPort::loadValue(http_accept_port_descriptor))
> - HttpProxyPort::loadConfig();
> - HttpProxyPort::loadDefaultIfEmpty();
> -
> cacheProcessor.set_after_init_callback(&CB_After_Cache_Init);
> cacheProcessor.start();
>
> @@ -1593,13 +1600,6 @@ main(int /* argc ATS_UNUSED */, char **argv)
> if (num_of_udp_threads)
> udpNet.start(num_of_udp_threads, stacksize);
>
> - sslNetProcessor.start(getNumSSLThreads(), stacksize);
> -
> -#ifndef INK_NO_LOG
> - // initialize logging (after event and net processor)
> - Log::init(remote_management_flag ? 0 :
> Log::NO_REMOTE_MANAGEMENT);
> -#endif
> -
> //acc.init();
> //if (auto_clear_authdb_flag)
> // acc.clear_cache();
>
>
--
Igor Galić
Tel: +43 (0) 664 886 22 883
Mail: i.galic@brainsware.org
URL: http://brainsware.org/
GPG: 6880 4155 74BD FD7C B515 2EA5 4B1D 9E08 A097 C9AE
Re: git commit: TS-1487: More startup order tweaking,
based on reported crash.
Posted by James Peach <ja...@me.com>.
On Jul 27, 2013, at 2:30 PM, Leif Hedstrom <zw...@apache.org> wrote:
> On 7/27/13 2:40 PM, Igor Galić wrote:
>>
>>
>> initialize even earlier.
>> +#ifndef INK_NO_LOG
>> again one of those options that's from TS_IS_MICRO_BUILD
>
> I personally think we should kill the MICRO_BUILD... Heck, even on my rinky dink Raspberry Pi, the normal build works just fine. I rather have us optimize our code such that the normal build works well everywhere :).
Yeh I wanted to kill it to. Next time I'm just gong to kill it unless someone ponies up a patch
J
Re: git commit: TS-1487: More startup order tweaking, based on reported
crash.
Posted by Leif Hedstrom <zw...@apache.org>.
On 7/27/13 2:40 PM, Igor Galić wrote:
>
>
> initialize even earlier.
> +#ifndef INK_NO_LOG
> again one of those options that's from TS_IS_MICRO_BUILD
I personally think we should kill the MICRO_BUILD... Heck, even on my
rinky dink Raspberry Pi, the normal build works just fine. I rather have
us optimize our code such that the normal build works well everywhere :).
-- Leif