pijul nest
guest [sign in]

Fixing bus errors on a full disk

[?]
Mar 4, 2021, 9:51 AM
WTXLZDYIS2AQZFOO7WCSFGRK235NR2VSOI2LOCORWF5WRS3E76UAC

Dependencies

  • [2] DASFQGOR Debugging
  • [3] WS4ZQM4R Debugging, tests, etc.
  • [4] OP6SVMOD Resetting history
  • [5] G4JEQLLX Debugging synchronisation
  • [6] YWFYZNLZ Cleanup + inter-process concurrency
  • [7] XEU2QVLC Debugging after plugging this into Pijul
  • [8] OHUZ73MK Versions
  • [9] E4MD6T3L Proofreading and commenting of this crate (massive bug fixes included)
  • [10] PRDUE4YA Cleanup + published on crates.io
  • [11] L5CVF6UJ Debugging
  • [12] YXKP4AIW New file locks, with multiple sets of free pages
  • [13] 5LSYTRQ6 More docs, example, and fixing the free page diagnostic function for mutable transactions

Change contents

  • edit in sanakirja/src/environment/muttxn.rs at line 269
    [3.13740]
    [3.13740]
    // Flush all the maps.
    for m in maps.iter_mut() {
    m.flush()?
    }
  • replacement in sanakirja/src/environment/muttxn.rs at line 314
    [3.15013][3.15013:15071](),[3.15071][3.85985:85995](),[3.85985][3.85985:85995]()
    for m in maps.iter_mut() {
    m.flush()?
    }
    [3.15013]
    [3.15072]
    maps[0].flush_range(0, env.roots.len() * PAGE_SIZE)?;
  • replacement in sanakirja/src/environment/muttxn.rs at line 447
    [3.13175][3.37584:37657](),[3.18573][3.37584:37657](),[3.37584][3.37584:37657]()
    let data = unsafe { self.env.borrow().find_offset(offset) };
    [3.18573]
    [3.37657]
    let data = unsafe { self.env.borrow().find_offset(offset)? };
  • replacement in sanakirja/src/environment/muttxn.rs at line 457
    [3.13231][3.37871:37948](),[3.18631][3.37871:37948](),[3.37871][3.37871:37948]()
    let data = unsafe { self.env.borrow().find_offset(offset) };
    [3.18631]
    [3.38010]
    let data = unsafe { self.env.borrow().find_offset(offset)? };
  • replacement in sanakirja/src/environment/muttxn.rs at line 466
    [3.88161][3.38158:38235]()
    let data = unsafe { self.env.borrow().find_offset(offset) };
    [3.88161]
    [3.4156]
    let data = unsafe { self.env.borrow().find_offset(offset)? };
  • replacement in sanakirja/src/environment/muttxn.rs at line 573
    [3.90925][3.90925:90984]()
    let data = self.env.borrow().find_offset(off);
    [3.90925]
    [3.39868]
    let data = self.env.borrow().find_offset(off)?;
  • edit in sanakirja/src/environment/mod.rs at line 47
    [3.92380]
    [3.92380]
    Ok(())
    }
    #[cfg(feature = "mmap")]
    fn flush_range(&self, a: usize, b: usize) -> Result<(), Error> {
    Ok(self.mmap.flush_range(a, b)?)
    }
    #[cfg(not(feature = "mmap"))]
    fn flush_range(&self, a: usize, b: usize) -> Result<(), Error> {
  • edit in sanakirja/src/environment/mod.rs at line 339
    [3.103972]
    [3.103972]
    }
    }
    #[cfg(feature = "mmap")]
    fn fallocate(&self, length: u64) -> Result<(), Error> {
    if let Some(ref file) = self.file {
    file.allocate(length)?
  • edit in sanakirja/src/environment/mod.rs at line 347
    [3.103982]
    [3.103982]
    Ok(())
    }
    #[cfg(not(feature = "mmap"))]
    fn fallocate(&self, length: u64) -> Result<(), Error> {
    Ok(())
  • replacement in sanakirja/src/environment/mod.rs at line 358
    [3.26952][3.103989:104052](),[3.103989][3.103989:104052]()
    unsafe fn find_offset(&self, mut offset: u64) -> *mut u8 {
    [3.26952]
    [3.104052]
    unsafe fn find_offset(&self, mut offset: u64) -> Result<*mut u8, Error> {
  • edit in sanakirja/src/environment/mod.rs at line 361
    [3.104118]
    [3.104118]
    self.fallocate(offset + PAGE_SIZEU64)?;
  • replacement in sanakirja/src/environment/mod.rs at line 369
    [3.104335][3.26953:27011]()
    return mmaps[i].ptr.add(offset as usize);
    [3.104335]
    [3.104396]
    return Ok(mmaps[i].ptr.add(offset as usize));
  • replacement in sanakirja/src/environment/mod.rs at line 549
    [3.106475][3.106475:106534]()
    let data = self.env.borrow().find_offset(off);
    [3.106475]
    [3.40014]
    let data = self.env.borrow().find_offset(off)?;
  • replacement in sanakirja/Cargo.toml at line 3
    [3.108441][2.20787:20805]()
    version = "1.1.2"
    [3.108441]
    [3.108459]
    version = "1.1.6"
  • replacement in sanakirja/Cargo.toml at line 29
    [3.84][2.20806:20873]()
    sanakirja-core = { path = "../sanakirja-core", version = "1.1.0" }
    [3.84]
    [3.5528]
    sanakirja-core = { path = "../sanakirja-core", version = "1.1.1" }