The diary

21.01.2014 ssh keepalives
  • If your remote server hangs on you occasionally, remember to set ClientAliveInterval in the sshd_config (it's not there by default, at least not on Precise): [z9.io]
15.01.2014 TLER on Samsung 840 PRO
  • If it supports it, why not enable it? [en.wikipedia.org]
     smartctl -l scterc /dev/sda
          SCT Error Recovery Control:
             Read: 70 (7.0 seconds)
             Write: 70 (7.0 seconds)
    If the drive is taking more than 7 seconds to return on an operation, I'd rather Linux knew about it than kicking the drive out completely.
14.01.2014 Bitlee failing to connect to MSN?
  • If you are getting messages like
     msn - Logging in: Connecting
     msn - Login error: Could not connect to server
     msn - Logging in: Signing off..
     msn - Logging in: Reconnecting in 5 seconds..
     msn - Logging in: Connecting
     msn - Login error: Could not connect to server
     msn - Logging in: Signing off..
     msn - Logging in: Reconnecting in 15 seconds..
     msn - Logging in: Connecting
     msn - Login error: Could not connect to server
     msn - Logging in: Signing off..
     msn - Logging in: Reconnecting in 45 seconds..
     msn - Logging in: Connecting
     msn - Login error: Could not connect to server
     msn - Logging in: Signing off..
     msn - Logging in: Reconnecting in 135 seconds..
    see [wiki.bitlbee.org] and [ismsndeadyet.com] for the hint -- it's just that you can't connect to the default server, and instead need to use "account msn set server X" before connecting. Doh!
07.01.2014 AMT making you upset?
06.01.2014 BTRFS for production?
16.12.2014 DDNS hurts
  • DDNS updates finally nailed; took quite a lot of investigating as ISC DHCPD's configuration is full of weird gotchas. The primary piece of help was [www.semicomplete.com] which explains in a simple way how static entries need to be set up. Key findings follow.
  • Setting a "ddns-hostname" makes the system actually work more reliably; ISTM that the query the client sends actually affects the way the hostname is determined. I assume this is tied to allowing the client to send its own hostname, which I consider undesireable, as I want the server to control what hostname I put in my domain).
  • Other references: [prefetch.net] [lists.isc.org] [www.zytrax.com]
05.12.2014 Using ping -I
  • It turns out that ping -I is a bit tricky. The simplest thing to do is to use the interface name: kiko@anthem:~$ ping -I eth2 altern.org PING altern.org (80.67.174.57) from 189.35.185.240 eth2: 56(84) bytes of data. 64 bytes from altern.org (80.67.174.57): icmp_req=1 ttl=49 time=259 ms but that is actually lying: the packet isn't going out from 189.35.185.240, which is the address for eth3, but rather from eth2's native address. I even tcpdump'd to confirm.
  • And if you use just the address, it doesn't seem to work:
     kiko@anthem:~$ ping -I 189.19.234.109 altern.org
     PING altern.org (80.67.174.57) from 189.19.234.109 : 56(84) bytes of data.
30.11.2014 LXC aargh and NFS mounts
  • If you are trying to mount an NFS share inside an LXC container on 14.04, it won't work until you fix the apparmor profile: [technuts.tru.my]
29.11.2014 Cron madness
  • I have been trying to get a find command to delete old files and directories under a tree; this is run in a cronjob and I've just been sloppy at it. Today I finally discovered -mindepth 1 and -depth were what I was looking for all along!
  • BTW, a trivial way to ensure only a single cronjob runs is to use flock: flock -n /var/lock/foo command Before I used lckdo, which is included in the moreutils package, but flock is part of util-linux and doesn't need perl madness.
28.11.2014 mtab versus /proc/mounts
02.11.2014 Happy Mailman Day: fixing unhandled bounces!
  • [mail.python.org] had the hint:
     grep ^"<[a-z]" ~/mail/bounces | tr -d \<  | tr -d \> | xargs bin/remove_members --fromall
23.10.2014 Magic SysRq actions disabled?
11.10.2014 Spin the furniture
  • Spent hours of my Saturday with Rafa and two woodworkers doing a full 180 of the TV rack which ended up being low enough for Rafa to hit his head (which would hurt). It almost killed us all but we succeeded and the results are actually.. pretty good!
10.09.2014 Google Hangouts auto-mute
  • I hate it, but [www.pixelmonkey.org] indicates a trivial way to fix it, which is adding a single line to a .config file for the talk plugin.
  • Gparted killed my Windows partition when resizing. Trying to get a recovery disk was crazy hard! It turns out unetbootin is the easiest way to do it, but Windows required NTFS which current unetbootin doesn't easily allow unless you use the hack in [askubuntu.com]
  • And once you get your Windows back you will discover that expanding the partition is instantaneous in the actual disk manager UI!
  • I messed up my GPG trustdb, but luckily: [trog.qgl.org]
03.09.2014 Iodine
  • Finally got IP over DNS working and it's amazing to say the least! [dev.kryo.se]
18.06.2014 CUPS & double-sided printing?
  • We have a decade-old Laserjet 1320 that is great for double-sided printing. That is, until recently -- perhaps even as recently as we moved our workstations to Trusty. What happened?
  • The best hint I found was at [ubuntuforums.org] trying to set the default options for the printer. When I enabled double-sided printing, CUPS warned me there is a Duplexer Installed option -- which was off. Fixed!
30.05.2014 Updated Server BIOS for out S5520HC
  • Huge filename and pretty massive firmware update: S5520HC_S5520SC_EFI_BIOS64_BMC61_FRU33_ME112.zip
  • Moved from 0050 to 0064 -- a 4 year delta between versions!
  • Only issue was the the FRU and DSR update didn't get done because it printed a scary warning about not being able to detect a temperature sensor.
     Detecting Front Panel Temp Sensor Device. Please wait...
      
     Front Panel Temperature sensor device hardware is not found.
     Chassis fan Speed Control (FSC) will not work properly without this
     sensor!
      
     Do you want to still Continue (Y/N)?
  • I guess I'm just going to ignore that as I don't really seem to need the update for those bits. What do the FRU and SDR pieces do anyway?
  • Oh.. I guess I understand now. This is why my fans are screaming! [www.experts-exchange.com] [www.intel.com] [communities.intel.com] [downloadcenter.intel.com] [communities.intel.com] [www.samsung.com]
16.05.2014 USB drives and burn-in
  • I'm replacing the server USB backup drives and looking for good alternatives. I've picked a few and am trying to burn them in before making the commitment (as previous drives I was trying to use ended up dying on me mid-flight). Burn-in for me is badblocks for a few days and some SMART self-testing.
  • One of the drives I got was a Seagate, and it annoyed me that there were a lot of errors in the two first SMART values listed by smartmontools as I did a badblocks on it:
     1 Raw_Read_Error_Rate     0x000f   100   100   006    Pre-fail  Always -       236840
     7 Seek_Error_Rate         0x000f   100   253   030    Pre-fail  Always -       204379
    I say it annoyed me, but then I read this: [serverfault.com]
  • So the lower side of the number is just a counter. And math shows they have zero errors. Yay!
  • And if you have a USB drive that has self-tests being aborted by the host, check to see if it's not sleeping mid-test. At least that is what [ddumont.wordpress.com] says; I'm trying it.
  • Daft Google syncml limitations: [www.nodhing.com]
  • Saved my ass with DD-WRT passwords today not being synced between web and ssh: [www.dd-wrt.com]
  • Quora just taught me:
     Answer from Susan Ng
     I learned this in 1st grade - it's a REALLY easy and simple way to learn
     your nine times table. Or to teach someone else to learn!
     1) Look at your (or someone else's) hands
     2) Say you want to find 9x7.  Put down your 7th finger
     3) Count the number of fingers to the left of your 7. This is your tens
     digit.  Count the number of fingers to your right.  This is your ones
     digit.
     9x7=63
    Wow!
  • What a trick: [testefromhell.wikispaces.com]
  • Typing the em-dash: [askubuntu.com]
  • Getting .bash_profile sourced: [askubuntu.com]
  • Just ran into: [www.fxp0.org.ua]
23.04.2014 Juju and LXC
  • Debugging session as to why I can't get the local provider to give me new machines in Juju. This is probably a regression in 1.18.1.4, but I still don't know yet.
  • One thing which is interesting is that the log for machine-0 is actually where a lot of the container traffic appears. machine-0 is the bootstrap node, and in the local provider, it's what houses all the other containers.
  • root@chorus:/etc/default# apt-get install lxc/precise-backports
  • Escape the console?
  • lxc-ls is busted?
  • [curtis.hovey.name]
