strace and it’s cousin ltrace are well known and invaluable diagnostic and debugging tools for Linux. Here are articles explaining how they work: How does strace work?, How does ltrace work?. But what about Windows?| jarekprzygodzki.dev
In 2004 Java 5 was released introducing a load of new features: generics, autoboxing, annotations, and… java.util.concurrent. You could use the exciting new java.util.concurrent.Future class to represent the result of an asynchronous computation, but it did not have any methods to combine these computations withoung blocking to get a result.| jarekprzygodzki.dev
Monitoring process creation and termination events is a useful skill to have in you toolbox. This article consists of two parts. The first introduces exiting tools for diffrent platforms. The second explains how these tools work internally.| jarekprzygodzki.dev
Keeping Docker images as small as possible has a lot of practical benefits. But even when following best practices| jarekprzygodzki.dev
Generating JVM memory dumps from JRE on Linux/Windows/OSX| jarekprzygodzki.dev
Annoyingly often internal Docker registries are secured with certificates signed by company’s own PKI or enterprise IT does a MitM to replace all HTTPS certs.| jarekprzygodzki.dev
It’s not obvious, but it’s possible to publish an additional port from a running Docker container.| jarekprzygodzki.dev
Ten wpis to krótki tutorial jak przechwycić ruch sieciowych z wybranych kontenerów Dockera, np. usług uruchomionych w ramach klastra Docker Swarm.| jarekprzygodzki.dev
Thanks to JAVA_TOOL_OPTIONS variable it’s easy to run any JVM-based Docker image in debug mode. All we have to do is add environment variable definition JAVA_TOOL_OPTIONS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 in docker run or docker-compose.yml and expose port to connect debugger.| jarekprzygodzki.dev
For a long time all my JVM-based Docker images were configured to exit on OOM error with -XX:OnOutOfMemoryError=”kill -9 %p” (%p is the current JVM process PID placeholder). It works well with XX:+HeapDumpOnOutOfMemoryError, because JVM will dump heap first, and then execute OnOutOfMemoryError command (see the relevant code in vm/utilities/debug.cpp). But with version 8u92 there’s now a JVM option in the JDK to make the JVM exit when an OutOfMemoryError occurs:| jarekprzygodzki.dev
Install Babun| jarekprzygodzki.dev
Docker nowadays (since 1.10, the original pull request is here docker/docker/#17989) adds some security to running containers by wrapping them in both AppArmor (or presumably SELinux on RedHat systems) and seccomp eBPF based syscall filters (here’s a nice article about it). And ptrace is disabled in the default seccomp profile.| jarekprzygodzki.dev
/**| jarekprzygodzki.dev
Z związku z moim zainteresowaniem Scalą i Akką naturalnym jest zajęcie się ostatnim elementem stosu reaktywnych technologii dla JVM od Typesafe – frameworkiem Play. Niniejszy wpis stanowi, mam nadzieję, pierwszy z serii wpisów opisujących moją przygodę z tym frameworkiem.| jarekprzygodzki.dev
In Scala there’s no literal for partial function types. You have to give the exact signature of the PartialFunction| jarekprzygodzki.dev
The successfully downloaded Vagrant boxes are located at ~/.vagrant.d/boxes on Mac/Linux System and %USERPROFILE%/.vagrant.d/boxes on Windows. This can be changed by setting an environment variable named VAGRANT_HOME to specify the location of .vagrant.d, as in VAGRANT_HOME=F:\.vagrant.d| jarekprzygodzki.dev
Today I was hoping to use BTrace to track a rather anoying bug in web application running inside WildFly application server. I’ve used BTrace some times in the past and my experience was nothing but positive. Until today, that is.| jarekprzygodzki.dev
During the last few months I’ve spent substantial amount of free time learning Scala and consider it time well spent. This article is first part describing my favorite features of Scala| jarekprzygodzki.dev
Każdy, kto miał do czynienia z aplikacjami Javy których rozmiar sterty liczy się w gigabajtach wie, że jedną z rzeczy których należy unikać jak ognia jest tzw. odśmiecanie pełne (Full GC). W większości przypadków można to osiągnąć przez rozważny wybór algorytmu GC i staranne dobranie jego parametrów. Nie rozwiązuje to jednak przypadku, gdy cykl pełnego odśmiecania wyzwalany jest przez jawne wywołanie System.gc() co manifestuje się wpisami w logach procesu odśmiecani...| jarekprzygodzki.dev
Nie wszyscy o tym wiedzą, ale Eclipse dostarcza i używa własnego kompilatora Javy – ECJ – zamiast standardowego javac. Kompilator umieszczony jest w plug-inie JDT Core i dostępny zarówno jako cześć Eclipse IDE for Java Developers jak i jako samodzielna aplikacja do wykorzystania zarówno z linii poleceń jak i programistycznego. Dlaczego ECJ jest tak interesujący? Jak pisze Wayner| jarekprzygodzki.dev
Investigating slow Docker image builds| jarekprzygodzki.dev