Wed, 31 May 2006
The other Iva
A week ago, I wrote about using Ekiga as a
videophone. Iva found another interesting way to use Ekiga - as a toy for
Iva. We call the remote echo test (
sip:email@example.com test number), enable the video loopback,
and put the audio to the speakers.
Iva gets extremely excited when she sees and hears herself (with a little
delay) in the softphone. She yells "Hello, Iva!" to the microphone, and waves
to the picture of herself. I think that because of the latency and because
usually people hear themselves in a different tone when they are speaking
than when the recording of their voice is being played back, she probably
thinks that the girl in the picture is not herself. I hereby appologize to
ekiga.net for abusing their bandwidth :-)
Anyway, I think the video telephony is definitely useful - now I can see my family even when I am at work. The only problem is that the picture of myself (which I have to display in order to stay in the viewing angle of the camera) it is pretty confusing: The image is displayed in a straight way, while my brain probably expects to see myself in a flipped image like in a mirror. So staying in the picture is difficult even with a visual feedback - I often move myself to the opposite side than I need to.
Tue, 30 May 2006
MIME::Words and UTF-8
We use the
package from CPAN to handle encoding
the RFC 1522-style
e-mail headers (those
Long time ago I have found that this package had a bug - when encoding two
adjacent words the inner whitespace should be added to the first or the second
word, because the whitespace between the two adjacent encoded words is discarded
during decoding. When moving our system to UTF-8, I have decided to install
MIME::Words module, and I wondered whether this bug is fixed.
In the manpage, they wrote:
It does not comply with the RFC-1522 rules regarding the use of encoded words in message headers. You may want to roll your own variant, using encoded_mimeword(), for your application. Thanks to Jan Kasprzak for reminding me about this problem.
So they did not fix the problem reported 3-5 years ago, they just acknowledged its existence (even with my name :-). The module also does not handle multi-byte characters (in UTF-8 strings) correctly, and defaults to the ISO-8859-1 encoding instead.
I have decided to fix this module, solving both the problem of two adjacent encoded words, and the problems of encoding/decoding from/to the multibyte strings. Here is the patch for MIME::Words and UTF-8. Hopefully they will apply it soon.
Thu, 25 May 2006
Kernel upgrades, crashes
Yesterday I have upgraded the kernel in our main server to the newest stable, 188.8.131.52. The server ran pretty historical kernel 184.108.40.206, because newer kernels had some problems in XFS on this setup. But even the older kernel has crashed from time to time. The 220.127.116.11 booted fine, I did few additional tweaks, and put the server back to the production use. Today, however, some problems appeared:
We have found that NFS clients using volumes from this server cannot lock
fcntl(). According to
the server just did not respond to the RPC locking requests. However, the
same kernel version on a different server, and with the same line in
/etc/exports, worked correctly, even with file locking.
I think the difference was in the NFS server utils, which are older
in the prodution system (RHEL3) than in the other server (FC3). However,
I couldn't recompile newer NFS utils, because it depends on the newer
version of Kerberos libraries. I was about to reboot the server back to
the older kernel, when it
crashed on me. I am back on 18.104.22.168 and I will probably wait till we upgrade
this box to RHEL4. If the problem is the same then, I will probably make
it a Red Hat problem.
When testing the NFS with the newest kernel on that other box, I have found
that the 3ware driver
not work with the
iommu=off boot option.
I wonder if akpm is right about the kernel getting buggier.
Moreover, it seems that the Tyan S2882 board does not boot correctly, when
the power-on memory test is interrupted by pressing the
key (MCE is reported, or the server just silently reboots when loading the
kernel). At first I thought the server was dead, when even the original
kernel refused to boot.
Tue, 23 May 2006
For a long time, Ekiga (and GnomeMeeting before that) had support not only for voice, but also for video. I did not have time nor hardware to test it yet. Today I have finally managed to borrow some webcams from my Windows section coworkers.
The good news is, that apparently everything works more-or-less correctly.
I have plugged in the first webcam (labeled Creative Labs),
lsusb discovered that it is in fact an OV-511 device,
using Google I have found that there is indeed a driver named
ov511, even included
in the standard kernel. After compiling and installing this module, Ekiga
immediately worked (I had to use the V4L driver, not V4L2),
and I was able to do both audio and H.264 video transmission while
calling their test URL
Even calling home worked (after enabling the video support on the remote Ekiga). The only slight annoyance with this (rather old) webcam is, that the viewing angle is too narrow, and I had to be careful not to move my head too much in order to stay in the picture.
The second webcam was newer - Logitech QuickCam 4000 Pro. It can be driven
by a Philips USB webcam driver,
which is also included in the mainstream kernel. When trying to use this webcam
with Ekiga or Mplayer, only a gray rectangle was shown. I had to use the
setpwc utility to
change the camera settings in order to get a reasonable image instead of
a gray rectangle. Sample settings are shown in the PWC webcam wiki (see the question
setpwc for the sample parameters).
I was surprised how easy it was to setup a software videophone under Linux. There are some projects left to the future explorations - for example using a built-in microphone in the webcam, or using the servos and some motion detection software to keep the head in the picture. Finding a good SIP softphone for Windows for my inlaws would also be an interesting project.
Sat, 20 May 2006
After one semester of the Japanese language course, I took part in an exam yesterday (together with Oozy). It was my first exam after maybe eight to ten years.
I think I managed to learn both Hiragana and Katakana well, but I am weak at vocabulary. Fortunately the exam questions did not contain any words I did not manage to memorize.
I have made one mistake, which I am ashamed of: I wrote the MU (ム) letter instead of MO (モ) in the transcription of the term "leMOn tea". Apart from that, the exam was OK, and we have passed. We want to enroll to a summer course, so that we can start from the third level instead of the second one the next semester.
Fri, 19 May 2006
It is interesting what can be found by just following the internal links on Wikipedia pages: I have looked up the phrase D'oh! (being non-native English speaker I really did not know its origin). Then, of course, I clicked on the page about Homer Simpson, and I have found that he is (apart from other categories) listed in a fictional alcoholics category.
So I wondered who else is considered to be a fictional alcoholic, and found Misato Katsuragi, my favourite Neon Genesis Evangelion character, listed there (well, is starting a day with a single can of beer considered being an alcoholic?).
I then followed to the page about Rei Ayanami. It contains an insane amount of details, speculations, and trivia. The most interesting information for me was, that even Rei's surname is taken from the WW2 Japanese ship (I already knew that some Evangelion characters' surnames are taken from the WW2 Japanese ships - for example Akagi or Sohryu - but it seems almost all of them are (see the question 3.4 in the previous link).
From general English catch phrase to Japanese destroyers in five or so clicks. Not bad, isn't it? Also, it seems that Wikipedia is especially strong in fictional characters. I have found such a big number of details there to which even a "specialized" site like AnimeNFO or AniDB cannot compare.
Wed, 10 May 2006
I always enjoyed reading Surely You're Joking, Mr. Feynman!, including the part about Feynman's hobby of lock-picking. As with computer security, I believe that for any massively deployed security technology (including the locks), security-through-obscurity is not a way to go, because the black hats have a big headstart there. Today a friend of mine sent me an interesting set of links about a new (or maybe not so new?) lock-picking technique, called lock bumping.
Firstly, here is a video from some Dutch TV, describing the lock bumping, and then there is a paper on lock bumping (PDF), written by people from Toool - The Open Organization Of Lock Pickers. The method itself is pretty interesting - it needs just a regular key with the deepest possible set of cuts.
I wonder whether the lock in my house is vulnerable to this attack - it is not listed by Toool as vulnerable, but who knows? I want to try this myself, but I am short of time these days ...
Anyway, this paper reminds me of the "Master Keyed Lock Vulnerability" paper, and I think the full disclosure is slowly taking off even in this area, which is a good news.
Tue, 09 May 2006
Why not microkernels?
I teach UNIX at our faculty. When thinking about the general principles of the operating system design, I still find the 1992 debate between prof. A. S. Tannenbaum and Linus Torvalds quite interestng. Today, a new paper by prof. Tannenbaum on this topic has been discussed on SlashDot. I think this comment neatly sums the problem up:
Kernels don't often crash for reasons related to lack of memory protection. It's quite silly to imagine that memory protection is some magic bullet. Kernel programmers rarely make beginner mistakes like buffer overflows.
Kernels crash from race conditions and deadlocks. Microkernels only make these problems worse. The interaction between "simple" microkernel components gets horribly complex. It's truly mind-bending for microkernel designs that are more interesting than a toy OS like Minux.
Kernels also crash from drivers causing the hardware to do Very Bad Things. The USB driver can DMA a mouse packet right over the scheduler code or page tables, and there isn't a damn thing that memory protection can do about it. CRASH, big time. A driver can put a device into some weird state where it locks up the PCI bus. Say bye-bye to all devices on the bus. A driver can cause a "screaming interrupt", which is where an interrupt is left demanding attention and never gets turned off. That eats 100% CPU. If the motherboard provides a way to stop this, great, but then any device sharing the same interrupt will be dead.
I think the problem is often the same with any other academic research versus the real world (sometimes even for research at our faculty - no, I would not be more specific here :-) - usually it is much more simple and nice to create something for research purposes only, and it is much harder, dirtier, and often not better than other (non-"scientific") approaches to apply the results in the real world.
Sun, 07 May 2006
Dual seat X and the evdev driver
I use dual seat X11 config (two graphics cards, two mice, two keyboards) at home. I had problems with this setup in Fedora 5, because this distribution is based on X.org release 7.0. Today I have finally made this working.
Firstly some background: in pre-7.0 versions of X.org/XFree86, the X server
needed to be patched. The first part of the patch implemented the keyboard
driver for the Linux event interface (
in order to use the USB keyboard, and the second part removed the code which
disabled all the other VGA cards present in the system when starting the X
server, disabled VT locking/switching code, etc.
Now it seems the 7.0 release is much cleaner with respect to multi-seat
configs. The X server has options for interoperability with other X servers
running on the same host (
-sharevts -novtswitch -isolateDevice),
and there is a brand new
evdev driver, which implements
the event interface handler not only for keyboards, but also for mice.
There is a big problem, though: the evdev driver in FC5 is not compatible with XKB.
Because Pavlína is back home and she needs the second head working,
I have decided to try to solve this. I have installed the new
xorg-x11-drv-evdev package from Rawhide (together with the
rest of X packages). It mostly works, but I had to patch (fd.o bug #3912) the XKB files
for the new "evdev" keyboard model. My keyboard config in
xorg.conf is now the following:
Section "InputDevice" Identifier "USBKeyboard" Driver "evdev" Option "Protocol" "evdev" Option "Device" "/dev/input/event1" Option "XkbModel" "evdev" EndSection
The new driver does not support any other device name than
eventN, so I had to hardcode the device name to the config, instead of using the
udev-based rule for symlinking to the right device (in case the devices are plugged in or recognized in a different order).
I use the following command to set up the US+CZ keyboard:
setxkbmap -model evdev -keycodes evdev us,cz_qwerty -option grp_led:scroll,grp_mode:switch,grp:shift_toggle
So finally, the multi-seat config is working for me even in FC5. And it seems the X.org 7.0 took much cleaner path to this than the previous releases. It is still not without glitches, but I think the direction is correct. The most important part is, that the multi-seat config is now supported in the X.org release, without patching and recompiling the X server.