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

GDB 7.10 from NDK r11b crashes while debugging Unreal Engine 4.10 demo #57

Closed
dosvidos opened this issue Mar 30, 2016 · 3 comments
Closed
Assignees
Milestone

Comments

@dosvidos
Copy link

I'm using NDK R10B for Windows, target device is AARCH64.
During the debugging session I've used GDB MI interface to integrate the debugger with IDE frontend.
Initial debugging experience is good, it hits the BP's and works okay, but after a few minutes of debugging GDB crashed with the following output:

2016-03-30 14:58:48.3592[GDB] cmd: "782-var-create --thread 10 --frame 0 - * "World""
2016-03-30 14:58:48.3592[GDB] stdout: 782^done,name="var11",numchild="4",value="0x7048e280",type="UWorld *",thread-id="10",has_more="0"
2016-03-30 14:58:48.3592[GDB] cmd: "783-var-list-children --all-values var11"
2016-03-30 14:58:48.4024[GDB] stdout: 783^done,numchild="4",children=[child={name="var11.UObject",exp="UObject",numchild="1",value="{...}",type="UObject",thread-id="10"},child={name="var11.FNetworkNotify",exp="FNetworkNotify",numchild="0",value="{...}",type="FNetworkNotify",thread-id="10"},child={name="var11.public",exp="public",numchild="86",value="",thread-id="10"},child={name="var11.private",exp="private",numchild="29",value="",thread-id="10"}],has_more="0"
2016-03-30 14:58:48.4024|GDB] cmd: "784-var-list-children --all-values var11.public"
2016-03-30 14:58:48.4024|GDB] cmd: "785-var-show-attributes var11.UObject"
2016-03-30 14:58:48.4024|GDB] cmd: "786-var-show-attributes var11.FNetworkNotify"
2016-03-30 14:58:48.5206|GDB] stdout: ~"/usr/local/google/buildbot/src/android/ndk-r11-release/toolchain/gdb/gdb-7.10/gdb/utils.c:1065: internal-error: virtual memory exhausted: can't allocate 4194392 bytes.\nA problem internal to GDB has been detected,\nfurther debugging may prove unreliable.\nQuit this debugging session? "
2016-03-30 14:58:48.5206|GDB] stdout: ~"(y or n) [answered Y; input not from terminal]\n"
2016-03-30 14:58:48.5206|GDB] stdout: &"\nThis is a bug, please report it."
2016-03-30 14:58:48.5206|GDB] stdout: &" For instructions, see:\nhttp://www.gnu.org/software/gdb/bugs/."
2016-03-30 14:58:48.5206|GDB] stdout: &"\n\n"
2016-03-30 14:58:48.5206|GDB] stdout: ~"/usr/local/google/buildbot/src/android/ndk-r11-release/toolchain/gdb/gdb-7.10/gdb/utils.c:1065: internal-error: virtual memory exhausted: can't allocate 4194392 bytes.\nA problem internal to GDB has been detected,\nfurther debugging may prove unreliable.\nCreate a core file of GDB? "
2016-03-30 14:58:48.5206|GDB] stdout: ~"(y or n) [answered Y; input not from terminal]\n"
2016-03-30 14:58:48.5206|GDB: This application has requested the Runtime to terminate it in an unusual way.
2016-03-30 14:58:48.5206|GDB: Please contact the application's support team for more information.
2016-03-30 14:59:08.4126|[GDB] Does not return a response to "-var-show-attributes var11.UObject" command in 20000 ms. Command timed out.
2016-03-30 14:59:08.4126|[GDB] Does not return a response to "-var-show-attributes var11.FNetworkNotify" command in 20000 ms. Command timed out.
2016-03-30 14:59:08.4126|[GDB] Does not return a response to "-var-list-children --all-values var11.public" command in 20000 ms. Command timed out.

That crash happened after I've stepped into a method UNetDriver* AActor::GetNetDriver() const
defined in a module UnrealEngine-4.10\Engine\Source\Runtime\Engine\Private\Actor.cpp
and tried to examine the local variables.
I can't find a core dump, but could share a UE4 demo APK & binaries.

@DanAlbert DanAlbert added this to the r12 milestone Mar 30, 2016
@jmgao
Copy link
Contributor

jmgao commented Mar 30, 2016

2016-03-30 14:58:48.5206|GDB] stdout: ~"/usr/local/google/buildbot/src/android/ndk-r11-release/toolchain/gdb/gdb-7.10/gdb/utils.c:1065: internal-error: virtual memory exhausted: can't allocate 4194392 bytes.

Are you using the 64 bit version of the ndk? If not, and you have gigantic unstripped libraries, this might just be address space exhaustion.

I can't find a core dump, but could share a UE4 demo APK & binaries.

If you're seeing this on 64 bit, please do so.

@dosvidos
Copy link
Author

@jmgao Nice catch, actually I'm using the 32-bit version of NDK - so GDB process is 32-bit.
Though unstripped library is not that big, only about 721 Mb, but it's definitely could be tricky to cram into 2GB of address space available for the Windows 32-bit processes.
Engine/Binaries/Android/UE4Game-Android-Debug-armv7-es31.so: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /system/bin/linker, not stripped
$ du -h Engine/Binaries/Android/UE4Game-Android-Debug-armv7-es31.so
721M Engine/Binaries/Android/UE4Game-Android-Debug-armv7-es31.so
I'll try the 64-bit version of NDK r11b

@jmgao
Copy link
Contributor

jmgao commented Apr 26, 2016

Closing under the assumption that it's either due to 32-bit. If it isn't (and it isn't fixed by 7.11), please reopen.

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

No branches or pull requests

3 participants