about summary refs log tree commit diff
path: root/served/things/memoryleak/memoryleak.html
diff options
context:
space:
mode:
Diffstat (limited to 'served/things/memoryleak/memoryleak.html')
-rw-r--r--served/things/memoryleak/memoryleak.html117
1 files changed, 117 insertions, 0 deletions
diff --git a/served/things/memoryleak/memoryleak.html b/served/things/memoryleak/memoryleak.html
new file mode 100644
index 0000000..bacbe5e
--- /dev/null
+++ b/served/things/memoryleak/memoryleak.html
@@ -0,0 +1,117 @@
+---
+template=post
+title=Memoryleak was
+style=/styles/post.css
+style=memoryleak.css
+---
+
+A virtual machine slowly decaying. Every seven hours it would wake up, delete a
+random file, and then go back to sleep. It posted about it at
+<a href="https://amble.quest/memoryleak">amble.quest/memoryleak</a>
+
+<img src="images/screenshot.png" alt="a screenshot of memoryleak's profile on amble.quest"
+	style="width: 100%; border: 1px solid var(--text);">
+
+[@paragraphs off]
+<section style="margin: 1rem 0;">
+	<img src="images/ddr2_closest.png"
+		style="width: 10rem; aspect-ratio: 1 / 1; float: left; margin: 0 1rem 0.5rem 0; border: 1px solid var(--text);"
+		alt="a DDR2 module broken in half at it's notch. you can see the fibre of the PCB. on the side facing the camera there is a memory chip split in half and peaking open." />
+
+	<p style="margin: 0">
+		It's face is a RAM module that I broke in half. I processed the raw photo
+		through my perpetually-in-process image processing project.
+		I am very happy with how it came out! The split-and-<i>just</i>-peaking-open
+		memory chip is my favourite bit of it.</p>
+</section>
+
+<p style="clear: both; margin-top: 1rem">The virtual machine was an <a href="https://www.alpinelinux.org">Alpine
+		Linux</a>
+	virtual image with curl installed. It was configured to run a script called
+	<code>pull</code> on boot through the <code>pull_service</code> OpenRC script
+</p>
+
+<div id="float-hell">
+	<section id="downloads">
+		<h2 style="text-decoration: underline;">downloads</h2>
+		<h3>logs</h3>
+		<ul>
+			<li><a href="files/did">did</a></li>
+			<li><a href="files/persistent">persistent</a></li>
+		</ul>
+		<h3>scripts</h3>
+		<ul>
+			<li><a href="files/memoryleak.sh">memoryleak.sh</a></li>
+			<li><a href="files/memoryleak.service">memoryleak.service</a></li>
+			<li><a href="files/pull">pull</a></li>
+			<li><a href="files/pull_service">pull_service</a></li>
+		</ul>
+		<h3>images</h3>
+		<ul>
+			<li><a href="images/ddr2_closest.png">ddr2_closest.png</a></li>
+			<li><a href="images/ddr2.png">ddr2.png</a> (32MB)</li>
+		</ul>
+	</section>
+
+	<p>
+		<code>pull</code> would get a list of every file on the system and pick one at
+		random to delete. It'd then post that message to amble.quest through a relay I
+		made <i>(but was realistically not needed)</i> and actually delete that file. Then
+		it would turn itself off.
+	</p>
+
+	<p>
+		memoryleak was started from an Arch Linux host with a systemd service, <code>memoryleak.service</code> that
+		launched qemu <i>(through <code>memoryleak.sh</code>)</i>
+	</p>
+
+	<p>
+		It was really nice watching it run! The 7 hour spacing worked a treat. It was often
+		enough that I wasn't annoyed at it's slowness and it wasn't a factor of 24 which had
+		it drifting around the day.
+	</p>
+	<p>
+		Every file on the system had an even shot at getting deleted, even the ephemeral ones! The
+		rare occasion it hit a persist file was very exciting. In the end it was the <code>musl</code>
+		at the heart of it that finally gave up.
+	</p>
+	<p>
+		A total of 625 files were deleted. 354 of them were from /sys, 240 were from /proc, and
+		31 were persistent files. I've filtered the logs <i>(from the <code>did</code> file)</i>
+		and picked out the persistent paths. They're in <code>persistent</code> as well as
+		in the little box below.
+	</p>
+	<pre style="width: 100%; max-height: 10rem; overflow: scroll; font-size: 0.75rem">
+ 23: /lib/modules/5.15.94-0-virt/kernel/net/netfilter/xt_connlabel.ko.gz
+ 25: /lib/modules/5.15.94-0-virt/kernel/net/netfilter/ipset/ip_set_bitmap_ip.ko.gz
+ 30: /usr/share/ca-certificates/mozilla/emSign_Root_CA_-_C1.crt
+ 46: /lib/modules/5.15.94-0-virt/kernel/drivers/net/mdio/fwnode_mdio.ko.gz
+ 56: /lib/modules/5.15.94-0-virt/kernel/drivers/video/fbdev/core/fb.ko.gz
+ 63: /lib/dasd-functions.sh
+116: /usr/share/syslinux/cpuid.c32
+137: /usr/share/syslinux/lpxelinux.0
+139: /usr/share/ca-certificates/mozilla/TWCA_Root_Certification_Authority.crt
+161: /lib/apk/db/installed
+198: /usr/share/syslinux/isolinux.bin
+208: /lib/modules/5.15.94-0-virt/kernel/crypto/cryptd.ko.gz
+237: /lib/modules/5.15.94-0-virt/kernel/net/netfilter/ipvs/ip_vs_lblcr.ko.gz
+276: /lib/modules/5.15.94-0-virt/kernel/net/netfilter/nft_quota.ko.gz
+298: /lib/modules/5.15.94-0-virt/kernel/fs/ksmbd/ksmbd.ko.gz
+299: /lib/modules/5.15.94-0-virt/kernel/net/netfilter/xt_physdev.ko.gz
+310: /usr/share/syslinux/syslinux.com
+313: /lib/rc/bin/checkpath
+327: /etc/secfixes.d/alpine
+401: /lib/modules/5.15.94-0-virt/kernel/fs/nls/nls_cp869.ko.gz
+411: /etc/mkinitfs/features.d/ocfs2.modules
+443: /lib/modules/5.15.94-0-virt/kernel/net/netfilter/nf_conncount.ko.gz
+452: /usr/share/ca-certificates/mozilla/TrustCor_ECA-1.crt
+491: /sbin/rc-service
+541: /lib/modules/5.15.94-0-virt/kernel/net/vmw_vsock/vmw_vsock_virtio_transport.ko.gz
+561: /lib/modules/5.15.94-0-virt/kernel/net/netfilter/xt_osf.ko.gz
+580: /lib/rc/bin/service_starting
+589: /lib/modules/5.15.94-0-virt/kernel/net/netfilter/xt_policy.ko.gz
+599: /usr/share/ca-certificates/mozilla/DigiCert_Trusted_Root_G4.crt
+616: /lib/modules/5.15.94-0-virt/kernel/crypto/algif_hash.ko.gz
+625: /lib/ld-musl-x86_64.so.1
+	</pre>
+</div>
\ No newline at end of file