Bottles icon indicating copy to clipboard operation
Bottles copied to clipboard

[BUG] Cannot manipulate the LDT on Flatpak

Open xerz-one opened this issue 2 years ago • 9 comments

When trying to run some random old program with Bottles under Flatpak, the following error pops up:

modify_ldt: Operation not permitted
wine: Unhandled page fault on read access to 000002F8 at address 7E267241 (thread 010c), starting debugger...
Can't attact process 0104: error 5

The culprit might be Flatpak not allowing manipulation of LDT entries, and seems to align with a ticket over at Lutris: https://github.com/flathub/net.lutris.Lutris/issues/85

xerz-one avatar Dec 28 '21 00:12 xerz-one

I’m aware of this, waiting for news on flatpak front

mirkobrombin avatar Dec 28 '21 06:12 mirkobrombin

I've also run into this problem before. Have you considered implementing the temporary patch/workaround that the Lutris team had:

"Hello! how did you patch out the ban? I am trying to set League on PS4 gentoo but I get this error. Can you please tell?

Removing these lines should do: https://github.com/flatpak/flatpak/blob/6f86a8ff423a2e7a8e1db70c69612f3fa49ae9d4/common/flatpak-run.c#L2899-L2901"

Considering this issue has been open since December 2019 (2 years ago) you may be waiting a while for news from the Flatpak front.

WineBottles avatar Dec 28 '21 19:12 WineBottles

Are you sure Lutris is patching Flatpak? It sounds weird :D

mirkobrombin avatar Dec 28 '21 21:12 mirkobrombin

Are you sure Lutris is patching Flatpak? It sounds weird :D

That's a good point. Looks like it used to lead to this link https://flathub.org/apps/details/net.lutris.Lutris but is no longer available.

"Lutris on Flatpak Lutris is an Open Source gaming platform for Linux. It installs and launches games so you can start playing without the hassle of setting up your games. This repository allows installing Lutris through Flatpak."

Either way, it would be appreciated if you could test or implement that temporary patch/workaround until Flatpak does whatever they need to do.

WineBottles avatar Dec 28 '21 21:12 WineBottles

Ya but such patch is for flatpak (the “whole flatpak project”) not just our Bottles flatpak. This mean the users should replace their flatpak support with our one 😅

mirkobrombin avatar Dec 28 '21 22:12 mirkobrombin

Oh, did this get fixed already? Why did the ticket get closed?

xerz-one avatar Jan 07 '22 18:01 xerz-one

Oh, did this get fixed already? Why did the ticket get closed?

Just missclicked 😅

Still waiting for news on Flatpak side.

mirkobrombin avatar Jan 07 '22 18:01 mirkobrombin

Hello mirkobrombin, first, thank you for all the work to make wine so easy to use by providing Bottles. I just wondering if you have been able to get some news from Flatpak side on this issue ? Availability to allow withelisting temporary LDT when necessary or other workaround ? Or this issue/request on Flatpak seems to be doomed and will stay that way ?

Thanks for your feedback!

RobOT05442309 avatar Jun 13 '22 09:06 RobOT05442309

Unfortunately at the moment there are no news or workarounds, sorry

mirkobrombin avatar Jun 13 '22 11:06 mirkobrombin

Good news! https://github.com/flatpak/flatpak/pull/5082 fixes this issue by allowing modify_ldt within Flatpak. This should be available in the next release, but unfortunately I do not know when this will ever happen. I'm closing this issue since it's outside of our control anyway.

TheEvilSkeleton avatar Sep 07 '22 02:09 TheEvilSkeleton