20.04.2014 36ers?
09.04.2014 HP Virtual Rooms
  • The trick to getting [rooms.hp.com] to work is to know that the plugin and application they provide are 32-bit. That's not something which is obvious unless you actually read the page carefully, and the failure mode is completely unobvious (the installer runs, the plugin is there, the test page looks like it works but no virtual room ever opens, with a URL flashing quickly before loading back into the test page). There is a trick which you can use to test manually and see what is wrong:
     kiko@limpinho:~$ cd .hpvirtualrooms 
     kiko@limpinho:~/.hpvirtualrooms$ ./hpvirtualrooms 
     bash: ./hpvirtualrooms: No such file or directory
     kiko@limpinho:~/.hpvirtualrooms$ file hpvirtualrooms 
     hpvirtualrooms: ELF 32-bit LSB executable, Intel 80386, version 1
     (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15
    Aha! Okay. So I need some 32-bit libraries..
  • First step, I need
     sudo apt-get install libc6-i386 
  • That lets me see via ldd the situation. And it's pretty bad: I need a total of 44 libraries pulled in as dependencies from this core set:
     libsm6:i386 libpng12:i386 libfreetype6:i386 libxi6:i386
     libx11-6:i386 libasound2:i386 libstdc++6:i386 libfontconfig1:i386
     libxrender1:i386 libxrandr2:i386 libglib2.0-0:i386 libxfixes3:i386
     libglu1:i386
  • But once that's done, it seems to work. I need to put a bit more effort into validating it in the office, but I at least now know how to do it. And best of all, it doesn't seem to need Java!
17.03.2014 Android and Account Syncing
  • If you look at your Android phone settings and all your accounts have "sync disabled", you will never figure out how to fix it. It turns out that you need to look in the Gmail app and enable sync. That in turn enables Android-wide synchronization, or at least that's my experience and what [androidforums.com] tells you to do. WTF.
  • Ah, now that I looked at [support.google.com] it looks more sensible. So the reality is that you control that same setting in both gmail and in the Data Usage settings screen. I bet I disabled it while roaming internationally!
21.02.2014 DHCP in the eyes of Wireshark
  • We had a cable modem that was annoying the hell out of us because it needed to be restarted periodically -- twice a day in the latest weeks. So we called the cable company in and convinced them to swap the modem out. In putting the new modem in I did a lot of log-digging and realized that actually the request note that goes out periodically:
     Feb 20 21:31:05 anthem dhclient: DHCPREQUEST of 177.34.169.88 on eth3 to 189.7.80.20 port 67
    is actually not a request which is going unanswered, since Wireshark shows clearly that there is a Request packet followed by an ACK from that IP address. Oh, actually, I am just grepping the log wrong, because if you look at the full successful operation it looks like this:
     Feb 17 12:22:51 anthem dhclient: DHCPREQUEST of 179.154.136.190 on eth3 to 189.7.80.20 port 67
     Feb 17 12:22:51 anthem dhclient: DHCPACK of 179.154.136.190 from 189.7.80.20
     Feb 17 12:22:51 anthem dhclient: bound to 179.154.136.190 -- renewal in 4407 seconds.
  • The problem we were having previously was that at some point the modem stopped working, and the refresh DHCPREQUEST never got a response, which looks like:
     Feb 17 20:01:24 anthem dhclient: DHCPREQUEST of 179.154.136.190 on eth3 to 189.7.80.20 port 67
     Feb 17 20:02:32  dhclient: last message repeated 6 times
     Feb 17 20:03:35  dhclient: last message repeated 4 times
    Sometimes the modem would do 7 refreshes before stalling, but lately it was rare to get to 4. The log looks much healthier now!
  • One particularly weird thing is that in the actual IP allocation request comes from a different DHCP server than the one which provides the response:
     Feb 20 17:37:45 anthem dhclient: DHCPDISCOVER on eth3 to 255.255.255.255 port 67 interval 3
     Feb 20 17:37:45 anthem dhclient: DHCPREQUEST of 177.34.169.88 on eth3 to 255.255.255.255 port 67
     Feb 20 17:37:45 anthem dhclient: DHCPOFFER of 177.34.169.88 from 177.34.168.1
     Feb 20 17:37:45 anthem dhclient: DHCPACK of 177.34.169.88 from 177.34.168.1
     Feb 20 17:37:46 anthem dhclient: bound to 177.34.169.88 -- renewal in 4840 seconds.
    So 177.34.168.1 provided the response, but if you look at the DHCP Server Identifier that comes back in the OFFER packet it says 189.7.80.20. I don't think that's illegal, but it's certainly not what I've seen in normal site-wide DHCP. And if you look at the updates afterwards the refresh DHCPREQUEST is ACK'd by 189.7.80.20.
27.01.2014 Undocked Libreoffice panes
  • I had this problem for the longest time, and just found out that it is actually a documentation issue: [askubuntu.com]
  • How on earth did they get to control-doubleclick, though?!
22.01.2014 ADSL and Telefonica
  • Once a year I try calling my operator to see if they can upgrade my uplink. I'm amazed that to this day I can only get a 4MB/s link on an ADSL connection from Vivo (ex-Telefonica, ex-Telesp), the local wired operator. It's even weirder that on my current line, which I've had for about 10 years, I can't get an upgrade at all from the current 1MB/s. At the same time, Virtua offers me 20 and 100MB/s on cable at not much more that Vivo charges for their measly 1MB/s. Maybe I won't call again next year!
08.01.2014 Reminder to self: DBL and sendmail access map
  • The [www.spamhaus.org] DBL is great, but if it is blocking email you should be receiving, the way sendmail integrates with milters means you can't work around it by adding the sender address to the access map. The URI-milter package that we use doesn't provide whitelist support either; it's even mentioned in their TODO at [email.uoa.gr] Should I not be using 0.1-versioned software?
  • Another thing which sucks about the URI-milter is that /any/ match is considered positive; for the DBL, which I just found out lists even bit.ly (see [www.circleid.com] for details), this means that both the 127.0.1.2 and 127.0.1.3 are blocked, but they are quite different -- the first is for actual spam domains, and the other, for redirector domains which may be abused by spammers (see [www.spamhaus.org] for details).
     Non-authoritative answer:
     Name:   bit.ly.dbl.spamhaus.org
     Address: 127.0.1.3
  • PS: I've been invited to speak at the Brazilian Campus Party this year! I'm presenting at the Socrates stage on the 29th from 15h30 to 17h00. Joining me will be Paulo Henrique de Lima Santana, Fabio Pires, Marcio Junior Vieira and Marcelo Marques.
07.01.2014 Spreadsheets and Locales
  • I hate locales in spreadsheets. [webapps.stackexchange.com] -- why on earth does the locale change the ARGUMENT SEPARATOR in formulas??
05.01.2014 DHCP root-path weirdness
  • There is an odd bug in the DHCP root-path setting. I just don't know what it is.
  • I used dhcpdump to study it, FWIW; see [bentis.calepin.co] for some handy DHCP debug advice.
  • Cooked up a very crude overall boot time measurement system using rc.local and /proc/uptime. I wonder how reliable it is.
  • PS: for the FAQ "why does /proc/uptime show a larger number for idle time than raw uptime", see [ubuntuforums.org]
04.01.2014 Ripening
  • Have you ever wondered what causes fruit to ripen? Well, I did tonight, and I looked it up on Wikipedia and was amazed to see the article is terrible! But it contained a link to an incredibly interesting entry in the Plant Physiology info homepage: [plantphys.info]
03.01.2014 FSCache for the new year
  • I got a few 16GB SSDs to try as FSCache drives for our NFS-root diskless network. The idea of being able to transparently cache data in them and improve performance is really appealing, but at least on Ubuntu Precise the results weren't ideal.
  • Setup is fairly simple. I wired the SSD drive into the chassis, formatted it to ext4, installed cachefilesd, enabled it in /etc/default and modified /etc/fstab to mount the SSD and add the "fsc" option to the NFS mounts.
  • There is a problem with the kernel Yama security provisions that seems to be triggered by enabling FSCache; when running mutt a bunch of errors show up in the syslog like this:
     kernel: non-accessible hardlink creation was attempted by: mutt_dotlock
    However, it's possible to work around this (see post at [utcc.utoronto.ca] for details) by just setting
     kernel.yama.protected_nonaccess_hardlinks = 0
  • It seems to be working (well, in fact it started working after I fixed the configuration file; I think brun can't be less than 10% or it errors out) as I can see the cache directory growing and nodes being added to the cache hierarchy. And it probably does speed things up, as repeatedly opening up a 6.5 GB-file (this box has 8 GB RAM) results in a pretty good speedup with the disk drive being read at a constant 70MB/s:
     $ time cat win_xp.qcow2 > /dev/null 
     real    4m17.169s
     $ time cat win_xp.qcow2 > /dev/null 
     real    1m11.031s
  • Unfortunately, there are three issues I've found so far. The first is that there is an obvious race that happens when opening files multiple times simultaneously. This happens most frequently when using mutt to try and open the same mailbox twice; when this happens I get a flood of kernel messages and mutt weirdly showing an "unknown" mailbox.
     CacheFiles: Error: Object already preemptively buried
     [kworke] preemptive burial: OBJb2 [OBJECT_RECYCLING]
  • The second issue is that the file UID/GIDs appear to come up busted, at least in some mount points, like you get with NFSv4 when idmapd isn't running:
     kiko@memento:~$ ls -ld .ssh/
     drwx------ 2 4294967294 4294967294 4096 Oct 12 21:02 .ssh/
     
    And while behaviour under concurrent reads may be fixed in newer kernel versions (see [lwn.net] and [www.redhat.com] the other issue is that this KingSpec SSD is actually not that fast, even when compared with loading bits over the GBe network. hdparm shows the performance is kinda miffy:
     $ hdparm -tT /dev/sda1
     /dev/sda1:
     Timing cached reads:   18356 MB in  2.00 seconds = 9183.84 MB/sec
     Timing buffered disk reads: 214 MB in  3.02 seconds =  70.85 MB/sec
    For the same comparison above, if I turn cachefilesd off, here's the result:
     $ time cat win_xp.qcow2 > /dev/null 
     real    0m45.817s
    Wow -- I see a sustained 120MB/s over the network for that read.
16.12.2013 Ubuntu LTS Kernel Enablement Baselines
13.12.2013 Certificate renewal
  • Our SSL cert is expiring and I'm trying to remember how to generate a new CSR. Let me find out.. ah, right, there is a guide at [support.comodo.com]
  • One odd thing is having to generate the combined PEM file manually; I guess they can't do it for you because you hold on to the key when generating the CSR.
  • Anway, all of this is stuffed into /etc/ssl/LOCAL for us now, with a convenient README.
  • Installed also the certificate to be used with our SMTP server; this required a change to starttls.m4 which uses the same cert config entry for the CA and for the server (which suggests to me that it should really be a combined PEM file..)
10.12.2013 Oracle Java dialogs
  • 2013 has been the Year of the Java Update it seems. We've had to update multiple times given the security problems raised, and this is a problem because Banco do Brasil heavily depends on Java for access control to both company and personal banking websites. And since this raft of updates, OpenJDK no longer works for the company banking site, so I've been forced to use a computer with Oracle Java just for this.
  • Previous issues with updates included annoying popups and an unreliable login mechanism; you would get in once every 10 attempts or fewer on my machine. When it failed it would redirect you to a page telling you to install Java.
  • With the latest update (1.7.0_45) there are no longer blocking issues, but there is an annoying dialog that pops up every time I access the bank website: [java.com]
  • Turns out it's because of a limitation in the security mechanism for LiveConnect , a JS mechanism to call from a website into an applet; there is no way to make it work for all versions of Java: [blogs.oracle.com]
08.12.2013 Minors and airline points
  • Did you know TAM only lets you enroll into their alliance program children that are older than 2 years old? I generally wouldn't care to give a corporation a children's data, but the round trip to Taipei is probably worth a free flight or two so it would be nice to get.
  • It turns out China Airlines and SAA don't let you either. I guess those points are void :-/
  • Just recharged my TIM and Vivo pre-paid chips with 50 and 60, respectively. They are supposed to last 180 days. Will they?
03.10.2013 NFS TUNE
21.08.2013 Catch-all
  • Lent: GoPro to Iuri
  • Lent: Wheel-bag to João (PT)
  • Lent: Wheel-bag to Ozias (Disc)
20.08.2013 GRUB2 RAID weirdness.. understood and solved
  • I rebooted the server for the first time (after the failed disk) to cope with a kernel upgrade. No, I haven't yet swapped out the disk -- the chassis makes it a bit painful. But anyway, to my surprise, the system got stuck in the grub prompt, and I couldn't get it to boot by specifying the linux and initrd lines. Why?
  • One symptom I found was that cat /boot/grub/grub.cfg returned garbage. The other was that there was only one kernel version listed in /boot, although I had just upgraded the kernel so there had to be at least two. And yet another was that a file I had touched in /etc was also garbaged up. What's going on?
  • It turns out that grub was assembling the raid array using the failed drive (with SCSI ID 8) instead of the spare. It's really interesting that grub does a read-only RAID mount, but with very little checking, so when you have failed drives it show you weirdly half-stale data. To address this I disabled the drive in the server's SCSI utility and booted again, successfully. It gives an indication of how the grub RAID code works; I wish I had a way of saying what drives were being used in an md array as it would have saved me a lot of pondering.
  • Oh, and I used the SCSI utility to verify the drive as well. I have re-added it back and am waiting for it to fail again. The IBM drive seems to be really slow.. or maybe it's that it's on the secondary SCSI interface with a slower tape drive on it as well.
05.08.2013 RAID drive failure
  • Our sdd drive (SCSI ID 8) was kicked out of the raid because of an abort SCSI command overnight, at 3:36am local time to be precise. I'll add it back to the array after a reboot to see if it is transient or if it's really dead. The spare meanwhile seems to be working okay, but the resync takes ages..
  • It's worth noting that this fall-back setup has become weirdly slow. I'm still trying to figure out if it's the disk or something else.
06.06.2013 Java Banco do Brasil Locale bonging
  • Banco do Brasil's Java authenticator won't work in Mari's chromium browser, but it works in Firefox. What is the difference? Well, in chromium, we run into this issue: [groups.google.com] which has shown up on [bugs.debian.org] and [bugs.debian.org]
  • So Mari's locale is pt_BR.UTF-8. But the question is, if the error really is locale-dependent, why doesn't it trigger for Firefox?
  • I know now one more piece of the puzzle. We know the system locale is pt_BR.UTF-8. But if I visit [www.browserleaks.com] with both browsers I notice there is an important difference when displaying the results of Locale.getDefault() -- Chromium displays:
     Locale.getDefault() :
     Language Code   en
     Display Language    English
     Country Code    US
     Display Country United States
     
    whereas Firefox gives me
     Locale.getDefault() :
     Language Code   pt
     Display Language    português
     Country Code    BR
     Display Country Brasil
     
    and that's likely to explain why Chromium fails (C locale parsing assuming a dot as the decimal separator) while Firefox succeeds.
  • I'm still not sure what triggers the BB machine authentication reset that we run into periodically. So far I know that kernel updates do trigger it. What doesn't: java updates, firefox updates. Unknown: changing from OpenJDK to Oracle Java.
23.05.2013 The Joule
  • My Joule was acting up, so I tried to kick it into submission by formatting its partition via mkfs.vfat. I ended up with a filesystem with a bunch of garbage files that I couldn't quite figure out. I called Saris up and they said literally "don't use FAT32 or anything, just plain FAT" which I took to mean mkfs.msdos. That ended up creating a 12-bit FAT. I ended up with an empty drive. So far so good. Then after disconnecting and reconnecting the device to the computer, maybe a few times, it automatically created a CycleOps directory with a config subdir below it. Perfect! I guess the corrupted FAT entries suggest that the device's firmware only knows to write FAT-12 to it.. I need to check another device to confirm.
22.05.2013 Packet Mystery
  • My firewall ends up occasionally seeing traffic on a certain interface with the wrong source IP address. Why is that?
  • This is interesting but I believe unrelated: [blogs.oracle.com]
  • Wow, Java history is complicated.. or maybe just interesting [weblogs.java.net]
29.03.2013 Movie catch-up
  • Silver Linings Playbook
  • The Prestige
  • Un Cuento Chino
  • XXX bad movie about haunted house
28.03.2013 Shaping
  • We're planning on shaping our main incoming link to see if it can carry our regular traffic together with VOIP. I'm storing some pointers here to help me when we get to that: [en.wikipedia.org] [forums.juniper.net]
23.11.2012 Where is my /tmp/.X11-unix directory?
  • It's missing on all our diskless machines. What's going on?
  • Dunno, but it solved itself as part of regular updates and a pretty major fix to our diskless /etc/init scripts; there were subdirectories inside /etc/init with older copies of /etc/init/*.conf, and it turns out upstart also parses subdirectories -- oops!
  • Got an icalendar invitation viewer for mutt set up using [nickmurdoch.livejournal.com] though it did force me to use gem install which is so not the way to do it in Ubuntu!
22.11.2012 New link, and the shaping of ingress traffic
  • We had a new internet connection installed today, and it's a 4Mbps premium, unshaped link. In a weird encounter, however, this line from wondershaper completely kills my download performance (measured by a simple wget) on it:
     # tc filter add dev eth0 parent ffff: protocol ip prio 20 u32 match ip
         src 0.0.0.0/0 police rate 3800kbit burst 10k drop flowid :1
    I can't figure out why. I thought that maybe the rate stuff was wonky and wanted to use the avrate policer, but that doesn't work either:
     # tc filter add dev eth0 parent ffff: protocol ip prio 20 u32 match ip 
         src 0.0.0.0/0 police avrate 380 reclassify flowid :1
     RTNETLINK answers: Invalid argument
     We have an error talking to the kernel
    I thought that had to do with NET_ESTIMATOR being missing in the kernel config, as the LARTC meantions that estimators needing to be compiled into the kernel, but it seems that option is now gone and they are always built in. Oh, I see what's missing -- an "estimator" option. So this runs ok:
     # tc filter add dev eth0 parent ffff: protocol ip prio 20 estimator 1 2 
         u32 match ip src 0.0.0.0/0 police avrate 380 reclassify flowid :1
    Unfortunately, I'm still only getting 50% of what I expected..
08.10.2012 Bike Updates
  • Swapped the F1SL's chain, and replaced the F2C's rear derailleur cable. And then the week ended, and I left the office!
12.09.2012 So halt -p huh? And rsyslog
  • It seems that /sbin/halt no longer turns the system power off, and you need to run poweroff (or halt -p) instead. Did you know that?
  • rsyslog in Ubuntu has a rule that provides an admin feature I've always loved; the ability to log stuff to /dev/tty*. Yes, it's a bit of a security disclosure but I figure if you have tty access anyway..
  • The problem is it ships broken by default in Ubuntu. The issue has to do with privilege dropping; [kb.monitorware.com] notes correctly that the PrivDrop bits in rsyslog.conf cause tty writing to fail. What it doesnt't note is that you can use named pipes for this functionality and it works just fine; I found this out in a very unlikely blog comment here: [mikebeach.org]
  • So all you need to do to get this to work is to use "|/dev/ttyX" as the destination string for the facility. Cool!
  • Actually.. coming back years later, I think that was the case for older versions of rsyslog. But the current version in Trusty removes the need for the pipe. However, to get it working I definitely had to add the syslog user to the tty group, something I had never tried before.
10.09.2012 DD-WRT, time and NTP
  • [www.dd-wrt.com] has a pretty complete analysis of just how wrote the timezone and NTP handling in DD-WRT is busted. No wonder it was confusing me! For now, just using UTC on the device seems wisest.
09.09.2012 Cycling Metrics and The GoldenCheetah Performance Manager
  • For people looking for a way to get performance manager-style data from GoldenCheetah, in particular how to get the Performance Manager graph to make sense, check out the guide at [www.cyclingmusings.com] which apart from making sense of the metrics and PM tabs is particularly useful in explaining that you need to have Power Zone data entered (under Athlete options) in order to get BikeScores -- probably the #1 gotcha there. You can also get an idea of the mechanics behind the Metrics tab in a webcast at [bugs.goldencheetah.org] -- particularly interesting are the pieces that describe saved charts and user-defined ranges, which are hard-to-impossible to discover through the UI directly. And the user-defined ranges are automatically available as seasons in the Critical Power chart, which I found out about in this post: [groups.google.com]
  • And, if you're confused about TSS, CTL, ATL and TSB not appearing in GoldenCheetah, the thing to know is that GC 2.x uses Phil Skiba's metric system, which maps to the Coggan model as below:
     TSS => BikeScore
     IF  => Relative Intensity
     NP  => xPower
     VI  => Skiba VI (XPower/Average_power)
     CTL => LTS
     ATL => STS
     TSB => SB
    AFAICT Skiba VI is only visible in the metrics tab.
06.09.2012 PSU Again?
  • Actually, not so fast on the PSU fix. Ever since we put the drives back in the box, we've had somewhat random SCSI errors. This morning, when I installed a new network card, though, I'm unable to get the thing to work again. And get this: it only happens when the drive caddy is inserted into the case. If the caddy is sitting outside of the box, everything works fine. But the moment I slide it inside the case, SCSI errors galore. And I've replaced the cabling, improved the drive positioning, disconnected fans.. my hypothesis is a PSU grounding problem. But I need to get a replacement to actually verify..
21.08.2012 Clamav on Ubuntu as a Sendmail Milter
  • I am a bit surprised that nowhere is there good documentation on how to get Clamav running on Ubuntu as a milter. It's actually pretty easy.
  • sudo apt-get install clamav-milter
  • sudo freshclam
  • sudo /etc/init.d/clamav-daemon start
  • Add
     include(`/etc/mail/m4/clamav-milter.m4')dnl
    to your sendmail.mc file.
  • make && /etc/init.d/sendmail restart
  • That's it -- you'll have a working installation that is already scanning, quarantining and updating the virus database. I'm not sure what exactly causes freshclam -d to run in the steps above, but it's a daemon that will keep your database up to date.
  • To test, just bounce a message containing a virus (you probably have too many!) to yourself. It'll be put in quarantine mode, which I took a long time to figure out is actually a special sendmail queue, which you view like this:
     kiko@anthem:/etc/clamav$ mailq -qQ
     MSP Queue status...
     /var/spool/mqueue-client is empty
             Total requests: 0
     MTA Queue status...
             /var/spool/mqueue (1 request)
     -----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient-----------
     q7LCqigM003096    40178 Tue Aug 21 09:52 
          QUARANTINE: quarantined by clamav-milter
                          
             Total requests: 1
  • Quarantined messages are going to be in the same /var/spool/mqueue directory, but are prefixed with "hf". To remove stuff from the quarantine queue, you can use
    /usr/share/sendmail/qtool.pl -d -Q /var/spool/mqueue
    and you can also use qtool.pl to remove individual files.
  • If you don't want the messages quarantined (I probably don't) you can just set the configuration option "OnInfected Reject" in /etc/clamav-milter.conf. Note also that Stephen Warren suggests "AddHeader Add" here: [bugs.launchpad.net] Once you've made any configuration changes, just run an /etc/init.d/clamav-milter restart.
  • So far I am /very/ impressed with how simple and well it all works. Kudos to the project team who has come up with a very simple design -- scanner daemon, milter, database update daemon, and that's it. The packaging is also really nicely done, with the user permissions set up correctly and intuitively. It eats up some memory on the server, but we have so much anyway..
20.08.2012 Avenging Spelling
  • Every once in a while you receive the odd surprisingly fantastic message, and this weekend's winner says this:
    Hi, there is a small typo in [www.linaro.org] .. commecial should be commercial. No need to thank me, it's what I was born for.
    It's then signed "The Spelling Avenger". So how cool is that? I wish he had a website to link to..
17.08.2012 Pop and there goes a pirate
  • Our server's Corsair AX750 power supply just gave up the ghost, about three years in. Swapping it out was tough, in particular because the drives didn't seem to enjoy the whole movement. We installed spare drives, futzed around and finally remounted the original configuration correctly. Go figure!
  • Pretty cool reference on what directories to exclude from an Ubuntu backup: [askubuntu.com]
09.07.2012 Tracking Hangouts
  • Our somewhat complex multilink setup here at the office has a low-latency line which works really well for VOIP and video conferences, but to make the policy-based routing work, we need to know what hosts we are sending traffic to. Google Hangouts presents that challenge, since it's unclear what the hosts involved are. Plus, it changes! It used to be that talkgadget.google.com was all you needed to track, but now they've added stun.l.google.com and I'm still figuring out if that's all I need to pay attention to..
08.07.2012 If Unity won't run..
  • [askubuntu.com]
     kiko@gasolinux:~$ /usr/lib/nux/unity_support_test -p
     OpenGL vendor string:   VMware, Inc.
     OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 0x300)
     OpenGL version string:  2.1 Mesa 8.0.2
      
07.07.2012 War and the X7DVA BIOS
  • Our Supermicro X7DVA-8 server has ECC memory, and the memory and Northbridge run REALLY hot, so hot you can't touch the parts when the box is running, and if you load the server up too much the temperature trip squeals. So I decided that we could try updating the BIOS to the latest (albeit 2008) version. However, I was unable, I mean, TRULY unable, to get it to boot from USB. I managed to do it once, on a fluke, but the drive failed to boot, and after that I could never do it again. I ended up following Johan's advice and using a SATA drive with Freedos on it.
  • Booting USB on the server never worked because, although the BIOS could see the drive, it didn't seem to identify it as bootable; the drive would never appear as bootable on the F11 menu, nor on the BIOS boot order menu -- so though the drive /did/ appear in the BIOS listing, it never had a sequence number next to it, while the first 8 entries have numbers 1-8 next to them.
  • Getting Freedos on the SATA drive was less trivial than I thought it would be. I had a Freedos USB stick, and I can boot from that on another workstation, so it should be a matter of doing a format /s, or an old-skool sys c:. But getting the SATA drive to actually boot was tricky, and I ended up being reminded of the magical incantation:
     fdisk /mbr
    which was exactly what was missing. Getting fdisk.exe (and format.com) involved ISO-mounting the freedos ISO, but that wasn't so hard in the end. And once I managed to boot, the flashing procedure was trivial and only took a few seconds (just type in "flash x7dva208.rom").
  • However, after flashing, the system continues to run as hot as ever! At least the BIOS update got us up to DMA version 2.5, and perhaps because of it, or because I tweaked a bunch of BIOS settings, my lshw now reports I have L2 cache. This bothers me though... does it mean I didn't have this before, or that lshw can how see it?
             *-cache:1
                  description: L2 cache
                  physical id: 7
                  slot: L2 Cache
                  size: 12MiB
                  capacity: 16MiB
                  capabilities: burst internal write-back 
    Now why does the capacity not match the size? The mysteries of modern hardware..
04.07.2012 Vitamin D and the endurance athlete
  • My wife's serum Vitamin D came up rather low. So I did some reading about it over at [www.ncbi.nlm.nih.gov] and, particularly interesting for an athlete, [www.vitamindcouncil.org] Mariana never leaves home without a serious sunscreen, and we both always shower after riding, so it's probably advised to supplement, particularly for Mari whose serum levels are low. I like this coach's take on it: [lwcoaching.com]
  • Iron, Creatine, Beta-Alanine, Lysine, Alanine, Niacin, Vitamin C, Zinc.. Sometimes I am reminded how crazy it seems to take this many supplements every morning, and I eat a /lot/ of variety -- that's life being a vegetarian athlete!
16.06.2012 spambayes 1.1 and persistent_use_database
  • If you used spambayes like me -- and truly apparently only me, since there are ZERO hits on Google for this issue -- and have recently upgraded to Precise, you will probably find your .proclog spewing errors like this:
     Attempted to set [Storage] persistent_use_database
     with invalid value True ()
    This is actually caused by a change in a spambayes' configuration key, which is being set in your ~/.spambayesrc to "True", which used to be the right way to do it -- and still is according to the Debian package's README. If you look at spambayes' Options.py you'll find out that this is now a string field, with the following options available:
     ("zeo", "zodb", "cdb", "mysql", "pgsql", "dbm", "pickle")
    Apparently the old format is dbm, which is sort of the new default (the default is runtime selected between ZODB and dbm), but it's probably sensible to be explicit about it, so into .spambayesrc it goes!
12.05.2012 rdiff-backup and a full disk
  • Do you know what you get when you mix rdiff-backup and a disk full error? I do now:
     File "/var/lib/python-support/python2.6/rdiff_backup/regress.py", line
     290, in restore_orig_regfile
     tf.write_from_fileobj(rf.get_restore_fp())
     File "/var/lib/python-support/python2.6/rdiff_backup/rpath.py", line
     1195, in write_from_fileobj
     copyfileobj(fp, outfp)
     File "/var/lib/python-support/python2.6/rdiff_backup/rpath.py", line 64,
     in copyfileobj
     outputfp.write(inbuf)
     IOError: [Errno 28] No space left on device
    Besides being a royal pain in the ass you won't believe me when I tell you that to repair this requires actual surgery on the filesystem. Here's a bug report [savannah.nongnu.org] and a thread that discusses the issue more widely [comments.gmane.org]
  • The solution I found was to find a couple of really large files (MOVs in fact) in the rdiff-backup-data subdirectories and move them around to a separate filesystem while running --check-destination-dir. Hopefully that won't error out completely -- still running.
  • Ah, indeed rdiff-backup can cope with that -- it basically creates zero-sized files where it would have placed the original file and moves on. In my case it's slightly more complicated to interpret because this is actually a recovery pass (using --check-destination-dir) from a backup that failed and therefore the recovery pass is trying to recreate files in the rdiff-backup master directory which are actually deleted in the live system. But that's easier to amend later!
  • The best solution I've found to this problem, so far, is to keep some easily-freed large files on the filesystem. That way, even if you /do/ run out of space and crash, well, you can move them away and then recover.
05.05.2012 Swaps
  • Swapped the battery on my Powertap Pro
  • Also swapped stem and handlebar on the F2C
24.04.2012 Cycling Complexity
  • Finding the exact replacement part I need from Shimano proves tricky: Y-4BN98060 is what I need according to [www3.big.or.jp] but it did take a while for me to figure out I had an SL wheelset. In fact, I by mistake bought a pair of Y-4B909000 (confusingly labeled 4-4B909000) only to find it didn't actually work! Of course, that is for the WH-7800, etc, etc. Damn.
  • /usr/share/xsessions is where GDM finds the environments available for users to log in to the system.
  • How cool is [www.asciiflow.com] huh?
19.03.2012 Sloppy focus on Ubuntu Unity
21.02.2012 TouchPlayer
  • Man I'm loving the HP WebOS Touchpad. I'll write up a proper blog entry about it, but if you're trying to get an application to play random AVI and WEBM videos on it, you'll need to install a third-party application. I installed TouchPlayer, which apparently is a build of mplayer. It wasn't exactly trivial, essentially because you need to use a host PC to do the whole process.
  • First, you enable "developer mode" on the Touchpad, which involves typing stuff into the tablet's search bar.
  • Next step, you run, on a host computer, something called "WebOS Quick Install". This is just a java archive you run doing "java -jar WebOSQuickInstall-4.4.0.jar". You can get it from [dl.dropbox.com]
  • Before running this for the first time, you need to install a "driver", which is called palm-novacom; you can download the .deb from [developer.palm.com] -- beware, it will run a daemon, which kind of freaks me out.
  • You can now connect the tablet to the computer. You now run WebOS Quick Install, which should detect your device fine. Now, click on a little networky icon, and select "Preware". This gets installed on the actual device. You can later use this on the actual Touchpad to install applications, and there are quite a few.
  • Last stop! You then need to download two .ipk files and install them on the tablet through WebOS Quick Install. The first one is for the filemgr service, which should be installable through Preware, but which is currently 404ing -- no worries, a version is available from [code.google.com] Touchplayer itself is available as a download from [mobilecoder.touchpadhp.info] -- just install both ipks and you'll have it available on the device.
  • That's it -- disconnect and enjoy!
20.02.2012 Blobs
  • I just extracted Nvidia's driver source from Ubuntu's latest package and generated an ls -l on kernel/. It's interesting that it's a non-GPL'd kernel module, something which I know is both kinda rare and kinda controversial. The full list is at [pastebin.com] but the remarkable thing is this blob in the middle of it:
     [... dozens of 1-100K .c files]
     -rw-r--r-- 1 kiko mondo 13444768 2011-04-18 18:54 nv-kernel.o
12.02.2012 IcedTea and Banco do Brasil
  • I know that IcedTea really didn't /use/ to work with BB, forcing us to install Sun Java, and yes, even the bank says that at [seg.bb.com.br] but while it is true that in Chromium it doesn't appear to work, if you run Firefox in Oneiric it works exactly as you'd expect it to. Yay!
29.01.2012 Google Talk IPs
  • 74.125.93.127, 74.125.93.126 for the actual STUN and UDP media traffic
  • 74.125.93.102 for the HTTPS traffic.
23.01.2012 Randomness
  • Installed today a new front tire on my Felt F2C, a Schwalbe Durano Plus; let's see how long it will last. The last one, a Specialized All Condition tire, is my current favorite, but I got a nasty sidewall cut in it with practically new thread that kind of miffed me.
  • I did a TV interview today about the educational work we're doing with cyclists and drivers in São Carlos: [eptv.globo.com]
  • Also posted a reply to a rather misleading analysis of the effects of open source on the market, this time directed at Stoq, who the poster says is "killing commercial sales-focused ERP software" -- I do wish that part was right, though! [www.guiadopc.com.br]
  • Fixed my diNovo Edge keyboard again on Oneiric (and chattr +i'd the udev rules file to stop it from breaking!) as per [ubuntuforums.org]
  • Where did my panel volume control go? Well, actually, in 11.04 and onwards, the volume control is now provided by an indicator applet, so what's you're really missing is the indicator applet! Just add it back and be happy.
  • Need to replace your PowerTap bearings? Check out [www.youtube.com]
13.01.2012 Happy New Year
  • The random changes over the new year bring me a few new bits of wisdom. I'm doing the finishing touches on a migration from a 32-bit Lucid on an X61 to an amd64 Oneiric on my mom's new X220 with SSD. She's not sure she likes it yet, but I'm trying hard so she does!
  • The first hint is a workaround for the very odd 40 second hang that you get with OpenOffice (and co) when using your computer in a network whose DNS server doesn't respond to weird queries. It seems that OOO is doing a DNS lookup for, literally, "foobar.(local)" where foobar is your local hostname. The way to solve that is to add a weird entry for the machine in your /etc/hosts file. End of hang!
  • Second is how to install hamachi on Oneiric. Just pull the file from a helpful PPA on [launchpad.net] -- this and hachigui, which you can get from webupd8team's PPA at [ppa.launchpad.net]
  • Third is a reminder of the Qt4 problem that happens on Oneiric; running something like GoldenCheetah fails because of [bugs.launchpad.net] -- or maybe I should say maybe because of, because that bug is fixed and yet this fresh Oneiric install can't run GC. Never mind, install qt4-qtconfig and then run qtconfig-qt4 to select Cleanlooks to get it working.
  • There is so much stuff that I just know nothing about. Today, it's Xen. I'm actually looking for cases of things that exist in the kernel source tree but which don't build into a kernel itself; I know perf is one such thing, and kvm-tools might be another (see [lwn.net] for Ingo's rationale of why more userspace should go in). In fact, there's a bunch of stuff in tools/ -- cpufreqtools, turbostat -- enough that in Ubuntu you get this all through the linux-tools packages. Outside of tools, nothing I can see. Well, there's scripts, but the distinction between tools and scripts is blurry to me -- FWICT scripts is for tools related to managing the kernel source tree, whereas tools is for userspace tools you'd use inside the OS. (Sidestep into coccinelle, which I had seen in-tree but didn't know what was -- it's a tool to describe and help apply a semantic change to source code) There's samples/ too, which contains example kernel and userspace code. Finally, there's firmware/, though that's legacy firmware pulled out from old drivers that are being moved to use the external linux-firmware package and the request_firmware() API. So there are quite a few things, but none of them seems to be a hypervisor (or a similar runnable hyperthing).
  • Anyway, short story is Xen itself, the hypervisor (in other words, the 500k-or-so /boot/xen-*.gz) is not in-tree. It is distributed standalone from [www.xen.org] and includes quite a bit of code that is forked from the kernel (obvious examples are bunzip.c and the acpi/tables stuff). Support for running the kernel as a Xen dom0 guest works out of the box as of recent kernel versions.
01.12.2011 SRAM Chains
  • Are not directional. At least the PC1070 chain I replaced on my F2C isn't! Apparently all the Shimano 10-speed chains are, though: [www.bikerumor.com]
  • Insightful link on the risks of sendmail virtusertable remote forwarding: [www.clasohm.com]
  • My Nokia 3250 was driving me crazy asking me "permitir ao cartão sim o envio da mensagem" (which actually means "Allow SIM to send message?"). Turns out you need to disable Settings->Phone->Security->Confirm SIM Services, and it happens because it's a 64K SIM and this phone doesn't support something called ENS. More information here: [www.howardforums.com]
  • Do you have an old server upgraded to Natty that's not getting its grub updated when you install a new kernel? Well, I did, and the reason was it was missing a single line in /etc/kernel-img.conf:
     postinst_hook = update-grub
    Thanks to Tim Gardner and Steve Langasek who helped track the problem down.
18.11.2011 Multi-homed pain
  • Upgraded Anthem to Oneiric; everything works well EXCEPT for the fact that some packets are ending up in the wrong interface. Specifically, if a request comes in to the interface which isn't the default route, it's not being replied to on the same interface. What's going on?
  • Turns out that SOMETHING happened in the 3.0 timeline that finally made it mandatory to specify rules that explicitly set the right routing table for replies on each IP address. So the fix was just adding these two lines:
     from 189.19.234.109 lookup dsl-eth2 
     from 200.210.17.18 lookup dsl-eth0
    That was really all that was missing. And, if you read the rules, you gotta ask yourself how it is possible that this worked before!
  • Of course, after I've found out what it is I find this site from 2007 explaining exactly this: [kindlund.wordpress.com]
  • Ran into bzr bug with our managed /etc. Damn it! [bugs.launchpad.net]
16.11.2011 The Eyes!
  • I've finally booked eye surgery for next week; Monday I go in for exams and then Tuesday or Thursday is the actual operation.
  • Interesting research in healing of Lasik-cut flaps: [www.usaeyes.org] -- damn, 2 years is a long time to wait for safety, though!
26.10.2011 Clearing out the attic!
  • Just deleted my ~/tmp, ~/Downloads, ~/devel/FREEZER today, so if I need it, remember to look at yesterday's backup ;-)
07.07.2011 A History of Tabs
  • I'm today surprised and mildly annoyed that the shape of Chromium's tabs are exacly the same as the tabs I designed in the first version of the tool www.lecto.com.br uses internally.
  • Was stuck doing a nfs-common update on the diskless, which seems to keep breaking in the postinst phase as nobody really runs nfsroot at Canonical (wink), but found out that dpkg keeps all the scripts in /var/lib/dpkg/info, and you can just hack the file to make the postinst pass and forget about it for now. Yay!
06.07.2011 Xen and Natty
  • Don't seem to mix, we found out when upgrading dragon2 to Natty, unless you update /etc/initramfs-tools/modules to include platform_pci and xen_blkfront. Read all about it at [bugs.launchpad.net]
05.07.2011 GRUBbed out on a Sandybridge
  • Since in the office we only use diskless machines which use gPXE, I end up not worrying about Grub very much. It turns out Grub2 has some weird traits, some great, some bad, and some probably a bit buggy.
  • For instance, with the default settings
     GRUB_HIDDEN_TIMEOUT=0
     GRUB_HIDDEN_TIMEOUT_QUIET=true
     GRUB_TIMEOUT=10
    I can never seem to get access to the menu. I ended up adding a boot tone -- Super Mario no less at [www.reddit.com] -- and then cranking HIDDEN_TIMEOUT to 1, which allows me to press two escapes during the tune and getting to the menu. The _QUIET thing is interesting; if you mark it false you get an ASCII countdown instead of a blinking cursor.
  • When I update-grub on this computer, I /must/ do a grub-install /dev/sda or I get into an infinite reboot loop without any recourse. Recovering involves using a USB boot image which fails into an initramfs prompt without trivial access to my RAID1, so I am not really interested in debugging beyond this.
  • This is Maverick's grub2, so it might be a solved-in-Natty thing.
  • Oh and, please note: if you have a Sandybridge CPU, Memtest86+ 4.10 will hang before starting up. You need to run at least 4.20; thankfully it's pretty easy to replace it -- download and stick it into /boot.
  • Mari's new box also suffers from [bugs.launchpad.net] so I'm also figuring out an updated e1000e driver for her. Ended up using DKMS to do the build, which isn't as hard as it looks. Just use a config like this:
     PACKAGE_NAME="e1000e"
     PACKAGE_VERSION="1.3.17"
     MAKE="make -C src/ BUILD_KERNEL=${kernelver}"
     CLEAN="make -C src/ clean"
     BUILT_MODULE_NAME[0]="e1000e"
     BUILT_MODULE_LOCATION=src/
     DEST_MODULE_LOCATION[0]="/usr/src/"
     AUTOINSTALL="yes"
     DEST_MODULE_LOCATION[0]=/extra
    make sure you have the right headers packages installed, and grab the latest e1000e driver from [downloadmirror.intel.com] -- funny thing was, I had it all set up when I installed the headers, and it Just Worked as part of the post-install hook. I did an update-initramfs -k all -u just in case, though.
  • Finally, this specific Sandybridge Maverick setup ended up with a horribly slow Xorg; turns out it's trivial to get it running fast by using the PPAs suggested in [ubuntuforums.org]
27.06.2011 A RAID Tale
23.06.2011 An ARM Machine List
22.06.2011 Eating those leftovers
  • Started the day by noticing the backup failed because the disk was full. Turns out I was a) backing up a bind-mounted /proc and b) had an extra copy of the root directory backup. Cleaning these up via rdiff-backup --check-destination-dir.
  • Updating Chromium to the latest beta fixed the hang I was seeing -- nice when it's easy to fix something like that!
  • The GC loader worked, but I needed to update /etc/group in the diskless system to get it to read /dev/ttyUSB0.
  • Worked around the weird upstart hang by checking for statd running inside diskless-mount, and used the same approach to avoid having to do the ugly sleep 6s inside statd-start.conf.
  • My GF account is unblocked.
  • Note to self: just rename .conf file extensions to something else if you want to disable them.
  • The only weird thing is that I asked this machine to halt and it.. seems to be hanging; or at least, taking a real long time. Okay, it seems to be that initctl is telling portmap to shut down, but it isn't dying, or maybe it's not even getting that far. I change umountnfs.sh to do an emit --no-wait to work around this and move on.
  • If you're using nautilus on an NFS serve, for instance, looking at your home directory, you may find it hangs to a horrible halt. The problem is related to apparmor: [bugs.launchpad.net] -- the workaround is pretty simple, adding the nameservice stanza to evince-thumbnailer.
  • References you need when doing this sort of work: [nfs.sourceforge.net] [upstart.ubuntu.com] [upstart.ubuntu.com]
  • Finally, the command you want when you want all your UUIDs neatly presented: blkid(8)!
21.06.2011 Natty boot leftovers
  • Sometimes, I'm getting a weird hang at bootup that says:
     IP-Config: no response after 3 secs - giving up
     IP-Config: eth0 hardware address XXX mtu 1500 DHCP RARP
    Online reference: [bugs.debian.org]
  • I've just noticed that cups and ssh get stuck in "starting" states; wonder what's causing that. SSH at least starts up okay at first, though if I stop and then start it, it hangs. I thought it had to do with both being "respawn" jobs, but acpid is as well and I can start and stop it without issues. Does this have to do with the /state stuff I made wait on both those services... or are they just being very very slow?
  • I wasn't logging stuff properly; turns out my rsyslog.d directory didn't have a proper 50-default.conf file, and nothing was getting logged out. But it is also being affected by this weird state blockage I am pointing out above.
  • Chromium won't load any pages. Gah.
  • Need to check if the PowerTap loader in GC still works.
  • Need to check if my GF account is unblocked.
  • rsyslog whines that xconsole is missing, but runs fine; Ubuntu bug: [bugs.launchpad.net]
  • The backup failed because the external drive ran out of space. Guess it's time I went to bed :-/
20.06.2011 Updating Root NFS to Natty
  • I'm in the process of updating our default root filesystem to Natty. I started out a bit stuck on this because our previous filesystems used modified bzimages (XXX: which tool?) to indicate we were booting from NFS; reading through [help.ubuntu.com] I just needed to update the initramfs.conf to indicate BOOT=nfs and regenerate the initramfs'. The server IP address and root-path is provided through DHCP, and this change AIUI tells the initramfs to look there.
  • Now, /dev/shm was coming up with the wrong permissions -- it's meant to be 1777, but wasn't. I can't quite figure out why this was happening, but it has to do with some leftover in /etc/init because I started from a clean slate and it's not happening now.
  • Next, when we boot NFS we get hung in upstart; if I use the alt-sysreq key to kill everything I notice that a) no portmapper is running and b) neither is statd. If I try and run the portmapper manually, it just exits without telling me what's going on. A strace tells me that a) /var/run/portmap.pid can't be written to (sure, the filesystem is read-only) and /dev/log isn't running.
  • So first, let's see if we can mount that filesystem read-write up front. I try this first by putting an entry in the rootpath being served up by dhcpd, but I get nfs-premount complaints suggesting that it doesn't like the ",rw" suffix. Instead, I put an "rw" into the gPXE script commandline and it seems to work.
  • To check, I created an upstart script that simply spawns bash:
     description^I"BASH for the power hungry"
     #   
     start on startup
     #   
     # Output to the console
     console output
     # Tell upstart to wait (see
     # [upstart.at] for more)
     task
     # Run the command
     exec bash
  • And indeed, I can now write to the root filesystem. Great. Now on to debugging why portmap and statd don't run when they should. I can't seem to wrap my head around the statd-mounting and statd interaction, so I'm trying to break it into pieces. Now, I expected the following script:
     start on mounting TYPE=nfs
     task
     exec start statd
     
    would block the NFS mount from going through until statd was running. But either start is asynchronous, or it doesn't block at all. I guess it's because statd takes a while to actually get going, and meanwhile the "mounting" event has completed and mountall. My workaround looks like this:
     start on mounting TYPE=nfs
     task
     console output
     normal exit 1 2
     # 
     script
         start statd
         # This apparently is necessary to ensure the statd run
         # completes; it's a hack but it seems to work more reliably than
         # anything else
         exec sleep 6s
     end script
    and so far it seems to work okay.
  • I then added in scripts, in the following order: rc-sysinit, udev-fallback-graphics, ssh, dbus and gdm. Reboot.
  • Worked. Added now rc and rcS.
  • Noticed I should have brought in mounted-varrun and the other mounted-* bits earlier. Done, though I question how useful mounted-tmp and mounted-dev are in this diskless setup.
  • Brought in a few more hopefully harmless bits: console-setup, dmesg, hwclock*, irqbalance, control-alt-del and module-init-tools.
  • Pulled in a slightly modified ypbind startup script and made gdm depend on it. The script comes from [bugs.launchpad.net] though I can't quite get it to work with the IFACE=!lo check that it uses; I just dropped that check which should work okay.
  • I dropped the mountall-net script which seems to be a hack to work around the lockd issue I think I worked around in a simpler (if slower) way.
  • Started using bzr to control the directory as it's a much better match than this ranting blog entry ;-)
  • I'm thankful for Johan's hint to radeon.modeset=0 on the kernel commandline which (in combination with disabling udev-fallback-graphics.conf) allows me to actually see what is being spewed in the log. I'd love to have upstart just log all the events to a file..
  • Overall, the main issues with upstart racing seem to be around the time the daemon starts up and is actually ready to handle events, and to a lesser extent around the complexity of the state transitions themselves. In our case, while we hooked on mounting to start statd, running the statd.conf script instantly allowed mounting to proceed, which would fail because statd wasn't yet running (why 5s of waiting addresses that, though..) Or in the case of NIS, which is running but not enough for GDM to actually show the list of users.
  • Spend a few minutes figuring out why file locking was broken (again). Turns out that a) /var/lib/nfs needs to have the sm and sm.bak directories mode 700 and writeable by the user running statd. Who, incidentally, is taken from the owner of /var/lib/nfs, and which was incorrectly set to syslog on this system (and there was actually no lockd user in the passwd file, oops).
  • It's unlikely postfix will actually work without /var/spool set up for it. But how do you get it set up initially? Easy -- just create /var/spool/postfix; the rest gets set up by postfix itself!
  • The diskless boxes write to /var/log early in the boot process; I've worked around this by mounting a tmpfs there and later on mounting directories under /state to handle that more gracefully. Looking at the tmpfs /var/log generated without /state. up to gdm running, so far what's written to it is:
     total 336
     drwxr-xr-x 2 root root     60 Jun 20 21:02 ConsoleKit
     -rw-r--r-- 1 root root 108599 Jun 20 21:02 Xorg.0.log
     drwxr-xr-x 2 root root     80 Jun 20 21:02 gdm
     -rw-r--r-- 1 root root    292 Jun 20 21:03 lastlog
     -rw-r--r-- 1 root root   1615 Jun 20 21:02 pm-powersave.log
     -rw-r--r-- 1 root root 208615 Jun 20 21:02 udev
    I've stocked this in 00early-log.contents files in the directory for later debugging.
02.06.2011 Bootable DOS USB Drives (for BIOS updates)
  • Have this annoying issue of having to update a BIOS, but not having a bootable DOS USB stick to actually run the update? Well, I did, and I spent a LONG time reading through various confusing blog posts until I stumbled upon one that gave me two important nuggets:
  • First, use FreeDOS
  • Second, use makebootfat (see [linux.die.net] for a manpage)
  • This actually translates into a very small number of steps. First, you download the fullcd FreeDOS image from [ftp.ibiblio.org] and then you do something like this (watch out for sdX below):
     # You'll need to change only this line
     DEVICE=/dev/sdX
     # Set up your DOS filesystem
     sudo mount -o loop fdfullcd.iso /mnt
     mkdir /tmp/dosboot
     cp /mnt/freedos/setup/odin/kernel.sys /tmp/dosboot
     cp /mnt/freedos/setup/odin/himem.exe /tmp/dosboot
     cp /mnt/freedos/setup/odin/command.com /tmp/dosboot
     cp /mnt/freedos/setup/odin/more.exe /tmp/dosboot
     # Set up a config.sys
     cat << __EOF__ > /tmp/dosboot/config.sys
     DEVICE=HIMEM.EXE
     LASTDRIVE=Z
     BUFFERS=20
     FILES=40
     DOS=HIGH,UMB
     DOSDATA=UMB
     SHELLHIGH=command.com /P
     __EOF__
     # Get the FAT boot sector
     cd /tmp
     unzip /mnt/freedos/packages/src_base/kernels.zip source/ukernel/boot/fat16.bin
     mv source/ukernel/boot/fat16.bin .
     # Do it
     sudo makebootfat -X -o $DEVICE -b /tmp/fat16.bin /tmp/dosboot/
     
  • I'm probably overdoing it by using HIMEM, and selecting only a few files from the odin/ directory; you might be able to avoid the config.sys entirely, and just use the whole /mnt/freedos/setup/odin/ as makebootfat's argument instead of the dosboot thing.
  • The -X is the only gotcha. I think you need to use it because you're using the fat16.bin file (for compatibility, maybe?)
  • It's really that easy. I have no idea why people complicate this so much. The only other post I've seen which uses this strategy is [notes.realitysedge.com] but it is still not enough of a cookbook for me. I suspect there's some issue with BIOS compatibility, and that my method doesn't work for all USB drives or computers, but it does work for me. For reference, the original blog post that hinted me on this is at [blog.realcomputerguy.com]
  • And wow, FreeDOS really does boot fast.
24.05.2011 Mutt, vim and auto-completion
  • I recently changed my mutt options to use autoedit, which is cool because it puts me in vim very quickly to reply to email, but not so cool in that typing in addresses becomes a lot harder. Well, today I spent an hour working up something that autocompletes the addresses when I type tab in those fields. Enjoy my quick hack here: [pastebin.ca]
22.05.2011 From 1TB to 2TB
  • Mari's computer needs lots of disk space because it's where she collects the photos and pictures she publishes on [www.marignatios.com] -- and photos are huge. This weekend I had to move the files from the existing dual-disk RAID-1 to a new pair of disks.
  • It's a long story, but to shorten it: a) I used rdiff-backup to back up the actual filesystem, except for the images b) unfortunately, the only external drive I had that was big enough to hold all her images was formatted as vfat -- I knew I was going to regret it c) I ended up just rsyncing the images to the vfat drive which worked okay because there were no permissions or ownership to care about d) I had to use a live-usb image to actually set up the new disks and copy the data across and finally e) I had a hard time getting grub to work, and I ended up stuck in the grub rescue> prompt once. When that happened, I found [help.ubuntu.com] to be invaluable, so if you ever run into that prompt yourself and feel lost, just read that page. Once I had booted into the system once, grub-install and update-grub fixed it permanently. Two big hammers, but they fix things just like the old /sbin/lilo did ;-)
17.05.2011 Can't Mailman and LinkedIn just be friends?
  • We run a number of mailing lists at Async; quite a few of them are related to Stoq, our made-for-Brazil point-of-sales-and-everything-else management sytem. The lists are busy with lots of users that subscribe to ask about features and workflows and it is always cool to see the interactions there. However, there's one thing which really drives me nuts, and that is that because of web-based email integration, LinkedIn thinks it's cool to send email to our mailing lists. Well, it's not cool, but mysteriously, Mailman doesn't block the emails either!
  • The reason this happens is a subtle Mailman behaviour that I suspected yesterday but which Barry Warsaw confirmed today: by default Mailman also looks at the Reply-To header to check whether the sender is subscribed and therefore allowed to send mail to the list. The email we got had headers like this:
     From: Foo Bar via LinkedIn <member@linkedin.com>
     To: Bar Baz <stoq-users@async.com.br>
     Message-ID:
     <1494000622.13827915.1305593008105.JavaMail.app@ela4-bed35.prod>
     MIME-Version: 1.0
     X-LinkedIn-Template: invite_member_23
     X-LinkedIn-Class: INVITE-MBR
     X-LinkedIn-fbl: s-qakeuW-Xh7nGNqQ4F7rGOINKZVY7HNzQuIeYRlX2tnWAO4zNKkm
     Subject: [Stoq-users] Foo Bar quer manter contato no LinkedIn
     X-BeenThere: stoq-users@www.async.com.br
     X-Mailman-Version: 2.1.13
     Precedence: list
     Reply-To: Foo Bar <foo-bar-is-subscribed-to-list@hotmail.com>
      
     [...]
  • The email member@linkedin.com is actually in a discard_these_nonmembers configuration rule for the stoq-users mailing list, so it should be getting discarded. But because the Reply-To address is of a list subscriber, Mailman thinks that the email is truly being sent by the subscriber, and not by a proxy like LinkedIn. It happily ignores other sender filters and delivers the spam. Ouch!
  • To fix this, you need to update /etc/mailman/mm_cfg.py and set the SENDER_HEADERS variable; the default value (in /usr/lib/mailman/Mailman/Defaults.py.) is:
    SENDER_HEADERS = ('from', None, 'reply-to', 'sender')
    I ended up using simply:
    SENDER_HEADERS = ('from', None)
    and then restarted Mailman. And now I'm waiting to see what my moderation queue looks like -- hopefully it will prove that the change worked! Barry tells me that in Mailman 3 this behaviour is clearer, and that they also have a debug mode planned which would allow us to send a probe email to find out why Mailman is doing what it does. But for now, problem solved!
  • (Launchpad, btw, also does this impersonation trick in order for its bug mail interface to work -- but because of how accounts are set up we don't really make it easy for you to send unwanted mail to a mailing list)
16.05.2011 shirt sizes, aggregate totals and SUMIF
  • I produced a spreadsheet in Google Docs today that was a pretty simple mapping of name and shirt sizes to quantities; something like this:
     foo S 3 
     bar M 5
     baz S 2
     poo L 1
  • I wanted to include an aggregate sum of each individual size; something like:
     S 5
     M 5
     L 1
  • It turns out that the SUMIF function is what I want. You just need to get the syntax right; I used, for each of the sizes, a cell like this:
    =SUMIF(B2:B31, "=S",C2:C31)
    That formula will check column B for cells that contain the string "S"; where they do, it will sum the numbers in the corresponding row of column C, which is exactly what I wanted.
  • There might be a way to do this without having to actually code a cell for each total. But finding out how eluded me in the five minutes I had for this task, so SUMIF remains as my favorite solution for today.
09.04.2011 MSN on Pidgin on Maverick
  • On Mari's computer, Pidgin doesn't like MSN anymore; it reports
     1 account was disabled because you signed on from another location
  • I've seen this mentioned in a few places, but nowhere as a big deal for Maverick users: [developer.pidgin.im] [trac.adium.im] [permalink.gmane.org] [pidgin.im] [bugs.launchpad.net]
  • I /think/ the problem is just that Maverick's Pidgin is old; as has happened before, the MSN protocol was updated and the implementation wasn't. At least upgrading pidgin to the version packaged in their release PPA (see [www.pidgin.im] for details) was enough to solve the problem permanently.
08.04.2011 Path MTU Discovery mysteries
  • Again, facing P-MTU-D issues on my secondary outbound interfaces, and I don't think it's not the fault of the upstream provider (well, I tried with both, and maybe they are both broken). Symptoms are the usual large-transfers-get-packets-dropped-silently-when-incoming.
  • It could be a network card issue, because I'm seeing errors only on that interface:
     RX packets:3058114 errors:14691 dropped:0 overruns:0 frame:14691
  • And I'm fascinated by the reply Stephen Hemminger gives at [www.spinics.net]
  • But for now the workaround is to use the good ole MSS clamping cheat covered at [lartc.org] (how did that disappear from my iptables rules, though..)
  • For other possible problems, look at [prowiki.isc.upenn.edu]
  • In updating the subnet entries, I cheated on the boolean math and used [jodies.de] to calculate the masks and addresses, which is pretty neat.
06.04.2011 Building GoldenCheetah 3.0
  • Midnight project. Trying to build GoldenCheetah's 3.0 branch requires lots of package scavenging, installation and some makefile hackery. But when it does build:
     kiko@gasolinux:~/GoldenCheetah/src$ ./GoldenCheetah 
     Cannot open qollector_interpret program, available from
     [opensource.quarq.us]
     QMetaProperty::read: Unable to handle unregistered datatype 'RideItem*'
     for property 'RideMetadata::ride'
     QFileSystemWatcher::addPaths: list is empty
     Segmentation fault
  • Sigh.
  • A make clean and make later, it seems to kinda work though! I am getting weird results on the graphs for imported rides, so I need to test next by downloading from the actual PT head to see what I think.
15.10.2010 Full CUPS and an empty lsusb
  • Mari's printer won't print. It's not the second time this has happened, but I keep forgetting what causes it. The symptom is simple: you ask the print dialog to print, and nothing happens. The printer properties screen says "/usr/lib/cups/backend/hp failed". The CUPS error_log says
     D [21/Nov/2010:12:30:49 -0200] [Job 43] prnt/backend/hp.c 745: ERROR:
     open device failed stat=12: hp:/usb/PSC_1400_series?serial=BR64H3G1K704BM
    And the final, odd hint is that lsusb just returns you to a shell prompt with no output. Do you know what the problem is?
  • It's related to working around a PowerAgent bug I wrote about a few months ago. To work around a Java library's fixation on /dev/usb I added a link from /dev/bus/usb to /dev/usb, and forgot it there. What happens then is funny: for some reason when plugging in the printer (or returning from suspend, it turns out) udev wants there to be a /dev/usb/lp0 entry, and since /dev/usb is linked to /dev/bus/usb, it ends up creating the lp0 node in /dev/bus/usb/lp0 which in turn causes lsusb to break, since it doesn't expect to find any device nodes on the first level of /dev/bus/usb. Delete the /dev/usb link and you're back in business. Pity it took me 20 minutes today to remember this!
  • PS: the same sort of error hit us on Anthem, our server, a few weeks later -- the hp.c backend complaining about open-device-failed. It ended up also being an issue with USB connectivity -- the USB hub we're plugging the printer into is just flaky.
14.10.2010 For a rainy Saturday
13.10.2010 The keyboard layout that won't go away
  • Is it happening to you too? Ubuntu won't let me get rid of an incorrect keyboard layout, and in fact defaults to it!
  • The problem is pretty complicated, but it's related to GDM, .dmrc and /var/cache/gdm/*/dmrc files. Or at least I've figured this from the various places it's been reported: [bugs.launchpad.net] [bugzilla.redhat.com] [ubuntuforums.org] [bugs.launchpad.net]
  • I deleted .dmrc, /var/cache/gdm/kiko/dmrc, logged out, logged back in and the problem is gone. But I think there's definitely a bug in there..
12.10.2010 Anthem now 64-bit
  • After a whole day of work Anthem is now Maverick 64-bit installed on a simpler set of RAID-10s. Issues that we hit so far:
  • [bugs.edge.launchpad.net]
  • [bugs.edge.launchpad.net]
  • A weird long hang of sync and dpkg when under heavy I/O load that might a tuning issue or something else
  • No /etc/init.d/iptables to restore my firewall rules, but iptables-persistent saved the day.
  • Cold bootup via NFS to GDM screen in 55s; not bad IMO! However, I'm still stuck with a /var/spool filesystem that still won't mount at boot, though in recovery mode a mount -a fixes it. Mystery!
  • Note to self: /proc/sys/kernel/domainname can't be set to anything but the correct NIS domain, as ypbind will always use it (and not read files or anything else to get it right)
09.10.2010 From Jaunty to Maverick in many painful steps
  • Upgrading our serveraxis-hosted server from an ancient Jaunty to Maverick has proven to be trickier than I thought. Here's the list of problems:
  • The kernel we boot off is a Xen guest kernel and it's hosted outside of the image, so when I upgrade to Karmic mountall starts failing all over because the kernel is too old: [bugs.edge.launchpad.net] [bugs.edge.launchpad.net] [blog.webangel.ie]
  • Once we boot we get a recovery console. I manage to log in by using serveraxis' excellent webconsole, but to get the paste working there requires some tricking Firefox into letting JS apps access the clipboard: [kb.mozillazine.org] -- in particular you need to use the about:config trick for granting access to signed scripts.
  • Once there it's possible to bring network interfaces up and even to start sshd, but logging in via ssh doesn't work because there's no /dev/pts, which you can easily fix by just mounting it: [www.linuxquestions.org]
  • I decided to contact serveraxis support about the kernel and continue recklessly upgrading with a non-booting system in the hope the kernel can get sorted out separately; apparently I'm not the only one and they've made at least one customer happy: [jenniandjordan.com]
  • When upgrading to Lucid, the installation fails to install the Lucid version of mountall -- again, because the kernel is too old, though this time it's because it triggers a tar bug: [bugs.edge.launchpad.net] [bugs.edge.launchpad.net]
  • I managed to wget mountall and a new tar, but the new tar package doesn't install because of the tar bug. Not to worry: ar x tar_1.23-2_amd64.deb and grab the tar binary in the data.tar.gz, putting it in /sbin. Got the mountall package installed and apt-get -f install && apt-get -u dist-upgraded away, which brings us all the way to Lucid.
  • The reboot into Lucid was as eventful as the one to Karmic, but I'm now a pro at fixing it up so I can actually upgrade fine.
  • The server has been mysteriously halted as I was using it; either this is routine maintenance or somebody's doing something to the server for me! And indeed, here it is:
     kiko@dragon:~$ uname -a
     Linux dragon 2.6.35.4-2.pvops #0 SMP Mon Sep 20 18:32:22 CDT 2010 x86_64 GNU/Linux
    ServerAxis absolutely rock -- they are actually a bit scary even!
  • Finally, until the reboot happened I was getting for a brief moment a compatibility issue with dircolors that is best explained by this bug: [bugs.debian.org]
  • Back to where I started: getting bitlbee-plugin-skype working on Dragon so I can use it to talk to people without proper chat clients. Pulled and installed the two packages from sid: [packages.debian.org] [packages.debian.org]
  • Then installed a vnc4 server and client and ran skype manually on the server; after some rock and rolling managed to get it to log in and run, and the skyped configuration (once you understand it) isn't that bad in fact. The thing which I wasn't clear about is that a) you need to have skype running and b) running skyped is what will cause you to be prompted to allow Skype4Py to access skype. But now it's all clear!
  • Once the installation and skype were happy through xvnc, I installed xvfb and just ran skype and skyped with the display set appropriately; it seems to just work which is nice after a whole afternoon of things that just didn't ;-)
  • Found out this little command
     account set skype/display_name "John Smith" 
    That seems to work with MSN as well. Interested in knowing what it does (and if it's persistent across connections and Bitlbee restarts..)
09.09.2010 Memory and Amnesia
  • Upgrading a desktop to 4GB. I won't really believe that somebody can actually need four gigs of RAM on a desktop, but Firefox and OpenOffice keep surprising me as their appetite for memory grows! Anyway, the important thing to know about when doing this upgrade is that:
  • You really want a 64-bit installation if you are using more than 4GB of memory; you can use PAE if you want to stick with 32-bit, but I'm not entirely sure it's worth it.
  • Low-end motherboards, including those using the Intel i945 chipset, don't really support much more than 3 gigs of ram; they have I/O addresses within that address space, and they lack memory remapping functionality to make it work. [en.wikipedia.org] has the skinny, and [www.linuxquestions.org] discusses the actual i945 chipset. There's a blog post at [blogs.msdn.com] that presents it nicely.
  • Meanwhile, Frictional Games released a pretty amazing game called Amnesia -- and they have a version for Linux! Spend your US$20 wisely here: [www.amnesiagame.com]
25.08.2010 unclutter hurts
  • I have two annoying things bothering me in Lucid. First .xsession-errors fills up to gig-size every other day with some weird
     "Window manager warning: Got a request to focus 0x2821bae (Terminal)
     with a timestamp of 0. This shouldn't happen!"
    messages. Second, if my mouse is highlighting a window and I alt-tab to another one, every other second or so the focus would shift to the original window. That essentially drove me CRAZY. So today, after having to delete the file for the Nth time because it was at 2GB, I found it that the culprit is UNCLUTTER!! [bugs.edge.launchpad.net] has the scoop, but if you want a recommendation from me, it's "apt-get remove --purge unclutter for now. I think it's just buggy -- the idea is a nice one, though I'm not sure I want an extra daemon just for that functionality -- in particular because it seems that the mouse pointer blanks over gnome-terminal when I'm typing anyway.
  • Bonus Lucid hint for the day: if your sun java plugin is installed but your firefox or chromium don't see them, try Johan's magic combo:
     update-java-alternatives -l
     update-java-alternatives -s java-6-sun
06.08.2010 A Logitech DiNovo Edge dongle's embedded and HCI modes
  • I have a DiNovo edge and think it is absolutely fantastic, except when it stopped working on my way to my Lucid upgrade. What happened? The problem is that to Windows users the dongle normally works in embedded mode, meaning it appears to the system as a regular USB keyboard and mouse. Many Windows users hate that behaviour, and would rather the dongle behaved as a regular bluetooth adapter. However, Linux users have the flexibility of choosing in which mode they want the adapter to work, and the magic of selecting them is done through hid2hci, which is run by udev when the device is plugged in. Now it used to be that you could enable or disable hid2hci by fumbling in /etc/default/bluetooth; with the inexorable move to udev, however, on Lucid this behaviour is now hardcoded in udev rules and by default hid2hci is run, which means the keyboard only works if you perform a bluetooth pairing exercise. And since it's a keyboard, that exercise can prove pretty challenging!
  • The command which is run when the BT dongle is plugged in is pretty simple:
     /lib/udev/hid2hci --method=logitech-hid 
         --devpath=/devices/pci0000:00/0000:00:1d.2/usb4/4-2/4-2.3/4-2.3:1.0/usb/hiddev0
    Note the path points to the hiddev0 directory for the device in question. Note also that it seems you can't revert back to embedded mode once the command is run, for some reason.
  • People that are running into this problem on Lucid should know that it's possible to have the dongle still work in embedded mode as long as the hid2hci call in /lib/udev/70-hid2hci.rules for the keyboard isn't run. When embedded mode is active, an lsusb run will list 3 devices like this:
       Bus 004 Device 017: ID 046d:c714 Logitech, Inc. 
       Bus 004 Device 016: ID 046d:c713 Logitech, Inc. 
       Bus 004 Device 015: ID 046d:0b04 Logitech, Inc.
    When you issue the hid2hci run, a 4th device appears, representing the mini-receiver in HCI mode:
       Bus 004 Device 024: ID 046d:c709 Logitech, Inc. BT Mini-Receiver (HCI mode)
       Bus 004 Device 023: ID 046d:c714 Logitech, Inc. 
       Bus 004 Device 022: ID 046d:c713 Logitech, Inc. 
       Bus 004 Device 021: ID 046d:0b04 Logitech, Inc.
    In this mode, you'll need to connect through bluetooth. Note that I haven't found that works reliably on my powerpc mac mini, though it seemed to on a little netbook. The simple workaround seems to be to avoid bluetooth mode by commenting that udev rule out, and keep an eye out for changes in that area when you upgrade.
  • Embedded mode is kinda fascinating; from the OSs perspective it's just a keyboard and mouse that are plugged into a hub; there's no bluetooth anything. When you plug the dongle in, you get the usual dmesg spew of USB information. Here's what dmesg is actually telling you:
  • A USB hub is found; 3 ports detected (of which one is the hub, device 046d:0b04)
  • A keyboard (046d:c713) is found, though the device string identifies it as a "Logitech Logitech BT Mini-Receiver"
  • A mouse (046d:0b04) is found, with the same device string as above.
  • You can play with the dongle a bit when it is in HCI mode, by the way, with hcitool; here's some info on Johan's macbook, and on my Nokia e51.
     kiko@gasolinux:/lib/udev/rules.d$ hcitool dev
     Devices:
         hci0    00:07:61:E3:38:E0
     kiko@gasolinux:/lib/udev/rules.d$ hcitool inq
     Inquiring ...
         00:23:12:39:44:1F   clock offset: 0x1b9d    class: 0x38010c
         00:22:FC:4D:65:47   clock offset: 0x618c    class: 0x5a020c
     kiko@gasolinux:/lib/udev/rules.d$ sudo hcitool info 00:23:12:39:44:1F
     Requesting information ...
         BD Address:  00:23:12:39:44:1F
         Device Name: Johan Dahlin’s MacBook Pro
         LMP Version: 2.1 (0x4) LMP Subversion: 0x21b4
         Manufacturer: Broadcom Corporation (15)
         [...]
     kiko@gasolinux:/lib/udev/rules.d$ sudo hcitool info 00:22:FC:4D:65:47
     Requesting information ...
         BD Address:  00:22:FC:4D:65:47
         Device Name: Kiko o substituto
         LMP Version: 2.0 (0x3) LMP Subversion: 0x6cc
         Manufacturer: Cambridge Silicon Radio (10)
    If you're in embedded mode, that won't work of course:
     kiko@gasolinux:~$ hcitool dev
     Devices:
  • References to this problem include [bugs.debian.org] [www.mail-archive.com] [www.mail-archive.com] [bugs.edge.launchpad.net] [bugs.edge.launchpad.net]
05.08.2010 RAID1 Lucid desktops
  • I followed most of the advice provided by [blog.foobaria.com] in installing a RAID1 array on a Lucid desktop, and in the end got to a booting system, but there were some things that I thought were worthy of note:
  • I didn't have network for the installation, so I just put the mdadm package on a USB stick and dpkg -i'd it into the system.
  • Perhaps for the reason above, upon first boot I ended up stuck in initramfs because my /etc/mdadm.conf had no ARRAY entries. I am still a bit surprised that we actually need that file to boot (see my posting of 2009-12-09 for more RAID-on-Ubuntu woes), and I am not entirely sure why the --scan option to assemble doesn't work, but I had to enter three ARRAY lines into it beore it actually worked. In the process I learned about the convenient -m flag to mdadm -A.
  • You can ask the installer to install GRUB on the MD device, which causes it to be installed to both drives, which is what you wanted.
  • I'm not sure I'm entirely happy with the speed of the desktop on the drives I have, though. Maybe it's just that it's RAID1. Interface-wise I know the drives support SATA-II signalling:
     kiko@hellokitty:~$ sudo hdparm -I /dev/sdb
         [...]
            *    Gen1 signaling speed (1.5Gb/s)
            *    Gen2 signaling speed (3.0Gb/s)
    But I'm not sure this ICH7 motherboard supports 3.0Gb/s..
02.06.2010 iwlagn disconnects.. then connects.. then disconnects.. then
  • For some reason, since I've upgraded to Karmic and through Lucid, my x61 and Mariana's x61s have the same problem: they keep dropping their connection to our DD-WRT WRT54G AP, with the same pattern:
     [35502.041062] No probe response from AP 00:40:10:10:00:03 after 500ms, disconnecting.
     [35503.958234] wlan0: direct probe to AP 00:40:10:10:00:03 (try 1)
     [35503.968728] wlan0: direct probe responded
     [35503.968738] wlan0: authenticate with AP 00:40:10:10:00:03 (try 1)
     [35503.970691] wlan0: authenticated
     [35503.970731] wlan0: associate with AP 00:40:10:10:00:03 (try 1)
     [35503.973310] wlan0: RX AssocResp from 00:40:10:10:00:03 (capab=0x431 status=0 aid=1)
     [35503.973318] wlan0: associated
     [35622.060151] No probe response from AP 00:40:10:10:00:03 after 500ms, disconnecting.
     [35623.973605] wlan0: direct probe to AP 00:40:10:10:00:03 (try 1)
     [35623.976226] wlan0: direct probe responded
     [35623.976234] wlan0: authenticate with AP 00:40:10:10:00:03 (try 1)
     [35623.979137] wlan0: authenticated
     [35623.979177] wlan0: associate with AP 00:40:10:10:00:03 (try 1)
     [35623.981630] wlan0: RX AssocResp from 00:40:10:10:00:03 (capab=0x431 status=0 aid=1)
     [35623.981633] wlan0: associated
    ad infinitum, every 120s. Seems like the only people that have this so far are at [permalink.gmane.org] and [ubuntuforums.org] and [bugs.donarmstrong.com] but neither of them have 4965AGNs like our Thinkpads do.
  • I've found a bug at [bugzilla.intellinuxwireless.org] but it's not really the same issue I think; at any rate there are a number of patches attached to comment 113 there, so it might be worth looking through. And the guy at [bugs.launchpad.net] seems to have the same problem (though he's posting to a bug which doesn't describe the same symptoms) so let's try disabling ipv6 (though it makes no sense to me) since it is my only lead... no, of course that doesn't work. Oh well, let's keep looking.
  • So it /could/ be the issue at [bugs.launchpad.net] which is caused by network-manager rescanning every 2 minutes and the driver hanging while the rescan happens. But one thing that strikes me is that it only happens with the access point we use at home -- in the office it works just fine.
  • I now think the reason this happens is because there is some oddness with the WRT54gv6 that I have at home. It's configured in repeater bridge mode, and that's where we have problems. I've noticed that it is often out of memory and has difficulty answering to web requests; it seems this is more than just a wifi adapter driver issue. I've since replaced that AP with a WRT160NL and it is working much more reliably; I also no longer get the driver hangs and error messages I was getting above. It seems to be a weird interaction between the AP and the wireless card, but it's not entirely clear what it is.
  • Later update: if dmesg tells you "Firmware error" then check out [bugzilla.intellinuxwireless.org] which is another one of those ironic bugs that are a) hard to identify b) affect lots of people. As a workaround you can enable swcrypto (whatever that means!) and/or try grabbing the older firmware at [intellinuxwireless.org]
01.06.2010 Reverse Path Filtering
  • We have a multi-homed server that chooses where to send traffic depending on its content; web traffic goes through one network, VoIP over another, and so on. One thing that has always left me surprised is the fact that we log so many martian packets on it with rp_filter enabled -- if reverse path filtering is desireable then why can't I use it here.
  • Turns out that I just don't understand RPF well enough. I used to think it was just going to drop packets that are from non-routeable RFC-1918 addresses and other obviously broken sources, but in fact it is more than that; the router when receiving a packet does a route check on the source address. It then will only forward the packet to another interface /if/ the packet was received from the interface it would return it to according to its routing tables. So if I receive a packet on interface A from a source address S destined somewhere non-local, that packet will only be allowed through if a packet destined to address S would be routed to interface A.
  • This works okay for "normal" routers, since there is only one path which packets should go through. but on our traffic-balancing setup it ends up being too simplistic. For instance, we have a default route set up to our primary network interface, and if /any/ packet arrives on our secondary interface, it gets dropped: the default route is on the primary interface, and since we use firewall marking to determine the route, the reverse path filtering check never realizes the routing table would have decided differently. I found the answer at [www.mail-archive.com] pretty interesting in confirming that, and there's even a patch that fixes this up at [bugzilla.kernel.org] but it was never applied as there was a design concern; the feeling was that netfilter could handle its part of rp_filter checking. If you care about how it's implemented, check out fib_validate_source() in net/ipv4/fib_frontend.c but it's not very easy reading unless you know that corner of the kernel fairly well.
  • Incidentally, really good commentary on forging of source addresses and what routers should do about it can be found here: [serverfault.com]
30.05.2010 DD-WRT Wireless Bridging
  • Spent about 3h today trying to get my wifi bridge operational again. Here are some of the stumbling blocks I ran into in the hope they are useful to anybody using DD-WRT on a pair of WRT54g boxes from Linksys:
  • I'm using DD-WRT v24-sp2 13064 on both main AP and repeater, but the repeater is using the micro flavor, since it's a v6 box.
  • I wasted about 2h on the fact that the repeater would not join the main AP's network, and would never show up as a client in the Wireless Nodes listing in Status_Wireless. After trying pretty much every single configuration known to man, Johan convinced me to do a hard reset of the main AP, and guess what? It worked! @#!@*#*@! I would never have guessed this, because at least in theory the main AP has nothing to do with the repeater AP, but something was cached in the configuration that survived across reboots. So if you find yourself stuck where the repeater just accumulates TX errors and never finds the main AP, try doing a hard 30/30/30 reset of the main AP. Even if the documentation misleads you into thinking otherwise.
  • WPA Personal encryption does work, but if you set the advanced configuration option "Authentication: shared key" it stops working, and the password MUST be the same in the main and virtual interfaces. In WEP mode, which is what I was using before, the passwords didn't have to match, which I really liked. There might be something in the hardware which limits this -- I don't understand enough about how wireless encryption and DD-WRT's wireless bridging mode is implemented.
  • I have a pair of higher gain omnidirectional antennas but I'm not convinced they work very well, nor do I understand how or whether DD-WRT's auto mode for the antennas works. I'm going to graph packet loss between houses now and do one change per two evenings over this week to figure out what can be better.
  • There are many advanced config settings to tweak, but for now I'm starting with the same configuration on both, using a G-only network.
15.12.2009 Evolution and Google Calendar
  • This works the way you'd expect, just adding a new calendar in Evolution, and it syncing automatically to the calendar applet. But there are a few caveats to it:
  • Google provides you with https:// URLs; Evolution expects them to start with webcal:// and will unhelpfully tack on the method in front of the URL for you, so you end up with something that starts with [https] -- yuck. Just delete the https:// in front of the address and everything works (though I am surprised it does, as I'd expect it to be SSL-only -- oh well). I didn't use Secure connection and it still worked -- don't know if it should but I'm not pretending to know what I'm doing here!
  • If it doesn't work, I bet your system provides settings for a network proxy. For some reason, this doesn't work for calendaring -- perhaps [bugs.edge.launchpad.net] has something to do with it -- but the workaround is pretty easy, just don't use a proxy for Evolution, or provide details there manually.
  • Whatever you change, it appears you have kill the additional processes Evolution spawns to actually have them pick up the changes. At least I did knock out evolution-data-server and evolution-alarm-notify for good measure.
  • If something goes wrong, you get notified of a problem with the ics URL through the statusbar, which might be a bit unexpected -- if you click on the icon in the statusbar you get a dialog with more details -- in my case, a connection problem.
10.12.2009 WCDMA and UMTS
  • For Brazilians, the important thing to remember is that 3G frequencies vary according to operator and location, and [www.gdhpress.com.br] tells you more about that sort of thing. In general, for my operator, Claro, north american versions work, but that means no E52 for me, since the US version isn't out yet.
