Cover photo
Reini Urban
Lives in Dresden
708 followers|319,640 views


Reini Urban

Shared publicly  - 
Adventures with systemd

I have just had my first real production interaction with systemd. I should warn partisans in advance that the conclusion is not clearly pro- or anti-systemd, the upshot is, there's a surprise interaction, and the means to manage it. Also the Debian community is awesome.

My issue was, for several systems, mostly VMs and cluster nodes in a test cluster that I'm setting up, the default config on Debian Jessie upgraded from Wheezy, SSH sessions do not cleanly exit when the system reboots. This is bad because my cluster-management tools, which push commands out to all the systems via ssh, will fail to exit or generate error codes which are false positives in this circumstance. Rebooting is rare, but important.

There's a Debian bug thread about this, linked below, and there are two solutions, both of which work, and I have used each in different circumstances.
The first solution is to enable "UsePAM" in your sshd config. Apparently, with UsePAM turned on and libpam-systemd installed, SSH sessions get registered in some global set of connections, and can be found and cleaned up at shut-down time. To my mind, this is a pretty strange interaction, and represents the kind new, poorly-managed global state that we were all freaking out about when we first learned about systemd. I have implemented this solution on the head node of the cluster in question, and it works.
For the client nodes of the cluster, I didn't really like this solution, it has the bad side effect of making all SSH connections display the message of the day and other status info (last log-in, etc.) that comes from working the PAM mechanism. Because client nodes do daemon-driven MPI connections, it's important that these connections be clean, there should be no status messages or other system traffic, once the SSH handshake is finished, it should go straight to the MPI traffic, otherwise MPI can get confused and behave poorly. One can in principle edit the PAM config to eliminate the superfluous messages, but you might still want them for console log-ins, and even so, you can still do it, just have the pam-ssh files not use any of the common-auth or common-session stuff, but then there's a lot of near-redundancy, it feels like the wrong scope.

Fortunately, there's the second solution -- if you disable "ssh.service" and enable "ssh.socket", you get clean session termination without requiring PAM in the sshd_config. This is what I have done on the client nodes of my cluster.

So, as I say, my first real operational issue connected with systemd, and so far so good.
Package: openssh-server Version: 1:6.6p1-5 Severity: normal Hi. Since openssh-server comes with systemd support, whenever a host is shut down or restarted, ssh connections to that host just hang and are no longer cleanly terminated (one also doesn't see the shutdown message anymore).
9 comments on original post
Add a comment...

Reini Urban

Shared publicly  - 
Argh, today I had to write a op_clone tree copier from scratch for my inliner. Copying graphs is not trivial, with pointers pointing inside and outside. In #perl5 we only had functions to clone data, but not code. op_clone keeps the data, but the inlined function needs to change some ops. esp. nextstate and args: by ref and if by value with a copy of the data.
My old attempt was fast, but destructively modified each inlined function in the definition.
More memory (max 10 copied ops per inlined cv), but more speed. No costly arg handling, no costly call and leave handling. Using the stack naturally and not as hackish and expensive as currently. Supporting fast call-by-ref, constants and literals and call-by-value, everything compile-time.
Now the loop-unroller will also be trivial.

BTW: nextstate is horror. It ends a statement, every ';',
and it resets the SP, the stack pointer, for each new line. A normal compiler would keep track of the stack context and would not pollute the stack with unconsumed data. lhs expr should not push their results to the stack, unless it's the end of a function.
For my inliner I added 2 new state ops, to keep the SP inside inlined functions, setstate and keepstate. Horrible, but so far an easier hack than rewriting the compiler to honor the lhs context properly.
Add a comment...

Reini Urban

Shared publicly  - 
darwin quirks with gethostbyname()
There is more than one way to make perl5 twice as fast, but this is what I did today. I fixed it on one machine. My Macbook Air gives constantly better results in my hash function benchmarks than my big Linux Desktop PC, because it has a newer i7 Haswell, and the linux has only an older i5 CPU.
Rocky Bernstein's profile photo
There's an old saying: "It only hurts when I laugh." Here I think it only hurts when I'm not laughing.
Add a comment...

Reini Urban

Shared publicly  - 
So the instruction cache beats CPU and throughput on Haswell.
The fastest hash function for perl overall is schmorp's fnv1a (unoptimized), while the longer, better ones are in fact slower:

| Hash Function | collisions|  time[sec] | Quality | cyc/hash |
| FNV1A        | 0.862     |   535 sec  |   BAD   |  33.19  |
| OOAT_OLD      | 0.861     |   537 sec  |   BAD   |  50.83  |
| CRC32        | 0.841     |   538 sec  | INSECURE|  31.27  |
| SUPERFAST     | 0.848     |   537 sec  |   BAD   |  27.75  |
| SDBM        | 0.874     |   541 sec  |   BAD   |  29.23  |
| SPOOKY32      | 0.813     |   546 sec  |  GOOD   |  38.45  |
| MURMUR64A     | 0.855     |   546 sec  |   BAD   |  28.80  |
| MURMUR64B     | 0.857     |   546 sec  |   BAD   |  27.48  |
| OOAT_HARD     | 0.842     |   547 sec  |   BAD   |  61.03  |
| MURMUR3       | 0.883     |   547 sec  |  GOOD   |  29.54  |
| DJB2          | 0.898     |   547 sec  |   BAD   |  33.78  |
| METRO64       | 0.892     |   550 sec  |  GOOD   |  26.78  |
| OOAT          | 0.860     |   551 sec  |   BAD   |  ??     |
| SIPHASH       | 0.853     |   551 sec  |  GOOD   |  114.48 |
| METRO64CRC    | 0.872     |   559 sec  |  GOOD   |  23.27  |

Compare that to

Also updated the perl testsuite results here, with collision statistics:
Add a comment...

Reini Urban

commented on a video on YouTube.
Shared publicly  - 
Awesome costumes!

Reini Urban

commented on a video on YouTube.
Shared publicly  - 
Probably the best NBA game this season so far.
Have him in circles
708 people
Scott O'Neil's profile photo
klaus jahnel's profile photo
Moritz Salchenegger's profile photo
aero aero's profile photo
George Böhnisch's profile photo
Vihara Hajipour's profile photo
Konstantin Serebryany's profile photo's profile photo
Matt Dees's profile photo

Reini Urban

Shared publicly  - 
Just wanted to share something cool. The music service I'm working with to port their Node to Dart, are LOVING Dart so much.

At first they thought it was going to take them a long time to port their code because it is a new language for them, but it's been a few weeks and most of it ported.

They loved it so much, that we're now working on porting their front-end music player from JS to Dart.

Thanks Dart Team! You guys are doing an amazing job.

Once the product is ready to launch, i'll share it here!
4 comments on original post
Add a comment...

Reini Urban

Shared publicly  - 
I ordered now a 2nd SteelSeries 6Gv2 mechanical keyboard, US-english, IMHO the only good keyboard for programmers. The price went down from >100 to 80. They still market it as gamers keyboard. Do only gamers buy good keyboards?
The Logitech G710+ has also some good mechanics, and even some programmable (Emacs or Unicode) keys, but a bad linux driver.
The only other option is the Razer BlackWidow Ultimate, which is IMHO not suitable for programmers. 
I tried now about 20 mechanical keyboards. In Germany they don't have US-English keyboards for programmers at all, so you have to try the mechanics on a German layout, and then order the US variant.
Reini Urban's profile photoNorbert Thek's profile photo
I use the MX Brown...
pro:  best keys for typing :)
con:  quite loud :-(   (The Logitech Mecha have extra dampener rings to reduce noise)
Add a comment...

Reini Urban

Shared publicly  - 
I used TLA+ in my distributed system class in Fall 2014. (To learn the backstory on this, read my pre-semester TLA+ post.) In short, I loved the experience and I am hooked. Integrating TLA+ to the class gave students a way to...
Add a comment...

Reini Urban

Shared publicly  - 
A little refresh for our big data friends. Local map reduce on your local super cluster, i.e. the desktop PC. 235x faster than your remote Hadoop cluster.
Introduction. As I was browsing the web and catching up on some sites I visit periodically, I found a cool article from Tom Hayden about using Amazon Elastic Map Reduce (EMR) and mrjob in order to compute some statistics on win/loss ratios for chess games he downloaded from the millionbase ...
Add a comment...

Reini Urban

Shared publicly  - 
I successfully finished fuzzing my projects. I got 4 cpu cores, so I fuzzed 4 at a time, around 15hrs each.

perl5 was very good. It was also by far the fastest. 1500/sec. No errors with .pl or .pm, but I haven't yet fuzzed it's binary or external formats, like Cpanel::JSON::XS (.json), YAML (.yaml), Storable or B::Bytecode (.plc, .pmc).

parrot was pretty good but slow. 100/sec. I only had to fix 2 major crashes. One simple one in the parser, and one in the compiler to forbid the `end` op within user-defined methods. See
.pir is now safe, .pbc was safe already.

potion/p2 was really bad, and still is. 340/sec. The parser was fine, but I had to harden the compiler a lot. But fundamentally the parser is still gc-unsafe, so you can simply break it by using long strings or symbolnames which cause GCs. That's also why you cannot use eval in BEGIN blocks yet, as they might cause a GC.

A simple afl - the american fuzz lop - usage doc is now here:
Paul Bennett's profile photo
Add a comment...
Have him in circles
708 people
Scott O'Neil's profile photo
klaus jahnel's profile photo
Moritz Salchenegger's profile photo
aero aero's profile photo
George Böhnisch's profile photo
Vihara Hajipour's profile photo
Konstantin Serebryany's profile photo's profile photo
Matt Dees's profile photo
Collections Reini is following
Map of the places this user has livedMap of the places this user has livedMap of the places this user has lived
Houston, TX, USA - Graz, Austria
There are two Reini Urban's from the Technical University in Graz. The other one is Bani. I'm the Ex-Architect, Ex-AutoCAD, xarch, x-ray, Ex-Helsinki, Ex-Inode, movie critic and prominent surfer from Graz, Austria. 
Formerly mostly Lisp, nowadays mostly Perl as I'm only dealing with really simple problems.
Senior Software Developer
Software, Movies, Architecture, Engineering, Automotive, ...
Basic Information
Apps with Google+ Sign-in
  • Word Search
Reini Urban's +1's are the things they like, agree with, or want to recommend.
myTuner Radio Pro

*** Live Rundfunk Sendung *** Über 1000 Deutsche und weitere 30,000 Rundfunkstationen in 120 Ländern stehen Dir in unserer application zur V

Metasploit: Major Android Bug is a Privacy Disa... | SecurityStreet

On the night of September 7, 2014, Joe Vennix of Rapid7's Metasploit Products team wrote, "I did not believe this at first, but after some t

Honey (Miele)

Irene helps terminally ill people to die with dignity by giving them a drug. One day, while working with a new client, she supplies the fata

If You Build It

"If You Build It" is a year in the life of one of America's most innovative classrooms where students design & build to transform their home

Movie Showtimes - Google Search

+You · Search · Images · Maps · Play · YouTube · News · Gmail · Drive · Calendar · More · Translate · Mobile · Books · Offers · Wallet · Sho

Jai Ho

Jai fights a one-man war against corruption and injustice.

Sundance Film Festival 2014

Download the Official App of the 2014 Sundance Film Festival! Each January, the Sundance Film Festival attracts the most innovative storytel

Multiple Hard Drive Faliure

We've lost several of the drives from the machine that hosts PAUSE. It's offline while we work to replace the drives and convince it to come

Google Politik & Wahlen

Google Politik & Wahlen. Verfolgen Sie auf dieser Plattform digitale Wahlkampftouren, sehen Sie sich Videos an, diskutieren Sie mit und nehm

Goalkeeper scores from own penalty area in Austria – video

USK Piesendorf goalkeeper Leo Hannes turns defence into outlandish attack against Berndorf when he catches an inswinging free-kick in his ow


Did the daughter of Jesus really flee to a small town on the coast of France?

YAPC::Asia Tokyo 2013 特別座談会 「Rubyの良いところ語ってください 〜そんなPerlで大丈夫か?〜」 - YAPC::...

ていただきます。 Perlが大好きな人はこのセッションからRubyから盗むべき事を感じ取ってもらい、Rubyが大好きな人にはPerlに触れるよい機会としていただければ幸いです。

Types and Perl Language - YAPC::Asia Tokyo 2013

0130716/1373983712 We say that Perl is a dynamically typed language. But what does the type mean? In this talk, in order to write a safer co

The Lone Ranger

A thrilling adventure infused with action and humor, in which the famed masked hero is brought to life through new eyes. Native American spi


[Sorry for the delayed post. I wanted to release this right after the YAPC::NA but just a few days after I got back to my country we got kin

U.S. Seemingly Unaware of Irony in Accusing Snowden of Spying

At a press conference to discuss the accusations, an N.S.A. spokesman surprised observers by announcing the spying charges against Mr. Snowd

The Kings of Summer

Joe, Patrick and the eccentric and unpredictable Biaggio - who, in the ultimate act of independence, decide to spend their summer building a

The East

A former FBI agent, Sarah Moss, is starting a new career at Hiller Brood, an elite private intelligence firm that ruthlessly protects the in

p2 - YAPC::Asia Tokyo 2013

her languages. Incompatibilities: XS, functional programming support, order of destruction, lexical hash iterators. New features: All data a


The beautiful way to organize code snippets.

Excellent Pho, egg rolls and everything
Public - 2 months ago
reviewed 2 months ago
Public - 3 months ago
reviewed 3 months ago
Public - 6 months ago
reviewed 6 months ago
I stayed at the Austin Homestead two times so far, and plan to stay there as often as possible, as it's the best budget hotel with weekly discount rates next to downtown. Beds are hard which is perfect for me as european. It's not an indian hotel as the other budget hotels t I-35, it's clean, and has big rooms.
Quality: Very GoodFacilities: Very GoodService: Very Good
Public - 3 years ago
reviewed 3 years ago
6 reviews
I didn't understand anything on the menu, buy the waiter brought me the best steak in my life. Better than Texas. For 8 Euro.
Public - 4 months ago
reviewed 4 months ago