Gluon Mobile Not Being Able to Port to iOS - gluon

I'm on the home stretch of this App I'm working on and I can't seem to get it to port to iOS. When trying to build my application on iOS, I get an OutOfMemory exception over and over again.
Then I tried to build a basic Gluon Mobile application and port it to iOS and I get this:
:compileJava UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:createDefaultIOSLauncher UP-TO-DATE
:compileIosJava UP-TO-DATE
:processIosResources UP-TO-DATE
:iosClasses UP-TO-DATE
:iosExtractNativeLibs UP-TO-DATE
:createIpa
RoboVM has detected that you are running on a slow HDD. Please consider mounting a RAM disk.
To create a 2GB RAM disk, run this in your terminal:
SIZE=2048 ; diskutil erasevolume HFS+ 'RoboVM RAM Disk' `hdiutil attach -nomount ram://$((SIZE * 2048))`
See http://docs.robovm.com/ for more info
RoboVM has detected that you are running on a slow HDD. Please consider mounting a RAM disk.
To create a 2GB RAM disk, run this in your terminal:
SIZE=2048 ; diskutil erasevolume HFS+ 'RoboVM RAM Disk' `hdiutil attach -nomount ram://$((SIZE * 2048))`
See http://docs.robovm.com/ for more info
Root pattern javax.annotations.**.* matches no classes
Root pattern javax.inject.**.* matches no classes
RoboVM has detected that you are running on a slow HDD. Please consider mounting a RAM disk.
To create a 2GB RAM disk, run this in your terminal:
SIZE=2048 ; diskutil erasevolume HFS+ 'RoboVM RAM Disk' `hdiutil attach -nomount ram://$((SIZE * 2048))`
See http://docs.robovm.com/ for more info
Root pattern javax.annotations.**.* matches no classes
Root pattern javax.inject.**.* matches no classes
Warning: javax.xml.bind.annotation.XmlRootElement is a phantom class!
Warning: java.nio.file.StandardOpenOption is a phantom class!
Warning: java.nio.file.FileSystem is a phantom class!
Warning: java.nio.file.OpenOption is a phantom class!
Warning: java.nio.file.FileSystems is a phantom class!
Warning: com.oracle.jrockit.jfr.TimedEvent is a phantom class!
Warning: com.oracle.jrockit.jfr.EventToken is a phantom class!
Warning: com.oracle.jrockit.jfr.ValueDefinition is a phantom class!
Warning: com.oracle.jrockit.jfr.EventDefinition is a phantom class!
Warning: com.oracle.jrockit.jfr.Producer is a phantom class!
Warning: com.oracle.jrockit.jfr.FlightRecorder is a phantom class!
Daemon stopping because JVM tenured space is exhausted
Daemon stopping because JVM tenured space is exhausted
My IMac is running 8GB of RAM on a 2.7GHz I5.
I have also attempted mounting a RoboVM RAM Disk to no success. Please help!

Usually, the iOS deployment requires a lot of memory, and it is a good practice to increase by default the maximum allocation memory pool of the JVM heap, up until 2 GB.
Running from your IDE, you can set this default value in the Gradle preferences.
For instance, on NetBeans, go to Preferences->Miscellaneous->Gradle, Scripts & Tasks, and as Gradle JVM arguments add -Xmx2048m:
Another option is to set a gradle property in your gradle.properties file (the one with the ANDROID_HOME property, under <user>/.gradle):
org.gradle.jvmargs=-Xmx2048m
This property file will be applied either running from IDE or from command line, so it is more appropriate.
A typical situation where an out of memory error is found is the first time the RoboVM compiler is launched. Luckily, all the compiled classes are cached, so restarting the task just resumes the process.
Also, if the process fails, sometimes can be convenient to stop all the deamon threads with gradle --stop and ./gradlew --stop, and start the task again.
If the process ends successfully, even if there are warning messages, just check on your iOS device that the app was installed and runs fine. Note that you could find memory issues as well, but this is a different issue.
Edit
when running long tasks, it's always convenient using --info to find out more about the process, with a more verbose output.
Also, the process can be run from the console (from NetBeans, right click on the build.gradle file and select Tools->Open in Terminal).

Related

Running out of RAM during daemon process

I am trying to make a Minecraft mod. I have set the gradle.properties to use 3GB of ram. If I do this it is able to load the daemon process however it immediately displays
Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at https://docs.gradle.org/2.14/userguide/gradle_daemon.html
Please read the following process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for 3072000KB object heap
It is running out of RAM, and I have no idea why as I have 16GB installed.
I tried closing all other programs but got the same problem. Next up I changed the gradle.properties to use 1GB and then 2GB of RAM, and instead just got an error saying it ran out of memory (I googled this error and the common solution was to give it some more RAM)
* What went wrong: Execution failed for task ':decompileMc'. > Process 'command 'C:\Program Files (x86)\Java\jdk1.8.0_211\bin\java.exe'' finished with non-zero exit value 1
Francisco Mateo recommended I update my gradle version - sadly didn't help.
I tried changing the distributionUrl in the gradle-wrapper.properties to the new version of gradle I am using so it now reads distributionUrl=https\://services.gradle.org/distributions/gradle-5.5.1-bin.zip
I also tried running InteliJ as administrator. Still no luck.
Not a clue what is happening here - help appreciated. If it makes any difference the error occures at 10:08 of https://www.youtube.com/watch?v=RZ66HdNkank

Custom built kernel produces non-bootable initramfs on Centos 7

I've been building my own kernel (4.19.37) and have no issues during build (make) or install (make install_modules + make install). Everything seems to go fine until I execute grub2-mkconfig -o /boot/grub2/grub.cfg. When executing this command, grub finds both my existing and new vmlinuz-* kernels in /boot/ as well as their corresponding initramfs-*.img. However, at that point the system hangs indefinitely (> several hours). Ctrl+C does not seem to stop it and I must reboot. I have looked into this issue and all I have found that could be a problem is the probing of removal disks for bootable OS's, which I have eliminated by both removing them and by adding GRUB_DISABLE_OS_PROBER=true to /etc/default/grub per this SE post. Neither has helped.
Upon reboot, I end up at the grub> command line, presumably because the grub2-mkconfig never finished and corrupted the grub configuration file. Here I can load both the old and new kernel without any issue, as well as initramfs, but when I execute boot I get a kernel panic:
end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)
Naturally, it is my assumption that there is something wrong with my initramfs-4.19.37.img that was created by my build process. As an experiment, I tested if I could load the new kernel, but use the old initramfs (4.19.10), and indeed it does boot into emergency mode. I however cannot do the opposite, old kernel with new initramfs. So something is fishy with my new initramfs image.
Getting smarter, my last experiment was mounting the old and new initramfs image with mount. They both mount successfully with no errors, and seem to have identical file structures. I have also compared both my new and old .config files for the kernel builds, and the differences are trivial.
A few other notes/observations:
In the image above, you can see List of all partions: produces nothing, so I am wondering if there is an issue with the file system type? My hard drive is xfs, what is the file system for the initramfs? CPIO?
At the grub> command line, ls / produces what I expect to see in /boot. It contains all my vmlinuz-* and initramfs-*.img files
My file system is xfs
I've tried various other kernel versions with same results
I have twice had successful builds and installs, once was the existing kernel (4.19.10), it was an upgrade, and a second time with the same kernel with a low-latency pre-emption model. I can't for the life of me figure out what I did differently then.
So the final question(s) are - What's wrong with the initramfs form these builds? What else can I do to validate it's integrity? Are there any .config changes I should make when building the kernel for the xfs file system?
Disclaimer: So this actually an continuation of [this question][3], but I've simplified the problem a bit. Some background info there might be relevant.
After updating the kernel using yum update, reboot the VM using the new kernel you get a kernel panic error.
Following commands will fix this problem.
yum remove kernel
yum update

JVM running out of memory in Bamboo

I'm facing an issue.
Currently running a build, in On-Demand Bamboo server in AWS, I'm getting an error and the log says:
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory.......failed; error='Cannot allocate memory' (errno=12)
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map XXXXX bytes for committing reserved memory."
Does anyone know how can I allocate memory to Bamboo, since is hosted in AWS? (I do not have much experience with both)
Thank you.
Did you ever solve this? I would start by checking the memory usage (free -m) and then try running the build outside of Bamboo, to see if that work as expected.
You can also update the setenv.sh file in the bamboo bin directory to add memory options. Update the JAVA_OPTS with some reasonable values, e.g. -Xmx768m -Xms512m, that makes sense for your build projects.