09.12.2009 mdadm, USB and SCSI, UUIDs and initramfs-tools
  • We've had a problem with our Ubuntu server since last year when I bought an external USB drive to handle rdiff-backups: when the bootup process starts, if the USB drive is plugged in, the RAID-5 arrays we have get confused because the drive names change -- normally sda is the first SCSI drive, but since probing is asynchronous, when the USB drive is detected first it's the external drive and mdadm fails into an initramfs shell. That's not nice!
  • A separate problem we were also running into was that the spare partitions, which normally live in /dev/sde, were not being automatically added to the array (even when the USB drive wasn't connected and the bootup succeeded) so I had to add an ugly rc.local command to add them in. This is similar to the issues found at [bugs.edge.launchpad.net] and [ubuntuforums.org] but not quite the same, as mdadm.conf's DEVICES entry actually included the spare drive.
  • So from 7pm to 11pm yesterday Johan and I worked on figuring out exactly what was causing this. And it turns out that it was a combination of two things, both related: the mdadm.conf ARRAY definitions, and a race condition during the initramfs process between the RAID autostart and the module-based kernel hardware probing. Here's how it works.
  • Ubuntu starts and mounts its RAID arrays in an initramfs. The initramfs image is packed with a set of shell scripts; the image is assembled from a bunch of code in /usr/share/initramfs-utils, primarily scripts with additional hooks that are run during the initramfs image generation and which modify the image itself. Anyway, while in the initramfs, the following happens:
  • Between initramfs' init-top and init-premount phases, it loads all essential modules. It knows to load the RAID modules through the work of hooks/mdadm (installed by the mdadm package), which adds them to the essential module list inside the initramfs. It knows to load the USB and SCSI modules because by default Ubuntu uses MODULES=most in its initramfs configuration.
  • Now, module loading order is deterministic, but in Ubuntu the SCSI probing is set to asynchronous (via the kernel option CONFIG_SCSI_SCAN_ASYNC=y; see [lwn.net] for details) the actual drives show up as the bus scans are finalized.
  • Meanwhile, in init-premount, a udev script fires off udevd which goes away and kicks off 85-mdadm.rules' RAID assembly, using mdadm --incremental. This is a pretty magical mdadm mode, and a read through the manpage section is pretty interesting.
  • Also in init-premount, an mdadm script checks for degraded RAID and LVM devices, and figures out whether or not to try and run degraded arrays. It does this by scanning the RAID superblocks using mdadm --misc --scan --detail.
  • After loading the modules, a script is run to mount the local filesystems; on non-NFS systems this script is called "local", and this is where we see if the root device is present and mountable.
  • After all this is done, the init-bottom scripts are run; here is where the udevd process is killed and whatever handling of the available hardware stops until udevd is started again.
  • The problem we are running is that the initial SCSI bus probe is done in a flurry of asynchronous activity; if you stop and read your kern.log after a reboot you're find out just how random the ordering is. What can happen on systems with lots of drives (such are ours, which has 6) is a race between the SCSI bus scanning, udev's triggering of 85-mdadm.rules and the killing of udev after the root filesystem is mounted. The race happens because the bus scan is asynchronous, which in turn means that the devices (which if you noticed above, are being added via mdadm --incremental) might take too long to show up -- long enough that udevd is killed and the real init starts trying to mount the rest of the (still incomplete) local filesystems.
  • To solve this, we simply added a script which sleeps for 15s in initramfs' local-premount; this is enough time for the hardware probing and udev rules to complete firing, ensuring that all RAID devices have been assembled and are available for mounting once /sbin/init kicks in. Simple but does the trick. It is likely that changing the scsi_mod scan option to "sync" would also solve this part of the problem. Yet another option would be to load the scsi_wait_scan module in local-premount.
  • We had an additional problem, which was that our mdadm.conf file specified sdX-style partition names for each ARRAY:
     ARRAY /dev/md2 devices=/dev/sda5,/dev/sdb5,/dev/sdc5,/dev/sdd5
    This doesn't play well with mdadm's --incremental mode when the drive order is changing around -- so when the USB drive appeared as /dev/sda the array could never be initialized and we failed to mount the root device. Changing the ARRAY line to refer to the MD device through a UUID solved this problem:
     ARRAY /dev/md2 UUID=b3b855d3:d8ee85f4:2ee19fc3:ff71564e
    As a nice side-effect once we made this change, mdadm --incremental started assembling our spare devices into our arrays: I had never been able to specify spares using the devices= syntax.
  • I suspect that in part [bugs.edge.launchpad.net] is caused by the on-demand nature of the module loading, but I'm not entirely sure -- perhaps specifying an explicit DEVICE line in mdadm.conf causes each device to be hit, which in turn means the right modules are probed. But I think it's actually a red herring, and that in fact the problem is with the modules Jan was missing in the initramfs.
  • Finally, it is strange but true that in the cases where mounting non-root local filesystems failed because of the udevd race, udevd in userspace never kicked the incremental mdadm again to finalize the running arrays, and even when running cat /proc/mdstat from the prompt, you could also see they were left incomplete or lacking spares. I'm not sure why this happens.
08.12.2009 Bad source addresses on my local server
  • Since a few reboots ago we ran into a pretty annoying issue on our server: packets originating on the server that were delivered to the server itself, handled by lo, were using the wrong source address. In more detail: our internal address for the server is 192.168.99.4. If when sitting on the server and I did:
     kiko@anthem:~$ telnet 192.168.99.4 80
     Trying 192.168.99.4...
    the connection was never completed. If I looked at a tcpdump trace
     17:18:17.439479 IP 189.x.x.x.42826 > 192.168.99.4.80: S 2220677816:2220677816(0) win 32792 mss 16396,sackOK,timestamp 6978218 0,nop,wscale 6
    it became clear that the wrong source address was being selected. But why?
  • I spent a lot of time reading and rereading the source address selection descriptions at [linux-ip.net] and couldn't figure it out. Everything in my routing tables was kosher -- and even if I cleared out all our fancy ip balancing rules and used plain turkey kernel and default gateway rules, the address was wrong. The src hints were there. There was no funky ordering issue. So why was the address wrong?
  • I finally read a slightly unrelated post at [lists.unix-ag.uni-kl.de] that gave me another idea: NAT! I hadn't thought of this possibility, nor did I recall changing anything there, but it was worth a try.
  • Turns out it was exactly that. I had a rule which said that:
     -t nat -A POSTROUTING -s 192.168.99.0/24 -o !eth1 -j MASQUERADE
    This would have worked perfectly if the packets were actually going to eth1. However, in the case where you are on the server connecting to itself, the packets go to the lo interface, but with eth1's source address 192.168.99.4, which matches that rule -- oops.
  • There are various solutions to this problem -- the one I went with was simple, specifying a destination network of ! -d 192.168.99.0/24 -- in other words, we only masquerade packets that are actually meant to be routed elsewhere. I could also have specified two ACCEPT rules that came before the MASQUERADE rule, avoiding masquerading for eth1 and lo simultaneously.
  • The trickiest thing with masquerading is that changing the rules takes a while to actually kick in -- it's not instantaneous. So if you change the rule and run the test immediately, it will fail -- but if you wait a litle bit you'll see it's actually fixed. Gar!
  • The morals to the story are
  • a) source address selection is also affected by IP masquerading even if the documentation doesn't remind you of that
  • b) when a host connects to itself, the lo interface is always used, even if the address being used to connect is not 127.0.0.1, and
  • c) it takes a while for iptables rule changes to actually take effect, so wait a while before actually testing them!
03.12.2009 Google Calendar on the Ubuntu Desktop n more
  • [johnnyjacob.wordpress.com]
  • When your sound goes bad, "sudo alsa force-reload" to the rescue!
  • When your xchat completion is weird, use "/set completion_amount 0"
23.11.2009 Git crack HEADs
  • Maybe git knows that I don't actually want to be using it:
     kiko@baratinha:~$ git clone [gitorious.org]
     Initialized empty Git repository in /home/kiko/x11-maemo/.git/
     remote: Counting objects: 241288, done.
     remote: Compressing objects: 100% (73222/73222), done.
     remote: Total 241288 (delta 191071), reused 214443 (delta 165447)
     Receiving objects: 100% (241288/241288), 186.11 MiB | 64 KiB/s, done.
     Resolving deltas: 100% (191071/191071), done.
     warning: remote HEAD refers to nonexistent ref, unable to checkout.
  • I wonder what it means when I have just spent 30 minutes downloading revisions to end up with no working tree! #$!@#@
26.10.2009 Saris Poweragent woes
  • Every once in a while I end up unable to download my PowerTap power files because Poweragent can't contact the PT head. Today it's giving me a traceback:
     WARNING [com.cycleops.jpowertap.Manager]: Exception Occurred Opening Device 0
     java.lang.NullPointerException
         at com.cycleops.jpowertap.CycleOpsDevice.readVersion
             (CycleOpsDevice.java:313)
         at com.cycleops.jpowertap.CycleOpsDevice.getVersion
             (CycleOpsDevice.java:286)
         at com.cycleops.jpowertap.CycleOpsDevice.getVersionFloat
             (CycleOpsDevice.java:387)
     [catch] at com.cycleops.jpowertap.Manager.getConnectedDevices
             (Manager.java:138)
         at com.cycleops.devicemanager.DeviceManager.getSelectedDevice
             (DeviceManager.java:52)
         at com.cycleops.devicemanager.DeviceManager.getSelectedDevice
             (DeviceManager.java:41)
         at com.cycleops.devicemanager.DownloadDeviceAction.performAction
             (DownloadDeviceAction.java:83)
    Wish I knew how to fix this.
  • Some more investigation using good ole strace shows this:
     [pid 19639] open("/proc/bus/usb", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_ CLOEXEC)
         = -1 ENOENT (No such file or directory)
     [pid 19639] open("/dev/usb", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC)
         = -1 ENOENT (No such file or directory)
    which suggests that we've got a legacy compatibility problem -- Ubuntu hasn't had a /proc/bus/usb mounted in a while. Let's see what we can do.
  • So I believe that /dev/usb was deprecated a while back in favor of /dev/bus/usb; in experimenting I add a symlink from /dev/bus/usb to /dev/usb and it seems to go a bit further. Next stop:
     [pid 21297] open("/dev/usb/005/012", O_RDONLY 
     [pid 21297] <... open resumed> )        = 126
     [pid 21297] read(126, "\22\1\20\1\0\0\0\10\3\4\1`\0\4\1\2\0\1", 18) = 18
     [pid 21297] read(126, "\t\2 \0\1\1\0\200", 8) = 8
     [pid 21297] read(126, "-\t\4\0\0\2\377\377\377\2\7\5\201\2@\0\0\7\5\2\2@\0\0", 24) = 24
     [pid 21297] close(126 
     [pid 21297] <... close resumed> )       = 0
    It turns out that this strace is misleading. The open() there is actually failing because of a permissions problem:
     ls -l /dev/usb/005/012
     total 0
     crw-rw-r-- 1 root root 189, 512 2010-10-05 12:08 001
     crw-rw-r-- 1 root root 189, 524 2010-10-05 18:31 013
    That's expected, since udev is the one expected to create user-visible device nodes under /dev -- for instance, /dev/ttyUSB0, which has the right permissions.
     crw-rw---- 1 root dialout 188, 0 2010-10-05 18:55 /dev/ttyUSB0
  • Anyway, a quick chmod 666 and poweragent runs again, and this time, it actually works! Here's the strace to show what happens:
     [pid 22794] open("/dev/usb/005/014", O_RDONLY) = 125
     [pid 22794] read(125, "\22\1\20\1\0\0\0\10\3\4\1`\0\4\1\2\0\1", 18) = 18
     [pid 22794] read(125, "\t\2 \0\1\1\0\200", 8) = 8
     [pid 22794] read(125, "-\t\4\0\0\2\377\377\377\2\7\5\201\2@\0\0\7\5\2\2@\0\0", 24) = 24
     [pid 22794] close(125)
    As you can see, the open() and close()s aren't unfinished this time. I'm not entirely sure why they don't finish when the permissions immediately fail, but maybe strace is tricking me, or maybe something's happen asynchronously. At any rate, once Poweragent has finished looking at all the USB devices, which it does in turn, it finally open()s the right device and then creates a long-lived fd to manipulate and download from:
     [pid 22794] open("/dev/usb/005/014", O_RDWR) = 35
     [pid 22794] ioctl(35, USBDEVFS_GETDRIVER, 0x9e4fdd10) = 0
     [pid 22794] ioctl(35, USBDEVFS_CONTROL 
     [pid 22794] <... ioctl resumed> , 0x9e4fdc70) = 30
     [pid 22794] ioctl(35, USBDEVFS_CONTROL, 0x9e4fdc70) = 30
     [pid 22794] open("/usr/local/lib/ftd2xx.cfg", O_RDONLY) = -1 ENOENT (No such file or directory)
     [pid 22794] open("/usr/lib/ftd2xx.cfg", O_RDONLY) = -1 ENOENT (No such file or directory)
    I'm not sure exactly how to fix this in a non-hackish way, but I'll write to Saris and see what they think.
