Misc live v. 4

The results of the 4th run of the misc competition are [http://mancoosi.org/misc-live/20110225/results/ online !] .

The annoncement sent on the mailing list:

This time, it was quite close, and execution times had to be taken into account several times to break ties. However, looking at the different total times for each solver it looks closer than it actually was. The reason for this is the way the “total success time” is defined (see http://www.mancoosi.org/misc-live/20110225/rules/, section “Breaking Ties”). Since we had many cases without a solution, our definition resulted in the same large constant added to the time of each participant. We’ll have to think about changing this for the next time.

We still have to decide if we’re going to have another edition of misc live before the official annual competition (TBA).

enjoy !


On equivalent debian versions

Date Tags debian

For one of our experiments, we ended up analyzing all versions mentioned in a Debian Packages file if mentioned in a constraint or in a version field of a package. It seems that there are a lot of DDs that like to use strange ‘formatting’ when writing down a versioned constraint. This is might be not a choice done directly by the debian maintainer, but just a consequence of a particular version schema from upstream.

The debian policy is rigorous with relation to the algorithm to compare version .

The strings are compared from left to right.

First the initial part of each string consisting entirely of non-digit characters is determined. These two parts (one of which may be empty) are compared lexically. If a difference is found it is returned. The lexical comparison is a comparison of ASCII values modified so that all the letters sort earlier than all the non-letters and so that a tilde sorts before anything, even the end of a part. For example, the following parts are in sorted order from earliest to latest: ~~, ~~a, ~, the empty part, a.[34]

Then the initial part of the remainder of each string which consists entirely of digit characters is determined. The numerical values of these two parts are compared, and any difference found is returned as the result of the comparison. For these purposes an empty string (which can only occur at the end of one or both version strings being compared) counts as zero.

These two steps (comparing and removing initial non-digit strings and initial digit strings) are repeated until a difference is found or both strings are exhausted.

I think the important part is about the numerical comparison The numerical values of these two parts are compared, and any difference found is returned as the result of the comparison .

Our tool finds a number of examples of equivalent versions : version 0.1-1 is equivalent to (0.00001-1,0.001-1,0.01-1,0.1-1) version 2.1.0-1 is equivalent to (2.01.00-1,2.1.00-1,2.1.0-1) * … etc . I’ve one page full of equivalent versions.

For example version ‘0.00001-1’ is from package libbenchmark-progressbar-perl. I don’t know why so many equivalent way of writing a version string are used. Probably they appear in completely unrelated packages I’m pretty sure no harm is intended :) However, to avoid confusion, it might be a good idea to settle on a non-normative canonical representation of versions. Like no ‘0’ in front of dots and hyphen… Maybe we could add a warning in lintian ?

If somebody is interested I can generate a full report that associates each version to a package name.


usb-creator

Date Tags debian

How to create a debian installer for a usb pen drive ? There are many way.s from a simple sudo zcat boot.img.gz > /dev/sdb to unetbootin.

Last night I discovered a very nice tool from ubuntu (usb-creator) that apparently is still not in the debian archives. There is a bit of doco here if you don’t know it already.

Installing it on debian is a breeze (I used the debs from lucid) and it works pretty well. The reason I’ve tried this one is that unetbootin sometimes failed for me producing an un-usable usb key. The old school method of course works, but sometimes, late at night, I feel the need of a friendly gtk interface to help my sleep.

Debs : usb-creator-gtk usb-creator-common


SNCF on his way to drupal !

Date Tags drupal

I’ve just learned from this article (in french) that the SNCF, the french railways company, is migrating all its infrastructure to an open source based solution. Apparently the organization has already migrated large part of their servers to IBM running linux, apache tomcat for the applications and drupal as their content management system.

Pretty soon alsy voyages-sncf will migrate to drupal. Hopufully it will work better then the actual website that from time to time really gives me an hard time when booking tickets.

hurray for sncf (at least reagaring this move :) )


More on Xen 4.0 setup on squeeze

Date Tags debian / xen

After the upgrade of last week, I didn’t have any major problems : xen 4 seems pretty stable and does its job well. One problem I encountered the other day was about the dom0 balloning. By default, xen sets dom0_min_mem to 196Mb and balloning set to true. This is all and good untill you try to use too much memory for your VMs, squeezing dom0 to its minimum amount of memory and causing all sort of problems. On the xen wiki, they reccomend as best practice to reserve a minimum of 512Mb to dom0 for its operations. This is done but setting dom0_mem=512M on the grub command line and the adjusting enable-dom0-ballooning to no and dom0-min-mem accordingly to the amount of memory you choose.

On debian, you can set the grub command line once for all just by adding in /etc/default/group the conf variable

GRUB_CMDLINE_XEN="dom0_mem=512M"

Another small problem is related to the reboot sequence. Since I’m using lvm on aoe, the default shutdown sequence (network down first, lvm later) is not going to work for me. As I’ve few lvm volumes on aoe and others on the physical disk, the proper solution to this problem is to write a custom shutdown script for the aoe lvm volumes and make it run before deconfiguring the network interfaces. In the mean time, to avoid the kernel hanging there forever, I’ve added these lines to in /etc/syscntl.d/panic.conf

# Reboot 5 seconds after panic
kernel.panic = 5

# Panic if a hung task was found
kernel.hung_task_panic = 1

# Setup timeout for hung task to 300 seconds
kernel.hung_task_timeout_secs = 120

This will instruct the kernel to panic and then reboot if there a task will not respond for more then 120 seconds.