You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Ignite TC Bot (Jira)" <ji...@apache.org> on 2021/10/18 15:23:00 UTC

[jira] [Commented] (IGNITE-14776) .NET: ClientFailoverSocket sets logger too late, resulting in null loggers downstream

    [ https://issues.apache.org/jira/browse/IGNITE-14776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17430067#comment-17430067 ] 

Ignite TC Bot commented on IGNITE-14776:
----------------------------------------

{panel:title=Branch: [pull/9499/head] Base: [master] : Possible Blockers (23)|borderStyle=dashed|borderColor=#ccc|titleBGColor=#F7D6C1}
{color:#d04437}Examples{color} [[tests 21|https://ci.ignite.apache.org/viewLog.html?buildId=6228732]]
* IgniteExamplesSelfTestSuite: CacheExamplesSelfTest.testCacheTransactionExample - Test has low fail rate in base branch 0,0% and is not flaky
* IgniteExamplesSelfTestSuite: CacheExamplesSelfTest.testCacheQueryExample - Test has low fail rate in base branch 0,0% and is not flaky
* IgniteExamplesSelfTestSuite: CacheExamplesSelfTest.testCacheAtomicLongExample - Test has low fail rate in base branch 0,0% and is not flaky
* IgniteExamplesSelfTestSuite: CacheExamplesSelfTest.testCacheContinuousQueryExample - Test has low fail rate in base branch 0,0% and is not flaky
* IgniteExamplesSelfTestSuite: CacheExamplesSelfTest.testCacheAtomicReferenceExample - Test has low fail rate in base branch 0,0% and is not flaky
* IgniteExamplesSelfTestSuite: CacheExamplesSelfTest.testCachePutGetExample - Test has low fail rate in base branch 0,0% and is not flaky
* IgniteExamplesSelfTestSuite: CacheExamplesSelfTest.testCacheDataStreamerExample - Test has low fail rate in base branch 0,0% and is not flaky
* IgniteExamplesSelfTestSuite: CacheExamplesSelfTest.testCacheAtomicStampedExample - Test has low fail rate in base branch 0,0% and is not flaky
* IgniteExamplesSelfTestSuite: CacheExamplesSelfTest.testCacheCountDownLatchExample - Test has low fail rate in base branch 0,0% and is not flaky
* IgniteExamplesSelfTestSuite: CacheExamplesSelfTest.testSnowflakeSchemaExample - Test has low fail rate in base branch 0,0% and is not flaky
* IgniteExamplesSelfTestSuite: CacheExamplesSelfTest.testCacheQueueExample - Test has low fail rate in base branch 0,0% and is not flaky
... and 10 tests blockers

{color:#d04437}Platform .NET (Core Linux){color} [[tests 0 TIMEOUT , Exit Code |https://ci.ignite.apache.org/viewLog.html?buildId=6228795]]

{color:#d04437}PDS (Compatibility)*{color} [[tests 1|https://ci.ignite.apache.org/viewLog.html?buildId=6228788]]
* IgniteCompatibilityBasicTestSuite: JavaThinCompatibilityTest.testOldClientToCurrentServer[Version 2.12.0-SNAPSHOT] - Test has low fail rate in base branch 0,0% and is not flaky

{panel}
{panel:title=Branch: [pull/9499/head] Base: [master] : New Tests (2)|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}
{color:#00008b}Platform .NET (Windows){color} [[tests 1|https://ci.ignite.apache.org/viewLog.html?buildId=6228818]]
* {color:#013220}exe: ClientConnectionTest.TestInvalidProtocolThrowsSocketException - PASSED{color}

{color:#00008b}Platform .NET (Core Linux){color} [[tests 1|https://ci.ignite.apache.org/viewLog.html?buildId=6228795]]
* {color:#013220}dll: ClientConnectionTest.TestInvalidProtocolThrowsSocketException - PASSED{color}

{panel}
[TeamCity *--&gt; Run :: All* Results|https://ci.ignite.apache.org/viewLog.html?buildId=6228819&amp;buildTypeId=IgniteTests24Java8_RunAll]

> .NET: ClientFailoverSocket sets logger too late, resulting in null loggers downstream
> -------------------------------------------------------------------------------------
>
>                 Key: IGNITE-14776
>                 URL: https://issues.apache.org/jira/browse/IGNITE-14776
>             Project: Ignite
>          Issue Type: Bug
>          Components: clients, platforms
>    Affects Versions: 2.10, 2.11
>            Reporter: Robert May
>            Assignee: Pavel Tupitsyn
>            Priority: Critical
>              Labels: .NET
>             Fix For: 2.12
>
>
> Because the logger is set last inside of the {code:c#}ClientFailoverSocket{code} class, if there are issues with the {code:c#}GetIpEndpoints{code} call, an argument exception can occur when a debug message is logged inside of {code:c#}GetIps{code} when the ip address can't be parsed.  In my case, this occurred with a DNS failure.
> Stack Trace:
> {code:c#}
>  System.ArgumentNullException: Value cannot be null. (Parameter 'logger')
>  at Apache.Ignite.Core.Impl.Common.IgniteArgumentCheck.NotNull(Object arg, String argName)
>  at Apache.Ignite.Core.Log.LoggerExtensions.Log(ILogger logger, LogLevel level, Exception ex, String message)
>  at Apache.Ignite.Core.Log.LoggerExtensions.Debug(ILogger logger, Exception ex, String message)
>  at Apache.Ignite.Core.Impl.Client.ClientFailoverSocket.GetIps(String host, Boolean suppressExceptions)
>  at Apache.Ignite.Core.Impl.Client.ClientFailoverSocket.<GetIpEndPoints>d__11.MoveNext()
>  at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
>  at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
>  at Apache.Ignite.Core.Impl.Client.ClientFailoverSocket..ctor(IgniteClientConfiguration config, Marshaller marsh, TransactionsClient transactions)
>  at Apache.Ignite.Core.Impl.Client.IgniteClient..ctor(IgniteClientConfiguration clientConfiguration)
>  at Apache.Ignite.Core.Ignition.StartClient(IgniteClientConfiguration clientConfiguration)
> {code}
> Here's the constructor code:
> {code:c#}
>             Debug.Assert(config != null);
>             Debug.Assert(marsh != null);
>             Debug.Assert(transactions != null);
>             _config = config;
>             _marsh = marsh;
>             _transactions = transactions;
> #pragma warning disable 618 // Type or member is obsolete
>             if (config.Host == null && (config.Endpoints == null || config.Endpoints.Count == 0))
>             {
>                 throw new IgniteClientException("Invalid IgniteClientConfiguration: Host is null, " +
>                                                 "Endpoints is null or empty. Nowhere to connect.");
>             }
> #pragma warning restore 618
>             _endPoints = GetIpEndPoints(config).ToList();
>             if (_endPoints.Count == 0)
>             {
>                 throw new IgniteClientException("Failed to resolve all specified hosts.");
>             }
>             _logger = (_config.Logger ?? NoopLogger.Instance).GetLogger(GetType());
>             ConnectDefaultSocket();
>             OnFirstConnection();
> {code}
> Note how the _logger variable isn't set until the very end of the constructor.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)