21.10.2009 A Nokia E51 as a Vonage Softphone
  • So today I set up my E51 as a Vonage Softphone sip client; the instructions I followed were up at [www.esato.com] and [www.vonage-forum.com] and apart from the fact that I got the password wrong, because in their wisdom vonage.com prints the password in a non-serif font (meaning lowercase L and uppercase I are kinda impossible to distinguish) it works really well. The other thing to watch out for is that the domain is "sphone.vopr.vonage.net" -- if you use just sphone.vonage.net the registration will be successful but you won't be able to dial.
  • The only bummer is that the international call rates are not the same as for the main service (that's kinda fine-printish but oh well). But hey, the portability is hard to beat..
  • Read a little bit about the ToS IP field: [forums.whirlpool.net.au] -- I used this to grok the instructions at [www.voip-info.org] which basically is a real upgrade from basic wshaper for VOIP; basically it puts the VOIP traffic in a non-balanced queue, and everything else in an HTB-set set of classes -- I read [www.opalsoft.net] to really understand how the whole thing works, and it's actually pretty cool.
  • Upgraded the E51's software via Windows using a couple of hacks as well. Used NSS to change the product code, then ran the upgrader and presto, it all worked. Took a /long/ time but in the end it paid off -- the new firmware's VoIP stacks and applications work really well.
09.10.2009 Booting USB drives on old BIOSes
  • In preparing an old server to sell off today I actually ran into a problem which apparently affects lots of old computers: the BIOS, though it supports bootable USB drives, is really picky about the drive geometry. After swimming through a collection of links like [brainstorm.ubuntu.com] and [help.ubuntu.com] I started tackling the trial-and-error that fixing up the geometry implies -- reading through [www.sudhian.com] and [www.911cd.net] for inspiration. And after 5 tries, I actually managed to get something that worked:
     16 heads, 63 sectors/track, 1986 cylinders
     Units = cylinders of 1008 * 512 = 516096 bytes
     Disk identifier: 0x00000000
     .
        Device Boot      Start         End      Blocks   Id  System
     /dev/sda1   *           1        1986     1000912+   6  FAT16
    Woot!
  • Of course, It Never Works The First Time; installing from the Ubuntu Server USB key left me with a broken system because it installed grub onto the USB key instead of installing it onto my SCSI drive. I ended up booting with the USB key plugged in (it had grub installed on it by the installer, which ruined it but allowed it to boot my server!) and running install-grub to get that fixed.
08.10.2009 So it's old news..
  • Still, the blog post "If Version Control Systems were Airlines" at [changelog.complete.org] is the smartest and funniest blog post I think I've ever read. And it's true, too.
02.10.2009 London and pings
  • So when traceroute tells you
     send failed: Operation not permitted 
    it is time to look at your firewalls, because it's likely that you've got a wrong rule in the output chain.
  • In London for the week, and back again on Saturday to Brazil. I miss Mariana and the way she smiles when I arrive.
20.09.2009 iptstate
  • Ever wondering what your IP masqueraded connections looked like? I always did, but I just found iptstate(1) and it is exactly what I wanted.
  • It seems that Embratel's link blocks ICMP packets related to fragmentation; the MTU on the cable modem's interface is 1472, but when I set it correctly on my router's interface, I get PMTU-D problems with the internal network (which has an MTU of 1500). The solution I cribbed from [tldp.org] involves using the TCPMSS target to iptables.
  • Other reading for today [www.wallfire.org] [www.netopia.com]
  • Oh, and for the record, even though [www.voiptroubleshooter.com] says that MTU 512 works best with ADSL modems, it certainly does not work for the Opticom we have connected here to the Telefonica line.
19.09.2009 PPC Mac Mini on Ubuntu Jaunty and video playback
  • Next problem for the weekend was video playback on my PowerPC Mac Mini. Standard Jaunty was installed on it, and it worked pretty well -- networking, audio, removable USB. But one thing was bugging me: video playback with Totem no longer really worked. Most videos I have (for instance, old Giro and Tour recordings in DiVX format) would no longer play, and the ones that did (like a recording of the 2007 world's) would play at terrible FPS, massively dropping frames and totally burning up CPU in full-screen mode. I figured that this was the real end of the road for this little mini; after all, Ubuntu's not really supported on it, and there's no binary magic (like fglrx or even flash) to make it work. This is a standard old-school PPC Mac mini:
     0000:00:10.0 VGA compatible controller: ATI Technologies Inc RV280 [Radeon 9200] (rev 01)
  • Well, today I spent some time looking into the problem. Turns out there were a couple of problems compounded. The first things I looked into were acceleration-related, and because most posts on the web are around 3D acceleration, the first thing I discovered was that there's an issue with the stock Jaunty kernel that I was running: [bugs.edge.launchpad.net] -- you can pretty easily diagnose this by running glxgears (yeah, we know, not a benchmark) and seeing that you get very low frame rates -- like 60 or so; in other words, falling back to swrast and not using hardware acceleration like the radeon driver in Jaunty should. The easiest solution I found to it was linked to from [ubuntuforums.org] -- I just downloaded and installed the kernel at [tmpstore.free.fr] and that was it, glxgears was up in the 700s after that, and CPU pretty low.
  • Turns out that 3D performance has nothing to do with 2D video, and this was a bit of a red herring (though it's great to have accelerated 3D graphics, I guess). I spent some time looking into the situation: first, VLC would play most videos that totem and gstreamer wouldn't, but it was still horribly slow -- the hardware wasn't being used for playback, indicating something was wrong with Xvideo. I looked around a lot for a solution, and ended up deciding to try an updated X video driver pulled from Tormod Volden's PPA at [edge.launchpad.net] -- just had to apt-get source xserver-xorg-video-ati, apt-get install the dependencies and dpkg-buildpackage it into existence. To save people the trouble of actually doing this, I put the assembled debs up at [people.canonical.com] and feel free to use them if you ever run into this problem. Once this was installed, I ran VLC and sure enough, the video playback was as smooth as ice and CPU usage really low.
  • A couple of closing notes. First, I'm not sure why this was set up this way, but the reason Totem wasn't even trying to do Xvideo was that gstreamer-properties had it disabled; once I enabled it it was as fine as VLC playing back the videos that didn't crash it. The second thing was that my /dev/dri/card0 was set to mode 660, which may have meant that GL apps running under me couldn't actually do DRI -- I set it to 666 but I don't think that actually did anything, so maybe that's crack.
18.09.2009 WRT54g Wireless Repeater Bridging
  • After investing R$80 on a new WRT54g to connect the house and office together in a way which works reliably, I spent some time researching alternatives to actually wirelessly connect them. I was always under the impression that it was pretty much impossible to do wireless bridging (i.e. a wireless AP here extending the range of a remote wireless AP, including the local ethernet switching) without having multiple radios available (and I didn't think the Linksys unit has multiple radios, nor do I know now), but apparently not only is it possible, it's trivial to do with recent DD-WRT v24 (there's no need, for instance, to set up WDS, which I think is a standard mechanism to do exactly this). I followed a tutorial on the DD-WRT wiki which was pretty much exactly what I needed: [www.dd-wrt.com] -- there's a version in portuguese which is actually more complete, though I was a bit reluctant to trust it: [www.infohelp.org] -- ironically the DD-WRT wikipage was updated YESTERDAY to add one critical step to the recipe. Guess I'm lucky!
  • The only trick I ran into was when flashing DD-WRT onto the Linksys. I had a WRT54v6 (see [www.dd-wrt.com] for details) which makes the process slightly trickier -- the flash and RAM are really reduced so you can't load the standard DD-WRT image through the standard (VxWorks) web UI -- you need to go through the steps outlined at [www.scorpiontek.org] -- it is a lot simpler than the stuff in the DD-WRT wiki itself, which seems to be geared towards windows users. I managed to get the prep and killer firmware loaded in the initial stages, but I was surprised when the tftp upload of DD-WRT itself didn't work. The upload itself went, the unit seemed to be doing something (pings stopped) but the web UI never came up. I could still tftp files across, so it wasn't bricked, but.. weird. Well, guess what -- ascii mode tftp won't work. Doh! Took quite a few reboots when looking at the flashing light to figure out that I needed to type "bin" before the put. Guess I forgot the lessons learned in the old inet BBS days.
  • Once that was done, the other thing I got stuck with was that the DD-WRT's web interface would give me a blank page whenever I saved or applied any changes. Turns out this is related to something cached in the browser (I suspect by IP, some shared cookie between the VxWorks web server and the DD-WRT one); I eventually read some dozen threads that all said the same thing: CLEAR YOUR COOKIES AND CACHE. It worked, too ;-)
24.08.2009 Lipoprotein A
10.08.2009 Seen today on my "2gb link"
  • Up 517kbps and Down 144 Kbps. From my ADSL modem's console. And then a reboot back to the usual 659/2297 Kbps -- so you tell me, what the hell?
15.07.2009 Well yes it's been a while
  • And no, I won't post anything interesting apart from recording the time schedule for SESC's swimming pool here in São Carlos. It's from 13:30 to 21:30 from Tuesday to Friday, and on weekends and holidays it's from 9:30 to 18:00. And you need to do a medical test before you are allowed to start going; make sure you don't forget that part.
  • Found out that F-Spot can upload to Smugmug, but there's apparently a bug which is failing on Hardy and I wonder if it works on Jaunty: [bugs.edge.launchpad.net]
04.05.2009 The only thing I can do is read
  • MySQL pissed me off today. It started out with it going OOM and then corrupting Bugzilla's logincookies file. So I turned it off, pulled out myisamchk and it did the right thing. Or half of it, it turns out. Once I had done that, the table was marked read only, and how the hell does one get out of that?
  • Turns out there were THREE things that needed doing. First, I had to chown the actual MYI file to mysql:mysql. Then I had to chmod it to 660, because the perms were broken. After that I got stuck, because mysqlcheck wouldn't update it, still saying "Table 'logincookies' is read only". Well, damn it -- turns out the last bit missing was running a "FLUSH TABLE logincookies;". So how was I supposed to guess that?
28.04.2009 You can't make this stuff up
13.04.2009 Eastern Easters
  • Possibly one of the all-time best Roubaix climaxes ran yesterday as an Easter present for everybody. Or well, I guess everybody but Flecha, Hoste and Hushovd: [www.youtube.com]
26.03.2009 How can one not love Launchpad?
     <danilo> kiko: got any cheap offers for marriage in EU? and can I
     continue to live here? (fwiw, I am busting my ass with documentation
     this time around since I want to ask for longer visas, and I'll have
     Canonical lie a bit in the invitation letter how I am going to go to
     Spain 745 times in the next year :)
     <intellectronica> danilo: as soon as i get my EU pass i'll be happy to
     marry you
     <danilo> intellectronica: sounds good :)
     <intellectronica> (even though you're a bit too tall to my taste)
     <danilo> intellectronica: well, you'd not be my first choice either, but
     I'll love you as if you were :)
     
14.03.2009 Things I miss about Brasilia
  • I left Brasília many years ago, and I only lived here for 4 years before starting university down south. But there are some things that I really miss about it.
  • One is the rain. It is spectacular in the summer months how beautiful and shocking the thunderstorms are; my parents have a house which is glass everything and the sound is deafening. When I come here I love staying at home and just listening to the roar of the storm hitting the house and the lake. And the thunder, when it strikes, makes your heart race, eyes widened at how loud that could really be.
  • Home is another. It is very neat to be surrounded with all these weird mementos of your former lives; trophies from races you did who knows when, comic book collections that you bought in forgotten newsstands and in ancient trips to places you never visited again, bits of arcane computer hardware that might just work if you can piece it all together. And the sounds of that old life around you.
  • My parents. I have had a lot of luck in my life, but wow, it seems almost unfair that I had a pair of parents as fantastic as mine. They are two ever-surprisingly versatile individuals if I ever saw a pair, and every year they seem to decide how they want to reinvent themselves. And whatever it is you want to do, they are interested in doing it with you. Run 15k? Sure! Waterfalling? Always! Out to buy random stuff I need? Now! Never boring. What an amazing couple.
10.03.2009 The purposes of war
18.02.2009 Argus Tick tock
  • The Cape Argus cycletour is on the 8th of March. The route is nothing but spectactular [www.cycletour.co.za] and it's not as flat as one might think [www.cycletour.co.za] -- and I am so happy I will be there along with thirty thousand other people. If everything goes according to plan..
16.02.2009 Getting older feels great
  • But let me ride my 110km this morning and then tell you exactly how great. I just wish it wasn't raining..
15.02.2009 pioggia maledeta
  • After 105km of rain yesterday, you'd think that it would let up for a birthday lunch? Guess I'm kinda short on credit with the weathermakers. Plan B!
09.02.2009 The politics of scanning
  • If you own an Epson scanner and want it to work in Ubuntu without installing the debs provided at [www.avasys.jp] by hand, check out my comment 5 at [bugs.edge.launchpad.net] -- basically, the versioning of these packages is psychedelic and somebody needs to get Avasys to make some sense of it so we can reasonably package and update iscan without breaking everything we ship based on it. Michael Casadevall and I spent a few hours on this over the weekend and though we have some packages in his PPA, they aren't really something which we can get into the archive for Jaunty.
08.02.2009 Some pictures are truly worth a thousand words
  • This gallery has such a striking set of contrasts I can't help but love it: [www.velonews.com]
  • Just got back from the first race of 2009, which was a 50km mountain marathon; out of the 800-odd registered I finished around 10th overall and, again, 2nd master. 42 seconds off! [www.sistime.com.br] I rode well the first half of the race, but lost contact in the hard climb in the middle of the race and just wasn't in the mood for a solo chase. I felt strong on the flats but had a little difficulty staying in contact on the climbs, and I particularly hated the soft feeling my SID has up front -- it makes me really not want to stand up when I'm riding, which means I can't easily jump on wheels or deal out the pain. Santa, bring me a new fork?
02.02.2009 Oggplay is just amazing
  • I have for years been enduring the Nokia music player on my 3250, which is the phone I use on bike rides. It's a big fat phone but the built-in speaker is loud and it is as solid as they get; mine has a cracked LCD, a partially broken case and so much water and dirt inside it you'd be amazed it still turned on. Not only does it work, but it works as well as it did when I got it 3 years ago.
  • I have a ton of Ogg Vorbis files that are the format I rip from my CD collections into. I knew there was this software called Oggplay [symbianoggplay.sourceforge.net] and that it played FLAC and OGGs, but when I looked at it I was worried that it was one of these applications that worries more about skinning than getting the UI right. I was also unsure about how much battery it would melt. I never tried it.
  • But, come 2009 music refresh program, I have Girl Talk in FLAC and I haven't been able to listen to it on the phone. I decided that today was as good a time as ever to try it out. And wow, it is amazing! The UI is so well designed I can already use it with my eyes closed (pretty essential for a player you use while riding). It has the file browser integrated with the playback screen, and it is really fast -- much faster than the built-in player. And FLACs and OGGs! Just really impressive. Guess I might just need to wait for Nokia to get over its DRM obsession before it considers shipping it by default?
  • One note on the installation is that downloading zips does seem a bit counter-intuitive to me; I was expecting a set of links from the website to installable SIS files. Maybe it has to do with how the downloads are hosted at Sourceforge?
01.02.2009 A campaign for modern music
  • It was last November that I realized it. When you're 33 all you think of is the songs you listened to when you're 23. That's rubbish. So I'm planning ahead and since December have been listening to everything mildly interesting I hear about. If you're in the same situation, here are my picks so far.
  • Foals, Fischerspooner, Chromeo, TV on the Radio's Dear Science, The Black Ghosts, Girl Talk, The Ting Tings, Cut Copy, Ladyhawke, Late of the Pier, The Whip, VHS or Beta, The Virgins, Buck 65, The Rapture
  • Not so new, but still great: Idan Raichel, Sad Lovers and Giants, Lene Lovich (can't believe I had never heard of her)
  • Stuff I (perhaps surprisingly given the hype) did not like: MGMT, Hot Chip, Les Savy Fav, Wire, Vampire Weekend
  • If you know me and want a USB mixstick put together just send me one through the mail; I'll fill it with my picks. Postage free.
31.01.2009 Waking up when it's dark
  • I kinda hate it when I can't sleep through sunrise. I go to bed pretty early and usually am asleep by 22:30; at that time my brain is already flagging and when it's not I remind myself of Jacobson's progressive relaxation method [en.wikipedia.org] and that's it, Zs show up in my brain. The problem for me is that when I am at home I just can't figure out how to wake up after 6. Normally this isn't a problem, since I go to sleep so early, but if I have a late night, it is a disaster. Yesterday the Launchpad team leads meeting ended in a dinner which we walked out from at midnight (!) and this 'morning' I've tried reading, drinking water, PMR, etc and just around now have given up and come to face my 1177-message-strong inbox. Funny thing is, there are only two situations in which I don't have this problem, and one of them is when I'm travelling on vacation. Damn.
29.01.2009 got watts
  • This week I'm supposed to be gearing up for the first race of the year, which is a pretty unspectacular marathon in Itu. I mean, it'll be painfully fun as all races are, but it's not a particularly long or hard race -- though some people argue that the easier the parcours the harder your buddies make it. Anyway, so because I have this race I'm doing some moderate-to-high intensity stuff this week -- I had done pretty much only hard tempo rides between December and January. I did 3x5' of 20/40s on Tuesday and Friday (at 300/500W), which left my legs soft and bubbly, and nearly beat my PR for 5' (which is 398W from last November). 20/40s require a serious psychological edge: the first hit is fun, the second is hard, the third is painful, and the two last ones are just total regret. But because the rest is so short and constrained, you just keep coming back..
  • Then on Wednesday I did this killer workout on rollers (since it doesn't f**** stop raining here) with 10x2' at 300/350W and then a little 3x5' ladder going from 260W to 300W. But man. AIIII. I was so lost after it. Johan said something to me during it but blam if I can remember what it was: just the sweat pouring off my face and the black spots in my brain. I had dinner at Sal6 later with Martin and Johan and I was absolutely useless (and then you called and it was even worse). My legs felt okay, and the ride the next day was fine, but the system shock was hard to get over. But then again, I broke my 10' and 20' records at 332W and 326W, which is 5.1 W/kg and nothing to sneeze at. Never thought I could do that on a January! I could have done a few more minutes but I'm not sure how many more; my heart maxed out at 173 which means I wasn't self-destructing, but the last minutes took a loooong time to go by.
22.01.2009 Wow
  • "I think it's the kind of stuff I need to do, I need to get in the race and work that top end," he said. "Like I've said 100 times here, I can't get that in training so the more I can be out there... I mean, I looked down at my power metre and the average after two hours was 340 watts, you can't do that in training. You're just constantly going and going and going." [www.cyclingnews.com]
  • Armstrong weighs 76kg, which means 4.4 W/kg, but still, pushing that hard for 2h is serious business. I did an average of 244 yesterday, in comparison, and it was a hard ride. Maybe he's talking NZAP or NP instead of average power, but does the SRM give you either of those?
03.12.2008 The Ting Tings
  • are probably the best new band I've heard this half of 2008.
02.12.2008 Subject: Songbird 1.0 PPA; Dear Lazyweb,
01.12.2008 Third and sick, or sick and third?
  • I can't decide. I made too many withdrawals from my immunological bank this week: travel, not a lot of sleep, delayed flights, indoor cycling and one or two big nights before Sunday's race nailed me. News at [prologo.uol.com.br] It will be a typing sort of day IYKWIM.
  • João and I didn't warm up properly before the race yesterday and my legs burned for the first 20 minutes, which means the pros dropped me on the first climb and I had to hang on to the next splinter until I figured out I actually had much more inside me and went out on a rampage. Clawed my way back to within two minutes of the leaders of the amateur ranking but only enough to land me third on the podium, flowers being the special touch this time. Why don't all race organizers give flowers to the winners?
25.11.2008 Riding in circles
  • Third day in Buenos Aires. Went to the gym yesterday and did 2h of spinning; 2 more today and 2 more tomorrow and then that's it for me. You can't do more than 6h of indoor cycling in a week. Or else your heart melts.
24.11.2008 I don't even wanna know
  • what the karmical implications are, but a search at a domain parking webpage returned this to me today:
     We were unable to find results for your search term - "Money".
     Are you interested in:
         * Money Laundering
         * Anti Money Laundering
         * Financial Opportunity
         * Money Com
    I guess they've got all bases covered.
18.11.2008 Testing testing 1 2 20
  • Did my first 20km test of the 2009 season. Average wattage was 276W, which for 66kg isn't all that bad. Now 20km is a LONG time for a test, and man those last 5ks take forever to roll by. But in the end I was pretty amazed at the result and let's see how well we can use it to kick some 2009 podiums.
  • It was Bruna's birthday today. She's 9! We had cake and popcorn and Pucca and Garu goodie bags complete with -- what else? -- "funny love". Everything a masters racer needs!
14.11.2008 The delta of 32
  • The news at [www.nytimes.com] is kinda tainted by the downer medical opinion about its low feasibility, but I personally find it just absolutely fascinating. Earlier this year I told myself that somebody would find a cure for AIDS; maybe I was just rehallucinating William Gibson's cure in Virtual Light but I figured there was enough known about the CCR5 variant [en.wikipedia.org] which provides natural immunity to the virus, that it was time somebody figured out how to use it. Well, they had already done it, two years ago; the story just took a long time to arrive.
06.11.2008 6am phone calls
  • Are a great way to kick that jet-lag! The call was good but I only really woke up in the last half of it. I rode off to Damha and did a good 4 short 1200W sprints, and then did 4 6' repeats of the longer climb. I managed about 310W for the whole set which is not bad as I wasn't totally hallucinating over it, heart probably close to threshold. On the last climb I did it at a higher cadence than usual and.. it actually felt like it hurt less and I was better able to cope with the annoying fact that the climb flattens out twice in the middle. In the last minute I was always a bit cooked but that's cycling for you.
  • Called Vitor Costa up to talk about training for the new year. He let me in on that I'm second-ranked brazilian master XCM this year: [www.cbc.esp.br] -- wow, I guess I just wasn't expecting to have made it that far up.
05.11.2008 OOPS
  • When Johan did our Intrepid upgrade on the weekend there was one thing he left unfinished, and that was figuring out why the kernel was OOPSing mid-startup. Well today I figured it out, tragically, by discovering that it's not because I'm so great at cleaning up my inbox (533 today from 1200 on Monday is kinda fantastic). It's because my box isn't sending out any email from me, and it's postfix that is causing our diskless NFS to OOPS on startup. Gotta love Wednesdays!
     kiko@gasolinux:/var/spool/postfix$ sudo /etc/init.d/postfix start
     /etc/init.d/postfix
      * Starting Postfix Mail Transport Agent postfix                         [ OK ]
     kiko@gasolinux:/var/spool/postfix$
     [  149.183761] BUG: unable to handle kernel NULL pointer dereference at 0000000c
     [  149.183895] IP: [] :nfs:nfs3_proc_setattr+0x69/0xf0
     [  149.183990] Oops: 0000 [#1] SMP
     [  149.187579] Pid: 5744, comm: master Not tainted (2.6.27-7-generic #1)
     [  149.187631] EIP: 0060:[] EFLAGS: 00010282 CPU: 2
     [  149.187688] EIP is at nfs3_proc_setattr+0x69/0xf0 [nfs]
     [  149.187699] EAX: 00000000 EBX: f5a89e7c ECX: f5a89f70 EDX: f59ddd80
     [  149.187699]  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
     [  149.187699] Process master (pid: 5744, ti=f5a88000 task=f5996480 task.ti=f5a88000)
     [  149.187699] Stack: f7da4000 c1000000 f5716f88 f5a89f70
                           00000000 00000000 00000000 f8a98f08
     [  149.187699]        f5a89e3c f5a89e7c 00000000 f8a86e00
                           f57170a8 f5a89f70 f5a89f18 f8a633e6
     [  149.187699]        f59ddd80 f55f1770 c018cda8 f5a89e9c
                           c01b02e5 f65e9d80 00000004 f5996480
     [  149.187699] Call Trace:
     [  149.187699]  [<f8a633e6>] ? nfs_setattr+0xb6/0x170 [nfs]
     [  149.187699]  [<c018cda8>] ? file_ra_state_init+0x8/0x20
     [  149.187699]  [<c01b02e5>] ? __dentry_open+0x1a5/0x260
     [  149.187699]  [<c01c0e00>] ? fifo_open+0x0/0x2e0
     [  149.187699]  [<c01bdb1d>] ? do_filp_open+0x1bd/0x790
     [  149.187699]  [<c02549fb>] ? copy_to_user+0x3b/0x130
     [  149.187699]  [<c01b57b9>] ? cp_new_stat64+0xe9/0x100
     [  149.187699]  [<c0235724>] ? apparmor_inode_setattr+0x14/0x90
     [  149.187699]  [<c01c89d6>] ? fnotify_change+0x2d6/0x3b0
     [  149.187699]  [<c037e62d>] ? _spin_lock+0xd/0x10
     [  149.187699]  [<c01ca4fc>] ? mnt_want_write+0x6c/0x90
     [  149.187699]  [<c01b0714>] ? sys_fchmod+0xd4/0x100
     [  149.187699]  [<c0103f7b>] ? sysenter_do_call+0x12/0x2f
     [  149.187699]  =======================
  • Perhaps more annoying is the fact that nobody else seems to have reported this problem to anywhere Google knows. Normally with OOPSes you can count on somebody else having the same problem, but today it sounds like I'm gonna be either debugging or lazywebbing..
  • Easy 2h ride down 29 and then around Damha and the Tour of Flandres. It's always easy when you wanna rest and you're by yourself. Enjoyed riding the Felt but I have come to realize that perhaps the Time ATACs are a bit too wide and ultimately responsible for why my left heel swings in so much. Why don't I write to [www.cyclingnews.com] I wonder? Well, Stuart agreed to come over tomorrow to look at this himself on the rollers so let's see after that.
  • Swapped out the battery in my Polar wearlink strap; also ran a bunch of errands including dropping a spaghetti mix of about 20 punctured tubes to the amusement of the LBS mechanics..
04.11.2008 You never thought self-destruction could be beautiful
  • Man, Fabiano toasted me on the way back from Santa Eudóxia today. It started out harmlessly enough, even though it was crazy hot, but by the time we were past Água Vermelha he was taking no prisoners and all I could do was follow the melted pavement and dead animals he left in his wake. Second day riding after 20 days off and it felt profoundly painful. I had a little divine moment on the climb coming back out of Santa Eudóxia, you know, when your head goes really light and your arms feel soft and then all of a sudden these strange thoughts go through your head? I had thoughts of myself as a child, and (somewhat paradoxically) of me as a parent taking care of myself as a child, and of misadventures and surprises that have happened over my life.. so yeah, it was self-destruction, but it was oddly pleasant. And as smoothly as the hallucinations started, they ended as we hit the top of the last long climb, and I managed to roll back home and only mildly suffer through the rest of the day.
03.11.2008 Heat
  • I am back in Brazil, and wow, it is hot. Last week I was surprised by this weird flurry of snow in West London; today I've got a brand new tan. In a way I like the contrast, but you have got to admit it is at least unnatural. After a morning spent across immigration, customs, taxi, bus and a quick ride home, I managed to dig time out in the afternoon to do a fun 2h ride to celebrate my return. Arthur and I did a little loop out to Itirapina and on the way back he stuck behind a truck and revved it at a scary 70km/h. I kicked and slapped in behind him and put out a ridiculous 700W for some 10 seconds before a car rolled next to me and started honking. I thought it was somebody cheering me on, but in fact it was the police! Ai ai, one day in Brazil and already in trouble.
  • Swapped out the tires on the Bianchi today for the new set I bought in London just last week, when the world was still young.
02.11.2008 Um,. any similarity is mere coincidence?
22.10.2008 Nokia to Evolution syncing?
  • If you're not afraid of the commandline and getting a bit upset in the process, try this: [help.ubuntu.com] -- it's the product of hours restarting phones and debugging obscure msynctool messages. It almost works reliably for me, too. Unfortunately it doesn't for my cousin, who was the prime intended recipient of those instructions. #!@#!@
14.10.2008 One more year
  • One more Tour of Santa Catarina, and this time I survived through the thick (and wet of it) to finish 10th overall and 3rd Master: [www.ciclismosc.com.br]
19.08.2008 USB drive woes
  • So.. our new external USB suffers when I rdiff-backup to it. Turns out that it may be too fast (the old one was a WD 5400rpm): [bugs.edge.launchpad.net]
     Aug 18 23:57:01 anthem kernel: [519190.143537] EXT3-fs error (device sdf1): ext3_find_entry: reading directory #2 offset 0
     Aug 18 23:57:01 anthem kernel: [519190.143882] Buffer I/O error on device sdf1, logical block 0
     Aug 18 23:57:01 anthem kernel: [519190.143907] lost page write due to I/O error on sdf1
  • I'm trying out a suggestion to fudge max_sectors to 128 and see if that improves things tonight.. sounds like it did. All sorted and backups both fast and stable now. Rock on!
04.05.2008 NFS sync versus async and /var/run and /var/lock mystery
03.05.2008 After upgrading the diskless
  • Run a depmod -a, because otherwise my screen get busted. Reminder to self!
  • When a server nfs.lockd stops responding, what to do? Well, Bruce Fields sent me a suggestion:
    Perhaps a sysrq-T dump of lockd would show where (and whether) it's blocked? (So once lockd stops responding, log into the server, run "echo t >/proc/sysrq-trigger", and collect the output from the logs, especially the stacktrace for the lockd process).
01.04.2008 New office
  • First of April, joke's on us. But we got a new office as a special gift! Rui Barbosa 1977 is going through its finishing touches as we speak and with some luck we will even have the Internet installed there.
31.03.2008 The phones I've owned
  • Nokia 1100a
  • Nokia 3250
  • Nokia 7250i (Pink!)
  • Nokia 6120
  • All but the 3250 can be unlocked with the code calculator at [www.peters1.dk] -- the the 3250 can't be because it requires a flash update?
  • Somebody asked me if it was possible to have more than one SIM in a mobile, and I thought there were no models that allowed that. Well, not a phone, but check this out: [ucables.com]
14.03.2008 USB 1.1 sucks
  • Had to go out and buy a USB 2.0 PCI card for my server today. Before:
     102400000 bytes (102 MB) copied, 76.3268 seconds, 1.3 MB/s
    After:
     102400000 bytes (102 MB) copied, 4.79696 seconds, 21.3 MB/s
    Much better.
12.03.2008 Super Sony Storage Support
  • I have an AIT drive that I bought back in 2005 to do backups and archival of the content on our server. We do daily backups of the full content, and rotate tapes weekly.
  • So a few weeks ago the backup started failing randomly mid-process. This happened before in the DAT days, but AIT proved to be much more reliable -- until now. I ordered a cleaning tape (there's a myth that AIT is self-cleansing, but [www.rm.com] says it's not) and when that didn't fix things, decided to send the unit out to warranty. I had to fish a number out of the Sony UK support site but once that was done it was quite smooth!
  • There's this great little software package called sonytape that Sony distributes from [sony.storagesupport.com] and I used it to generate a trace file. One cool thing was that the support team at Sony was able to look at the trace file (after I sent it to them) and find out how dirty the tape head was and how many times the tapes I was using had been cycled (provided the tapes have [www.aittape.com] which mine do). That's pretty impressive! One interesting result of that is that I know (now) you're not supposed to cycle a tape more than 50 times, which means that if you're using a tape a week, it shouldn't be used for more than a year. I hadn't heard that number anywhere else, and the only stuff I can find on the web says the tapes last 30 years. But that's shelf life!
  • In general, the support experience was outstanding. You call a UK number and get a support engineer that can actually tell you something useful and knows enough about the hardware to make the experience interesting and rewarding. If I ever run a support operation, I want to make sure my experience is as good as that one.
08.12.2007 The Royal Dutch
  • Wanna tell a dutchman from an eskimo? [www.zompist.com]
  • When apt says
      files list file for package `cpp-4.1' is missing final newline
    it's time to look at /var/lib/dpkg/info/smbfs.list and figure out what is wrong with the file. In my case, it was a very mangled file; probably a result of some filesystem damage that happened when my mac mini hung.
  • I finally discovered that mutt can record my multiple identities (well, actually, multiple email addresses) and make reverse_name work by using the "alternates" configuration variable.
  • Commands I learned how to use today: blkid vol_id md5sum gnome-mount, and all because I am investigating [bugs.launchpad.net] with Johan!
07.12.2007 Things gone missing
06.12.2007 The disappointment junkies
  • This week Johan is trying to convince me that when we upgraded from 10BaseT to 100BaseT that the diskless did not get significantly faster; I am upset at that suggestion but given that my memory is not anything to write home about he might be write.
  • So just to make sure we have a late 2008 opportunity for disappointment I convinced him to buy a [www.netgear.com] switch so we can test our diskless at a full gigabit speed. We'll tell you really soon how much of a difference it didn't make!
05.12.2007 Some keywords
  • Ride João Arthur Catraquinha Me Santa Eudóxia Afternoon Felt Bianchi Melting Hammered Happy Dinner Sal6 Pizza João Just Like The Old Days
04.12.2007 Trails from a forgotten past (at UFSCar)
  • Today João, Fabiano, Dalcimar and I rediscovered a set of trails at UFSCar that made me remember how much fun I used to have there in the 90s. Crazy technical, fast and not too hard, which means you can do a hundred loops without noticing you're dead. I got whipped in the face and arm by a thorny bush, and after the 2:30h my legs and my back definitely hurt!
  • When I went to university back in 93, it was crazy how many bicycles and cyclists there were. The classrooms were jammed with them. If you wanted to skip a class and go for a ride, all you had to do is go down to the restaurant and you'd always, reliably, find someone who was there waiting for you. We used to ride to uni with cycling shoes because that's just how it was. I missed a lot of statistics classes riding over the Jedi trail. The interesting thing is that the trails are all still there; in fact, they are better now than they have ever been. However, there are no cyclists any more. And I mean none. Zero. Not a single student after 1998 has taken up cycling as a sport, and only a minority commute, probably on the days they can't get a ride with somebody else. That's a big change in demographics and culture.
  • I've been reading at Mary Poppendieck's suggestion a set of software engineering articles by Corey Ladas. They are very interesting! One that stands out is this sincere review of process models (a topic which fascinates me) I just saw at [leansoftwareengineering.com] He also makes a pretty cool point about multitasking:
    One inspiration was a result from Boehm that programmer productivity peaks at 2 concurrent tasks. One task should be a high-priority primary task, and the other task should be a lower-priority task that you can work on when the first task is blocked. This was an empirical result, not just armchair noodling, so I thought it would be cool to build a process around it.
03.12.2007 The House of Heat
  • It's hot today. No, serious, it's like 35C in the shade. I went for a 3-hour ride today and towards the end my heart rate (which admittedly has been pretty high since I've come back from vacation) was in the 160s for a sustained 220W. That's not very impressive. The ride was good, just a loop towards Corumbataí and back, and I had this funny buzz from [www.gigolorecords.com] playing in my head for some of it. That's a great album even if it is a bit sick. I mean, not as sick as, say, [en.wikipedia.org] but if you have heard either you get what I mean.
  • Today I had lunch with João, one of my friends who is a biologist and a teacher and also as much of a cyclist as anyone could be. Biologists are amazing people and I would strongly recommend lunch with one if you have the opportunity. As it is I privileged to have the best biologist friends a human could ask for! (The god of friendship must like me.) Speaking of which, Sal6 came back from Australia today, too. OK, different subject.
  • Anyway, during lunch João and I talked about mitochondria. Recently it came to my attention (and there's a dead-basic page up at [www.microbeworld.org] that talks about this) that mitochondria and chroloplasts have their own DNA, and there are hypothesis that say they they actually derive from bacteria that came to coexist within more complex cells. I talked to João about the evolutionary consequences of that. Earth has a lot of O2 and CO2, and therefore, it's easy to see how organisms that consumed those primary gasses could have appeared. The fact that they could then develop this symbiotic relationship with an eukariot is to me, however, amazing.
  • More interesting yet is how different plants are to us and other fauna, and I am led to suspect that a lot of it has to do with how our energy processes work -- for instance, CO2 is abundant in different locations, at different times, and the process for consuming it places constraints on how a successful organism might develop; those constraints (to an extent) dictate the morphology (and other aspects) of plants. João and I talked about the existence of other little prokariot cells that consume other gasses; we know of various examples of deep-sea (barophilic) bacteria that reduce methane and sulfates (I recommend [www.zmuc.dk] as a great paper on this). We also speculated on how we could have ended up with some wildly different creatures on earth if those had been abundant in our atmosphere instead of O2 and CO2 (there's even an article at [www.int-res.com] strangely named "Symbiosis between methane-oxidizing bacteria and a deep-sea carnivorous cladorhizid sponge" that shows that it is at least possible).
  • So I'm left wondering if this doesn't make it much more likely that complex alien life could actually exist. I mean, finding a planet that has similar atmospherical components to Earth is hard, but if we know that one-celled organisms could use other stuff to breathe.. it suddently looks a lot less unlikely to me.
02.12.2007 A Sunday with God
  • Today I am pondering about God. Or rather his existence. Sorry, His existence. I mean -- if He does actually exist -- He gave me an afternoon at the swimming pool with girls in bikinis, and He also gave me a productive morning where I made PQM grant my fix to [launchpad.net]
  • On the other hand, [farm1.static.flickr.com] makes it clear that God didn't provide blankets where they were most needed. I used to take that to mean that He didn't actually exist, but I'm not so sure right now.
  • And today's working hypothesis, slightly inebriated one at that, is that there may not be actually one God, but lots of gods. And maybe that the god that gives blankets takes Sundays off too.
01.12.2007 San'kara
  • Cycled to Santa Eudóxia with Dalcimar, then took a nap, and then checked out [www.myspace.com] and Shanti at this end-of-year edition of the local open-air rave. You weren't there, so you don't know anything about what happened here!
30.11.2007 Or.. do they?
  • Magno is never wrong. So when he saw my post yesterday, he went straight to the crux of the LASIK versus PRK matter: [www.youtube.com]
  • One thing I can never remember how to do is to allow remote users to relay through our server. It's as simple as adding the user to the SASL database, but I can never figure out what the domain is. I finally had the time to find out today: the SASL domain /must/ be anthem.async.com.br. I'm not sure why, and I don't care, but if it works for matsubara, it's good enough for me.
29.11.2007 LASIK, PRK and Cycling
  • And meanwhile (I don't have enough to do) I have started to look into eye surgery. You could ask me why I would even consider that given how great contacts and glasses work. I could then say it's because I keep losing (or ripping) my contacts, or because glasses are heavy and make me look like I'm about to retire, but that's not the truth. It's not because I spend the day looking at a computer screen. It's not because I adore movies and reading and drawing. Those are all things that I can do with contacts just fine. I have mild diopters: -1.50 sphere and -1.25 cyl. in the left eye and -1.50 sphere and -1.25 cyl. in the right. I've not worn any correction for the past month, and I'm not bothered -- it's not a serious handicap.
  • Well, except for the horribly true fact that contacts and glasses are terrible for cyclists. Yeah, I'm aware of just how much they have evolved and improved over the past 10 years, in particular because I was already a cyclist then -- and practically with the same diopters, too. No, the issue, really, is that cycling is this crazy sport where dirt and rain flies into your eye during hours, where you bang your globes out dropping off jagged rocks, and where you occasionally end up in the emergency room (as [www.amigosdabike.com.br] so painfully demonstrates). These particularities make glasses and contacts pretty painfully inconvenient, even if you need the visual acuity to survive through the event.
  • Glasses are great for their stability and protection. It's hard to beat them for value, too. But unfortunately, when it rains or gets muddy, they are useless. You can't clean them or dry them; you can only stick them into your helmet and hope they stay put. They are also heavy, fragile and prone to scratching. Peripheral vision is really bad, which as a cyclist I miss a lot, particularly when looking backwards or around in a pack; if you have rimmed glasses it is worse as you get this stripe of plastic in the middle of the screen. For mountain biking, where you splash around for at least part of any ride, you often end up with your glasses in your jersey pocket and red, myopic eyes full of dirt. And, without glasses, when you hit that technical section with that murderous rut to the left, you only see it when you've already picked the left side.
  • Contacts are great for peripheral vision, and somewhat better in the dirt-in-my-eyes aspect. You still get big chunks of dirt in your eyes, but if you blink madly and endure the sand in them, they clear up. You can wear regular sunglasses, which means you are not locked into your custom-prescription set, and which will still protect your eyes. Unfortunately, they have two very undesireable properties for cycling. First, when a pack accelerates to 70kph, it's hard to keep them in your eyes, and this is why I lose so many. They often end up stuck on my glasses, or melting on pavement. The second, more terrifying aspect to the toric contacts I wear, is that when you are banging down singletrack, they spin ever so subtly. When they spin, you can't see /anything/ for a few seconds, which is damned scary in the beginning and only slightly less so five years later. I can't really prove a unified theory of poor vision leading to bicycle crashes, but I have enough scars that prove I've done serious field research on the matter.
  • And this is why today at 9am I found myself doing a first consultation with a doctor that has practiced eye surgery for the past 13 years, Marcelo Torigoe (of [www.google.com] fame). I had a great time and asked him almost everything I was curious to learn about: risks, healing time, procedure, technology. I had already researched the basics before going on, and I came out with a few interesting considerations for the R$200 appointment:
  • Corneal thickness is really the crucial factor when decising between LASIK and PRK; the fact that you need to cut a flap means LASIK requires a thicker layer of material to work with.
  • Marcelo defaulted to LASIK. He explained that the Bowman membrane stays intact in LASIK, and that photophobia, haze and halos were less frequent with it, and those were pretty much his stated advantages of LASIK. He said his ratio was 80 LASIKs to 1 PRK, which to me was surprising. This kind of freaked me out because LASIK has this serious flap-cutting side to it, though he reassured me it would be safe in altitude or depth.
  • He made a point of saying that I'd not wear contacts for 30 days before the operation, to reduce risk of infection and to ensure the eye was in its natural shape. He also, more worryingly, said no crashing, water or sweat for 30 days after the operation.
  • Modern eye surgery uses an eye tracker to follow the eye if it moves; it used to be that the doctor needed to adjust for this manually (well, with his foot; is that strictly manual?). You look at a bullseye on the operating equipment in order to try and keep your eye still. It appears to work, somehow, since so many people have had luck with it.
  • The operation itself would cost R$2,400 -- which I did not find too expensive, and it would include both a corneal topography and pachymetry done on the day to ensure my eyes looked good enough to cut up.
  • There is newer equipment (which they have) that does custom PRK and LASIK; they have one but haven't used it much yet, and it's a lot more expensive. It sounded like it had better.. uhm.. resolution, but he said there wasn't a strong advantage to using this procedure for my diopters. (He obviously didn't think my diopters were anything to write home about.)
  • He told me I have a little spot in the back of my left eye, about the size of my optic nerve. I hope that's not going anywhere!
  • I still have a few questions now that I have reflected on all this. Is LASIK really safe for a cyclist? Does the flap heal perfectly, or will it always be a delicate membrane glued by the corners, ready to be banged or wrinkled out of place by a crash? Will my eye be less robust because of it? And is the Bowman layer important enough to justify LASIK over PRK? Seems like dogs don't miss it much.

    Though, truth be told, dogs don't ride.

  • (I read through many threads today on the topic of PRK and LASIK while I was waiting for the doctor. The post I found the most quotable at [groups.google.com.br] -- blog school says all classic posts end with a quote -- goes like this:)
     > I think the faster the guy can perform the proceedure, the less
     > invasive he is in performing it.
      
     Invasive is invasive.  The speed of the procedure makes no difference.
      
     Speed is good in a sprint.  It's not good in surgery or sex.
28.11.2007 And back home
  • After almost four weeks somewhere.. no.. everywhere else, I'm finally back home, back to a strange world of bicycles, work and friends. Well, most of my friends, anyway. Sal6 is still out in Australia and I left Keren-Or back in Equador, and god knows I haven't seen Dieter for ages now (eternal shame on him for missing me when I raced the Satellite Tours!), but that's just how it is with best friends; take decades to see them again and you still have everything in common. I am very lucky for having these friends.
  • The last month went by in a flash. I was in Boston for UDS and some Launchpad training with Mary Poppendieck; then about 1h south in Plymouth for Canonical's yearly all-hands meeting. That was mad. Then, after getting stuck in Miami for a day and a night (which was even madder) I rolled into Quito, and from there, to the Galapagos. What followed is.. just not really fit to put into words, because every adjective sounds light, biased or clichéd. So I won't try. But I might post a picture soon!
13.11.2007 Random pausing for just a bit
  • I can't get to Quito because, well.. [www.dailymail.co.uk]
  • I annoyingly cracked my FSA K-Force Carbon crank arm bolt when moving it from my Specialized to my Felt F2, and I have been looking for a replacement ever since. On this trip I finally found one at [smartbikeparts.com] -- the part I wanted was FSA 390-2060, a.k.a. CR3807. I have no idea what the codes mean, but I got exactly what I needed, except that my original bolt was a cheap alloy, and this one is definitely steel.
  • When it comes to airplane security for cyclists, Lennard Zinn said it best at [www.velonews.com]
    You absolutely cannot bring CO2 cartridges on the plane; not even in your checked baggage. Of course, what do you think inflates those life vests under the seats if you pull the tab? You guessed it, a CO2 cartridge! But, as with every airline security rule, ours is not to question why, ours is but to smile and comply.
23.10.2007 Cups Browsing Mysteries
  • So today Roberta tells me, mid-LP-release, that she can't print. There is no LaserJet available for her, which means that our server isn't sending out browse messages, which means something's broken in the Gutsy upgrade. Man!
  • tcpdumping IPP showed me that anthem isn't sending out IPP broadcast packets, but another box (with a dead printer, ironically) was. What's up with that?
  • Gutsy has cupsys-1.3.2; feisty has cupsys-1.2.8; ISTM that browsing for 1.3 must have been updated, because the configuration options are different. For Gutsy, I can use:
     Browsing Yes
     BrowseAddress 192.168.99.255
     BrowseProtocols cups
    but for Feisty, I have to use:
     Browsing Yes
     BrowseAddress 192.168.99.255
     BrowseLocalProtocols cups
    Note that BrowseLocalProtocols /is/ required there. There may be a way to have BrowseLocalProtocols defined as a consequence of some other setting, but I couldn't find out what. The code in scheduler/main.c hinted that it was involved, but oddly enough the source code is indentical in both versions.
  • Also solved my MRTG/SNMP problem with interfaces reordering today: [answers.edge.launchpad.net] -- take note to the hint in the MRTG manual, which allows you to specify interfaces using differing syntaxes: [oss.oetiker.ch]
  • And on a final note: logrotate -d really means debug. I was getting a weird error when testing logrotate on a file:
     creating new log mode = 0644 uid = 0 gid = 0
     open("/var/log/named.log.1", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such
         file or directory)
     error: unable to open /var/log/named.log.1 for compression
    and was scraching my head. Why is this open() missing an O_CREAT? Well, doh -- the file wasn't created in debug mode, and that's why you get this obscure error. Silly logrotate.
21.10.2007 Gutsy and Network Interfaces
  • Upgraded Anthem to gutsy. Rebooted, no eth0. What's up? I spent a long time doing random ifconfigs until I realized that ifconfig -a actually did list the interfaces -- as eth3, 4 and 5!
  • Turns out that /etc/udev/rules.d now has a configuration file that persistently defines what the network interfaces are going to be called. It is regenerated by udev on startup (for the first time, I guess) and you can edit it to specify what you want it to look like. Fixed and restarted udev and they all look good.
  • Also finally figured out what was the deal with specifying interfaces for samba but still getting netfilter log spam: if you don't specify "bind interfaces only" it doesn't work! Read more at [samba.org]
  • Final lesson of the night. If ICMP pings are going through your Speedtouch DSL modem, but TCP isn't, check if the interface isn't set to "napt". For some reason it doesn't seem to do double-napt the right way.
18.10.2007 PostgreSQL and daylight savings
  • So Brazil (for some reason) changes its DST date every year, based on calculations by "the scientists". I use Pedro's very cool tz-brasil package to handle that and it works pretty well most of the time. However, we run both PostgreSQL 8.1 and 8.2 in the server, and the 8.1 servers didn't update their time. What's going on?
  • Turns out that the reason for this is that PostgreSQL has its own copy of the timezone database, and tz-brasil doesn't update that copy (understandably). Martin Pitt explains to me that the reason for this is mostly compatibility with legacy systems, but that for Gutsy he's now just symlinked to the system zoneinfo database, and that upstream actually approved of this change. Whew!
  • Incidentally, the reason 8.2 worked was that its timezone was set to 'localtime' by default, which follows the default system time. 8.1 doesn't let you do that:
     kiko=# set timezone='localtime';
     ERROR:  unrecognized time zone name: "localtime"
    so you are stuck with updating the file.
10.09.2007 30 percent is steep
  • After riding over the unpaved, 30% gradient, mind-numbing Serra dos Lima at this long weekend's race, I was entertained at discovering an article at [www.bikereader.com] which discusses a few 30%-plus ascents across the world.
27.08.2007 Water landings
  • One day somebody told me that there had never been a successful water landing performed by a commercial airline. That's actually not true, as you can read at [en.wikipedia.org] and [dir.salon.com] -- in particular
    If you're flying from New York to Phoenix and you're smirking as the attendant blows into that plastic tube, remember that twice since the late 1980s jets went off the end of a runway at La Guardia and ended up in the bay. Both crashes left people very much alive and very much swimming.
03.08.2007 This TOS stuff doesn't work
  • So much for my apparent success of yesterday! I've found a couple of problems with this policy routing that are driving me crazy. First, Squid fails to put the TOS bits on some packets; while normally the 0x8 that I specified can actually be seen in an ethereal capture (though there it's called the "Differentiated Services Field", it's the same thing, really) in some cases, it just isn't: [www.squid-cache.org]
  • Apart from that, SSH also uses DSCP 0x8 midway in its connection when you are running a non-interactive command (it actually uses 0x8, 0x10 and 0x4 sometimes). This causes my server to also route the packets in the wrong direction! Very frustrating. While I could use netfilter to mangle DSCP away on the incoming interfaces, the fact that squid is giving me the headaches above suggests it's actually not likely to be worth it. Damn. Moved back to tcp_outgoing_address, with an ACL to avoid the host we want to route statically :-(
02.08.2007 It's been a while
  • but I just found a way to fix up squid and iproute2 to actually route the way I want to, and I think that's worth celebrating (and communicating) through a traditional diary entry. So first the problem: our server has two outbound connections to it; connection A is a static IP DSL link, which is pretty slow; connection B is a faster dynamic IP DSL link. We want most web traffic to route through connection B, but certain servers want to restrict per IP, so we want to route this traffic through connection A.
  • The easy solution to this is of course to use netfilter's mangle table and iproute2's ip rules to determine what goes where. We tell netfilter to mangle this way:
     -A PREROUTING -i eth1 -p tcp --dport 80 -j MARK --set-mark 1
    and we tell ip rule to divert this way:
     32765:  from all fwmark 0x1 lookup dsl-home
    To restrict host X.X.X.X to go through the other connection, I just added a specific IP rule:
     from all to X.X.X.X lookup dsl-business
  • This works perfectly, except for one situation: where traffic originates from the server itself, it always goes through the business link. The reason for this is explained in table 3-2 on [www.faqs.org] -- in short, when packets originate on the local host, routing decisions are made before the packets can get mangled, which means the fwmark gets added too late.
  • Now that's such a corner case I would normally not care, except for the fact that we also run squid on this server. That means that all the traffic we direct via squid is actually getting routed through connection A -- which is slow and definitely not whatwe want. So for the past months, I've been using a very hackish solution, which is to use squid's tcp_outgoing_address to put packets on the wire with connection B's IP address. This works, but it's a big hack, and it requires that you actually avoid doing it for host X.X.X.X, because otherwise you're putting packets with connection B's source address on connection A. That means editing two configuration files for each host -- yuck.
  • Today I `discovered' the tcp_outgoing_tos config option for squid. I had not realized that iproute2 lets you do policy routing based on TOS! This actually end up being slightly more complicted than simply setting the same TOS in both places; first, because the squid docs mislead you into thinking that any TOS will do; a message suggests that rfc1349 doesn't agree with that, though: [lists.netfilter.org] and even for squid there's some odd behaviour reported: [www.squid-cache.org]
     tcp_outgoing_tos 0x8
  • Turns out that there is actually a TOS bit in [rfc.net] that makes sense in my case, which is 8 -- maximize throughput. So I set that up in squid and in ip route, and wow, the packets started flowing correctly. I discovered that ping also has a -Q option you can use to test the routing, and it works as expected, which is quite cool.
  • You need to disable the reverse path filtering for any of this (even using tcp_outgoing_address) to work. I'm not sure why, but:
     echo 0 > /proc/sys/net/ipv4/conf/eth2/rp_filter
  • The unfortunate side to this story is that some connection-B-bound packets, for some reason, still end up on connection A, and what's worse, with connection B's source IP:
     00:55:36.352517 IP homelink.async.com.br.52332 > od-in-f147.google.com.www: R 2679150523:2679150523(0) win 0
     00:55:53.498535 IP homelink.async.com.br.46654 > pain.warhead.org.uk.www: R 2759083133:2759083133(0) win 0
    I suspect it may have something to do with [osdir.com] but I am not sure yet..
23.05.2007
  • Did three months really just go by, or was that just my imagination? Where have I been?! Not New Zealand, like certain other creatures it seems: [www.kikokiwi.com]
25.02.2007 Marmelópolis to São José dos Campos: 181km
  • World hold on..
24.02.2007 Visconde de Mauá to Marmelópolis: 148km
  • After a completely blacked-out night, I left Mauá after breakfast with Sylvia (Ivan apparently never has more than just coffee). I eat bread and spend the morning fighting the burning sensation it gives me. I fail to find a new camera at Mauá; I guess lots of people buy cameras for Carnival. I also forget to buy rehydration powder. I manage to fill my bottles despite all this incompetence, and call my grandmother to say hi and bye. She is lovely even when she forgets everything; she is definitely in the "face adversity with good humor" school and I have tried to learn from her as well as I can.
  • Mauá is a lovely place and I loved its activist community; everywhere you see signs of people rallying for all sorts of interesting and important causes. You feel that nature is well-kept by its inhabitants here; I end up wishing I felt like that everywhere. But in half an hour I wasn't feeling anything but the painful drone over the pass of Serra da Barreira into a village called Mirantão, about an hour out of Mauá.
  • The reason I ended up in Mirantão is that I've been unable to establish whether or not I can get from Maromba to Itamonte. Itamonte is on the other side of Itatiaia, and there isn't much in the way of roads around here; I should be happy that there is a way for me to get there at all without having to ride back to the tarmac of Dutra. I got my mother to try and call some travel agents around there but nobody was able to provide us with a reliable suggestion to go with, and the only story we heard was of someone that spent a whole day on a motorbike to do the 40km trail. Ivan suggested Mirantão, and I'm crazy enough to say sure why not.
  • So on this uphill to Mirantão I figure out that I feel only average today. This is a marked change from yesterday when I was able to attack all the uphills with a vengeance; today I feel sort of flat and it takes a while for the pain to become sharp enough for comfort. It's weird how a dull pain is rarely appreciated in cycling, but there you have it. It's amazing how I only really feel better after some 4 hours of riding -- before that I feel like I am practically dragging myself along.
  • Anyway, I wasn't very sure about this road to Itamonte. I had ruled out this trail from Maromba. I knew there was a trail through a place called Vale da Prata that Ivan had pointed out to me in his crumbling IBGE maps. But it all looked very sketchy, and at Mirantão a pair of guys on motorbikes explained how it was best to go through Santo Antônio; so after some Guará Viton (the black petrol from hell that god sent to save cariocas) I rolled off on that road. Man, was it hard. I'm not saying just "tough".. this was about 6km of really steep, really rocky uphill. I gasped all the way up. It was unexpectedly hard and will remain the second hardest uphill I endured on this trip (I think) -- and that's only because Passa Vinte had make me almost cry the day before. It actually made the 3km of uphill to Mirantão feel like a joke. At Santo Antônio I put on a healthy face and drank a coke at the local bar. I think bars are the only thing you can guarantee that every village will have, and this bar, next to the colourful little square that defines Santo Antônio, was the last sign of practical civilization I'd see before reaching Itamonte, some 3 hours later. It turns out that Santo Antônio to Itamonte is 54km of hard dirt road, and not a lot of locals had ever made the whole trip. My tour guide reassured me "even cars can drive on that road". Great. That makes it sound almost as bad as it actually was. Ouch. Long stretches of sandy flats ended up giving way to rockier and rockier uphills that would fit perfectly into a mountain bike marathon, and then finally a long, twisty and pretty technical uphill unfolded. My chain started to suck a bit at this pint and I was forced to keep ratcheting back and forth; at this point I felt pretty down and a bit depressed at how slow I was going, even after putting in an effort that I knew I'd have to pay for later.
  • But the area has got to be one of the most beautiful I've seen on this trip. Rocks and our native Mata Atlântica are everywhere; birds and butterflies and flowers decorate them. The road levels off finally and then bumps up and down through a handful of villages. One of these little villages has a bar whose owner is discussing VOIP with a customer. I have another coke there; this time it's warm but I am past caring. And then after an endless succession of up and down I reach the downhill to Itamonte, all 20km of it. I swear it's like an hour of no-pedalling downhill, not steep but fast enough to keep you honest. The road here is better, but not excellent, and the ruts and rocks teach me an "exit strategy" strategy. This routine is basically looking at a risky section and figuring out where I want to exit the section; it's really useful because what defines how much you have to brake is what comes after the section you are on (and not really how hard the section actually is). It's all about looking ahead, identifying risks and when and where to exit. Sounds like Barry Boehm and a VC on crack desn't it?
  • Anyway, finally hit Itamonte. It's an oddly small city with a million bikes per capita. I had a cheese-n-egg sandwich and a coke for lunch, and I don't really feel very good in the stomach. Finally manage to buy some rehydration powder from the prettiest pharmacy salesgirl I've met. Bloody expensive too!
  • I endure 20km of the most horrible road to Pouso Alto. I swear that I was in some sort of serious risk no less than 5 times in those 40 minutes of biking! The road is so narrow, the cars and trucks so fast, the vegetation so overgrown.. I have no clue how this nightmare of tarmac doesn't have a collection of crosses decorating it, but I'm not too interested in being the next cross there, so I take it easy and look back a lot. Friggin drivers honking their horns at me! At Pouso Alto I turn off from this horrible road, have another coke (burp) and hear from the man who runs this bar (another bar) that the road to Virginia would be "calmer". Well, doh. Only /one/ car overtook me for the collection of ups and down. This was a seriously peaceful 25km ride once I was past São Sebastião do Rio Verde (which is practically connected to Pouso Alto, really). I stopped only once on this road to appreciate it; this road which would appear to go to many places but which ends up in Virginia because "the gubmint didn't finish it". I wonder how many pieces of unfinished business has been left behind.
  • At Virginia it dawns on me that it is too far to get to Delfim Moreira today. It's getting dark and it's going to rain. I stop at a bar (yes) and get more instructions. So it's not too far to Marmelópolis, and I can probably get food and bed there. Now the funny part about that is that I had just read about Marmelópolis a few days ago in Itaipava, and now I was facing the possibility I would be sleeping there (if I managed to not die en route, which was easier said than done because at this point I had been riding for some 7 hours already). Fascinating coincidence? It rains at the foot of the 11km uphill I am about to face, and for the second time on the trip that little yellow Pearl Izumi jacket is called upon to save me. I clean my chain while I wait for the rain to go away, and it kind of does. The uphill is not too steep and is actually a lot of fun! I trick myself into just looking a the antennae at the far end of the valley and every once in a while I look up and admire how close they are already. There's a beautiful little waterfall on the way up, too. I reach a tiny village and am scared that this is all of Marmelópolis, but of course it's not, it's still some 6km beyond São José da Mantiqueira. I investigate the local bar and buy things that you put in your mouth and go crunch with nutrition or swish with hydration. And then there are signs, and then a steep bit of downhill, and there unfolds before my eyes Marmelópolis in all its splendour. I try and remember what I read about this place.. it used to host a pair of factories that made a sweet out of the Marmelo fruit, but they closed and the city has been asleep since then. But as I arrive the city comes back to life and I am in love with its peacefulness and its people. Hold on, find a pousada. Ring but no answer. Turns out the city's just had a blackout, but the owner's brother comes by and gets the owner to come by and open the place for me, the most humble and yet appreciative people you could find in such a place. As if they were honestly happy to hear your story, and eager to share theirs with you. So the owner worked at Scania, in São Paulo, and came back with his savings to set this place up; his brother lives here as well, with his mother, and they shower me in sweets photos and even a calendar (not sure how that's going to fit into my baggage).
  • That's all I get in terms of showers, though, because there is no hot water, and I've waited so long that it's now dark and real cold. Altitude. We've been chatting for hours, and no, there's no electricity, which is also a big problem for Marmelópolis because there's a major party supposed to run at the local club and everybody's bought tickets and is waiting out for this. We spend long hours looking at the mountains around us and figuring out if the trucks we see belong to the electricity company. So I mention stove-heating some water, because a man has to eat after some 9 of riding, and just as that is coming to fruition.. lights. It's a hot bath for me (luckiest human on earth) and then a stroll through the town for dinner at Monte Moriá. The owner, Jair, tells me about this Jerusalem landmark, while I eat an omelette, rice, beans, fries.. mmmmm. That's what I needed. He tells me about an alternative route, where I will see less tarmac and more mountains, and about the city, and about its history and folklore. I manage to avoid the disco on the way back, where washing and brushing and writing up is enough to trigger a shut down for the night.. night.
  • Marmelópolis is at 1303m, and about 3400 people live here. You need to have been there to see how pretty the stars are on a summer night, though.
23.02.2007 Conservatória to Visconde de Mauá: 123km
  • So it turns out that cycling clothes do not dry overnight, regardless of what is otherwise considered as fact. They are soggy and that's a bit depressing when you are awake at 7am looking forward to breakfast in dry clothes. I towel-dry them, and that does not work very well. Body-drying is a technology which /does/ work however. I have that early breakfast with an adorable housemaid and I pack my stuff. Nobody else is awake in this city. It is very pretty in the morning light. The road starts out up, as usual, and terribly steep; it then levels out enough for me to enjoy it. Some 3km out of the city I view the arched bridge which is an attraction in this area. It was built by slaves, I was told in Conservatória, and the railroad tracks used to go over it. I climb up and see what it looks like from up there. Somebody is building a little house on the right hand side, though you can't see it from below. Survival, I guess.
  • I had decided to change my route, which originally ran due west to Fumaça, to visit this bridge and another important feature: a 200m tunnel through which the old railroad used to go through. And it is amazing! It drips water through, and puddles and a river flow through it. You ride in and only have the light on the far side to guide you, and it's actually not a lot of light. I cross a man on a horse at this point and we wave to each other. I must admit I am happier to be cruel to a bicycle than to a horse. The road I'm following is narrow and twists and turns through the hills; I can only think of the train going through them, hauling cargo to and from god knows where. I pass by a house which has been assembled inside a deactivated railroad station; we have so many of these in my country. This one is called Leite de Souza, I think. The lady is amused at my request to take a picture of her house but in hindsight the sun was in the wrong position and it flares out the shot. I can still remember her holding on to her little baby in the morning light, though.
  • The road is not too hard or uphill and I roll through São José do Turvo and then Santa Rita do Jacutinga. São José is nice and small, but Santa Rita is amazing, and a waterfall runs through the city. This waterfall is walled off and you're not allowed to bathe in it; in fact, you can't even look at it from very close up and I was unable to get a decent shot of it. What is wrong with these people? I think the river is managed by this mining company set up close by and they must have some sort of weird voodoo with the river that they don't want me to see.
  • From Santa Rita to Passa Vinte it gets a bit scary. All I can see are steep mountains that look at me with evil cyclist eating grins, and the road is narrow and full of splintered rock. This is mining country. In fact, the state I have just entered is called Minas Gerais. This road splits up and there are two options announced, one through a named uphill, and one unnamed. I chose the nameless one; if this uphill has a name it's because it's got to be pretty nasty.
  • Turns out my option can't have been much easier. I go through three serious sections of uphill and downhill and it's not only pretty dangerous going down I fear I'll collapse out of heat going up. I can't remember if I used the small chainring here, but if I didn't, I should have, because the uphill that goes into the city is in three long and painful sections which I meditate through, click, click, click. When I finally reach the city I am afraid to say there is not much going on there. I stop at a bar and get the best information a man can get about the road on to Visconde de Mauá, and buy drinks at pretty much every establishment open here. I try and buy some rehydration powder at the pharmacy but they don't have any can you please try the local hospital. I'm in a hurry (what for exactly?) and say thank you very much and then ride off. And the ride is nice because it is mostly down and around and along the Rio Preto with its wide and charming curves. I stop for a while to clean and oil the chain which is a little bit worse for the wear, but still going okay. I pass by all these folks on holidays with their cars full of chairs, children and.. beer; I guess that's what these guys think is a holiday. Come to think of it, can't blame them given I'm giving a demo of the alternatives. But everybody I pass by is friendly (though not very curious) and waves me on into the right direction, and makes nice comments about the weather and how hot it can be and oh, it's a serious uphill to Mauá. I'm like whoa -- 12km of uphill? But that's what they say it is.
  • So I turn off in the wrong direction after a river and a bridge and then I turn off in the wrong direction again. What is wrong with me! I get advice, the second time after I'm some 5km off the track, but this road, it's so beautifully covered in trees, that I forget it. When I finally do get on the right road up to Mauá (no, not really, but I can't remember the name of the little village at the top of this pass..) I have been psychologically prepared for some serious handlebar-hugging but it never comes. There are only two steep sections and I negotiate them by spinning hard before hitting them, and then keeping the cadence high enough to get past them. I use another strategy too: stopping to look at waterfalls! There is a massive waterfall next to the road and I take this 2k detour because you only live once and this is no little waterfall. It's got to be some 500m down at least, and I hike up over the rocks and look at it from many different angles. I tell you man, this is a /lot/ of water. The rains of January are still being washed down the great fluvial veins of Minas, it seems. The uphill to the pass is not too hard; I think I must have climbed in total some 8km over an hour, but this is now behind me as I roll easily across the flat at the top. I run into an electricity truck and they all point me in the right direction (and I'm hungry by now, but I will have to make it). As I descend out of the hilly section at the end of the pass I notice that there is this massive rock towering over me, and from there on Pedra Selada watches me ride through the farmland that you run into approaching Mauá. The rock is particularly striking and once you hear its name you can't help but think it actually is saddled up. I chase a bus down and pass it and I must be going over 40 an hour if he's not keeping up (stopping for everybody in sight as he was, too).
  • I arrive in Mauá early. I run into Sylvia's house just after I decide to eat some of my food as I am just starved; it is right on the road I am coming into and it is a beautiful little cottage with a.. pizzaria right next door to it. You can't go wrong with pizza. Trout pizza, pizza with chèvre cheese, vegetarian pizza... I definitely need the calories. Sylvia and Ivan treat me like a king and I am already spoilt 30 minutes in.. hours later I can only move around by rolling. We spend a lot of time reminiscing about family (and we have lots of that) and the past; her grand-daughters join us for pizza and I can't help but laugh at the age gap. Seems like everybody has an age gap to me; where are all those 76ers I grew up with? And are any of them on a bike today? After 120km of dirt I don't think I can guess the answer to that today.
  • Mauá is at 1300m, population around 6000. The city itself is only a short little strip with shops on each side; most of the population lives in little country houses around it, I guess.
22.02.2007 Itaipava to Conservatória: 151km
  • So on my Carnival vacation, following the tradition of last year's epic ride to the beach, I decided to set up a bike trip from Itaipava, where my aunt Bia and my grandmother Alayde live, to as far west as I could in 4 days of hard riding. The map I bought with Tecão at the bus stop said that was probably São José dos Campos (which is where we ended last year's tour) and after being body-searched by the armed forces while getting into Rio, enjoying a raucous Carnival at Areial with my mother, sister, Crica, Mari, Emilia and Olimpia, and cycling with Brazil's finest Avancinis, I was more or less ready to go. Starting a bike tour is a funny thing, because it's just as if you were leaving home to go for a ride, except you don't come back, and instead ride on until you are past the point of no return. These diary entries will be in installments as they are large and mostly reproduced from a battered notebook which survived the rains on the fourth day (we'll get there), but they are about as much fun as actually going there, and they hurt a lot less to read than to ride.
  • I leave Itaipava at around 9 in the morning. It's hard to leave early when you have all your stuff to pack and yourself to prepare, though this does get a bit easier as you get into the pattern of doing it daily. My grandmother Alayde is lonely all by herself in that big house, as Bia and my uncle are down in Rio for a doctor's visit today. I think many lonely thoughts as I roll out feeling well but a bit confused. I ride past (closed) bike shops (damn, wanted to buy a Presta adapter..), sleepy Itaipava on this post-carnival Thursday, up and around and then finally out to the road where I attacked everybody (on a mountain bike) yesterday and survived with a smile. The road turns off to Araras and then starts going up and down, rolling in the beginning and then it's way up after some 10K or so; it is cold and I wonder if I should have pulled out that rainjacket that yes Michy you give me the most spectacular things but never mind, it's hard going up and I'm only cold because it's 95% humidity around here (as usual). The climb is probably around 15% at parts, and at least 10% average. I grind up in the middle ring (and will only end up using the small ring on Friday, and even then, only for a short while), overtaken by little busses and big pickups, riding up into the clouds. It was sunny when I left home, but here the valley is covered in pretty but dark clouds in those menacing patterns that make you think of Pearl Izumi jackets (like that one yes I have it stowed away way too carefully in my pack). As does the downhill after the unexpected pass (well, it's not so unexpected after you're twisting your frame left and right and looking up in hope of some respite); no, come to think of it the downhill makes you think about that black North Face fleece that you decided to send off via Brasília with the rest of your baggage because it was too heavy to carry. So, freezing hands and back, the road tilts down and DOWN and then it flattens out into Vale das Videiras.
  • So the Valley is the sort of place that the eco-riche enjoy; lots of little restaurants and pousadas and the kind of place that is tastefully painted and clean and delicious and unfortunately not our destination for today. I roll on past Malta and then through a tiny village where the tarmac finally ends. The road from here on is bumpy but hardly sandy, and I'm all questions as to how my little KHS will take the rack I've attached only 12h ago to its seatpost (I will later find that the rack grinded a millimeter off the post across these 600km, which is a rate of around 0.0017 mm/km; a good deal, I think). The rack makes noises and shakes a lot and occasionally swings out to the right (always right. always right. is that my crooked pedalling?) but is remarkably stable for the R$20 it cost a year ago. About this road: the views are magnificent, left and right. Black rounded rock that marks this region of Brazil is everywhere. I roll on to Coqueiros, a tiny village on the crossroads, and then it's actually tarmac into Maravilha. And on that tarmac downhill, once a kombi has ridden past me, something funny happens.
  • My bike is my old KHS, which is OX3 cromoly mostly assembled with XTR plus an assortment of parts some of which actually survive from my S-Works tour bike I used in the Great Travels of 1998. But the wheels are my old racing Mavic Crosslinks, except the rims have been replaced by DT Swiss, because rims don't last forever and even less so when they have two XTR vise-grips, designed by Japanese engineers, machining into their walls. So this bike is sturdy and has seen everything, and just last Monday it has seen a bearing replacement, because on the Sunday ride to Teresópolis and back the rear hub made really scary noises and then blew up completely. Now Crica and Mari drove me around Carnival Monday looking for a bearing shop and we actually managed to buy replacements, and me in my premonitious self buy two because spares are wisdom. And then my wisdom sends this same spare off straight home with my stuff because, yes, bearings are too heavy to carry around. Except that now, on this tarmac downhill into Maravilha (and only the portuguese-speaking can appreciate the irony), the bearing starts to make the same ominous noises. It sounds like little bones are being ground into the thing which they make Jello out of. Or maybe like the premature end of a bike tour. So I am depressed. But I roll on despite the noise, and the fact that my rear wheel has developed this pretty nasty wobble that at times rubs the right stay.. you know, it's OX3. Nothing can really harm it. A kid rolls by me into Maravilha and tells me that's what the place is called, no serious it really is. He rolls by me on a little BMX, and him and I know that it has no brakes which means skidding is the only way of stopping. I ask him, only half-jokingly, where I can find a bike shop, and he shows off his little-proud-blue and brand-new grips and says that at Paty do Alferes is where you get them. I conclude I must visit this shop.
  • So as soon as I get into town I roll down the cobbles, which means Unlock ETA on the Marzocchi because it's hard when it's that bumpy, and my hands were a bit numb this morning, probably because of the extra effort to hold the weight attached to seatpost, yes? I pass a typical small-sized town in Brazil. Lots of construction. Real estate. Everything for sale. Brazil rolls on too, regardless of crisis and scandal and success in my world it seems. I ask around and end up at the bike shop. I am destiny's fool today too. The bike shop is not what me, urban creature extraordinaire, am expecting, because not one bike in it has a quick-release skewer, and that is a simple way of saying bad news to a cyclist. So I try easy things first, and ask the guy who runs the shop if I can use his wheel truing device (which is doubtlessly and then confirmed of course to be a contraption machined out of a fork and some custom aluminum adjustment bits attached to it via complicated wires and plates) to try and get it straightened out, and he says that no, we don't do this sort of thing around here, you leave the bike and then you pick it up later. But this is Brazil, so I say "no, no, I can do this, really, and I can pay for the time I use the stand" and the guy says ok. So I fix the wheel as well as I can, except that it only depresses me further because the crackling noises and loose axle are self-evident as I spin and true it. Why am I even bothering? Well, because. And easy things first.
  • So I try and take apart the rear hub, and it's easy to do this on the Crosslink. But the left-hand bearing is fine, so we're going to have to disassemble the cogs, and though he miraculously has a cassette tool (what for I wonder) he lacks a chain whip. Well, chain whips are easy to cobble, and a bit of chain and a wrench make up for it. Out come the cogs, off I spin the nut that holds the bearing in place inside the freehub body, and.. oh. Out come lots of little steel balls and three almost triangular sections of a cylinder, which are obviously a cracked inner ring. But this is a sealed bearing hub, you see. These things aren't user-serviceable. They live their precise little lives inside walls of steel and virtually nothing but nuclear impact makes them come apart. So it's like when you look at your patient and you see his pancreas and spleen without needing an x-ray: you know it's gone the way of Mr. Eko. But hang on. I had just replaced this bearing last Monday. WTF?
  • So here I am standing inside one of the most understocked bike shops in the world, with a cartridge-bearing wheelset disassembled, and a very specific cartridge bearing that looks more like army shrapnel. How do I get myself in these situations? The bike mechanic is sympathetic in a really cool way and him and I end up having a great time musing about ways to fix the wheel. You can't really put ball bearings into a used cartridge, and particularly one which is in bad a shape as mine. So I instead walk over to a gas station closeby, axle and bearing bits in hand. There are two gas stations and both apparently sell automotive parts, but I choose the one on the left. And at this station there's a shop, where in turn there's a guy peering into a computer screen and I greet him smiling (you have to be positive when you're as busted as I am). He half-ignores me, then comes around to looking at me. So yes sir, I am looking for a bearing replacement. What's the code? Uhm, well, this is all I have of it. Display axle and mangled bits of metal. Eyebrows. I need a code if I am to locate a bearing. Well sir, unfortunately this is all that's remaining of the bearing; can we not do some measurement and searching? Young man, we seem to not be communicating. I say I need a code to locate this bearing, and you have none. What application is this for? It's for a bicycle wheel. Oh, then. Bike parts are found in the bike shop.
  • So I look at him feeling like 65 cents. Instead of cursing him, though, I measure the bearing, try to find it in a catalog, and when I conclude he only has bearings slightly larger than mine, I give up and walk away with his unfriendly replies stuck in my head. At the bike shop the mechanic is sympathetic again and asks me what I am to do. I consider this myself; call home? Catch a bus? Find a job? Meanwhile he is busy opening the counter and looking at a bottom bracket. Not a 2007 XTR BB I tell you. But inside this bracket you can see a little cartridge bearing. And you won't believe that it's exactly the same size bearing as I wanted, either. Well, neither did I, but it fit and after some copious hammering (yes, you often need to use hammers around this KHS) the old bearing was out and the new bearing was in. That's the way you fix things! Perhaps most curious was the discussion about pricing of this bearing. The mechanic tells me that yes, the bearing works, but that I'll have to pay a steep price for it given I've rendered the BB useless. I say whoa, here goes my lunch money. I am in the worst possible position to negotiate and prepare to shell out hundreds of reals. Then he does little calculations, and you can see the numbers bubble up in the ether of his thoughts. And he tells me: R$9.80. No, really. And all this while, the truth in the gas station salesman rings in my ears. Bike parts, bike shop. Doh. The mechanic even finds me a spare bearing in a box before I leave. I smile, confident that I've just confirmed that God actually exists. And on with this cycling business.
  • The road between Paty and Miguel Pereira is run alongside a set of deactivated railroad tracks which double as a bike path. Miguel and Paty are an odd continuum, even though there's supposed to be some kilometers between them, and I catch glimpses of bike shops over my shoulder. Maybe I'm not so out in the sticks after all. Miguel is a charming little town and pity it doesn't have a disposable camera for sale so I can show people just how much. Fair enough, my memory is my personal prize. So I ride along the road to Vassouras. It's hot and sunny but I hammer it out, faux aero-bar position just like Floyd taught us last year. The road rolls around and down, down and down, right, left, and I'm in Vassouras, university city which wins today's picturesque city square contest. And I finally buy a camera to prove it! Another irony: the bike shop here actually has the brake pads I've been trying to buy for a week, and it costs R$5 and change. I am being spoilt by this place. The pads are GTS brand, which my friend Gaucho always finds good things to say about. I figure they could improve, but at least they are still "starting". I forget to buy the Presta valve adapter though. Again. Roll away anyway, and off to Barão de Vassouras, and then to Juparanã, where I cross the Paraíba river in an odd but lovely bridge. I take a snapshot of the tracks and the river underneath it. It is sunny and very hot and I love being here.
  • I hammer along into Juparanã, over cobbles and around a square and somehow Ms. Tatoos and Mr. Bike can't seem to agree on the best way to advise me to get to Conservatória. I laugh, and it's the third time I ask anyway. Juparanã is charming but strange, as if it's a ghost town stuck in the wake of Carnival. The road climbs up and it's not too harsh, and then it turns into a hot and rolling race on tarmac. I must have been overtaken by at most 3 cars in the hour and a half it takes me to dust this section. The road is great until it disappears into craters and then it is great again; I muse how hard this must be to drive on, and it reminds me of driving to Ouro Preto two years ago, stuck on these secondary roads that cyclists love and drivers hate. I make it to the end of the road unscathed and then left towards Barão, but I turn off into the dirt road of Conservatória. 120km and almost there. It is a hard ride up and down, or maybe I'm just not used to being off-road. Conservatória takes a while to show up; I'm tricked into detouring to look at a waterfall which is really more of a pool, and it's not an easy ride up, but I have matches to spend still. That is, until I realize that Conservatória is not close! In the end I get there. It's a lovely little cobbled town, musical in every aspect, and with houses that are named and not numbered. You need to go there one day. And send me a postcard. I stay at the nicest pousada, and it's expensive but worth it; dinner is at a portuguese restaurant that is charming and delicious and serves tortillas like Emilia would have me eat after a long day like this. I complain very little tonight, 150km and change. Laundry, swap those brake pads and I am a dead man until tomorrow.
  • 150km in 7:25 (20.2 kph). Heart rate averaged 126, maxing out at 172 (I think out of Araras). My CS-200 tells me 3976 calories. Conservatória is at 518m; population 6500.
09.02.2007 TV on the Radio
  • Is so good it hurts. Don't walk, RUN and steal some of their music today -- while you still can <wink>.
07.02.2007 Ouch
  • My right thigh hurts; I think I have tendinitis somewhere in my sartorius.
  • I h8:
     ProgrammingError: ERROR:  for SELECT DISTINCT, 
         ORDER BY expressions must appear in select list
  • But I <3 science: [www.eurekalert.org]
    Harvard University psychologist Ellen Langer and her student Alia Crum found that many of the beneficial results of exercise are due to the placebo effect.
06.02.2007 First race of the year
  • And two crashes later I finish second and 22nd overall: [www.marcioravelli.com.br] -- my conclusions? a) 12 minutes off the pace b) base training makes you slow c) Larsen Mimo tires up front are too dangerous for me d) all eyes rest on March. Pictures up at [www.ativo.com] and [www.ativo.com]
02.02.2007 U R what U 8
  • Remember that thing about me having plotted my blood tests in a spreadsheet? Well, I just discovered that Scientists also suggest that "Vegetarians and semi-vegetarians are less exposed to cardiovascular risk factors": [www.ijathero.com]
  • Being a vegetarian is even good for the environment. I think TGI should factor that in to avoid me having to plant 100 trees a year :-/ [www.ambientebrasil.com.br]
01.02.2007 All that suffering works wonders
30.01.2007 Never let culture stand in the way of TV
29.01.2007 Fashion reigns, but fashion rains?
  • You won't guess that I was at [www.spfw.com.br] this weekend. I was on biking holidays (for the first time in some 30 days too) and Emilia and Olimpia were down in São Paulo so I took the bus down on Friday evening and spent the days roaming the city. You always spend horrendous amounts of money in São Paulo, though this weekend was cheaper than usual because the fair was free (and the freebies were fun too). We saw Anish Kapoor's São Paulo exhibit (I had seen the one in Brasília which is very similar but has some peculiar differences in positioning and setup). We were late to the play that Emilia is performing this weekend and that was a pity but I have seen Autumn, Winter (by Lars Norén) before so not a complete catastrophe. Many other wonderfully bizarre things happened over the two days; one that immediately comes to mind is watching leadout man Chamorro (for Sundown) actually win Aberto da República in Brasília after dropping the favorites and his main man Morcegão in the final push to the line. I have never seen this happen before in a race.
  • Also presenting at SPFW was The Green Initiative, Osvaldo's reforesting project that has been making waves all over. The cool thing about TGI is that they make it easy for anybody to calculate how much they would need to plant in order to neutralize their equivalent six-month emissions, and it's trivial to actually go ahead and sponsor the reforesting for that amount. Very smart.
  • Apart from that it rained. It is raining here today too. Excessive rain sucks, and we've had way more than an excess this year. It hasn't rained fish yet though: [en.wikipedia.org]
28.01.2007 It almost happened
  • If Adam hadn't spoken to the cowboy, it would have all been shut down.
26.01.2007 Dismemberment pickups
  • I mean, Dismemberment Plan and Silversun Pickups. But I keep hearing Boards of Canada in them..
25.01.2007 An anecdotal investigation into NFS performance
  • Johan often complains. It's sometimes because of NFS. Today Johan pointed out to me that issuing a copy of a working tree over NFS was really slow:
         jdahlin@walrus:~/dev/sicem$ time cp -r gazpacho gazpacho-2
         real    2m9.621s
    and I was intrigued as to why indeed that is so slow. It's an average-sized tree: 33MB, and it contains about 2500 files. So why does this copy, which takes about 3 seconds on the server, take so long over NFS? The short answer is that file creation is synchronous, and I have tried to start a thread about this over at [marc2.theaimsgroup.com]
22.01.2007 Transform null equals?
  • Today was a day of many WTFs. So you tell me what's wrong in this picture?
     launchpad_dev=# select * from bug where owner != NULL;
      id | ... | date_last_updated 
      --------+-------------------
      (0 rows)
      
      launchpad_dev=# select * from bug where owner = NULL;
      id | ... | date_last_updated 
      --------+-------------------
      (0 rows)
      
      launchpad_dev=# select count(*) from bug;
      count
      -----
         10
      (1 row)
    Yeah. Salgado and I were bitten by this "feature" today in the karma cache updater and I just found it so dangerous that I have got to question the value of having this in the SQL standard for anything but cuteness. There's an option in PostgreSQL that gets the sane behaviour back: transform_null_equals. The funny thing is the only result you get back when you query for "transform_null_equals" and braindead is (as usual) a comment about Microsoft: [www.google.com]
21.01.2007 Google: Cinema São Carlos
  • "São Carlos produz 1º filme inteiramente local": [overmundo.com.br]
  • Our apache dies every time logrotate runs. The logs tell us this:
     [Sun Jan 21 06:25:24 2007] [notice] SIGUSR1 received.  Doing graceful restart
         accept_mutex_on: Identifier removed
     [Sun Jan 21 06:25:24 2007] /usr/lib/apache-ssl/gcache started
     [Sun Jan 21 06:25:24 2007] [error] (2)No such file or directory:
         mod_mime_magic: can't read magic file /usr/share/misc/file/magic.mime
     [Sun Jan 21 06:25:24 2007] [notice] Apache/1.3.34 Ben-SSL/1.55 (Ubuntu)
         mod_filter/1.4 PHP/4.4.2-1build1 mod_auth_pam/1.1.1 mod_perl/1.29
         configured -- resuming normal operations
     [Sun Jan 21 06:25:24 2007] [notice] Accept mutex: sysvsem (Default: sysvsem)
     [Sun Jan 21 06:25:24 2007] [alert] Child 7177 returned a Fatal error...
         Apache is exiting!
    Funny thing is, it happens to a bunch of other people as well: [blog.gmane.org] [www.wlug.org.nz]
13.01.2007 If you REALLY need to use PHP
  • Then don't do as I do:
         $open = 0;
         $filename = "../DIARY";
     ?>
     <!-- BEGIN_DIARY -->.
     <TABLE CELLSPACING="0" CELLPADDING="5" BORDER="0">
     <?
         $fd = fopen($filename,"r");
         while (!feof ($fd) && ( ! $count || $i <= $count ) ) {
             $buffer = fgets($fd, 4096);
             if ( ereg("(^[0-9][0-9]\.[0-9][0-9]|^TODO)", $buffer) &&
                  ( !id || ereg("^$id", $buffer))) {
                 $open = 1;
                 $buffer = explode(" ", $buffer, 2);
             /* open day block */
     ?>
       <TR><TD CLASS="diaryhead">
       <A HREF="diary.html?date=<?=$buffer[0]?>"><?=$buffer[0]?></A>
  • Instead do as I say: use a templating system like Smarty or FastTemplate.
         <div>
           <p><b>{t}Last 24h{/t}</b></p>
           {if $24h_ip}
           <table id="TopIp">
             <tr class="Header">
               <th></th>
               <td><b>{t}IP{/t}</b></td>
  • Every time you use inline HTML in your PHP scripts, god kills a kitten. If you won't do it for me, do it for the kittens.
12.01.2007 Hand crafting
  • The ACM Queue supplement of this month, on the topic of 2007 development tools, has an editorial that says the following:
    The era of handcrafted code and tests, and then a hand-off of code via uncoordinated linear processes into production, is coming to an end.
    Really? Does anyone see an end to handcrafted code and tests? Not in the Free Software world, I don't. In fact, I see less and less code and test generation tools, while I see more and more abstraction in the form of frameworks and libraries.
  • Speaking of which, I finally hacked up an RSS feed of my diary. Blame Fabio C. P. Navarro for reminding me that it wasn't that hard. It is actually one of the ugliest hacks I've ever produced, and yet I am still proud of it. Yes, it too was hand crafted.
10.01.2007 Window scaling?
  • One of our clients is using a satellite link which carries Windows packets perfects, but not Linux packets. Why? Turns out the issue is some router on their outgoing path which doesn't handle TCP window scaling (as specified by RFC-1323) correctly. The horrible workaround is to disable window scaling on the Linux hosts.. but Dave M. would frown: [www.ussg.iu.edu]
  • Or could it be tcp_timestamps? There's some evidence that can be problematic with broken routers as well: [antionline.com] [www.squid-cache.org]
09.01.2007 Speaking of fighting back
  • It seems Daniela Cicarelli and her co-star in their "home" video (available everywhere on the Internet you care to look) have managed to "fight back" and get YouTube banned across Brazil! It's more a beach video than a home video, to be honest: [exclusivo.terra.com.br]
  • I noticed this on the cover of the newspaper when I was out buying food for Olivia this morning and I have got to say this is wonderfully insane. I guess there are two sides to it. On the down side, there is a lot of great YouTube.com content that we're going to have to miss out, but on the upside, you have many options to grab the amateur video elsewhere: [www.mininova.org] [www.mininova.org] [www.mininova.org] [www.mininova.org] and, oh yeah, Google, who owns YouTube still lists the video, anyway: [video.google.com]
  • What can I say. Thank god for effective protection of privacy? I wonder how much effort it would take to knock down Google, come to think of it. Zuardi has more to say about this, in softer words and a sweeter language than I do: [idomyownstunts.blogspot.com] and somebody's actually registered a boycott domain already: [www.boicoteacicarelli.com]
  • BEST MUSIC TITLE EVER: [cchits.ning.com]
  • If you think you might enjoy Goodbye The Band, since the track above is lost and gone, try this: [ia300031.us.archive.org]
  • I bought a Kong toy for Olivia today. I'm reading about stuffing them, which apparently is something of an.. art? [dogs.thefuntimesguide.com] Wonder if I got the right thing? This guide actually says that "Kong Toys Are The Best Toys For Dogs": [dogs.thefuntimesguide.com] ... but... an automatic dispenser? [www.sfgate.com]
08.01.2007 Fighting back
  • Hardware hell almost took over my weekend but I fought back and won. Upgraded the drives in the server to 73GB and added them one by one to the Raid-5 doing the musical chairs routine. It was unfortunate that along the way I got the SCSI transmission blues: I replaced the SCSI cable for a cable with more positions, then replaced one hard drive, then replaced the next, and that's where the SCSI errors appeared. I rebooted out, swapped the cable for the old one, and the errors went away. Swapped the rest of the drives. Swapped the SCSI cable back in. End of problems. Go figure!
  • Here's a bonnie++ run of the Raid-5 with the new Atlas Vs:
            ------Sequential Output------ --Sequential Input- --Random-
            -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
       Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
      7592M 18494  59 28195  34 21676  26 40032  92 74555  21 596.9   1
            ------Sequential Create------ --------Random Create--------
            -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
      files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
         16  2662  98 +++++ +++ +++++ +++  2746  98 +++++ +++  6460  97
    By looking over the internet I notice that the performance I'm getting isn't actually that great (I've seen setups that do twice the sequential read and write speed we do) but.. I'm not sure why.
  • Was reminded by [groups.google.com] of how to copy partition tables using sfdisk. It's actually too trivial:
    sfdisk -d /dev/sda | sfdisk /dev/sdb
  • Then discovered what /etc/iftab (and iftab(5)) was meant to do, and stopped the interfaces dancing around every time I rebooted; it was almost completely random, amazingly.
  • VMWare refuses to run over SSH on my PowerPC mac, and I haven't yet found out why. I discovered today it does run on my laptop, but only after I added the infamous
     xkeymap.useKeycodeMap = "TRUE"
    option to my ~/.vmware/preferences. Go figure. Funny thing is that Gustavo's email to the redhat list is what reminded me of it: [www.redhat.com]
  • I then got the new VMWare tools installed; I liked seeing that it actually allows you to shrink virtual devices (though I don't need to right now), and that it installed easily after I added a CD-ROM to the virtual machine (who knows why? I had a virtual CD-ROM there but it didn't work) and did the Add/remove programs thing.
  • I hear thunder on the horizon.. oh-oh.
05.01.2007 A Crater
21.12.2006 7 meters of rain
  • [www.agencia.fapesp.br] should make London residents feel better: 7000mm of rain fell in 2000 in an area in Calçoene, in Amapá, northern-most state in Brazil. That's like twice as much the second-most-rainy place registered, which is around Panapiacaba, near São Paulo capital. One interesting fact in the study is how much rainfall varies across the Amazon region: some places have almost desertic profiles, whereas others are almost as.. good.. as Calçoene.
20.12.2006 MySQL repair man of the day
  • I had to fix some corrupt MySQL tables today. If only I knew how. I was running into a problem: any insert into the bugs table for Bugzilla told me the following:
    Duplicate entry 'NULL' for key 2
    Thing is, there is no key 2 for the bugs table. Scratch head, right? Oh-oh: [forums.mysql.com]
  • Turns out there are two great commands for MySQL I had never used: CHECK TABLE and REPAIR TABLE. A number of these tables were corrupted! I'm not sure how bulletproof the recovery is, but I hope it's good enough -- no 8am calls for me tomorrow please!
11.12.2006 The heat is on
  • At least inside the server case:
     kiko@anthem:~$ sudo hddtemp /dev/sd[abcd]
     /dev/sda: QUANTUM ATLAS10K3_36_WLS020W: 37°C
     /dev/sdb: QUANTUM ATLAS10K3_36_WLS020W: 37°C
     /dev/sdc: MAXTOR ATLAS10K5_73WLS: 44°C
     /dev/sdd: MAXTOR ATLAS10K4_36WLS: 39°C
    So maybe the drives which are higher up in the case are hotter, and the 10K5 is hottest. Why is that I wonder? Or could it be that the more modern the drive, the warmer it gets?
06.12.2006 That's why they call them scientists
  • Apparently scientists have discovered that environmental issues such as contact with family, exposure to drugs and poverty have more to do with people taking up harder drugs than being smokers of pot: [www.agencia.fapesp.br] -- and all I can really say is "duuuh". The study is interesting, though, in that it used a population with groups that used pot before or after cigarettes and alcohol, and neither of them had a higher propensity of serious drug addiction.
  • One of our server's fans is on strike. It's a Minebea 3110KL-04W-B69. Interestingly enough, I found in a message post at [www.short-media.com] its CFM rate -- about 42.
  • You might ask yourself why I am looking at [www.thule.com.br] -- to be honest, I don't even know myself. But it's pretty cool, isn't it? Thule make a 4-bike one too, but it's more than twice the price, and this one is so nice and compact.
05.12.2006 Was it the shorts and sandals?
  • Yesterday evening something interesting happened that I didn't mention. So I went to see if everything's sorted for me to finally vacate and return my old house, and this is after an army of painters and workers have been over it fixing scrubbing and cleaning up, and my bank account has suffered the usual million little cuts in getting this sorted out. Now my landlord's had a bit of bad luck this year and his old lady is very sick, and the entire family has moved in to his place and are doing a good job of cheering him up. I've stopped by a few times to pay my respects and talk about the house and generally I think I've been a good tenant and a respectful neighbor. I mean, I've minded my own business, taken good care of the house, and made improvements during the years I was there to the extent the house is nicer than when I moved in. I think that's good karma to share.
  • And then there was yesterday. While I am walking into the house, my landlord's son greets me and we make conversation, in typical São Carlos fashion. How are you? Pretty good; how are you guys doing? Ah, not too bad. So.. you're a student here, are you? Me? No, I graduated a long time ago. Oh, really? Yeah. I finished my master's about 4 years ago and haven't gone back to study yet. So he pauses for a bit and then asks me what he's been meaning to ask me all along. So, do you, I mean, aren't you going to go out and get a job?
04.12.2006 and back
  • In second place, and third place overall, which was great: [www.sampabikers.com.br] I was a bit miffed at having missed first place in our age group by some 8 minutes, given we led the race for a long while, and I am still asking myself how we managed to fall back 12 minutes from first place overall! However, I had only one very slight and uneventful crash at night, and the rest of the time rode super-strong. I finished the first lap in second place and the third lap (I had to do three in a row, which kinda broke me) in the top 5, which very a pretty pleasing experience. Next year we will shoot for number one, because it's been many years of #2 at this specific race. The last time I was on that same podium, I recall, our team ended up in a fist-fight! At least the runners-up were a bit classier this time. Pictures I found online include: [www.amigosdabike.com.br] [www.wvagencia.com.br] [www.wvagencia.com.br]
01.12.2006 Almost there
  • The last great race of the year starts tomorrow: [www.mtb12horas.com.br] so today João, Gaúcho and I did some loops of Russian Roulette, and yes, you guessed it! The first mandatory crash was mine! João had a nastier one later because he had a chain skip and I hope he can sort that out until tomorrow. I may have pictures to share on Monday; here's hoping batteries last. I will take a video camera to shoot some of the training loops and well who knows, perhaps we can even manage to shoot one of the final laps. Wish me luck!
30.11.2006 I have been so busy
  • I've been unable to stay awake at the job: [www.async.com.br]
  • But still smiling through the rough of it all: [www.flickr.com]
  • It was Daniela's birthday over the weekend, so I had to do a marathon of work and travel on Saturday that ended up at 1am at the airport in Rio; highlights were me missing the flight in Campinas, Fabia and I driving to São Paulo in an amazing rail of rain, our flight delaying 2 hours, and actually getting to the club. Pictures of the really fun part of the trip are at [picasaweb.google.com] and mmmm I realize I need to shave sometime soon: [picasaweb.google.com]
29.11.2006 The Forest (The Cure)
  • Today, after 14 years of negotiation, a law that specifies use and protection of Brazil's Atlantic rain forest (Mata Atlântica, perhaps my favorite forest worldwide, and one in which I have spent many nights, and left many pounds of flesh in) was approved by our state legislators. 14 years is a bloody ridiculous amount of time to do anything, but this is such an amazing success that I can't help getting a knot deep down that our bumbling government has actually managed to so something unequivocally good. So share my hope, and if you can savour the portuguese, read more about this milestone at [www.sosmatatlantica.org.br]
28.11.2006 Gravity
  • Lennard Zinn finally explains why heavier cyclists descend faster using the math here: [www.velonews.com] -- but the most interesting part of it is that he actually links to an article from a Brazilian site: [www.vivaesporte.com.br] -- and that article in particular is an amazing resource for both climbing and descending for cyclists who are scientifically inclined.
24.11.2006 So you have a Siemens Gigaset
  • And you are curious how to set the names of the extensions? You select the "internal" menu, and then each individual phone has its own menu where you can change its number, set its name and unregister it. I am still not sure how you get some of the extensions to not ring when somebody calls in. Tech support says it's not possible -- well that just sucks. I guess these phones are not really useful for companies with secretaries, after all!
22.11.2006 Jono says it all
     <kiko> I suck at mutt
     <jono> mutt? kiko, the 1980s called and want their mail client back
21.11.2006 They overcame ED!
  • Of the 16 bits of spam stuck in the moderation queue for the Kiwi mailing list, 14 of them mentioned Erectile Disfunction -- a few of them abbreviated as ED. Has somebody been leaking information over the INTERNET??
  • Back in Brazil after some good ole USAing. It was fun. I need to add some backlogged entries to ensure I actually remember what I did.
01.11.2006 Moving house..
  • I'm moving house today, and then moving city for a few days, and then moving country for a few weeks. Don't expect to see me on the hills to Analândia for a while.. I'm going to be up in Minneapolis, which is freezing: [www.weather.com]
31.10.2006 Some things in cycling just make you go WTF
  • So how do you explain, after being caught red-handed with cash and dope, evidence stacked as high as the Galibier, Manolo Saiz is awarded a ProTour license for 2007?! WTF? At least somebody found the words to make it right: [www.velonews.com]
30.10.2006 In no particular order
  • In the next 5 days I need to:

    a) write two reports
    b) land 4 branches
    c) visit my grandmother
    d) go to Rio
    e) ride 300km
    f) fly to Minneapolis
    g) produce a plan for next week's UDS
    h) produce a plan for the Canonical all-hands
    i) rent bicycles in various places
    j) get 5 custom parts ordered and delivered at Michy's house in time
    k) move houses
    l) find a home for 2 dogs
    m) interview 2 people for random jobs

    Oh, hmm and n) write an obscene number of emails. I know I do that already but this week will be particularly obscene. I might even include profanity in them if you really ask for it.

28.10.2006 It's a hot saturday
  • and as usual the afternoon acid baths are scheduled. Tune in at 14:00 if you are that sort of person.
  • Mez and I yesterday tried to figure out how the hell to get Mailman to let messages with a certain header through without making the list unmoderated. It turns out that the spam filters can almost do what you want, if not for a strange design detail that the UI doesn't make clear. The bug report and a workaround are here: [sourceforge.net]
  • I was doing some google trawling of myself, and found a set of links that are historically interesting (and I don't even remember most of it): [www.rnlivre.rn.gov.br] [www.gnu.frb.br] [www.sounerd.com.br] [lse.sourceforge.net] [www.snort.org] [www.osdl.org]
27.10.2006 Constant Gardeners
  • Today I am going to write about how amazed I am with gardeners in my home city. It's a long story, but, basically, I live between my house and my office in São Carlos. Each of these has a garden, and each of these gardens requires regular tending to. I do it occasionally, but I am really too busy to do it regularly, and for this reason we've tried to find somebody to come and do it regularly for a monthly price. This is the same sort of work I used to do up in New Milford in 1998, and I really enjoyed it. I enjoyed getting paid regularly, too. Funny thing is, it appears the gardeners here don't! You see, they come and announce good intentions in doing weekly work. Because there will have been some time since the last well-intended gardener has done trimming, there will be some initial heavy lifting required, and I offer to pay that work up-front as a sign of good will. So the gardener comes and does the work and we pay him and the houses look smart, and we say yes sir you do acceptable work let's do this regularly and we'll pay you once a month. That's the last we see of the gardener. At some point some other gardener comes along, and the story starts over, with an interesting overlap, because the old gardener comes back a few weeks later and says hey remember me I'm the gardener, to which I reply yes sir but it's a bit too late now as we've found a new and reliable replacement. And after doing this some six times, I realize what the problem is: I'm stuck in a Moebius loop.
  • Overweight and heating up the world. Hard to actually believe, but [www.news.uiuc.edu] has a report on how weight increases in the American population have led to increased fuel consumption. I am blaming them for how hot it is here today.
26.10.2006 So far
  • It was an interesting morning. I did 5 repeats of the local Tour of Flanders, and for all of them my heart rate was way into the 170s, hitting 181 on the fourth. I was flying over the cobbles; at one point André stopped me and said "Dude, the laws of gravity still apply to you, mmmkay?". I wonder if it's because the Granfondo has brought me to a better level, or if it is a temporary benefit that will wear off in a few weeks. Maybe it's because I'm finally under 65kg. Whatever it is I really enjoyed it and ended up the intervals not even half-dead; we had enough energy left to chase each other in the downhill, with the sand in the corner making the turn at the bottom particularly fun. For some value of "fun" I mean. 1:44 total riding time. Today was so hot I put sunblock on at 6 in the morning. That's gotta be a personal record. Which reminds me..
    You're staring at the sun
    You're standing in the sea
    Your mouth is open wide
    You're trying hard to breathe
    The water's at your neck
    Your body's over me
25.10.2006 I'm really weird
  • But after listening twice to TV on the Radio I start to think I like it. What is wrong with me?
  • I tabulated my blood tests from the past 6 years today in Openoffice, and noticed a bunch of interesting little details. I am rather fascinated by blood tests in general: the idea that you can measure a net result of everything you do as an organism by measuring your blood. For instance, since converting to a vegetarian diet my LDL and Triglycerides have gone down by around 50%, and this last year, where I've eaten some fish and more egg, my LDL levels have gone up slightly, but my triglycerides are as low as ever. I rated high on glycosis, but I think that's just because I didn't really have a 12-hour fast before the test (I had dinner too late). I catch myself wondering how much daily variation in these levels may occur; I might request a second test in December at another lab to see what it looks like.
  • Back in 99 my test detected some calcium oxalate crystals in my urine; the portuguese article at [www.medonline.com.br] is an excellent technical description of kidney stones and potential dietary contributors to them. I may have just been dehydrated when I took the test, though -- I often was back then.
24.10.2006 Granfondo Pinarello 2006
  • Results of the weekend race may tell a sad story; 9th in age group and 45th overall: [www.ativo.com] However, that is but a fraction of the awesome experience that the race was. Riding up in the top-20 of a massive peloton at an average of over 40kph is an amazing feeling, and I climbed, attacked and paced with them all. That is, until we hit the 110km mark, I ran out of water, bonked on the larger uphill on the way back, paced Beto up the hill and then paused for a few minutes to fill up those bottles. I managed to latch on to a group which was riding okay, but not really spectacularly. I ended up averaging around 38, which means I covered the 150km in less than 4:15. It's amazing how much time you lose if you drop out of the peloton; it would have been impossible to chase them back if they were anything more than 100 meters ahead of me. I loved the race, and will definitely ride it again next year. And yes, I know myself enough to know that a dehydrated Kiko just doesn't operate smoothly; however, the logistics of getting water were complicated, and it was my first road race ever. Frances Farmer will have her revenge.
18.10.2006 You Could Have It So Much Better
  • [www.fpciclismo.org.br] It might not be *all* right, but beach, biking and 160km of blood-curling flats starts sounding really appealing now that the acid baths of the weekend have started wearing off the legs (and brain). I am curious to see how strong I'll feel at the end of it of course. And if we're lucky, it might not even rain: [br.weather.com]
17.10.2006 São Carlos once more
  • After a late flight home and a seriously LONG taxi ride I made it home yesterday without passing out. Well I did actually pass out for most of the trip and was surprised that we were already at Analância after what seemed to be a blink. I did end up having to pay part of the fare with some US$50! Funny thing that the rain overnight didn't manage to ruin our morning ride (but no, no Tour of Flandres to celebrate either). I was wrecked from the aggression of the weekend war in Brasilia, so much that I was dropped on one of the last uphills.. thank god for offices.
11.10.2006 I did something
10.10.2006 Iron Biker
04.10.2006 The codes of ethics
  • Wouldn't it be great if political parties signed ethics codes, just like the Pro Tour teams do? I mean with automatic suspension of any politician involved in a corruption inquiry, and automatic suspension of the whole party if multiple politicians were found guilty. And why on earth is such a thing possible in cycling, but not in government?
03.10.2006 To say the least
  • if you are anything like me you should apt-get install the miscfiles package.
29.09.2006 What am I talking about?
  • As Johan points out, indeed, it was not a dog.
    Franco is not speaking Norwegian but making up the dialog. "Schmergsdorf" as Carpenter puts it. The subtitles, however, give the impression he is speaking Norwegian. The words spoken are actually understandable for Norwegians. Albeit broken Norwegian, the line goes: "Se til helvete og kom dere vekk. Det er ikke en bikkje, det er en slags ting! Det imiterer en bikkje, det er ikke virkelig! KOM DERE VEKK IDIOTER!!" This translates to: "Get the hell outta there. That's not a dog, it's some sort of thing! It's imitating a dog, it isn't real! GET AWAY YOU IDIOTS!!"
25.09.2006 Stretching
22.09.2006 Spam is weird
  • Check this out
     N *  40 Sep 17 Shari Morrow        ( 0.3K) 64% of members got laid
     N *  41 Sep 07 Issac               ( 0.3K) 66% of members got laid
     N *  42 Sep 20 Curt Randall        ( 0.3K) 67% of members got laid
     N *  43 Sep 13 Tomas Alston        ( 0.3K) 72% of members got laid
     N *  44 Sep 09 Tom Carlisle        ( 0.3K) 73% of members got laid
     N *  45 Sep 17 Weldon Tyson        ( 0.3K) 73% of members got laid
     N *  46 Sep 17 Brittney Villegas   ( 0.3K) 74% of members got laid
     N *  47 Sep 14 Virginia Rhoades    ( 0.3K) 75% of members got laid
    Do you think they actually run the statistics?
21.09.2006 Unless you are the sort that freaks out easily
20.09.2006 Kinda
  • sick. Not 100% but have that weird feeling in my throat, something of a headache. I'm feeling remarkably well given that though.
  • It rained today after a /very/ long time without serious rain; it was welcome, and the fact that I'm only cycling on rollers this week makes me appreciate it even more.
  • A crackhead technician connected our DSL filters the wrong way around this morning and we had an Internet outage for a while. I had to draw a diagram to figure the damned wiring out! Ping averages on our fixed DSL connection:
      Host            Loss%   Snt  Last   Avg  Best  Wrst StDev
      192.168.32.1    0.0%   4958  24.3 175.8  19.8 2115. 241.0
  • And on our dynamic DSL connection:
      Host           Loss%    Snt  Last   Avg  Best  Wrst StDev
      200.206.239.227 0.0%   3225 163.8 112.0  51.9 3765. 179.9
  • Trivial howto on setting up content-negotiated compression in Apache: [www.mukund.org]
  • Isn't is spooky that John Christensen, who plays the character in Waking Life that talks about techniques for discovering you are actually lucid dreaming, died before the movie was finished? I had noticed his name is on the credits twice.. [amazon.imdb.com] (and then I noticed that whoever used to run [WWW.FILETHIRTEEN.COM] knew him, since I'm the only person on the Internet that seems to have noticed this connection..)
