question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Concurrency issue with TimeZoneConverter

See original GitHub issue

Version

4.19.2

Describe the bug

Intermittently we are seeing a concurrency issue when trying to use date based adaptive functions.

It seems to stem from concurrent access of static dictionaries in TimeZoneConverter.

To Reproduce

To reproduce you can follow the following steps. Note step 3 is not easy to reproduce and requires some load:

  1. Having a bot using the adaptive function convertFromUTC in the first turn. e.g. =float(formatDateTime(convertFromUTC(utcNow(), 'Eastern Standard Time'), 'HH'))
  2. Then restarting the process hosting the bot code
  3. Having concurrent requests hit our bot which both cause the static dictionaries in TimeZoneConverter to be initialized - causing the error below which stops the bot from functioning:
System.InvalidOperationException

AdaptiveExpressions.TimeZoneConverter.LoadData

Operations that change non-concurrent collections must have exclusive access. A concurrent update was performed on this collection and corrupted its state. The collection's state is no longer correct.

Expected behavior

The dictionary access in TimeZoneConverter should be thread-safe.

Screenshots

N/A

Additional context

N/A

Issue Analytics

  • State:closed
  • Created 7 months ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jamesemanncommented, Feb 24, 2023

Thanks team for prioritising this. I will keep an eye out for the new release Monday

0reactions
tracyboehrercommented, Feb 24, 2023

@robertcox-msft It will be available on NuGet within minutes of the release. We will do a Release on GitHub. Anyone watching the repo will get notified. We don’t have any other mechanism to notify.

It won’t be until Monday at the earliest though.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TimeZoneNotFoundException in Alpine Based Docker Images
My problems began whilst working on a multi-tenant event processing microservice. The service processes some messages from an AWS SQS queue, ...
Read more >
SQL Server 2016 concurrency limitations? Tuning for db ...
The only issue is that there is no internal context connection available in the static class constructor, so the Assembly will need to...
Read more >
slack-timezone-converter/Gemfile.lock at master
An integration for Slack that converts any time string in a message to all timezones where the team is - slack-timezone-converter/Gemfile.lock at master ......
Read more >
Handling Concurrency Conflicts - EF Core
This page discusses mechanisms for ensuring that your data stays consistent in the face of such concurrent changes.
Read more >
asp net timezone dropdown list
The TimeStamp attribute is used to specify that a property should take part in concurrency management.. The TimeStamp attribute is only valid if...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found