Coder Social home page Coder Social logo

Data miscompares about umap HOT 1 OPEN

mcfadden8 avatar mcfadden8 commented on September 23, 2024
Data miscompares

from umap.

Comments (1)

mcfadden8 avatar mcfadden8 commented on September 23, 2024

I added some additional instrumentation which gets us a little closer to when the pages are being updated. The umap library has been modified to check the consistency of the entire buffer of pages each time the thread returns from the userfaultfd poll() request. The consistency check looks at each page descriptor in the buffer and if the page is not marked as dirty a SHA1 comparison is performed against the data that was originally read from the backing store.

The logfile below contains the results from running umapsort in the following way:

$ time umapsort -p 100000 -b 1000 -f /mnt/intel/sortfile -t 128 -u 1 >& /tmp/logfile

This causes 128 application threads to perform a quicksort on the data that is in /mnt/intel/sortfile. One userfaultfd thread is present and the buffer is limited to just 1,000 pages.

logfile.txt

As can be seen in the logfile, there were 7 pages in the buffer that got into an inconsistent state:

223973 0x7f7721c9e000 WARNING: Dirty page found that was not previously marked dirty!
 223974 0x7f7721d01000 WARNING: Dirty page found that was not previously marked dirty!
 223975 0x7f7721d03000 WARNING: Dirty page found that was not previously marked dirty!
 223976 0x7f7721c91000 WARNING: Dirty page found that was not previously marked dirty!
 223977 0x7f7721c8f000 WARNING: Dirty page found that was not previously marked dirty!
 223978 0x7f7721c8d000 WARNING: Dirty page found that was not previously marked dirty!
 223979 0x7f7721d16000 WARNING: Dirty page found that was not previously marked dirty!

The umap() library does not do anything about the inconsistency until one of the pages is actually EVICTED in order to make room for a new page becoming present as shown at the following lines of the end of the logfile:

 226763 0x7f7721d16000 EVICT
 226764 0x7f7721d16000 WARNING: Dirty page found that was not previously marked dirty!
 226765 0x7f7721d16000 Dirty page found that was not previously marked dirty! Exiting

Looking at page 0x7f7721d16000, you will see that it was brought in to the buffer at line number:

 223623 0x7f7721d16000 NOT Present { 0 READ }

I believe that I am logging each message that I receive back from the poll() call to userfaultfd. Yet, I am not seeing any other messages for that particular page. It almost seems like the UFFCIO_COPY(UFFDIO_COPY_MODE_WP) is not sticking and the page seems to be writeable?

from umap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.