This topic describes debugging strategies for issues that manifest themselves only when the app is running in AWS. Due to the limitations of debugging a process running on an EC2 instance, You.i TV recommends that you try to reproduce the issue on a local Linux machine.
Frequent causes of AWS-only issues are:
The local Linux build was made Debug while the AWS Server build is Release.
The AWS build was compiled with the wrong compiler version, or a different compiler version than what is tested locally. Ensure the same version of GCC is used to build both the local and AWS versions of the app, and that it matches the version used to build the underlying You.i C++ libraries. If necessary, contact your You.i TV representative to find out what was used for the underlying You.i C++ libraries.
Ensure that your Linux executable was not built with dependencies not available on the EC2 instance.
One way to do this is to examine the results of readelf -d myAppExecutable
.
Look for any non-standard SharedObjects
; for example, LinuxBrew
.
The app runs geo-checking code that returns different results when run on AWS.
Assets are missing on AWS; that is, they not added to the deployed tarball.
On AWS, the app runs headless; that is, the app is launched with -n1
(for example, ./RNSampleApp -n1
).
Try this locally.
A good way to verify that what you deploy is what you are running is to extract the application tarball and run that locally.
If you still cannot reproduce the issue locally, then try simplifying the code (for example with #ifdef
statements) to isolate the problem.
Once the issue can be reproduced locally, use gdb
to debug the issue.
Basic usage is:
gdb myApplication
gdb run -n1 // or whatever arguments you want
gdb continue
gdb break MyFile.cpp:MyFunctionName // add a break point
gdb step
You can also contact your You.i TV representative to request logs of the EC2 instance to gather more information.
See also Troubleshooting .