DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
View Events Video Library
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Integrating PostgreSQL Databases with ANF: Join this workshop to learn how to create a PostgreSQL server using Instaclustr’s managed service

Mobile Database Essentials: Assess data needs, storage requirements, and more when leveraging databases for cloud and edge applications.

Monitoring and Observability for LLMs: Datadog and Google Cloud discuss how to achieve optimal AI model performance.

Automated Testing: The latest on architecture, TDD, and the benefits of AI and low-code tools.

Related

  • Legacy Code Refactoring: Tips, Steps, and Best Practices
  • Using A/B Testing To Make Data-Driven Product Decisions
  • Leveraging Infrastructure as Code for Data Engineering Projects: A Comprehensive Guide
  • Leveraging Observability Techniques for Energy Efficiency Optimization in Data Centers

Trending

  • Leveraging FastAPI for Building Secure and High-Performance Banking APIs
  • How To Use ChatGPT API in Python for Your Real-Time Data
  • Designing Databases for Distributed Systems
  • Running Unit Tests in GitHub Actions
  1. DZone
  2. Data Engineering
  3. Data
  4. The Bug That Ruined My Weekend

The Bug That Ruined My Weekend

Oren Eini user avatar by
Oren Eini
·
Dec. 05, 14 · Interview
Like (0)
Save
Tweet
Share
4.12K Views

Join the DZone community and get the full member experience.

Join For Free

this is bloody strange. i have a test failing in our unit tests, which isn’t an all too uncommon occurrence after a big work. the only problem is that this test shouldn’t fail, no one touched this part.

for reference, here is the commit where this is failing . you can reproduce this by running the raven.tryouts console project.

note that it has to be done in release mode. when that happens, we consistently get the following error:

    unhandled exception: system.nullreferenceexception: object reference not set to an instance of an object.
       at raven.client.connection.multigetoperation.<tryresolveconflictorcreateconcurrencyexception>d__b.movenext() in c:\work\ravendb\raven.client.lightweight\connection\multigetoperation.cs:line 156
    --- end of stack trace from previous location where exception was thrown ---
       at system.runtime.compilerservices.taskawaiter.throwfornonsuccess(task task)
       at system.runtime.compilerservices.taskawaiter.handlenonsuccessanddebuggernotification(task task)

here is the problem with this stack trace:

image

now, this only happens in release mode, but it happens there consistently. now, i’ve verified that this isn’t an issue of me running old version of the code. so this isn’t possible. there is no concurrency going on, all the data this method is touching is only touched by this thread.

what is more, the exception is not thrown from inside the foreach loop in line 139. i’ve verified that by putting a try catch around the inside of the loop and still getting the nre when thrown outside it. in fact, i have tried to figure it out in pretty much any way i can. attaching a debugger make the problem disappear, as does disabling optimization, or anything like that.

in fact, at this point i’m going to throw up my hands in disgust, because this is not something that i can figure out. here is why, this is my “fix” for this issue. i replaced the following failing code:

image

with the following passing code:

image

and yes, this should make zero difference to the actual behavior, but it does. i’m suspecting a jit issue.

Testing Release (agency) Console (video game CLI) Data (computing) optimization Commit (data management)

Published at DZone with permission of Oren Eini, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Legacy Code Refactoring: Tips, Steps, and Best Practices
  • Using A/B Testing To Make Data-Driven Product Decisions
  • Leveraging Infrastructure as Code for Data Engineering Projects: A Comprehensive Guide
  • Leveraging Observability Techniques for Energy Efficiency Optimization in Data Centers

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: