Debugging Docker builds

One of the projects I'm working on has a CI/CD pipeline that builds Docker images. The Dockerfile runs yarn install, then yarn build. The latter runs the TypeScript compiler tsc. Everything was working fine, but one day the build failed with the following error:

tsc: command not found

But TypeScript is still part of package.json. Nobody touched package.json or yarn.lock recently. Nobody could reproduce the problem locally with Docker: it only happened in the CI/CD pipeline. What is going on? We needed to debug the Docker build on the CI/CD server.

Read more »

Software development is like surgery

Estimating how long it takes to build software – or even how much effort a sprint is – is pretty hard. Estimates often turn out to be too optimistic, and mispredictions can be pretty hard to explain to management. I know why this is so – Michael Wolfe on Quora has a great analogy (there is even an interesting discussion on Reddit), which I agree with. But I'm wondering whether there's an easier analogy.

Read more »

EuRuKo 2019 was lots of fun

EuRuKo 2019 – the largest Ruby conference in Europe, took place on the 21st and 22nd of June. I gave a talk on the 21st about what causes Ruby memory bloat (where I also reported new findings since I first blogged about the issue), as well as about Fullstaq Ruby. Fullstaq Ruby is a server-optimized Ruby distribution that's faster, uses less memory, and is easier to security-patch thanks to being distributed via RPMs and DEBs.

Read more »

What causes Ruby memory bloat?

Ruby apps can use a lot of memory. But why? Various people in the community attribute it to memory fragmentation, and provide two “hacky” solutions. Dissatisfied by the current explanations and provided solutions, I set out on a journey to discover the deeper truth and to find better solutions.

Read more »

Full-system dynamic tracing on Linux using eBPF and bpftrace

Linux has two well-known tracing tools:

  • strace allows you to see what system calls are being made.
  • ltrace allows you to see what dynamic library calls are being made.

Though useful, these tools are limited. What if you want to trace what happens inside a system call or library call? What if you want to do more than just logging calls, e.g. you want to compile statistics on certain behavior? What if you want to trace multiple processes and correlate data from multiple sources?

In 2019, there's finally a decent answer to that on Linux: bpftrace, based on eBPF technology. Bpftrace allows you to write small programs that execute whenever an event occurs.

This article shows you how to setup bpftrace and teaches you its basic usage. I'll also give an overview of how the tracing ecosystem looks like (e.g. "what's eBPF?") and how it came to be what it is today.

Read more »

Self-awareness vs confidence

Some people I know tend to have an air of confidence around them. They wield their Steve Jobs reality distortion field, commanding attention and persuading people. They almost always act like they are certain of everything.

My natural inclination appears to be the opposite: I tend to be careful until I have done a careful analysis. I only act confident when I am sure, which can take a while. I think a lot about whether I am doing the right thing.

Experience has given me reason to believe that I am more self-aware than many other people. Yet I have also learned that this self-awareness comes at a price. Thus, I have been wondering why I am like this, and what I should learn from self-certain people.

Read more »
Page 1 of 4