iXit / Mesa-3D

Please use official https://gitlab.freedesktop.org/mesa/mesa/ !
https://github.com/iXit/Mesa-3D/wiki
66 stars 13 forks source link

One Piece Pirate Warriors 3 errno 12 #265

Open John-Gee opened 7 years ago

John-Gee commented 7 years ago

Hello,

I'm using latest mesa-git with wine-staging 2.0rc5 patched with Sarnex's nine patchset.

All games I've tried lately work fine but this one. It crashes with:

radeon: mmap failed, errno: 12 wine: Unhandled page fault on read access to 0x00000030 at address 0x11fef91 (thread 0072), starting debugger...

Switching to standard wine d3d works fine. Changing the graphic quality settings in game had no impact.

It's fairly reproducible so I'd be glad to offer whatever log/information is needed. trace: https://mega.nz/#!gpBkVKhb!raoBGbnBvekuFFrqaHKY4IXBeNAOax9Thy6_zC3-YK0

Thank you! John

axeldavy commented 7 years ago

You can take trace with apitrace on gallium nine. We use a special patch for that.

John-Gee commented 7 years ago

Oh nice.

Where may I find this patch?

siro20 commented 7 years ago

It's included in ixit/wine and sarnex's patches. You need to to set env WINEDLLOVERRIDES=d3d9=n and provide the path to apitrace d3d9.dll or place it in game's folder.

John-Gee commented 7 years ago

Great, thank you!

John-Gee commented 7 years ago

Well that was easy to get the trace, replaying it doesn't seem to crash though, so I'm not sure how useful it may be.

https://mega.nz/#!gpBkVKhb!raoBGbnBvekuFFrqaHKY4IXBeNAOax9Thy6_zC3-YK0

axeldavy commented 7 years ago

Indeed, replaying doesn't cause crash here. Could you make a log (mesa built with --enable-debug, then using env var NINE_DEBUG=all) running the game to capture a crash ?

Thansk.

John-Gee commented 7 years ago

nine.zip

Here's the log, somehow this time it crashed really quickly, and yet there's more than a million lines in there.

axeldavy commented 7 years ago

I don't see what can be wrong in the log. Could you make 1 or 2 more, in order to try see a crash pattern ?

John-Gee commented 7 years ago

nine2.zip nine3.zip

Here are 2 more.

For whatever reason both are of similar size, but quite smaller than the previous one.

(It should be unrelated, but just in case you see something about it in the logs, in today's tests texts in one menu in game is all corrupted, which was not the case last time I tried it with nine).

axeldavy commented 7 years ago

Do you have dedicated card or APU ?

Can you describe what happens when looking at the gallium hud for gtt and vram usage ? from memory, GALLIUM_HUD=GTT-usage,VRAM-usage but you can use GALLIUM_HUD=help glxgears to see the exact syntax.

From the log, I expect GTT usage to go high, and then apps crash. I'd like to know how high it goes, if the increase is smooth or brutal, etc.

John-Gee commented 7 years ago

It's a dedicated RadeonHD 7970 with 3Gb of VRAM.

GTT and VRAM are fairly consistent from start to crash. GTT oscillates between 250 and 265Mb and VRAM between 1 and 1.15 Gb.

axeldavy commented 7 years ago

And if you look at application ram usage (you con't see with the gallium hug, you'll need some other way) ?

John-Gee commented 7 years ago

Just in case I tried to free a lot of memory of my system but the behavior was not changed.

As for numbers, I've sent them to a file: https://gist.github.com/John-Gee/1a555efc9059686a07e9762d6c32a7eb

It seems really close to max 32b uint, and it's a 32b prefix. I wouldn't be surprised that it died by reaching the maximum before I could get the info in my file. Would that make sense to you?

axeldavy commented 7 years ago

Right... So now the question is whether it's the app behaving bad because of some value nine returned, or nine behaving bad and having a mem leak.

John-Gee commented 7 years ago

Just in case I got the same numbers with csmt instead of nine.

GTT starts around 190Mb and maxes around 200Mb. VRAM starts around 750Mb and maxes around 800Mb. And VMSize never gets to more than 3975052Kb (I didn't go past the point at which nine usually crashes, so maybe it would go the same amount later on...).

John-Gee commented 7 years ago

Just read your message, should I run valgrind or something like that to check for leaks?

axeldavy commented 7 years ago

interesting, could you check how far goes mem usage without nine ? And if it decreases after reaching the max.

John-Gee commented 7 years ago

https://gist.github.com/John-Gee/27342c782547f6b62fcc1ce327438582

John-Gee commented 7 years ago

nine4.txt

John-Gee commented 7 years ago

nine5.zip

John-Gee commented 7 years ago

log with systemmem nine6.txt

John-Gee commented 7 years ago

nine7.txt with staging