custom Linux kernel build failure in vmware workstation

While trying to compile/build and boot custom kernel inside vmware workstation, while booting new kernel, it fails and falls to shell with error "failed to find disk by uuid".
I tried this with both ubuntu and centos.
Things I tried but didn't help
check mapping by uuid in boot entry and existence in directory.
initramfs-update
replaced root=uuid=<> with /dev/disk/sda3
is it issue with vmware workstation?
how can it be rectified..??
I had a similar fault with my own attempts to bootstrap Fedora 22 onto a blank partition using a Centos install on another partition. I never did solve it completely, but I did find the problem was in my initrd rather than the kernel.
The problem is the initrd isn't starting LVM because dracut didn't tell the initrd that it needs LVM. Therefore if you start LVM manually you should be able to boot into your system to fix it.
I believe this is the sequence of commands I ran from the emergency shell to start LVM:
vgscan
vgchange -ay
lvs
this link helped me remember
Followed by exit to resume normal boot.
You might have to mount your LVM /etc/fstab entries manually, I don't recall whether I did or not.
Try this:
sudo update-grub
Then:
mkinitcpio -p linux
It won't hurt to check your fstab file. There, you should find the UUID of your drive. Make sure you have the proper flags set in the fstab.
Also, there's a setting in the grub.cfg that has has GRUB use the old style of hexadecimal UUIDs. Check that out as well!
The issue is with creation of initramfs, after doing a
make oldconfig
and choosing default for new options, make sure the ENOUGH diskspace is available for the image to be created.
in my case the image created was not correct and hence it was failing to mount the image at boot time.
when compared; the image size was quite less than the existing image of lower version, so I added another disk with more than sufficient size and then
make bzImage
make modules
make modules_install
make install
starts working like a charm.
I wonder why the image creation got completed earlier and resulted in corrupt image (with less size) without throwing any error [every single time]

AWS auto scaling test failed instance

I have an autoscaling cloudformation that I think I have set up to replace failed instances based on StatusCheckFailed_Instance. I want to test this. Can I test this by terminating one of the EC2 instances? Thanks!
Instance Status Check might fail for one of the following reasons:
Memory Errors
Out of memory: kill process
ERROR: mmu_update failed (Memory management update failed)
Device Errors
I/O error (Block device failure)
IO ERROR: neither local nor remote disk (Broken distributed block device)
Kernel Errors
request_module: runaway loop modprobe (Looping legacy kernel modprobe on older Linux versions)
"FATAL: kernel too old" and "fsck: No such file or directory while trying to open /dev" (Kernel and AMI mismatch)
"FATAL: Could not load /lib/modules" or "BusyBox" (Missing kernel modules)
ERROR Invalid kernel (EC2 incompatible kernel)
File System Errors
request_module: runaway loop modprobe (Looping legacy kernel modprobe on older Linux versions)
fsck: No such file or directory while trying to open... (File system not found)
General error mounting filesystems (Failed mount)
VFS: Unable to mount root fs on unknown-block (Root filesystem mismatch)
Error: Unable to determine major/minor number of root device... (Root file system/device mismatch)
XENBUS: Device with no driver...
... days without being checked, check forced (File system check required)
fsck died with exit status... (Missing device)
Operating System Errors
GRUB prompt (grubdom>)
Bringing up interface eth0: Device eth0 has different MAC address than expected, ignoring. (Hard-coded MAC address)
Unable to load SELinux Policy. Machine is in enforcing mode. Halting now. (SELinux misconfiguration)
XENBUS: Timeout connecting to devices (Xenbus timeout)
It seems to me that #1 is the easiest to implement to fail on demand. You can add web hook or launch a shell script with the delay to start some process which will result in OutOfMemory failure, to confirm that your autoscaling configuration works as configured.
Terminating the instance will not help to test your configuration, as when you gracefully terminating the instance, it is removed from the pool of available instances, and the check will not be performed.
More details on status checks can be found here: Troubleshooting Instances with Failed Status Checks

Resources