Joerg Jaspert: Bugs, Bugs, Bugs and a nice speed improvement
This all started when a DSA (Debian SysAdmin (those with root rights on all .debian.org machines)) wanted to upgrade the kernel running on our ftp-master host. It was shortly before dinstall, but hey, there it went, and the machine rebooted into a 2.6.28. Besides murphy taking his share making the machine fsck its huge filesystem that is all fine.
What wasn t fine was the result we found. An odd one. Suddenly one tool we run during our dinstall run decided to blow up. Well, it did nt break, it just went dead-slow. Usual runtime had been about 5 minutes before, now we had over an hour - and only about 20% of the work was done. YUCK. Thats sure not going to work. Reboot in a 2.6.27 kernel did not show this problem, going back to .28 had it again. Which meant we had yet another reboot to get a working system.
At which point investigation of the problem started. Turns out that pythons popen2.popen2 function is closing all available filehandles before it forks. Thats all fine and also what you usually want. Problem is (and all the glory to have found the cause goes to Peter weasel Palfrader) that the .28 kernel included a patch titled rlimit: permit setting RLIMITNOFILE to
RLIMINFINITY (0c2d64fb6cae9aae480f6a46cfe79f8d7d48b59f) that
allows, as the title implies, to set the limit for number of files to infinity.
More citation from weasels mail:
Closer investigation showed that the broken default ulimit did not apply
to system processes (like stuff started from init). In the end I
could establish that all processes that passed through pam_limit at one
point had the bad resource limit.
Apparently the pam library in Debian etch (4.0) initializes the limits
to some default values when it doesn t have any settings in limit.conf
to override them. Turns out that for nofiles this is RLIMINFINITY.
Commenting out case RLIMITNOFILE in pam_limit.c:267 of our pam
package version 0.79-5 fixes that - tho I m not sure what side effects
that has.
Debian lenny (the upcoming 5.0 version) doesn t have this issue as it
uses a different pam (version).
So, whatever the fix might be for etch, if any, there is no way we Ftpmaster can force DSA to live with a 2.6.27 kernel forever on our host. As the problem occurs when using popen2 - lets get rid of it. Luckily popen2 was used in dak by people that either did not know the gzip module python has, or it has been there since before that exists. Don t know, but that made removing popen2 a not too hard deal, done by our newest addition to the Ftpteam, Mike O Connor, stew (Thanks!).
A pretty nice side effect is a huge improvement to the speed of the tool Prior, using popen2, it took around 5 minutes to do its job. Now using the gzip module we are down to some 44 seconds. Yes, below one minute, but well, must have some effect if you stop forking a thousand times and all that thousand times close all (1024) available filehandles
But that alone isn t enough. There was a second tool also using popen2 (thankfully only once instead of a million times). Fixing that tool got its runtime from 2 minutes down to 0.7 seconds. Yes, less than one second, getting the same result out. Thats the gain you get from not going like get a tempfile, zcat foo > tempfile, filehandle=open(file), dowork including reading its content but foo=gzipfile.readitscontents, dowork(foo) .
I like it. And am now sure that avoid popen2 at nearly all costs, if you can is a good motto. :)
The monthly board meeting of
(Apologies in advance for the shameless plug.) It s possibly a little late to talk about new year s resolutions, but if anyone is a 
It s been a while now since the 2008 Summer of Code ended. This year, twelve (?) projects were selected. That s twelve students working full time on a Debian-related project during the summer.
The Google Summer of Code has sometimes been criticized in the past for having a poor student-developer retention rate inside the host projects. One of the goals of the program has always been to bring new people to budding or established free software organizations and it s a pity that some would leave the project as soon as the program ends.
On the other end, poor integration of created code within the project leads to work that is hard to merge in, or worse, doesn t get merged in at all. That s a waste of time and resources and a probably cause of global warming as well.
Hopefully, it s not always the case. Some people choose to stay committed within the organization in the long-term. Useful code gets merged in and pushed to the public.
I am going to give a
An apparently little known fact about dpkg is that it clears suid bits
when upgrading packages. This defeats the
hardlink-a-suid-binary-and-wait-for-exploit attack that
used to be a worry, and which apparently
As I move to having more and more machines on my internal LAN, I felt the time had finally come that I sit down, and rebuild my network to take advantage of things such as gigabyte networking, LDAP, single-user sign on, and so forth. I'm doing partially for fun, and partially because its an interesting experiment to see how Linux from an IS environment compares to a Windows 200x IS environment (one of my former jobs was a 2000/XP/2003/Vista sysadmin position).

After lot of development, I finally decided to release new testing
release of Gammu.
The biggest changes are in SMS daemon, which got lot of improvements and
is now in separate binary gammu-smsd. It can log better (support for
syslog and Windows Event Log has been added), it can work as a proper
daemon or Windows Service, it can be debugged easier (Gammu logs go to
same log as other messages, SQL queries can be logged), can reload
configuration on the fly.
In libGammu, debugging has also improved (you can now use callback to
process messages), some memory leaks were fixed and some minor bugs has
been fixed.
Command line interface now supports text for text messages to be entered
through parameter and not only using standard input, it has a new
command chekfirmware which obsoletes UsePhoneDB configuration option and
other bug fixes has happened, for example messages sending is now again
working on Windows.
And last but not least, SMS daemon, all related things and gammu
configuration files now have man pages, which boosts documentation level
from none to almost perfect ;-).
As a special bonus for Czech users, Gammu translation is now more
complete and all new man pages are translated to Czech.
Full list of changes:
In June of 2005, I finished reading

I was thrilled to be part of a successful Debian bug squashing party
organized by MIT's
(or echo "blosxom hold" sudo dpkg --set-selections)
A few people had pointed out to me that my blog was appearing weirdly in
Google Reader. I myself read my blog via Planet Debian and Planet Linux
Australia, where it appears fine, so I hadn't noticed the problem first
hand.
I did some digging tonight with the