19.09.2006 I think I'm
  • SICK! Argh! I hate being sick. Tomorrow will tell, though.. and I've got the national championships this Sunday.. waaaah.
  • Results from the last race are finally up and I am not too far down this time: [www.timeeventos.com.br]
  • I know one of these dudes: [mako.cc]
15.09.2006 Returns
  • FSA granted my wish and is sending me a brand new K-Wing. I am so lucky sometimes..
  • Gross! My DVD of Torn Curtain has a blemish that makes it impossible to view what happens after 1:04, which frustrated Johan and I yesterday after enjoying Paul Newman's cool performance. How does it end?! I contacted Amazon customer service about this today; let's see.
  • Wow, Amazon customer service issued me a full refund in less than 2 hours! I'm amazed as always as how hard they work to keep their customers happy -- I can't say I have once felt unfairly treated by them.
14.09.2006 Silencio
03.08.2006 Raided
  • So /dev/sdb died again this morning. I think we're going to have to end up purchasing a replacement.. boohoo. Looked into a replacement at Misco, and funny thing is, a 73GB disk costs as much as a 36GB. So perhaps we will get that extra room for /home that Johan has always been bothering me about. :-)
28.07.2006 Tour de Beer
  • One week after we cheer a pretty mundane yellow-jerseyed Floyd into the Champs, we get some unexpected news down the pipe: [www.velonews.com] It's funny, though, to have the subject of beer and testosterone come up so close one to the other, and I was surprised to discover that this article suggests that there is actually a link: [www.clinchem.org]
  • Of particular interest to me, though, was the statement by Allan Davis, who rode for Liberty, and who was implicated in Operación Puerto before the Tour. His statement at [www.cyclingnews.com] reads:
    I invite or even demand that the UCI, ACF, Spanish Judicial system or whoever needs to, carry out a DNA test to finally clear my name from all of this. I understand that this is my choice and every individual is free to do whatever he feels he needs to do.

    Should the DNA test prove that I am associated to this case, I will hang up my cycling shoes the day after and head home to Bundaberg and start looking for a normal job.

    All of this is very frustrating when all I want to do is ride my bike and be able to make a living for my wife, kids and myself.

    Allan Davis.

    That's a pretty interesting -- and strong -- statement. I wonder what that means given that the general belief is that everybody involved in professional port, no matter where or who, is doping.
  • Following the Hardware Hell posting, I should mention that my K-Wing FSA handlebar has now cracked too. What have I done to deserve this?
  • Man, git is weird:
     Right now I'm running the Ubuntu 2.6.15-26 code with this set of
     patches, and things look good:
      
     5a07a30c3cc4dc438494d6416ffa74008a2194b3
     6eb0a0fd059598ee0d49c6283ce25cccd743e9fc
     d25bf7e5fe73b5b6d2246ab0be08ae35d718456b
     76b461c21468f41837283b7888d55f1c0671f719
    as taken from [launchpad.net] highlights how obscure things are now!
