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

Intermittent failure creating map with persistence #354

Closed
mickyloo opened this issue Nov 11, 2021 · 10 comments
Closed

Intermittent failure creating map with persistence #354

mickyloo opened this issue Nov 11, 2021 · 10 comments
Assignees
Labels

Comments

@mickyloo
Copy link

mickyloo commented Nov 11, 2021

We are getting intermittent failures during map creation in our CI tests.
The test creates a small <LongValue, LongValue> map of 5 entries with persistence to file in a temp folder.

java.io.IOException: Not enough space to fallocate 0 MiB to / unallocated was 0 MiB
	at net.openhft.chronicle.hash.impl.VanillaChronicleHash.fallocate(VanillaChronicleHash.java:1078)
	at net.openhft.chronicle.hash.impl.VanillaChronicleHash.map(VanillaChronicleHash.java:1058)
	at net.openhft.chronicle.hash.impl.VanillaChronicleHash.createMappedStoreAndSegments(VanillaChronicleHash.java:511)
	at net.openhft.chronicle.map.ChronicleMapBuilder.createWithNewFile(ChronicleMapBuilder.java:1850)
	at net.openhft.chronicle.map.ChronicleMapBuilder.createWithFile(ChronicleMapBuilder.java:1748)
	at net.openhft.chronicle.map.ChronicleMapBuilder.createPersistedTo(ChronicleMapBuilder.java:1593)
	at net.openhft.chronicle.map.ChronicleMapBuilder.createOrRecoverPersistedTo(ChronicleMapBuilder.java:1614)
	at net.openhft.chronicle.map.ChronicleMapBuilder.createOrRecoverPersistedTo(ChronicleMapBuilder.java:1604)
	at service.data.chronicle.ChronicleBuilder.build(ChronicleBuilder.java:75)
	at service.data.chronicle.ChronicleBuilderTest.build_ToFile_whenValueTypeIsLong(ChronicleBuilderTest.java:65)

chronicle-map version 3.21.86
JDK8
Debian

We are not seeing this issue in 3.20.84.1

@alamar
Copy link
Contributor

alamar commented Nov 11, 2021

Is it possible that you are running out of disk space @mickyloo ?

@mickyloo
Copy link
Author

@alamar We have confirmed that our pod does have available disk space when we see that error.

@minborg
Copy link
Contributor

minborg commented Nov 12, 2021

Are you able to share the actual test that is failing?

@minborg minborg added the bug label Nov 12, 2021
@minborg
Copy link
Contributor

minborg commented Nov 12, 2021

I have run my test over 50k times and was unable to reproduce:

image

@mickyloo
Copy link
Author

This is the minimal code that allows us to reproduce the issue intermittently.

public class ChronicleTest {
  @Rule
  public TemporaryFolder testFolder = new TemporaryFolder();

  @Test
  public void build_toFile() throws IOException {
    String baseDirectory = testFolder.getRoot().toString();
    File file = new File(baseDirectory, "chronicle.dat");
    ChronicleMap<LongValue, LongValue> map = ChronicleMapBuilder.of(LongValue.class, LongValue.class)
        .name("test")
        .entries(5)
        .createOrRecoverPersistedTo(file, true);

    assertTrue(file.isFile());
  }
}

@minborg
Copy link
Contributor

minborg commented Nov 15, 2021

Hi @mickyloo

A while ago, we reworked the handling of the recover operations and made them more rigid. One of the things we did was to acquire an exclusive lock during recovery. It should be mentioned that the recover operations should only be invoked "manually" when making sure there are no other processes using the map.

Is it possible for you to run a more recent version (e.g. BOM 2.22ea57)?

I have re-run you test above over 50 000 times with no problems using the BOM above.

image

@minborg
Copy link
Contributor

minborg commented Nov 23, 2021

Did you update your version @mickyloo ?

@mickyloo
Copy link
Author

We still see the issue with the latest version, 3.22ea5.

@minborg
Copy link
Contributor

minborg commented Jan 3, 2022

I have added tests that try to reproduce your problem. When they pass on all our build platforms, this issue will be automatically closed. Please reopen if the problem persists @mickyloo

minborg added a commit that referenced this issue Jan 4, 2022
@hft-team-city
Copy link
Contributor

Released in Chronicle-Map-3.22ea6, BOM-2.22ea86

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants