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

Crashes on attempting to read realm file from some external drives #7454

Open
peppy opened this issue Mar 12, 2024 · 8 comments
Open

Crashes on attempting to read realm file from some external drives #7454

peppy opened this issue Mar 12, 2024 · 8 comments
Assignees

Comments

@peppy
Copy link

peppy commented Mar 12, 2024

SDK and version

SDK : .NET 11.7.0

Potentially related to c3ed40b.

Started in line with an update of realm-dotnet:

ppy/osu@3a22421#diff-11522f45ae2408786975ae807444ce91fea4c4a2cfd21e2f18caf7fa4199412dL38-R38

Observations

  • How frequent do the crash occur?

We've had four user reports so far since a new release yesterday. All involve users trying to start the game with a realm file located on an external disk, likely all ExFAT format.

Crash log / stacktrace

Example 1:

2024-03-11 21:33:59 [error]: Realm startup failed with unrecoverable error; starting with a fresh database. A backup of your database has been made.
2024-03-11 21:33:59 [error]: Realms.Exceptions.RealmException: GetFileInformationByHandleEx() failed for 'D:\nochmaosu\client.realm': �p�����[�^�[���Ԉ���Ă��܂��B
2024-03-11 21:33:59 [error]: at Realms.NativeException.ThrowIfNecessary()
2024-03-11 21:33:59 [error]: at Realms.SharedRealmHandle.Open(Configuration configuration)
2024-03-11 21:33:59 [error]: at Realms.RealmConfiguration.CreateHandle(Configuration& configuration)
2024-03-11 21:33:59 [error]: at Realms.RealmConfigurationBase.CreateRealm()
2024-03-11 21:33:59 [error]: at Realms.Realm.GetInstance(RealmConfigurationBase config)
2024-03-11 21:33:59 [error]: at osu.Game.Database.RealmAccess.getRealmInstance()
2024-03-11 21:33:59 [error]: at osu.Game.Database.RealmAccess.prepareFirstRealmAccess()
2024-03-11 21:33:59 [error]: An unhandled error has occurred.

Example 2:

image

2024-03-12 00:42:21 [error]: Realm startup failed with unrecoverable error; starting with a fresh database. A backup of your database has been made.
2024-03-12 00:42:21 [error]: Realms.Exceptions.RealmException: GetFileInformationByHandleEx() failed for 'F:\osu-lazer\client.realm': The parameter is incorrect.
2024-03-12 00:42:21 [error]: at Realms.NativeException.ThrowIfNecessary()
2024-03-12 00:42:21 [error]: at Realms.SharedRealmHandle.Open(Configuration configuration)
2024-03-12 00:42:21 [error]: at Realms.RealmConfiguration.CreateHandle(Configuration& configuration)
2024-03-12 00:42:21 [error]: at Realms.RealmConfigurationBase.CreateRealm()
2024-03-12 00:42:21 [error]: at Realms.Realm.GetInstance(RealmConfigurationBase config)
2024-03-12 00:42:21 [error]: at osu.Game.Database.RealmAccess.getRealmInstance()
2024-03-12 00:42:21 [error]: at osu.Game.Database.RealmAccess.prepareFirstRealmAccess()
2024-03-12 00:42:21 [error]: An unhandled error has occurred.

In both examples, I've tested the realm file provided by the user and it works fine on my drives (macOS) so the user's database is not at fault.

Copy link

sync-by-unito bot commented Mar 12, 2024

➤ PM Bot commented:

Jira ticket: RCORE-2014

@nirinchev
Copy link
Member

Do you know if this only happens on Windows?

@nirinchev nirinchev self-assigned this Mar 12, 2024
@peppy
Copy link
Author

peppy commented Mar 12, 2024

@nirinchev So far we've only had reports on windows. I unfortunately don't have an ExFAT formattable drive available to test on macOS today.

As a heads up, we are hotfixing this with a revert from 11.7 to 11.5, as the database files still seem backwards compatible for this version downgrade.

@nirinchev
Copy link
Member

So this is upgrading from Core 13.20.1 to 13.26.0. Skimming through the changelog, it appears these 2 changes were related to ExFat filesystems #6959 and #7162.

I've also found a similar issue in Go: golang/go#29214 which was fixed by this change: https://go-review.googlesource.com/c/go/+/154377.

@ironage can you take a look since @fealebenpae is off these days and I'm not sure if we have other windows experts around.

@nirinchev nirinchev assigned ironage and unassigned nirinchev Mar 12, 2024
@ironage
Copy link
Contributor

ironage commented Mar 12, 2024

There also might be a race condition in InterprocessMutex when a file is reopened while in the process of being closed on another thread

If that is the case, then this might be fixed by #7448

@peppy
Copy link
Author

peppy commented Apr 22, 2024

This has been re-tested by someone on our team and is still a blocking issue, meaning we are currently pinned to <=11.5.0.

@ironage
Copy link
Contributor

ironage commented Jun 3, 2024

Does this happen only when using encryption? If so, it will very likely be fixed by #7698 since that moves away from using unique file ids altogether.

@peppy
Copy link
Author

peppy commented Jun 4, 2024

We are not using realm-level encryption, no.

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

No branches or pull requests

3 participants