[Bug 35563] New: GetProcessMemoryInfo() is unimplemented
http://bugs.winehq.org/show_bug.cgi?id=35563 Bug ID: 35563 Summary: GetProcessMemoryInfo() is unimplemented Product: Wine Version: 1.7.12 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: ntdll Assignee: wine-bugs(a)winehq.org Reporter: achurch+wine(a)achurch.org Classification: Unclassified Despite bug 13302, GetProcessMemoryInfo() is still effectively unimplemented, in that it returns zero in all fields instead of actual data. The missing code is in the underlying ntdll call, NtQueryInformationProcess(ProcessVmCounters): (see http://source.winehq.org/source/dlls/ntdll/process.c#L231) case ProcessVmCounters: { VM_COUNTERS pvmi; [...] /* FIXME : real data */ memset(&pvmi, 0 , sizeof(VM_COUNTERS)); Test program (compile with -lpsapi): #include <assert.h> #include <windows.h> #include <psapi.h> int main(int argc, char **argv) { PROCESS_MEMORY_COUNTERS pmc; assert(GetProcessMemoryInfo(GetCurrentProcess(), &pmc, sizeof(pmc))); assert(pmc.WorkingSetSize > 0); return 0; } -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=35563 Jerome Leclanche <adys.wh(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |testcase -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=35563 Anastasius Focht <focht(a)gmx.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |focht(a)gmx.net --- Comment #1 from Anastasius Focht <focht(a)gmx.net> --- Hello Andrew, do you have a real world app/game that breaks because of incorrect values? Creating 'meta' bugs because of 'FIXME' status of some API is not useful. For example there is already a bug that targets specific field of 'ProcessVmCounters' info class: Bug 5657 ("NtQueryInformationProcess ProcessVmCounters info class: actual value for 'PagefileUsage'") Regards -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=35563 --- Comment #2 from Andrew Church <achurch+wine(a)achurch.org> --- I had to disable a test in a library I use for game development because it expects a nonzero value in WorkingSetSize. That's perhaps not as "real-world" as bug 5657, but I'd still like to be able to run all the tests under Wine if possible. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=35563 Anastasius Focht <focht(a)gmx.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Summary|GetProcessMemoryInfo() is |Custom game development |unimplemented |library expects non-zero | |value for ProcessVmCounters | |info class member | |'WorkingSetSize' Ever confirmed|0 |1 --- Comment #3 from Anastasius Focht <focht(a)gmx.net> --- Hello Andrew, --- quote --- I had to disable a test in a library I use for game development because it expects a nonzero value in WorkingSetSize. --- quote --- if the library is publicly available (game SDK?) please add a download link just for completeness. Refining summary. Regards -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=35563 --- Comment #4 from Andrew Church <achurch+wine(a)achurch.org> --- Created attachment 47524 --> http://bugs.winehq.org/attachment.cgi?id=47524 procmeminfo.diff The library isn't publicly available, but I found a few spare cycles and wrote a patch that fixes the bug (as well as bug 5657) on Linux. I don't know how you feel about having platform-dependent code there, but it's a proof of concept, at least. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=35563 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, patch -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=35563 super_man(a)post.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |super_man(a)post.com --- Comment #5 from super_man(a)post.com --- assuming still valid issue, the patch itself applies cleanly against git (Hunk #1 succeeded at 243 (offset 12 lines). wine 1.7.50 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=35563 --- Comment #6 from Andrew Church <achurch+wine(a)achurch.org> --- The issue is still relevant, just for the record. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=35563 --- Comment #7 from super_man(a)post.com --- Would you mind sending the patch wine-devel? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=35563 --- Comment #8 from Andrew Church <achurch+wine(a)achurch.org> --- Done. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=35563 Qian Hong <fracting(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fracting(a)gmail.com -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=35563 --- Comment #9 from super_man(a)post.com --- (In reply to Andrew Church from comment #8)
Done.
http://source.winehq.org/patches/ ? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=35563 --- Comment #10 from Andrew Church <achurch+wine(a)achurch.org> --- (In reply to super_man from comment #9)
What's that supposed to mean? (Please note that I'm not familiar with the Wine development process, so I don't know about any patch submission procedures that may exist. If you're involved with development, you're welcome to submit the patch yourself -- I don't particularly care about credit or anything like that.) -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=35563 --- Comment #11 from super_man(a)post.com --- (In reply to Andrew Church from comment #10)
(In reply to super_man from comment #9)
What's that supposed to mean? (Please note that I'm not familiar with the Wine development process, so I don't know about any patch submission procedures that may exist. If you're involved with development, you're welcome to submit the patch yourself -- I don't particularly care about credit or anything like that.)
http://wiki.winehq.org/SubmittingPatches -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=35563 --- Comment #12 from Andrew Church <achurch+wine(a)achurch.org> --- (In reply to super_man from comment #11)
(In reply to Andrew Church from comment #10)
(In reply to super_man from comment #9)
What's that supposed to mean? (Please note that I'm not familiar with the Wine development process, so I don't know about any patch submission procedures that may exist. If you're involved with development, you're welcome to submit the patch yourself -- I don't particularly care about credit or anything like that.)
Well, I've got too many other things going on at the moment to go through a complex process like that right now. Again, feel free to submit the patch yourself if you like. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=35563 Andrew Church <achurch+wine(a)achurch.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #47524|0 |1 is obsolete| | --- Comment #13 from Andrew Church <achurch+wine(a)achurch.org> --- Created attachment 53981 --> https://bugs.winehq.org/attachment.cgi?id=53981 Patch (for wine-1.9.5) Updated the patch to work with wine-1.9.5. Just for completeness, the relevant library is now online at http://achurch.org/SIL/ and the relevant test can be run by building the included sample program (make -C SIL-*/sample/build PLATFORM=windows) and running it with the option "-test=sys_debug". -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=35563 --- Comment #14 from super_man(a)post.com --- (In reply to Andrew Church from comment #4)
Created attachment 47524 [details] procmeminfo.diff
The library isn't publicly available, but I found a few spare cycles and wrote a patch that fixes the bug (as well as bug 5657) on Linux. I don't know how you feel about having platform-dependent code there, but it's a proof of concept, at least.
It seems to me that they have mac specific function for VM_COUNTERS already included http://source.winehq.org/git/wine.git/blob/6bc0ce26a853b51f11958545bfa5570bd... 117 #if defined(HAVE_MACH_MACH_H) 118 119 static void fill_VM_COUNTERS(VM_COUNTERS* pvmi) 120 { -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=35563 winetest(a)luukku.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |winetest(a)luukku.com --- Comment #15 from winetest(a)luukku.com --- https://source.winehq.org/git/wine.git/commitdiff/bf7a97e5d3482d1ee4130d716f... Might be fixed now. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=35563 winetest(a)luukku.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |achurch+wine(a)achurch.org -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=35563 --- Comment #16 from Andrew Church <achurch+wine(a)achurch.org> --- Confirmed that https://source.winehq.org/git/wine.git/commitdiff/bf7a97e5d3482d1ee4130d716f... fixes the bug. Sorry for the delay in responding. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=35563 Bruno Jesus <00cpxxx(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Fixed by SHA1| |bf7a97e5d3482d1ee4130d716f0 | |2b870df804040 Status|NEW |RESOLVED --- Comment #17 from Bruno Jesus <00cpxxx(a)gmail.com> --- (In reply to Andrew Church from comment #16)
Confirmed that https://source.winehq.org/git/wine.git/commitdiff/ bf7a97e5d3482d1ee4130d716f02b870df804040 fixes the bug. Sorry for the delay in responding.
Thanks for the reply. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=35563 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #18 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 2.7. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=35563 Michael Stefaniuc <mstefani(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |2.0.x -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=35563 Michael Stefaniuc <mstefani(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|2.0.x |--- --- Comment #19 from Michael Stefaniuc <mstefani(a)winehq.org> --- Removing the 2.0.x milestone from bugs included in 2.0.2. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
wine-bugs@winehq.org