Follow

I am so fucking god damned tired of constantly being someone's fucking ALPHA tester thanks in large part to the fragility of dynamic linking.

The database backfill program I was working on apparently **CAN ONLY** run on my personal laptop, because, you know, installing it on a cloud server just totally **HAS** to break that one tiiiiiiiiiiiiny little dependency that the entire house of fucking cards has to depend on.

👏FUCK👏DYNAMIC👏LINKING👏TO👏HELL.👏

@vertigo preach it

if it's too big to link statically, it should be a server

@thamesynne Even if not a server, at least a dynamically LOADED (but statically LINKED) program. Vis-a-vis, how libraries are implemented on AmigaOS and Tripos. Basically, threadless "servers" that expose a jump table (with statically understood offsets for various functions) for entry points.

@vertigo I've read an academic paper once arguing that if the kernel deduplicated memory (not hard), there'd be benefit to using dynamic linking.

@alcinnz

I've not heard this argument before, and am skeptical. Aren't DLLs an attempt to dedupe memory?

Most of the detriments to dynamic linking seems to come from symbol management. In the event that I exploded over, the problem was specifically due to "versioned symbols."

@alcinnz
To be clear, I'm not arguing against the use of reusable modules. I get upset only because the way they're implemented in the ELF executable format is dangerously brittle, needlessly complex, and very verbose. AmigaOS makes extensive use of shared libraries that are nonetheless statically linked, and never had any linkage errors or difficulties with them.

@vertigo It was quite a recent paper if I recall right, which shows some promising numbers.

If those numbers still hold in real world systems it indicates we've solved this deduplication problem in the wrong place, thereby making things less reliable than they could be.

Also in this case we'd be addressing by value rather than some name the kernel wouldn't even know about. Versioning problems solved.

@alcinnz I'd be interested in reading this paper, if you happen to have a link handy. Otherwise, I'll keep an eye out for any articles that touch on deduplicating memory and dynamic linking.

@vertigo Not handy, but ask @jamey .

I think he was the one to point me to it, but if not this one he can definitely find some interesting paper for you.

@alcinnz @vertigo This sounds vaguely familiar but I don't recall reading a paper on it personally. You have me curious though. 😁

@alcinnz @vertigo Apparently a major application of memory page deduplication today is higher-density cloud hosting of virtual machines: Two of the first papers I found are os.itec.kit.edu/downloads/publ on doing it more efficiently, and svs.informatik.uni-hamburg.de/ on learning things you aren't supposed to know about neighboring VMs by noticing which pages get deduplicated.

Which makes me wonder: @yomimono, have you seen a paper on using page deduplication with static linking as an alternative to dynamic linking?

Sign in to participate in the conversation
Mastodon

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!