Categories
Austria Life

East / West and counter-intuitive train stations

I was booking train tickets from Vienna to Budapest this week and noticed the following absurdity:

My train from Vienna to Budapest leaves at Wien Westbahnhof and arrives at Budapest Keleti pályaudvar. In other words, I’m leaving from the western train terminal in Vienna and will arrive at the eastern train station in Budapest.

So far, so good.

It’s just that Budapest is straight to the east of Vienna.

(Yes, there are good reasons for that, for the Vienna side it’s that the train is coming from Zurich. In Budapest Keleti seems to be the default station for international trains.)

Categories
Pet Peeves

Numerology and Haider’s death

I spent this weekend in Carinthia and got treated to the local press. The KTZ had on their front-page a story about a numerologist who had calculated that Haider was in great danger during October and November. She had tried to warn him, but they didn’t manage a meeting before his date with a concrete fence post.

As usual, the story did not ask the only really relevant question: How many other calamities had she predicted in her career that did not came to pass?

Categories
Life

Dusting off old files

Today I was trying to free up the IDE disk of my old PC to be used inside an USB enclosure as external disk for our laptops. This is pure archeology: backups of prehistoric home-directories are contained in disk-images of slightly less ancient hardware. Some of the files are there in duplicates, as I made backup copies long time ago.

One of the more interesting things I stumbled upon were the files containing my master thesis in Mathematics. That document was written in LaTeX and handed in in 1996. I haven’t touched TeX for a long time now and had no idea whether my files from back then would still work on a current Linux box.

So I installed the Ubuntu LaTeX packages on my laptop to a) test the TeX processing and to check how good the current LaTeX to HTML conversion tools work.

Everything worked surprisingly smooth except for a non-standard package I used to format and include C source code: tgrind.

It seems like the current version is no longer compatible to what I used back then, at least it doesn’t define the \tagrind macro. Luckily I had the full disk image of my old box, thus I could copy in the missing style and macro files.

Adding them to my TeX distribution made everything work. The speed on current hardware is not bad, too: a complete TeX run takes only a third of a second on my laptop. Well, the 486DX2-66 I used back then was a magnitude or two slower.

So here are the results:

Categories
IETF

draft-lendl-speermint-background-02

This time I manged to publish a new version of my speermint thesis-like I-D in time. Phew. Spending time in trains is sometimes the best way for me to focus on a single subject. That used to be easier; now with 3G on the phone I can connect to the Internet while riding trains which provides ample fodder for distractions. Anyway, …

This update isn’t so much an update on the existing text, but instead adds a few new sections. Whereas the old text just analyzes the problem-space and lays out some generic principles, the additional text now provides a vision on what the solution could look like. As a bonus, I also discuss a few design mistakes I saw in various other documents.

Feedback is welcome.

[Update: My slides for the IETF session are here. Thanks to Alex for standing in for me. This pdf contains the comments I added to help Alex. ]

Categories
System Administration

Getting kmail on Ubuntu to open links in firefox

This is one of the simple things which required more searching than I expected. I note the solution here in the hope that it is helpful to the next person searching for an answer.

The problem:

We’re running plain Ubuntu installations (gnome) with Kmail (for Kolab). Clicking on links in emails opens a shell window with Lynx and not Firefox.

The fix:

Most of the search hits I found advised me to use kcontrol and go to “KDE Components -> Component Chooser”. Well, that option isn’t enabled in the Ubuntu version of the KDE packages. As I don’t run the KDE panel, the suggested solution doesn’t work either.

The solution is contained in these bug tracker messages:

sudo apt-get install kde-systemsettings
kcmshell defaultapplication

Sometimes I miss the times of simple configuration files.

Categories
Life

Statistics and the Wall Street crash

I stumbled on an article about Nassim Taleb’s book “The Black Swan” recently. Quick summary: It’s very easy to make mistakes when applying the mathematical theory of statistics to the real world. Not everything in the world can be described as independent random variables with clearly defined properties.

So whenever you put real money behind your statistical reasoning, you better be really sure that your calculations are correct and that all the preconditions regarding applicability of the theory are met.

Furthermore, the rare event you are tempted to ignore (the “this won’t happen in my lifetime” syndrome) may have such bad results that you just shouldn’t discount it.

All this reminded me a bit of what I wrote 12 years ago in my master thesis on Pseudorandom Number Generation:

Classic statistical tests examine if the test statistic does not deviate from its expected value too much. If we are only interested in the expected outcome of a similar simulation problem, such one-level statistical tests are all we need in order to be confident about the accuracy of the simulation.

On the other hand we might be interested in the distribution of the simulation’s outcome. For this goal hitting the expected value is not enough, the variance of the result is now important, too. Thus we will demand the same behaviour from the test statistic, too.

Let us illustrate this principle with an example. We want to test the well known strategy of doubling the ante in a game of roulette. It is supposed to guarantee winning the initial ante and works like this: If we do not win in the first round (and therefore win twice the ante) the ante is doubled for the next round. If this round is won, we get back four times the initial ante while we invested three times the initial ante resulting in a net win of one ante. In case of bad luck we double the ante again hoping for eight times the ante for an investment of seven. As we hope that we will finally win before our capital is drained a net win seems to be certain.

In order to simulate this we need random numbers to determine whether we will win the current bet. The probabilities are 18/37 for winning and 19/37 for losing each round, respectively. It seems to be natural to use the lengths of runs as a test statistic to test our source of PRN for its fitness to simulate a real roulette table. The probability that the maximal run length in 500 tries is greater than 15, is smaller than all usual values for α, so according to the corresponding statistical test we should reject all sequences where such runs do occur.

When we now run the simulation with these prescreened sequences we will never ever experience a loss as long as we have enough money for 15 steps of doubling the ante. Thus we should conclude that the strategy works. As we know, this is not true. So what went wrong with our simulation ?

The statistical test considered it equally important whether the sequence in question was “well-behaved” or not, whereas the simulation assigned completely different weights to those cases. Thus the area that the test considered to be insignificant (smaller than α) played a major role in the simulation (more than 1/2).

There are some other cases of simulations where we are not so much interested in the average case, but in the extreme ones. Consider for example all those safety measures in power plants or other machinery where a rare sequence of occurrences might lead to catastrophic results. When simulating these security systems one must not a priori exclude unusual sequences.

Please note that the distinction between level-1 and level-2 tests (tests which test the distribution of the results of a level-1 test) is arbitrary. The test statistic of a level-2 test is just another function of the underlying set of PRN, too.

Categories
System Administration

Debian Lenny: / on LVM2 on dm_crypt on raid

This is just Google-fodder:

If you use the lenny (beta2) installer to setup a system which uses / on LVM on dm_crypt on raid, then the first reboot fails with something like “cannot find LVM volumes”. After a few minutes you get dumped into a busybox shell.

Getting the system to boot

Run cryptsetup luksOpen /dev/md1 md1_crypt (or md0, depending on your setup). Exit busybox and the system should boot through. Then …

Fixing this for good

It seems to be that this Wiki page still applies. Thus you have to create a line in /etc/crypttab containing (in my case md1)

md1_crypt /dev/md1 none luks

and run update-initramfs -u to update the initrd.

That’s it.

Categories
Life

A rant

I’m using the AvantGo client on my nokia phone to read newspapers on the subway from/to work (and while waiting for Clemens to go to sleep). Yesterday, it stopped working. Today I debugged it and discovered that the nameservers of A1 (Mobilkom Austria) simply cannot resolve avantgo.com. The domain is fine, and IP connectivity towards them is also OK via the cell phone.

So I called up their hotline. So far, they can reproduce the problem. No solution, other than entering the IP address in the browser. If this isn’t just a bug, but a deliberate blocking, I’m going to raise hell. I’m in a bad mood.

[Update: they managed to fix this within a day. Good.]


And today’s Microsoft patchday seem to have broken switching from internal to external screen on my Thinkpad.

Great.

I’m downloading the latest Lenovo updates at speeds worthy of last century. Let’s see if that helps.

Categories
CERT System Administration

RT(IR) Command line ticket creation + Autoreply

This is one of the “simple” problems which always take longer to solve than expected.

The goal: Script RTIR to generate Investigations associated with an Incident.

In order to do that, I needed to solve the following who subproblems:

  1. Being able to use the “edit” feature in the command line “rt” client and capture the new ticket’s id
  2. Basically, I needed to capture the STDOUT of the “rt” command, and let also rt invoke vi. My solution:

    --- /usr/bin/rt 2007-10-31 11:52:20.000000000 +0100
    +++ /usr/local/bin/rt 2008-08-20 14:14:20.000000000 +0200
    @@ -1335,7 +1335,7 @@
    local $/ = undef;

    open(F, ">$file") || die "$file: $!\n"; print F $text; close(F);
    - system($editor, $file) && die "Couldn't run $editor.\n";
    + system("$editor $file < /dev/tty > /dev/tty") && die "Couldn't run $editor.\n";
    open(F, $file) || die "$file: $!\n"; $text = ; close(F);
    unlink($file);

  3. Add attachments during ticket creation
  4. The “Autoreply on Create” Scrip is supposed to mail out the newly created content to the Requestor, thus I needed to not only provide plaintext while the creation, but also all the attachments that need to be sent out to the Requestor.

    Adding text is simple, just use “Text: foo bar” to the Template. But attachments are simply not supported for “rt create” (and not that easy to add in the code). They are supported for “rt correspond”, so I can sidestep the “attachment on create” problem by simply splitting up the work into an empty “rt create” followed by a “rt correspond -a file”.

    There is just one gotcha: The Autoreply script will happily mail on ticket creation with an empty mail.

    Solution: Change the “Condition = On Create” for the Scrip to “Custom” with

    my $t = $self->TransactionObj;
    return 0 unless ($t->Type eq "Create");

    my $c = $t->ContentObj;
    return (defined($c)) ? 1 : 0;

Categories
CERT IETF

DNS: The sky is falling

In April I speculated about the impending doom of the DNS.

Now we know what was in the works, and yes, it’s not a pretty picture.

My idea from april doesn’t work 1:1, as the attacker doesn’t attack a single target, sondern arbitrary other hostnames in the same domain.

Anyway, I spent the last days analyzing data from .at nameserver regarding patch discipline in Austria. You can read the depressing results here.