Daemons and the pragmatics of unexpected error values from system calls

When I wrote about the danger of being overly specific in the errno values you look for years ago, I used the exampleof a SMTP server daemon that died when it got an unexpected error from accept() . Recently, John Wiersba asked in a comment:

I'm not clear what you're suggesting here. Isn't logging the errorcode and aborting the right thing to do with unexpected errors? [...]

In practice, there are two situations in Unix programs, especiallyin daemons


Linux network-scripts being deprecated is a problem for my home PPPoE link

The other day, I ran ifdown on my home machine for the first timesince I upgraded it to Fedora 29 and got an unpleasant surprise:

WARN : [ifdown] You are using 'ifdown' script provided by'network-scripts', which are now deprecated.
WARN : [ifdown] 'network-scripts' will be removed from distribution innear future.
WARN : [ifdown] It is advised to switch to 'NetworkManager' instead -it provides 'ifup/ifdown' scripts as well.


accept(2)'s problem of trying to return two different sorts of errors

A long time ago, I wrote about the dangers of being overly specificin the errno values you looked for , withthe specific case being a daemon that exited because an accept() system call got an ECONNRESET that it didn't expect. Recently,John Wiersba left a comment on that entry asking what else theoriginal programmer should have done, given an unexpected errorfrom accept() . In thinking about the issues, I realized that partof the problem is that accept() is actually returning two different


Some things on ZFS's per-pool performance statistics

Somewhat to my surprise, I recently found out that ZFS has had basicper-pool activity and performance statistics for a while (they'reold enough that they're in our version of OmniOS, which is notexactly current these days). On sufficiently modern versions of ZFS(currently only the development version of ZFS on Linux ), you can even get a small subset of theseper-pool stats for each separate dataset, which may be useful fortracking activity. To be clear, these are not


Planning ahead in documentation worked out for us

Several years ago I wrote a kind of a war story about planningahead in documentation , which can besummarized in my tweet from then :

Current status: changing documentation to leave notes for myself thatwe'll need in three or four years. Yes, this is planning way ahead.

Specifically, I documented various test procedures and additionalrequirements for our internal self-serve DHCP portal and its overall system . We weren't going toneed this information before we updated the DHCP portal from 14.04


How I get a copy of the Ubuntu kernel source code (as of Ubuntu 18.04)

For unfortunate reasons beyond the scope of this entry, I've recentlyneeded to once again take a look at the Ubuntu kernel source code,as they're patched and modified and so on from the upstream versions.There are some things where I'll just look at the official kernelsource , butfor certain sorts of issues, nothing short of the real kernel we'reusing (or something close to it) will do. Every time I do this Ihave to re-discover or re-


You shouldn't allow Firefox to recommend things to you any more

The sad Firefox news of the time interval is Mozilla: Ad onFirefox’s new tab page was just another experiment ,and also on Reddit .The important quote from the article is:

Some Firefox users yesterday started seeing an ad in the desktopversion of the browser. It offers users a $20 Amazon gift card inreturn for booking your next hotel stay via Booking.com. We reachedout to Mozilla, which confirmed the ad was a Firefox experiment andthat no user data was being shared with its


Our Linux ZFS fileservers work much like to our OmniOS ones

I wrote recently about our new generation of Linux-based ZFSfileservers . One of the things that I coveredonly in passing is how surprisingly similar they are to our currentOmniOS fileservers . Although we'vechanged from OmniOS to Linux, which is a significant shift at onelevel, a great deal of the administration and how we work with themhas basically not changed at all. From the perspective of using andoperating our ZFS fileservers, very little has fundamentally changedand most of our practices and procedures are just as


Thinking about DWiki's Python 3 Unicode issues

DWiki (the code behind this blog ) is currently Python 2,and it has to move to Python 3 someday ,even if I'm in no hurry to make that move. The end of 2018, withonly a year of official Python 2 support remaining, seems like agood time to take stock of what I expect to be the biggest aspectof that move, which is character set and Unicode issues (this isalso the big issue I ignored when I got DWiki tentatively runningunder Python


Our third generation ZFS fileservers and their setup

Our third generation of ZFS-based NFS fileservers is now in production(although we've only started to migrate filesystems to them from our current OmniOS fileservers ),so it's a good time to write up all of their elements in one place.At one level our third generation is much like our first and second generation , with basically the same ZFSsetup, but at another level they're very different. Put simply, thefirst two generations used Solaris and then OmniOS with an iSCSISAN, while