11.07.2006 Hardware hell
  • In the past 7 days I have had: one KHS cromoly frame crack; one S-Works aluminum frame crack; a rear Bontrager hub crack (a first for me); and finally, a hard drive crash on anthem. Check it out:
     Jul 11 00:38:42 anthem kernel: kernel: [4926845.846000] SCB_SCSIID[0x97] 
     Jul 11 00:38:42 anthem kernel: [4926845.846000]  76 FIFO_USE[0x0]
                     SCB_CONTROL[0x64]:(DISCONNECTED|TAG_ENB|DISCENB) 
     Jul 11 00:38:42 anthem kernel: [4926845.846000] SCB_SCSIID[0x97]
    That was last night. The server seems to have survived it but I got hatemail from mdadm this morning, so I attempted to re-add the drive to the array without rebooting. Not such a bright idea:
     kernel: [4970777.415000] SCSI error : <0 0 9 0> return code = 0x6000000
     kernel: [4970777.415000] end_request: I/O error, dev sdb, sector 651754
     kernel: [4970777.415000] md: write_disk_sb failed for device sdb14
     kernel: [4970777.416000] md: errors occurred during superblock update, repeating
    and a hung server. The funny thing is that it isn't completely broken; it's actually the second time this year it crashes on me, and if it crashes every six months, that's not so bad. I rebooted anthem and re-added the disks and they work great now. I am shopping for a replacement, though..
  • And then, 5 minutes later, Salgado tells me his brand new Syncmaster 173 LCD monitor is kaput. I wonder if Samsung has world-wide warranty...
31.05.2006 You only live once
  • And even then, /maybe/ once.
29.05.2006 I take the blame
  • I think I did my best ever mountain bike race yesterday. I placed 6th overall, less than 15 minutes behind the race leader, after 4 hours and 100km of scorching sun, blood-curling sugarcane and stomach-turning climbs. I have to say I couldn't quite believe it myself when I crossed the finish line alive and in first place of the sub-35 category. Man I love being 30! [www.tripadventure.com.br]
  • Carol apparently did 5th of her age group in this year's Ironman Brazil: [ironman.com] -- amazing after the short training time she had this year, and given her history of injury and survival. Wow!
  • From a report by AT Kearney:
    Um programador brasileiro ganha em média US$ 13,4 mil por ano, bem menos que seu colega canadense (US$ 36, 4 mil) ou de Cingapura (US$ 33,5 mil).
25.05.2006 Continents
  • Really interesting article on how the continents appear to have come into existence, but only for portuguese-readers: [www.agencia.fapesp.br]
  • Michy asked me to check my ideal frame size using [www.bikebuster.com] so I went ahead and tried it out. I think I measure 174, and I measured my leg height to approximately 82cm. It is interesting!
     MTB min. height     17.88 inches    44.69 cm
     MTB max. height     19.38 inches    48.46 cm
     Roadbike min. height                54.12 cm
     Roadbike max. height                56.01 cm
    It appears from this that my 17" is slightly small for me (and it feels a bit like that when I ride it, because my arms could go out much farther). But smaller is lighter! It also says that my saddle height should be 71.52cm. I'm going to try that.
  • We appear to know where AIDS came from, now: [www.agencia.fapesp.br]
23.05.2006 Pilotagem!
22.05.2006 Mondays!
  • Emails bloqueados esta semana para: kiko@async.com.br (total 43308). No, that's not a typo. 43000 spams blocked at the SMTP level. Scary.
  • Today a guy told me the tree in front of the office is going to die because it is growing up sideways, like in a 60-degree angle. I don't think it is, but maybe he's right. He did, unsolicited, cut the rope that was tying the trees together, and said the rope was hurting the tree (it did indeed leave a mark in the tree bark). We will see.
19.05.2006 Le Grand Dernier Bivouac
  • Today, a good friend, and one of the greatest climbers of all time, passed away on the Everest. Vitor was one of the kindest, nicest, most positive people I've ever had the honour of meeting, and we spent some amazing moments together on the Amazon, for a week in 2001. He was strength, daring and laughs through disaster and fortune alike. But Vitor was something of a spirit of fire, and as much as I admired him, that particular mountain has no love for us, and you rely on having only lucky days when you are up there. I will miss him.
18.05.2006 Books
  • This person just donated 30 thousand books to the University of São Paulo: [www.agencia.fapesp.br] which beckons the question: how does one amass 30K books in a lifetime? That's like one thousand books per year for 30 years -- 3 per day pretty religiously.
10.05.2006 Sandbagged
  • Johan's making little waves into big waves: [article.gmane.org]
  • Little-known factoid about the London Underground: It is the oldest underground system and one of the three largest in the world. Operations began on 10 January 1863 on the Metropolitan Railway; most of the initial route is now part of the Hammersmith & City Line.
08.05.2006 Big
  • Came back from Big Biker yesterday; did a 3rd in my age group which was not all bad, considering that I'm only one year back into biking. Results are up at [www.bigbiker.com.br] -- 27th out of 244 is not great but it is something already.
  • I discovered not all of PyGTK.org's problems are gone; there seems to be more content that is not UTF-8 -- specifically, stuff in tarballs! I pester Gustavo to fix it.
05.05.2006 Encoded!
  • I finally reconverted all the pages on pygtk.org to be UTF-8-encoded. This was actually more work than it sounds; we had content with completely unknown encodings, and it took me a while to discover that 0x92 is actually not in latin-1 at all (it's a quote character in Windows CP-1252!). I ended up using iconv to detect files that were non-utf-8 and converted them manually; I then fixed up .htaccess to serve utf-8 again. One message in my inbox down!
  • Of interest during this research was [permalink.gmane.org] which talks about how to highlight non-ASCII characters. Unfortunately it didn't work very well for me, but I'll save it for later.
  • Yesterday, I discovered listadmin, the command-line tool for managing Mailman lists, and today I have blazed through the lists in a tenth of the time it generally takes. It totally rocks! I had to install the Debian unstable version, though; I've requested a UVF exception for it. Let's see how that goes.
02.05.2006 FISL, biking and partial illness
  • Is the summary fo the past weeks.
  • FISL in particular meant generating painful pictures like this: [thomas.apestaart.org]
13.04.2006 And finally, I am Rio
  • so if you do, look for me in the mountains.
11.04.2006 Today, I planted a flower
  • to try to make up for the rest of the day.
05.04.2006 I WENT TO BED
  • at 2am and survived the 5:30 bike ride of death. This was a feat; I have been riding about 500km every week, but getting up half-drunk in the dark and rolling out in the freezing weather must give me a karma bonus that I will want to cash in at some point.
  • Matthew pointed out [usabilitynews.com] to me, and I noticed that any advertisement program is bound to reduce the ROI for me. I wonder why.
04.04.2006 I am in a terrible mood
  • And I'm not entirely sure why, but I'm sure I'll find out soon.
  • I discovered today that a friend and journalist died last weekend; I knew Giordani Rodrigues from the brazilian antispam lists, but also personally from FISL and from an assortment of top-quality (and caustic!) security and technology-related news that he'd regularly publish. He ran [www.infoguerra.com.br] I guess he'd like to be remembered for all the great work he did, so here's my bow to the greatest technology reporter Brazil has ever had.
  • I suspect I have developed a mild food allergy. I will need to investigate this week; one more fun task to go through.
03.04.2006 Destroy Everything You Touch
  • This new Ladytron album is amazing; you get electro-babes with the buzzsaw distortion that made My Bloody Valentine famous. I'd love to have the sensation of first listening to it kept in a little box. The Louis XIV album is, however, OUTSTANDING and should be placed in the eternal hall of fame.
  • It is demoralizing to see things like [www.light-bikes.com] and [www.light-bikes.com] floating around on the internet. 8.5kg for an M5? So the guy's a wimp (who removes his granny chainring and then shoots a picture of a dirty bike? who is he kidding?); his bike is still over a kilo lighter than mine!
10.03.2006 The shock waves of sent-mail
  • My inbox is pummelling me. I'm fighting back with the tools Matt and I have worked on perfecting: ruthless filtering, fast replying and delegation. It's now down to 30 again. Go me!
  • I gave up long ago, but I did watch Lost on DVD! [c2.com]
01.03.2006 Will this be a DEATH MARCH?
  • I was shocked to read, today, this quote:
    Its chief executive, Eric Schmidt, alienated many on Wall Street last month when he told Time magazine, "The company is not run for the long-term value of our shareholders but for the long-term value of our end users."
28.02.2006 Riding there and back, in 5 days
  • Finished today a tour from São Carlos to the beach. It covered almost 600km, with the longest day being Saturday, from Campinas to São José dos Campos. The wind was on our backs for the whole 4 days of riding, excluding some 25km from Caraguatatuba to São Sebastião (and in the opposite direction, yesterday, remarkably). The uphill from Guaecá to Maresias is really the hardest stretch of uphill, though all of Tamoios was pretty rough, and in particular, yesterday, scorching as well.
  • Pix of part of the trip are at [async.com.br] including the victory shot at [async.com.br]
23.02.2006 Looking back
  • To the first two months of this year, I have cycled just over 2000km. I'd say that's not bad considering I was stuck in the London Dungeon for 2 weeks and sick on the first week of the year. My neck hurts today however. Hmmmm.
21.02.2006 Apparently
  • The Nokia 770 was finally released today. I need to get an updated system image for mine..
  • It seems that MacOS Internet Explorer 5.16 and 5.17 don't tolerate quotes (single or double) in CSS url() instructions; just updating some CSS to avoid bustage.
17.02.2006 meus amigos (666)
  • It must be my lucky star shining!
16.02.2006 Super-30
  • I woke up, and it started to rain, but not before I managed to ride away from the clouds. Always south..
14.02.2006 Not Waving But Drowning
13.02.2006 Hold Tight London
  • The rain has given us truce today, so the morning ride was neither wet nor bad, but it did mean I sat from 6am to 7:30 waiting for it to clear up.
  • I keep forgetting how many times, but it appears we've landed on the Moon six times in those 4 years we were crazy (or brave) enough to try: [moon.google.com]
  • And, just for the record, no, the moon is not hollow: [curious.astro.cornell.edu]
09.02.2006 The rain in spain
  • ruined my bike ride this morning, so I went running instead. Turns out 5 minutes into my run this kid on a bike is run over in front of USP. I stop and assist him how I can while having J. Random Person call an ambulance. Calling ambulances is not a fun thing in Brazil, because they end up taking forever to show up. The kid wore no helmet and banged his head on the floor. It bled a bit. He scratched his elbow and shoulder as well. He didn't look so shaken after a couple of minutes and the guy who ran him over offered to take him to the hospital, since the ambulance still hadn't showed up. Before he left I told him to get a helmet. I have been run over about 3 times, and cracked a number of helmets in a lifetime, but I have never hit my head.
06.02.2006 CAN PEOPLE STOP
DESTROYING EMBASSIES
ALREADY? KTHXBYE
  • I am amazed at how crude and thin-skinned humans have shown themselves to be over this cartoon nonsense. The catholic church got over their excessive self-importance about 200 years ago, when they finally stopped burning people, and wouldn't the world be a better place if other religions decided to behave maturely as well.
  • (on "200 years ago" above, I actually thought it was around 400 years ago, but [en.wikipedia.org] depresses me with the news that the Spanish Inquisition ended as late as 1834)
  • I am so jet lagged this week it is not funny. Yawn.
05.02.2006 Let the juices flow
  • To be honest, it is possible that the thing that bothered me the most about London this time around was the absolute absence of drinkable fruit juice. Now that may sound snobby and silly but I honestly can not fathom how people can live without fresh fruit juice. They should fix that situation, these scientist people.
04.02.2006 The doctor is in!
  • Back from London and the Soyuz rollout sprint, barbed wire finishing ribbon and all.
20.01.2006 New Horizons
  • We're going to take a closer peek at Pluto in some 10 years: [www.agencia.fapesp.br] -- I didn't know of all the crap that exists between Neptune and Pluto. I wonder if a couple of other planet-sized objects will be found there.
  • There's news at [www.agencia.fapesp.br] that makes me wonder at the investment in development of technology in this country. I mean, the text describes a little biodiesel processing plant, that takes vegetable oil and converts it into biodiesel -- at an efficiency of 60%, and costing less than US$20,000. This is something pretty impressive to me -- and vegetable oil is something we have lots of in this country. However, most impressive is that they managed to develop this thing with grants of less than R$1 million -- that means, less than US$500K. POCKET CHANGE! If only we had a serious attitude (and set of policies) regarding technology.. I bet we'd see lots of great new ideas emerge.
  • More end-of-year pictures at [salgado.kicks-ass.org]
19.01.2006 More rain?
  • Woke up and it was raining, so I ran for 40 minutes instead of the usual heartshattering bike ride. Spoke to Michy, who leaves today for the USA in search of, hmmm, winter, enlightenment and love? She did not allow me to speak to my grandmother, which I entirely resent. The dogs only got a short walk because it was raining but they got three massive bones to chew on while they wait for the evening walk (and my dogs are not vegetarian).
  • So apparently some 10,000 years ago people were already enduring climate change in the land of Tripoli: these guys were the precursors of the Garamantian Empire. It appears that the desert there was once humid, too: [www.agencia.fapesp.br] -- Perhaps most fascinating about them is that a) it used to be land which could be used for agriculture -- it's now a desert; and b) they irrigated their civilization to death, because over 600 years the ground water level decreased to a level it was no longer usable. And isn't it peculiar how contemporary civilization doesn't really consider itself in terms of centuries?
  • It rocks that we're officially running a debris processing plant in São Carlos: [www.maisinterior.com.br]
  • I should plan on visiting [www.evanscycles.com] next week. I think I want a road stem, perhaps a new helmet, a bike stand, some time pedals.. I should also go for a few swims at [www.rbkc.gov.uk]
18.01.2006 And yet, I only grow thinner
  • Paradoxically, in Brazil, the highest obesity rates (70%) are in a specific demographic: poor women that live in the southeast (the more developed area). And even more interesting, favela-dwellers had the highest incidence of obesity: [www.agencia.fapesp.br] -- I guess the lifestyle has a lot to do with it -- both favela and female.
  • Visited Livia and her parents last night; talked to Du over VoIP and then chatted about better living through odontology, life in the USA and the future of democracy (no kidding). Stopped at Habib's and ate a pretty meagre meal, but the cheerful staff more than made up for the substandard food. At least I can say I've been there once.
17.01.2006 The end has no end
  • I also had a weird dream tonight, involving ex-girlfriends and kids on motorbikes. Woke me up at 6:30 and, well, when you dream of ex-girlfriends you don't really want to back to bed. Rode some 70km in a refreshing breeze that turned back into the furnace we know São Carlos in January to be.
16.01.2006 What started out just great
  • didn't really hold up to much. An average day with heat, interview and difficult problems to solve.
15.01.2006 Appropriately called SUN day
  • Hot as hell. HOT. Did nothing. Rode bicycles with Corbani and Lilian around UFSCar. Corbani says he likes his new bike. I am pleased. We go to the bakery. I sleep while listening to the Strokes. Dinner at Amici with Tecão. Estrela and Monica had a fight. Sleepy. Zzzz.
  • Some pix of notable São Carlos losers over the weekend are at [www.async.com.br]
14.01.2006 Hang in there it will be over soon
  • Woke up. Cut lawn. Yawned. Arrived late in office. Fixed a few bugs. Waited for Corbani and Lilian. Had lunch at Mamãe Natureza. Went home. Got dressed and participated in the weekly ritual that involves hours of riding over hills on bicycles. Got back. Felt sick and dehydrated. Drank copious amounts of liquid. Sat around and talked to Nando, Corbani and Lilian. Listened to music. Went out to dinner and talk with survivors of said ritual. Sat outside a bar for an hour while Matsubara laughed endlessly at my misfortune. Went home and slept the black sleep of the depraved.
13.01.2006 Each day is only as unique as you are
  • Two remarkable things happened this morning. Truly remarkable things happen every day, but not always do you actually get enough time to yourself to notice them. The first thing was that I noticed two parrots sitting on the telephone wire in the house in front of mine; I had never noticed them before, and yet they were busy chirping away at sunrise. And what a sunrise it was -- burning the tiles on the house and the tar on the street. So I rolled out for what would have been a typical 70km ride in the hot January sun. Except I ran into Osvaldo and his nephew, Felipe, riding from São Carlos to the beach; I had met Osvaldo's nephew at a party at Matilde's last week, and he had said this was going to happen. I enjoyed this coincidence immensely and did another 20km loop with them. Osvaldo told me all about the new projects that he was working on that dealt with carbon emission credits, and Felipe was just silent and content to ride on the Stumpjumper in Osvaldo's draft. I might be convinced to try and certify Async, you know -- we are not big fossil fuel consumers, really.. only one person actually comes by car.
  • Interestingly enough, my conversation with Osvaldo touched upon the same subject as the news that cam in today at [www.agencia.fapesp.br]
  • The only really unremarkable thing this morning was that I arrived 2 hours late in the office, a bit too late for the Malone migration. I am so thankful that James H. and SteveA had it all under control, it was barely any work when I arrived. Now, to implement the features they are missing..
  • The 770 has VoIP, finally: [www.internettablettalk.com]
  • We had a rock and roll dinner tonight, with Magno, Aline, Ivo, Lucas, Matsubara, Johan, Melissa and Nando all there. Notable absences were João (who doesn't have a phone yet) and Tecão (who said he had a runny nose, the nerve). We had nuclear beans, radioactive rice and superficial soymeat, and NO ANIMALS WERE HARMED IN THE PREPARATION OF THAT MEAL. I need to plant a tree to make up for the carbon deficit, though. Cleaned up the kitchen somewhat (I have guests!) and strolled out with the dogs at 2am. It rained a bit.
12.01.2006 And it fit me like a glove
  • I had a weird dream this night. I was in Ouro Preto, going to race the Iron Biker. Well, except that Ouro Preto was actually more like Ilhabela -- an island with waterfalls. And that I wasn't really going to race, but I changed my mind and decided to race in a double with a friend from Brasília, Bruno Santana, that I haven't spent serious time with for the last 15 years at least (though I did see him at last year's Iron Biker). I had forgotten all my equipment: helmet, pedals, shoes.. a disaster. So the dream turned into this bounty-race of sorts as I tried to get people to lend me these. Bruno at some point took a ferry across to the mainland (!) to pick up an extra set of shoes that were left in the car, and I meanwhile sat on a bridge. I think there were some guys with sunglasses in a black car that talked to me at some point.. I really love dreams.
  • Good sub-140 ride; the first in which I did not once bump it over 160bpm. I had to go pretty slowly up Liquigás to keep it at 159, but I actually managed to; it appeared to me that breathing out regularly helps. Will have to confirm tomorrow (and hopefully wake up earlier).
  • Went to UFSCar to do a short test at the new physiotherapy hospital, which turned out to be a lot more fun than I expected (and in different ways, too). Lucas met me up there and we rode back together. Sandra Abib managed to nail me into doing another talk in April while I rode down in front of the library (make mental note not to ride down in front of libraries in the future). Arrived in the office to find anthem spurting out a random stream of messages on the console:
     SIMODE0[0xc]:(ENOVERRUN|ENIOERR).
     CCSCBCTL[0x0].
     scsi0: REG0 == 0x60, SINDEX = 0x122, DINDEX = 0x116
     scsi0: SCBPTR == 0x33, SCB_NEXT == 0xff80, SCB_NEXT2 == 0xfff7
     CDB 2a 0 3 80 8 ac
     STACK: 0x29 0x15 0x125 0x125 0x25e 0x25e 0x25e 0x93
     <<<<<<<<<<<<<<<<< Dump Card State Ends >>>>>>>>>>>>>>>>>>
     DevQ(0:4:0): 0 waiting
     DevQ(0:9:0): 0 waiting
     DevQ(0:10:0): 0 waiting
     DevQ(0:12:0): 0 waiting
     DevQ(0:13:0): 0 waiting
     (scsi0:A:9:0): Device is disconnected, re-queuing SCB
     Recovery code sleeping
     (scsi0:A:9:0): Abort Tag Message Sent
     (scsi0:A:9:0): SCB 127 - Abort Completed.
     Recovery SCB completes
     Recovery code awake
     found == 0x1
     SCSI error : <0 0 9 0> return code = 0x6000000
     end_request: I/O error, dev sdb, sector 2073927
     
    we ended up having to reboot, at which point nothing using /dev/md11 worked because mdadm --assemble /dev/md11 gave me a message that suggested an internal bug: invalid argument or something. I ended up finding out that --force does what we needed and the arrays are back up.
  • I am so tired today I might be convinced to skip the gym..
11.01.2006 Took a wrong turn on the astral plane
  • "Estamos em uma cidade com 150 quilômetros por 150 quilômetros e que emite três vezes mais poluição do que toda a Suécia." is the good news that [www.agencia.fapesp.br] brings us.
  • Rode with the swede through the Valley of Pigs, all under-170bpm (and the average in the 130s). My heart is still a bit fucked from the typical holiday sickness, but I'm coughing less and my head is all systems go. Should remind myself to keep hydrated.
  • We're finally inflicting Malone on the world :-) [lists.ubuntu.com]
10.01.2006 Lifeguard for a day, fool for a lifetime
  • Visited Bruno's mother at the hospital in Ribeirão Preto. Had a very interesting and enjoyable afternoon as we studied x-rays, family history, physical effects of emotional distress, and the future of Brazilian education. Some politics in the conversation. I had the thought, when coming back, that one inequivocally good thing you can do is to keep company and care for a patient you love.
  • (Added saran wrap to STIs at 6am, which solved the rattling. Did a sub-140bpm ride, hopefully first in a series of base-building rides)
09.01.2006 Scorched earth
  • Woke up feeling as sleepy as I was when I went to bed; I think this coughing keeps waking me up. Hopefully I'll have it nailed in a day or two. Did a one-hour ride towards the airport, rough road to Ribeirão made my STIs rattle again. I need to add more saran wrap to them. Stumbled my cadaver into the office once more.
08.01.2006 It never rains in the happy house
  • Sunshine at last. Couldn't quite believe it when I woke up and saw a clear blue sky; it had been a week of gray (and black) up to today. So I spent the day tending to the gardens, giving the dogs much-needed baths, and doing small home repairs that I've put off before. Johan gave me a hand and in the end it was only half a chore (and half a sunburn). We finally watched the end of The Breakfast Club (hey mdz) and took the dogs for a walk. Monica and Estrela still occasionally decide to cross the street on their own; in part this owes to their excitability (which is taking a long time to subdue, in retrospect) and in part to the fact that dogs love a bark-at-gate episode. Olivia is never a problem; she is so cool. We met Nando at random, had some juice at the office and took a cab to watch A History of Violence, which is quite good, though perhaps it's expected given the names on the roster. Cronenberg knows how to make a fun movie that still manages to raise interesting questions (and Fausto, remind me, why did this text formerly mention Sex, Lies and Videotape?) Johan and I strolled back through USP from the bakery, and were assailed by 14-year-olds that were bored of São Carlos. It's so interesting to observe the generation (cultural, too, perhaps) gap -- even though they were into rock and punk and lived in the same city as us, we were set worlds apart. Fed the dogs once more, took them out for a stroll and and coughed myself to sleep.
07.01.2006 Two thousand and six thunders
  • The suicide bike ride was actually a 4-man death-march into Analândia via the dry river. For the whole ride we could see the lightning flashing out westwards. It rained randomly, and I felt like crap on parts of the way back, but in the end Lucas and I sped away and stretched out in front of Parque Itaipu waiting for Tecão and Johan, who was so knackered he spoke in syllables for the final hour. Not a bad ride altogether. Had dinner out at Matilde's boyfriend's house, cooked an omelette, and, for the first time in a long while, laughed so hard I cried. Pity I was so sleepy I can only half-remember what happened; perhaps, thankfully, only the non-embarassing half.
03.01.2006
  • [www.agencia.fapesp.br]
  • Weirdness that breaks accessing new.opengroup.org through our external link:
     Redirect from 192.168.99.3 on eth2 about 192.153.166.92 ignored.
       Advised path = 192.168.100.4 -> 192.153.166.92, tos 00
    Found out what it was -- DSL modem had an additional address and a broken netmask on its main address. Fixed.
12.12.2005 Aluminum pots rot
  • [www.agencia.fapesp.br]
     O alumínio tem forte relação com doenças como o mal de Alzheimer,
     câncer de pulmão e eventos inflamatórios pelo organismo.
  • Interesting bit on productivity and self-conditioning at [www.kuro5hin.org]
  • SSH and weird connections that go down after 5 minutes? Never again!
     ServerAliveInterval 300
08.12.2005 Moving right along
  • I feel for some reason strangely energized today. Perhaps it was my discovery of the artist and name behind a song that I've heard so many times and never found out what it was. It was Alter Ego's Rocker, and there are free mp3 downloads on the web! Oh, right. Mp3 downloads are illegal. Shucks. I really liked that tune.
07.12.2005 What a wierd day.
  • PostgreSQL died on our dogfood server.
  • Squid died on anthem.
  • The shipit exports failed to run.
  • Johan's box kernel paniced at bootup.
  • The backup failed.
  • Vim tip of the day from salgado: to search for tags recursively up the tree, use the following syntax:
     set tags=.tags;/
  • Second vim tip of the day from BjornT: if you have bicyclerepair installed, try running:
     :BikeFindRefs
    on any method or function definition. It rocks!
02.12.2005 The end of the week
  • Did a morning ride with the venerable Sal6, Magno and Johan -- basic pigs. Felt fine. Have been doing lower-cadency rides lately and I feel a lot less like dying at the top of hills. It rained quite a bit, which made me feel a bit sneezy, but it cleared up over the course of the day.
  • After a few days of straight work Steve and I manage to finish our team reviews, in time for the deadline. Cool!
29.11.2005 Tuesdays are the days
  • Woke up really
  • Found jordi's post on Montreal at [oskuro.net] and later his quote about CDG:
    I have no idea of where my luggage is, but at this point I don't care. I only wonder at what time I'll get sleep. What I do know, is that these fucking idiots claim there is free wireless in this spot of Terminal 2F, but it's not true at all.
    If you know Jordi you can imagine how funny that really sounds.
28.11.2005 Mondays are mondays
  • Magno and I did a 7am ride for about 2h. I did it really slow and relaxed and felt a lot better at the end of the ride than I usually feel on MTB rides during the week (where I end up feeling like death is upon me). I should get more variety in these rides, though, and perhaps research something to improve my recovery, since my legs often feel dead during weeks of hard riding.
  • Had an early call with Abraão to help me decide on whether the XTR crank is really the right one to buy. We discussed some of the alternatives and in the end it was his reassurance that: a) you can replace the "bottom bracket" in the crankset when the shipped one dies for about R$100 b) there are FSA chainrings that fit it well that made me okay with XTR decision. Let's see how wise that was in a few week's time. We also talked about Specialized frames and his suggestions on what to buy if I was to replace my existing M4 frame (2000).
  • Had pizza with Niemeyer and Rudá where we discussed many entertaining fallacies of software engineering and I had the idea of a "Software Engineering Patterns" kind-of-thing.
27.11.2005 Racin'
  • Did a 4K race in about 15 minutes at UFSCar's 35-year commemorative sprint, finishing 8th overall (and perhaps 2nd or 3rd of students and ex-students, which isn't very honorable but looks good on the resumé). I gave away the t-shirt they handed out to Gaspar.
  • Also did a 2h ride with Magno, João and Johan; basically, a reverse ride of a route we sometimes do. I found it much better than the direct route. Was a gerally relaxed Sunday ride and João didn't cause me too much pain for which I am grateful.
26.11.2005 INBOX in control
  • I've put some serious effort into taking control of my INBOX. Following mdz's cookbook I've started doing absolute crazy filtering of almost everything that's hitting the INBOX, meaning I should be a lot more responsive to email than before, but also meaning I might let some list, bugtracker and auto-generated traffic slack off the radar. I believe this is a step forward though; the last months I was simply buried in email and could do nothing to keep up with it, which made me feel rather bad -- my INBOX is my life.
  • Uhm, that is, if I don't count the 3000 or so messages that are accumulated in my former INBOX that I haven't processed yet. I'll probably do 10 300-message runs to clear those over the next weeks.
  • Today was UFSCar's 35-year commemoration, so Fabia, Johan and I hung out around there talking to old-timers. Of note I saw Bruno from Santos, who works at Mormaii, Luciana and Fabiana Rosetta (who it turns out is doing another round of undergrad study, ironically with Bruno, one of the youngest interns that works with Evandro on Stoq), and Silvano, who is always too much fun.
  • Johan and I also managed to fit in about 2h of riding through that. I felt kinda flat but I guess getting back to speed was going to feel like that anyway. Did a longer ride out in the back; I decided to show him the Jedi path given it was a day of nostalgy. We also did 10 laps in the forest before going home. It didn't rain, but it should have.
25.11.2005 Ubuntu rocks
  • But you knew that: [reviews.zdnet.co.uk]
  • Set up the second link on Anthem yesterday, so we have some redundancy possible. The Speedy home link's latency is /so/ much lower I'm amazed. It's like 5 times lower. Priceless in setting up the links was [www.lartc.org] and in particular, the issue with reverse path filtering: [lists.netfilter.org] and [www.tldp.org]
  • Hit my head with snmpget until I realized that snmpv3 requires a username, and that -v 1 solves the issue nicely:
      
22.11.2005 ?
  • After yet another month spent in carpeted basements and cold climates, BACK IN OFFICE.
  • Finished 4th (out of other 4-people relay teams in our age-group) in the 12-hour MTB race over the weekend. It was good but not great; I did a majorly fat (and unexpected) stack and cracked another helmet, and was really tired out from the travel and I am still drip-dropping through the day, though I feel very healthy. Detailed results are at [www.sampabikers.com.br] and [www.sampabikers.com.br] and pictures are at [www.biosphera.com.br] and [www.async.com.br] and, if you add "Christian Reis" to the textbox [www.ativo.com] and cross your fingers, you get an extra set.
  • If you're really attentive (and you know portuguese) you'll see that the first link is actually typo'd. It must suggest an automaintained site, because the link is present on the main page of the site, and it doesn't 404 out. Agh.
19.10.2005 Swamped
  • Lots of bits and pieces to do. Some NFS performance study: [billharlan.com] [www.missioncriticallinux.com] [groups.google.com] [groups.google.com] [groups.google.com] [groups.google.com] [dcs.nac.uci.edu] [dcs.nac.uci.edu] [blogs.sun.com]
     th 8 2747936 59079.566 14835.486 5952.540 0.000 3293.329 2232.819 1900.259 1999.936 0.000 6549.737
  • And now, with 64 threads:
     th 64 2748083 59125.361 14838.813 5953.420 0.000 3293.579 2233.022 1900.395 2000.066 0.000 6550.060
  • And now, after 12 hours:
     th 64 2748083 59543.017 14912.958 5959.034 0.854 3293.654 2233.022 1900.395 2000.066 0.000 6550.060
    From my reading of this it appears that we're now using up to 50% of our threads (albeit *very* rarely), and never more than that. There seems to be an odd bug with 8 threads because the 4th and 9th percentile are stuck at zero (and now that I changed to 64 threads we see some action in the 4th percentile). And yep, Neil Brown confirms this via some email to nfs@lists.sf.net.
  • Did some tweaking on the server -- increased read-ahead on the md