How to debug a segmentation fault without a core dump

April 9, 2021

In the past, I had to deal with this kind of restriction on several occasions. A segmentation fault or, more generally, abnormal process termination had to be investigated with the caveat that a core dump was not available.

What's the difference between T, volatile T, and std::atomic<T>?

March 22, 2021

There seems to be a lot of confusion about the significance of using std::atomic<T> over a much more straightforward volatile T or T. In the context of concurrency, being aware of the difference between the three cases is one fundamental cornerstone in ensuring correctness.

Does the JVM eliminate allocations of temporary objects?

March 15, 2021

A Stack Overflow user was wondering if the JVM can eliminate the allocation of a temporary object by replacing it with an implicit static instance. Is the JVM “smart enough” to do so?

How to access glibc heap metadata

February 18, 2021

I had that exact requirement recently. I needed to restore the glibc heap from a core dump based on a new process. After restoring all original mappings, all it took was patching main_arena.

Does the JVM return memory to the OS?

January 24, 2021

Resource efficiency is a major concern when it comes to optimizing the performance and scalability of an application. In the Java world, one aspect that usually dominates resource concerns is memory usage - more specifically, the size of the Java heap.

How to compare core dumps for simple time travel debugging

January 6, 2021

How can the difference between two Linux core dumps be identified and why would this even come up? This is going to be lengthy, but will hopefully give you your answer to both of those questions.

Why does the JIT continually recompile the same method?

December 23, 2020

A Stack Overflow user noticed frequent recompilations, even after a substantial JVM uptime and couldn’t find an explanation based on the common knowledge on JIT compilers.

How to trace JVM filesystem accesses using Java

December 11, 2020

For tracing filesystem accesses of Java applications, native tracing facilities are always the first choice. On Windows, use Process Monitor to trace I/O. On Linux, use strace. Other platforms provide similar facilities.

What makes a sequential write sequential on an HDD/SSD?

November 25, 2020

Logically, a single write can be seen as both, random and sequential, because it always affects a specific number of consecutive bytes. In case of synchronous and direct I/O, where writes are not delayed based on caching, the actual execution order and timing of writes are critical.

Is the Java object constructor thread-safe?

October 8, 2020

Every once in a while, the thread-safely of Java object constructors comes up. More specifically, it’s not so much about the process of object construction but rather the visibility of writes triggered by that process in relation to other threads.

Why are sequential writes faster than random writes on an HDD/SSD?

September 13, 2020

The write performance of a disk is influenced by the physical properties of the storage device (e.g. the physical rotational speed in revolutions per minute in case of a mechanical disk), the disk I/O unit to I/O request size ratio and the OS/application.

Get in Touch