[Bug 56835] New: memory allocation error in wine9.0
https://bugs.winehq.org/show_bug.cgi?id=56835 Bug ID: 56835 Summary: memory allocation error in wine9.0 Product: Wine Version: 9.0 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs(a)winehq.org Reporter: csumushu(a)126.com Distribution: --- Our program can run using Wine 8.0, but because Wine 8.0 does not sufficiently support the WinPcap library, it exits the function directly after calling pcap_loop without listening to the network card. Therefore, we plan to use Wine 9.0. We tested it with a test program, and it did not have this issue. However, when running our software, we encountered the following error log: ‘0104:err:virtual:map_view anon mmap error Cannot allocate memory, size 0x3c141000, unix_prot 0x1’. Could this be due to some configuration issue? -- 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=56835 --- Comment #1 from mushu <csumushu(a)126.com> --- Created attachment 76647 --> https://bugs.winehq.org/attachment.cgi?id=76647 winpcap demo The C program is designed to validate the functionality of WinPcap, and it’s unrelated to the error mentioned in the title. -- 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=56835 --- Comment #2 from Hans Leidekker <hans(a)meelstraat.net> --- (In reply to mushu from comment #1)
Created attachment 76647 [details] winpcap demo
The C program is designed to validate the functionality of WinPcap, and it’s unrelated to the error mentioned in the title.
Thanks, could you also attach a compiled program? Are you using a new style wow64 build? -- 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=56835 --- Comment #3 from mushu <csumushu(a)126.com> --- (In reply to Hans Leidekker from comment #2)
(In reply to mushu from comment #1)
Created attachment 76647 [details] winpcap demo
The C program is designed to validate the functionality of WinPcap, and it’s unrelated to the error mentioned in the title.
Thanks, could you also attach a compiled program? Are you using a new style wow64 build?
Sorry, due to network restrictions, I am unable to upload binary programs. I am using MinGW GCC on Windows to compile. I downloaded the WinPcap development package and placed ‘demo.c’ inside. I ran the command ‘gcc demu.c -o demu.exe -I./Include/ -L./Lib/x64/ -lwpcap -g’ -- 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=56835 --- Comment #4 from Hans Leidekker <hans(a)meelstraat.net> --- (In reply to mushu from comment #3)
(In reply to Hans Leidekker from comment #2)
(In reply to mushu from comment #1)
Created attachment 76647 [details] winpcap demo
The C program is designed to validate the functionality of WinPcap, and it’s unrelated to the error mentioned in the title.
Thanks, could you also attach a compiled program? Are you using a new style wow64 build?
Sorry, due to network restrictions, I am unable to upload binary programs. I am using MinGW GCC on Windows to compile. I downloaded the WinPcap development package and placed ‘demo.c’ inside. I ran the command ‘gcc demu.c -o demu.exe -I./Include/ -L./Lib/x64/ -lwpcap -g’
It works fine here on current git Wine. Can you attach a WINEDEBUG=+wpcap log? -- 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=56835 --- Comment #5 from mushu <csumushu(a)126.com> --- (In reply to Hans Leidekker from comment #4)
(In reply to mushu from comment #3)
(In reply to Hans Leidekker from comment #2)
(In reply to mushu from comment #1)
Created attachment 76647 [details] winpcap demo
The C program is designed to validate the functionality of WinPcap, and it’s unrelated to the error mentioned in the title.
Thanks, could you also attach a compiled program? Are you using a new style wow64 build?
Sorry, due to network restrictions, I am unable to upload binary programs. I am using MinGW GCC on Windows to compile. I downloaded the WinPcap development package and placed ‘demo.c’ inside. I ran the command ‘gcc demu.c -o demu.exe -I./Include/ -L./Lib/x64/ -lwpcap -g’
It works fine here on current git Wine. Can you attach a WINEDEBUG=+wpcap log?
In the latest version 9.0, there is no issue with WinPcap library support; this problem appeared in Wine 8.0. However, in Wine 9.0, there is a memory allocation problem when running our Windows program. So, I encountered two different issues in two versions: the WinPcap library support problem in Wine 8.0 and the memory allocation problem in Wine 9.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.
https://bugs.winehq.org/show_bug.cgi?id=56835 --- Comment #6 from Hans Leidekker <hans(a)meelstraat.net> --- (In reply to mushu from comment #5)
(In reply to Hans Leidekker from comment #4)
(In reply to mushu from comment #3)
(In reply to Hans Leidekker from comment #2)
(In reply to mushu from comment #1)
Created attachment 76647 [details] winpcap demo
The C program is designed to validate the functionality of WinPcap, and it’s unrelated to the error mentioned in the title.
Thanks, could you also attach a compiled program? Are you using a new style wow64 build?
Sorry, due to network restrictions, I am unable to upload binary programs. I am using MinGW GCC on Windows to compile. I downloaded the WinPcap development package and placed ‘demo.c’ inside. I ran the command ‘gcc demu.c -o demu.exe -I./Include/ -L./Lib/x64/ -lwpcap -g’
It works fine here on current git Wine. Can you attach a WINEDEBUG=+wpcap log?
In the latest version 9.0, there is no issue with WinPcap library support; this problem appeared in Wine 8.0. However, in Wine 9.0, there is a memory allocation problem when running our Windows program. So, I encountered two different issues in two versions: the WinPcap library support problem in Wine 8.0 and the memory allocation problem in Wine 9.0.
There were many changes in this dll since 8.0. I recommend using Wine 9.0. Can you attach a log from that version? -- 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=56835 --- Comment #7 from mushu <csumushu(a)126.com> --- (In reply to Hans Leidekker from comment #6)
(In reply to mushu from comment #5)
(In reply to Hans Leidekker from comment #4)
(In reply to mushu from comment #3)
(In reply to Hans Leidekker from comment #2)
(In reply to mushu from comment #1)
Created attachment 76647 [details] winpcap demo
The C program is designed to validate the functionality of WinPcap, and it’s unrelated to the error mentioned in the title.
Thanks, could you also attach a compiled program? Are you using a new style wow64 build?
Sorry, due to network restrictions, I am unable to upload binary programs. I am using MinGW GCC on Windows to compile. I downloaded the WinPcap development package and placed ‘demo.c’ inside. I ran the command ‘gcc demu.c -o demu.exe -I./Include/ -L./Lib/x64/ -lwpcap -g’
It works fine here on current git Wine. Can you attach a WINEDEBUG=+wpcap log?
In the latest version 9.0, there is no issue with WinPcap library support; this problem appeared in Wine 8.0. However, in Wine 9.0, there is a memory allocation problem when running our Windows program. So, I encountered two different issues in two versions: the WinPcap library support problem in Wine 8.0 and the memory allocation problem in Wine 9.0.
There were many changes in this dll since 8.0. I recommend using Wine 9.0. Can you attach a log from that version?
What type of logs are needed for the memory allocation failure issue that occurs in Wine 9.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.
https://bugs.winehq.org/show_bug.cgi?id=56835 --- Comment #8 from Hans Leidekker <hans(a)meelstraat.net> --- Let's start with WINEDEBUG=+wpcap. -- 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=56835 --- Comment #9 from mushu <csumushu(a)126.com> --- (In reply to Hans Leidekker from comment #8)
Let's start with WINEDEBUG=+wpcap.
root(a)mushu:~# WINEDEBUG=fixme-all,+wpcap /usr/lib/wine/wine winosp_release/winospexe/winosp.exe "C:\\ProgramData\\ne1\\WINOSPHARDCFG.INI" 0024:warn:wpcap:DllMain failed to enable 32-bit mmap() "Unknown options specified" 0108:err:virtual:map_view anon mmap error Cannot allocate memory, size 0x3c141000, unix_prot 0x1 The above is the output log. Is it possible that the WinPcap issue and the memory allocation error are two separate problems? -- 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=56835 Bernhard Übelacker <bernhardu(a)mailbox.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bernhardu(a)mailbox.org --- Comment #10 from Bernhard Übelacker <bernhardu(a)mailbox.org> --- Following is my attempt to compile the test program and run it with needed capabilities without being root: cd .wine/drive_c wget https://npcap.com/dist/npcap-sdk-1.13.zip unzip -d npcap-sdk npcap-sdk-1.13.zip wget "https://bugs.winehq.org/attachment.cgi?id=76647" -O winpcap_demo.c x86_64-w64-mingw32-gcc \ -g -O2 \ -Inpcap-sdk/Include \ -Lnpcap-sdk/Lib/x64 \ winpcap_demo.c \ -lwpcap \ -o winpcap_demo_x86_64 i686-w64-mingw32-gcc \ -g -O2 \ -Inpcap-sdk/Include \ -Lnpcap-sdk/Lib \ winpcap_demo.c \ -lwpcap \ -o winpcap_demo_i686 sudo setpriv \ --inh-caps '-all,+net_raw,+net_admin' \ --bounding-set '-all,+net_raw,+net_admin' \ --reuid=benutzer \ --ambient-caps='+net_raw,+net_admin' \ env -i HOME=$HOME /bin/bash --login -i WINEDEBUG=+wpcap wine winpcap_demo_x86_64 WINEDEBUG=+wpcap wine winpcap_demo_i686 With the 32-bit build and +wpcap the "Unknown options specified" is visible, and tracing network packets seems to work. So the issue in winosp.exe with wine-9.0 seems not to be covered by the winpcap_demo.c reproducer. This size of 0x3c141000 seems to be nearly a quarter of the whole address space of a 32-bit process, which would need to be available in one contiguous block? Maybe there is some setting to tell the application to map less memory? Or maybe there is a 64-bit version available? -- 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=56835 --- Comment #11 from Hans Leidekker <hans(a)meelstraat.net> --- (In reply to Bernhard Übelacker from comment #10)
With the 32-bit build and +wpcap the "Unknown options specified" is visible, and tracing network packets seems to work.
That's expected. PCAP_MMAP_32BIT is only needed in a new WoW64 build.
This size of 0x3c141000 seems to be nearly a quarter of the whole address space of a 32-bit process, which would need to be available in one contiguous block?
Assuming this works on Windows it would be interesting to try a new WoW64 build. Perhaps enough memory will be available there when native libraries are mapped above the 32-bit limit. -- 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)
-
WineHQ Bugzilla