Spark jobs were failing. All of them. The data pipeline had stopped. This is a tale of high-pressure debugging.
[Read More]Accessing home computer from anywhere
Do you sometimes want to access your home computer from an outside network? Maybe you use another system, but you do not trust it and would prefer your home computer for some workflows?
This post outlines the steps to make such access possible.
[Read More]The program that would not go away
This post is about a program hang. The hang was in the Python process that was running Ansible scripts. The problem was hard to debug and had me go back to Unix textbook.
[Read More]Correct way to create a directory in Python
Can you see the problem with this code? It comes from Ansible, v2.1.1.0.
if not os.path.exists(value):
os.makedirs(value, 0o700)
It’s quite straightforward. It checks if a directory path exists. If
it does not, then it creates the directory path, similar to mkdir -p. What could be wrong?
Getting rid of unused virtual disks on XenServer
A continuous test server I’d set up had stopped working. The XenServer on which it was running had a 1TB disk: and it was full. What’s going on?
[Read More]Log rotation, no code change needed
This post shows you how to rotate old logs from your application. There is no change to application code. There is no specialized logging library or framework needed. It works for any language, on standard Unix platform.
[Read More]Resetting a TCP connection and SO_LINGER
Can you quickly close a TCP connection in your program by sending a reset (“RST”) packet?
[Read More]Program crashes, only in 64-bit mode
This is a story of a program that worked, until it broke on a 64-bit platform.
[Read More]ps | grep is broken on FreeBSD
It is true. Even on the latest FreeBSD 11.0 (I checked the source tree).
[Read More]Debugging emacs slowness
I use Emacs (emerge) while merging files. Today, when trying to merge some Python code, I found that it was taking exceedingly long time. It was blank for 5 minutes and counting.
[Read More]