mirage / mirage-www

Website infrastructure and content for mirage.io
https://mirage.io
ISC License
172 stars 106 forks source link

Out of Memory - Mirage on Xen #565

Open marqueswsm opened 7 years ago

marqueswsm commented 7 years ago

Hello. I'm working with MirageOs on Xen. I created unikernel with a simple web page. However, my unikernel Crash and show the error message: "Out of memory". In addition, I tested the examples mirage-www and static web application of the mirage-skeleton and error persist. This error occurs when I do some requests with Apache Benchmark (AB).

MirageOS booting...
Initialising timer interface
Initialising console ... done.
Attempt to open(/dev/urandom)!
Unsupported function getpid called in Mini-OS kernel
Unsupported function getppid called in Mini-OS kernel
2017-08-28 11:33:04 -00:00: INF [net-xen:frontend] connect 0
2017-08-28 11:33:04 -00:00: INF [net-xen:frontend] create: id=0 domid=0
2017-08-28 11:33:04 -00:00: INF [net-xen:frontend]  sg:true gso_tcpv4:true rx_copy:true rx_flip:false smart_poll:false
2017-08-28 11:33:04 -00:00: INF [net-xen:frontend] MAC: 00:16:3e:17:17:32
2017-08-28 11:33:04 -00:00: INF [ethif] Connected Ethernet interface 00:16:3e:17:17:32
2017-08-28 11:33:04 -00:00: INF [arpv4] Connected arpv4 device on 00:16:3e:17:17:32
2017-08-28 11:33:04 -00:00: INF [udp] UDP interface connected on 192.168.0.150
2017-08-28 11:33:04 -00:00: INF [tcpip-stack-direct] stack assembled: mac=00:16:3e:17:17:32,ip=192.168.0.150
2017-08-28 11:33:05 -00:00: INF [dispatch] Listening on http://localhost/
2017-08-28 11:35:04 -00:00: INF [arpv4] ARP: timeout 192.168.0.1
2017-08-28 11:35:04 -00:00: INF [arpv4] ARP: timeout 192.168.0.1
2017-08-28 11:36:04 -00:00: INF [arpv4] ARP: timeout 192.168.0.109
2017-08-28 11:36:04 -00:00: INF [arpv4] ARP: timeout 192.168.0.109
2017-08-28 11:40:04 -00:00: INF [arpv4] ARP: timeout 192.168.0.1
2017-08-28 11:40:04 -00:00: INF [arpv4] ARP: timeout 192.168.0.1
2017-08-28 11:45:04 -00:00: INF [arpv4] ARP: timeout 192.168.0.1
2017-08-28 11:45:04 -00:00: INF [arpv4] ARP: timeout 192.168.0.1
2017-08-28 11:50:04 -00:00: INF [arpv4] ARP: timeout 192.168.0.1
2017-08-28 11:50:04 -00:00: INF [arpv4] ARP: timeout 192.168.0.1
2017-08-28 11:56:04 -00:00: INF [arpv4] ARP: timeout 192.168.0.1
2017-08-28 11:56:04 -00:00: INF [arpv4] ARP: timeout 192.168.0.1
Fatal error: out of memory.
Mirage exiting with status 2
Do_exit called!

Does anyone know why this error occurs and what is the solution?

samoht commented 7 years ago

How much memory did you give to your Xen VM?

marqueswsm commented 7 years ago

Thanks for the answer. I tested it with various amounts. However, when I have provided more memory, the VM responds to a larger number of requests, but the problem occurs in the same way. I currently place 256MB and the error occurs with 500 requests. I do not know if this error should occur according to the amount of memory or the problem is in the Xen configuration...

www . xl:

`# Generated by mirage configure -t xen --ipv4 192.168.0.151/24 (Mon, 28 Aug 2017 12:32:51 GMT).

name = 'www1' kernel = '/home/wagner/Downloads/mirage1/src/./www.xen' builder = 'linux' memory = 256 on_crash = 'preserve'

disk = [ 'format=raw, vdev=xvdb, access=rw, target=/home/wagner/Downloads/mirage1/src/./tar_block1.img', 'format=raw, vdev=xvdd, access=rw, target=/home/wagner/Downloads/mirage1/src/./tar_block2.img', 'format=raw, vdev=xvde, access=rw, target=/home/wagner/Downloads/mirage1/src/./fat_block2.img', 'format=raw, vdev=xvdf, access=rw, target=/home/wagner/Downloads/mirage1/src/./tar_block3.img', 'format=raw, vdev=xvdc, access=rw, target=/home/wagner/Downloads/mirage1/src/./fat_block1.img', 'format=raw, vdev=xvdg, access=rw, target=/home/wagner/Downloads/mirage1/src/./fat_block3.img' ]

vif = [ 'bridge=xenbr0' ] `