Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetTargetsByLevelForLogger - LoggingConfiguration.LoggingRules is not thread safe #2393

Closed
snakefoot opened this issue Nov 16, 2017 · 1 comment
Labels
bug Bug report / Bug fix nlog-configuration
Milestone

Comments

@snakefoot
Copy link
Contributor

snakefoot commented Nov 16, 2017

[xUnit.net 00:00:27.8269283]       System.AggregateException : One or more errors occurred. (Destination array was not long enough. Check the destination index, length, and the array's lower bounds.
[xUnit.net 00:00:27.8270756]       Parameter name: destinationArray)
[xUnit.net 00:00:27.8312139]         ----- Inner Stack Trace -----
[xUnit.net 00:00:27.8312708]            at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
[xUnit.net 00:00:27.8313274]            at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
[xUnit.net 00:00:27.8313899]         /home/travis/build/NLog/NLog/src/NLog/LogFactory.cs(855,0): at NLog.LogFactory.GetTargetsByLevelForLogger(String name, IEnumerable`1 rules, TargetWithFilterChain[] targetsByLevel, TargetWithFilterChain[] lastTargetsByLevel, Boolean[] suppressedLevels)
[xUnit.net 00:00:27.8314531]         /home/travis/build/NLog/NLog/src/NLog/LogFactory.cs(914,0): at NLog.LogFactory.GetConfigurationForLogger(String name, LoggingConfiguration configuration)
[xUnit.net 00:00:27.8315153]         /home/travis/build/NLog/NLog/src/NLog/LogFactory.cs(1218,0): at NLog.LogFactory.GetLogger(LoggerCacheKey cacheKey)
[xUnit.net 00:00:27.8315640]         /home/travis/build/NLog/NLog/tests/NLog.UnitTests/LogManagerTests.cs(572,0): at NLog.UnitTests.LogManagerTests.<>c__DisplayClass25_0.<ThreadSafe_getCurrentClassLogger_test>b__2(Int32 e)
[xUnit.net 00:00:27.8316180]            at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`1.<ForWorker>b__1(RangeWorker& currentWorker, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion)
[xUnit.net 00:00:27.8316537]         --- End of stack trace from previous location where exception was thrown ---

https://travis-ci.org/NLog/NLog/builds/303097933?utm_source=github_status&utm_medium=notification

@304NotModified 304NotModified added bug Bug report / Bug fix nlog-configuration labels Nov 17, 2017
@304NotModified 304NotModified added this to the 4.5 milestone Nov 17, 2017
@304NotModified
Copy link
Member

guess we need a lock, ins't?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug report / Bug fix nlog-configuration
Projects
None yet
Development

No branches or pull requests

2 participants