Search Results: "ag"

10 August 2006

Julien Danjou: My first experience with python

Today I decided to start learning Python. I am sick of Perl. I used to be quite good but now I totally lost my power and it's too hard to reuse code I wrote years ago, since I barely understand it. To begin, I decided to play with Paramiko, a module for using ssh with Python.
Unfortunately, I was unable to simple use from paramiko import * so I was totally disapointed. Fortunately, a python developer working near me helped me to understand why it did not work. And it was actually a bug :-) which is now reported as #382348. I am very amused by falling on a bug with my first line of Python. But be sure I will continue to use it to develop a little tool for my personnal usage. ;-) I know the pitoon! I know the pitoon!

Jaldhar Vyas: Liquids On A Plane

Not mine, I got it via Boing-Boing but I had to link to it in light of the stupid new air travel regulations. liquids on a plane

MJ Ray: The Meanings of Words

Lars Wirzenius posted about understanding meaning agreeing or accepting in "everyday language". I don't think it does. It only means that in some limited situations like "I don't want you to do that ever again: understand?" It's much more everyday for it to mean knowing about something or comprehending it. If you've seen bizarre accusations on debian mailing lists after someone claims to understand someone else's point of view, maybe this is why? I can understand it, but it's a PITA. Yes, it's a possible interpretation, but it's not often the most probable.

Martin F. Krafft: Through with XFS

I am through with XFS, once and for all. Well, at least for laptops. I still think it's a good filesystem when you can ensure that the power never goes, and your hardware is reliable, but it's just not adequate for laptops or even desktops. I ran into some serious problems a while ago, but managed to recover. Two nights ago, however, three XFS filesystems on my laptop decided to blow up and left my system thoroughly broken. I guess as the hibernate maintainer, I should really start doing my tests somewhere else than my main system... It all started out with a dist-upgrade and this output:
dpkg: error processing /var/cache/apt/archives/dpkg_1.13.22_i386.deb
(--unpack): unable to make backup link of
'./usr/share/man/man1/dpkg-deb.1.gz' before installing new version: Unknown
error 990
Looking at /usr/share/man/man1, I started to anticipate the apocalypse:
# ls -l /usr/share/man/man1
total 7956
?????????? ? ? ?    ? ? ? 7zr.1.gz
?????????? ? ? ?    ? ? ? 822-date.1.gz
?????????? ? ? ?    ? ? ? CA.pl.1ssl.gz
?????????? ? ? ?    ? ? ? Defoma::Common.1.gz
So I look at the log, and amidst kernel oops notices, there's this lovely cookie:
Filesystem "hda6": Corruption of in-memory data detected.  Shutting down
filesystem: hda6
Filesystem hda6 is /usr, so at that time I figured "it could have been worse", booted to single user, and remade the filesystem with the intention to simply reinstall all packages... when I found /var/lib/dpkg/info to be in similar condition. The rest of /var seemed fine, but I resolved then that there was no hope in reviving this system. Fortunately I brought an external drive that had just enough free space to hold my /home and some other stuff, but since USB is really slow when it comes to shifting large amounts of data, I decided to do something productive in the mean time and to answer some outstanding mails. It wasn't difficult to get SSH back up, so I started to work on a remote machine and used the time efficiently. Some time later, though, I got confused in the mist of screen sessions and was browsing my home directory on the laptop, thinking I was elsewhere (my home directories are mostly synchronised), when I noticed a directory in similar condition as the above. Oh shit. Imagine my pain and fear as I first thought my remote machine was also dying, imagine the sigh when I found out I was on the local filesystem, and imagine the shock when I realised that /home was also affected by the XFS breakage... A glance around /var confirmed that the XFS breakage was actually spreading and had now affected three filesystems on this machine. Fortunately, by that time, I had copied everything to the external drive, and decided to put my laptop and myself to sleep. I woke the next morning to the task of reinstalling the thing and decided to be optimistic about it. After all, a reinstall would mean I could finally try partman-crypto and encrypt my laptop's data to protect against leaking sensitive stuff in the case of loss or theft of my laptop. The installation was not as painless as I had hoped, but that was mainly because I ran into a known problem with the graphical installer and partman-crypto, which does not allow to set up volumes with random encryption keys (e.g. swap; see the forthcoming announcement for the beta3 release of the installer), and a bunch of smaller bugs. I had to restart the installation with the traditional frontend to get what I wanted, but other than that, I was very impressed with what our installer development team has accomplished! And a special round of gratitude to Frans Pop for not losing his patience while helping me on several occasions throughout the process. Now, 24 hours after the incident, I am back to normal with a fresh laptop and no data lost (except for one directory which I pulled from a mirrored remote machine; it had no local modifications (so why did XFS screw it up anyway?)). The fonts are all jaggy, so there's something I have to figure out. All things considered, I am sad to have lost 24 hours, but I can also relax more now, without fear of further XFS breakage or loss of private data. Update: Oh, and despite this, I did choose ext3 for all my laptop's filesystems. JFS was really cumbersome and slow last time I tried it, and I surely would not touch RazorFS after experiencing serious data loss on numerous occasions. Update: Two responses so far. Full ack for Julien (except for him laughing at me), Ingo's post warrants a reply though. First, ext3 is also journaled, and if you're about to say "yeah, but it's a hack on top of ext2, well... ext2 is damn mature, and journaling isn't really rocket science, so that "hack" isn't going to be too complicated. In fact, I like the idea of journaling being an option rather than a built-in feature. Second, of course you're supposed to keep backups. But since you keep backups, my top requirement of a filesystem is not "how to get the data back", but "how to ensure it does not break. If it breaks, I can reinstall and restore from backup, but that's a certain amount of time lost. If it doesn't break, well, that's like stealing a little something back from death then, isn't it? Third, I do follow the linux-xfs mailing list, but so what? I did not have write cache enabled, and I was running the 2.6.17.7 kernel at the time of the mishap. Lastly, you point to "excellent tools" to recover the filesystem. I am not sure how excellent xfs_repair really is when it reports "bad magic number 0x0 on dir inode 4696727" during the run, claims to have fixed it, I mount the filesystem, unmount it, run xfs_repair again and get the same message. No filesystem is perfect, and as we know from Biella's problems (among many others, ext3 is no exception. But we did get her data off! So then it's really an open field again, crap filesystem against crap filesystem. I guess at this point it helps to know that ext3 actually follows VFS semantics, while on XFS, a completed sync() syscall does not actually mean it has written the data to disk (see e.g. #317479). And then there are bugs like #239111... ext3 it is for now. If that let's me down, I'll try JFS. If that fails and noone has actually implemented a proper filesystem, I might have a go myself. Haha. Update: Alceste Scalas adds:
Ingo is right when he says that every filesystem has bugs --- but bugs apart, the design of Ext3 (i.e. its physical-block journaling) makes it a far more reliable choice for desktop and laptop PCs, expecially for people without an UPS. An Ext3 filesystem could only crash because of a bug or an hardware failure, while an XFS filesystem can be trashed even without bugs or hardware failures, due to the unavoidable consequences of a power loss on PC-class hardware.
He also alerted me to this mailing list post, which compares data=ordered journaling of ext3 (which almost noone does for performance reasons) with XFS and RazorFS. Update: You may also be interested in this post. Update: Otavio Salvador points me to this FAQ entry, which SGI must have added very lately. It explains how to deal with the directory corruption that was part of my problem. I guess I would have liked to know earlier, but I consider the outcome with dm-crypt + ext3 a win anyhow.

Evan Prodromou: 23 Thermidor CCXIV

I'm extremely glad to see that Creative Commons launched a public discussion of the Creative Commons 3.0 license draft. I highly recommend that interested people take a look at the licenses; they've had some very important changes that make works available under the new licenses more compatible with Free Software. Part of my work for Debian has been discussing these changes with Creative Commons and helping to make the licenses work for Debian. I'm glad to say that much progress was made; sadly, there's one outstanding issue that may be a blocker. I've written a Debian Creative Commons Workgroup report for Debian members that may also be interesting to the general public. tags:

Bernhard R. Link: Graphic Libraries

Wouter Verhelst asked why simple games are so slow nowadays.

I think the problems are in the libs. All this modern stuff tries to become more and more modern, and get more and more stuff out of all those new render extensions, direct graphics and hardware accelerations. There simply is no way to decide which way is faster, so libraries have to guess. So it is no suprise things go wrong. And the place they go wrong are of course not the fast computers, but the older stuff, that does not has those nifty accelerations and no fast CPU to cancel it out.

Another disadvantage are all those "portable" libaries. SDL for example needs three connections to the X server before it does anything. Three times etablishing a connection, checking of security cookies, and so on. Its API looks like living with windows, or never intended to be use for anything other than full-screen mode. (You want to find out how large the window is? Why should you be able to when you said the window cannot be resized?)

QT likes to use extensions, too. I don't know if it is its fault or newer X servers, but the newer your installation gets, the slower 2D games using QT can become. (Note the can, if you have the right graphics card, lucky you, if you have the wrong one, bad luck). To be fair QT is not supposed or designed for 2D games. On the other hand I don't know what it is supposed to do other than being a C++ compiler benchmark measured in hours.

GTK was such a promising design. Object orientated (widget classes are one of those very few things were object orientated can be used with more advantages than disadvantages) but still plain C, small and looking like designed for X. To be fair, I do not even know how well it performs, as the ever increasing library cancer drives me away. From the "users should not be able to change their homedir, that would be far too much the Unix way" glib, over all this miriad of differt little libraries, all moving all the time, spewing their headers in so many different directories a compiler invocation folds three time around your terminal.

Well, enough ranted. My next graphical program will use Athena Widgets. I only have to hope all this reanimated X development in the last time will not pull xlib away from under out feets in the future...

Thom May: System attack or just stupid terrorists?

The “foiled” terrorist attack looks suspiciously like an attack on the underlying system, rather than an actual attempt to blow planes up - it’s almost laughable that terrorists in this day and age could hope to get explosive devices onto planes in hand luggage. If we decide that the terrorists aren’t stupid, the attack begins to look decidedly different. They’ve succeeded in causing absolute chaos in one of the busiest weekends in the british airline calendar, the effects of which will probably drag on for a few days. If you wanted to be really nasty, they’ve also caused a large number of people to be trapped in one place, and extremely vulnerable to attack. The BBC report says Heathrow Terminal 1 is “jam packed”. I suspect that a terrorist organisation will look at something like this as relatively cheap, too - 18 peons arrested, sure, but we know they can afford the manpower and they’ve once again demonstrated that the air travel infrastructure our society is so reliant on is extremely fragile and vulnerable.

Filip Van Raemdonck: No free ride

The picture below is a hardware test setup I ran this morning, with an old and discarded motherboard which has a Pentium III CPU on it running at 733 MHz. Since that's still faster than any other system I own save for the ibook (which is a G3 running at 800 MHz), I wanted to see if it was truely broken as reported, or not. The issue, which I actually witnessed before, was that on initial boot it tended to restart up, to a few dozen times. These restarts could happen from early post BIOS stage up to while logging on. Once it had been powered on for a little while, the restarts would usually go away.

Disassemble PC

I assembled any missing parts - video card, memory, and an AT case from which I used the reset button as the power switch to the ATX motherboard - and started by running memtest on it. Which ran just fine for nearly half an hour; but I ran memtest before to try and help diagnose the problem and it had run fine then, too.
So I crossed my fingers and tried running a Linux Live CD from it. Unfortunately, after about half a minute the system restarted once again. The only parts remaining from the original system were the motherboard and CPU, power supply and DVD-ROM (but not the IDE cable). With that in mind, the most likely culprits are indeed motherboard or CPU.

Chances of being able to rescue the parts are nearly nil, but I'm still curious about what could be the actual failing part. Are there any thorough hardware tests around, which could be run (preferably) from bootable CD or floppy?

Andrew Pollock: [tech] Performance comparison between LVM and a straight disk

The beauty of having your hardware arrive in installments is you can do all sorts of fooling around with lots of storage that you wouldn't otherwise do because you'd be falling over yourself to get it all up and running yesterday. So as I impatiently wait for my TV tuner card to arrive, I've been doing some "benchmarking" to see how various different configurations perform. One of the things I wanted to find out was how much overhead did LVM give you. So I took one of the four disks in my non-redundant array of Bloody Huge Storage, and ran bonnie++ on it as a straight JFS volume on /dev/sda and as a logical volume in a volume group that used all of the logical extents provided by making /dev/sda into a physical volume. Again, I ran bonnie++ as:
bonnie++ -d /mnt -s 2G -n 1024 -u nobody:nogroup
So here's the results of running it on a JFS filesystem straight on /dev/sda:
                    -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
minotaur         2G 13712  95 18561  21  9152  11 13874  94 20446  18 142.2   1
                    ------Sequential Create------ --------Random Create--------
                    -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
               1024  5999  37  7125  19  1604  12   616  12   168   0    61   1
And here's the results of running it on a JFS filesystem on a logical volume that used all of the free logical extents provided by a volume group consisting of a physical volume made from /dev/sda
Version  1.03       ------Sequential Output------ --Sequential Input- --Random-
                    -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
minotaur         2G 13790  96 18566  21  9132  11 14202  96 20628  18 146.3   1
                    ------Sequential Create------ --------Random Create--------
                    -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
               1024  5989  37  7056  20  1605  12   611  12   167   0    61   1
Yup, that's right. It was actually slightly faster in a few cases. I can't explain that one. But it certainly goes to show that there is no noticeable performance impact of using LVM. Nice.

Andrew Pollock: [opinion] An Inconvenient Truth gets bad press Down Under

Film at 11 My friend Andrew brought this article in the Sydney Morning Herald to my attention today. I was initially mildly incensed by it, then someone at work pointed out the author's Wikipedia entry, which led onto this Bulletin article on her. So it seems she's just a professional right-wing shit-stirrer. This other article she wrote managed to stir up some ire amongst the cycling community. Still, I am glad to see that An Inconvenient Truth is coming to Australia. Well worth the watch. Now I need to go find where Who Killed the Electric Car is screening...

9 August 2006

Aigars Mahinovs: Laptop down

A half an hour ago my brand new Dell XPS M1710 laptop stopped working. It just turned off and would not turn on again. I got my old HP lappie out and went to Dell site for debugging. After several quite nice debugging steps the fault fell into a generic “no idea what it is, but it sure is bad” category and I was told to contact the support, which I did - by email. Let’s see how long it takes to get this thing fixed and how will they respect my Linux partitions if I will need to send it in.
Oh well, that means that I will go to bed early today - yay! (P.S. As one might note, I am very keen to find good thing behind anything. I got into this habit when I was fired from my job last January. It helped me a lot. Repeat after me - every change is for good. It is that simple, you just need to find the good things sometimes. Sometimes it is hard, but the search is rewarding.)

Josselin Mouette: Rediscover python packaging

After seeing several developer comments implying that they won't package python software because this has become too complicated, I was hit by the fact python-support had drifted away from its original goal: make the developer's life easier. The initial idea was to simplify dh_python and make it use something that could automatically handle byte-compilation, without the maintainer even noticing it.

Therefore, with the help of Manoj Srivastava's priceless work to clarify the policy and of Pierre Habouzit's background work on supervising the transition, I have improved dh_pysupport to be able to generate correct dependencies. I have also finally added the last missing piece of functionality: private modules needing a specific python version.

This is a necessary step for Joey Hess' plan to remove dh_python from debhelper. But the more important thing is, for most packages, dh_pysupport can now be a drop-in replacement for the old dh_python. This means that many remaining packages for the transition can be updated with s/dh_python/dh_pysupport/ and a new build-depend.

And, for anyone who's afraid of maintaining a python package because it is too complicated, let me show how to make a simple package using python:

Yes, that's all. You mean, just like with the old dh_python, the one that used to work without having to understand anything? Yes, just like this one. Don't add a XS-Python-Version field, it's not needed. Don't add a XB-Python-Version field, it's useless. Don't add a debian/pycompat file, it's deprecated. You can add a debian/pyversions file if the package has requirements on the python version, but it's not needed for many packages.

Of course, packages with binary extensions should build them for all available python versions, but dh_pysupport handles both cases. Of course, I don't claim it's free from bugs, but bugs can be fixed now there is a good design.

So finally, I can say it again: python packaging is simple. You shouldn't be afraid of it.

Sergio Talens-Oliag: Moved to ikiwiki

After some time thinking about it I've moved my blog from PyBloxsom to ikiwiki; I'm still playing with it and the site needs some work, but it seems to work ok and the default look and feel is good enough for me. This post is written using Markdown to give it a try, but I wrote a simple plugin to add (partial) support for rst to be able to keep all my old entries without additional editing. I've sent the file to joeyh and I hope it gets into the upstream code (improved, if possible), as that will remove the need to keep my local changes in sync with the debian package. I have not enabled the ikiwiki.cgi because the machine I'm running it is quite slow and anyway I only need it for comments, and I usually don't have many of them. Instead of enabling comments I've added a footer asking people to send comments to echo -n klgoaca@@@eapafwl.fwl tr -s @a-z@ @i-za-h@ instead. To avoid flooding planet I've used the ikiwiki flood prevention mechanism, previous posts can be reached through the categories and/or using the full Blog index. Update I've been told that there is a Perl library to parse rst. I knew someone was working on it, but have not seen code until now; the package is called Text-Restructured and it is available from the URL http://search.cpan.org/dist/Text-Restructured/. Probably my hack could be replaced by code that uses this module instead of calling python to parse the files... any volunteers?

Julien Danjou: Today's victory

After several hours of gdb, I won against #381456. I'm happy.

Steve Kemp: maybe of a brain hemorrhage, I haven t decided yet.

The past two days have been fairly busy and now I just want to avoid all computery things for the next week or so. This will almost certainly fail to happen, but I have a low-tech weekend planned which will involve shopping for outdoor gear and loitering outdoors drinking ale. Briefly I’ve: Still todo: I’m almost tempted to use one of those fancy “control panels” for managing a bunch of domains when I move over to the Xen instance. However many of them appear fragile, and contain numerous obvious XSS attacks - these do not fill me with confidence. Perhaps I will investigate more hosting setups soon. At the very least I wish to move towards an SQL-backed virtual hosting setup for email. Ideally exim4, but I’d settle for postfix at a push. So .. lots of research happening, and more to follow. Expect quiet from me for a while.

Evan Prodromou: 22 Thermidor CCXIV

I was sad to see that Wikia, wp:Jimmy Wales's commercial wiki hosting service, recently launched a wiki travel guide. As a founder of Wikitravel, which recently partnered with rival Open Content wiki travel guide World66, I don't like seeing needless duplication of effort. Wikia has been a great member of the Free Culture community, and I hope they'll take the needs of Open Content as a whole, as well as their business requirements, into account. I wrote an Open letter to Wikia about the matter. tags:

Thom May: The Solaris Installer

I had my first introduction to the Sol10 installer today. Oh My. For anyone who has ever complained that Debian is hard to install, go try solaris and then come back. Dependency resolution? Sure, we can tell you what dependencies you’ve missed. Then you get to go hunt around the appallingly laid out tree of packages (subtrees with one package in, no indication of what subtree a requirement might be in) trying to find the thing. Then you hope you’ve not missed something else, otherwise, repeat ad infinitum. And the granularity of the thing is just dreadful. I’ve ended up with all kinds of crap installed that I’ll never use just because something else that I’ll never ever use, but is a required package, depends on it. And Heaven forbid that you should wish to search for something in the package list. I walked back into our office and the Solaris Admin I share an office with tells me about all this cool stuff you can do, that is utterly undocumented in the manual as far as I can tell, that would actually be a really useful default, like Live Upgrades. And don’t get me started on the package system itself, especially not when you have to throw the abortion that is Blastwave into the mix. Tim Bray has also mentioned just how good the Debian/Ubuntu packaging system is in comparison, and wonders why Sun aren’t investing quality engineering time in making it work on Solaris. In contrast, the Ubuntu installer’s approach of installing the bare minimum and letting the packaging system do the work post install feels to me like the perfect method for installing a server.

Carlos Villegas: Comparing preload 0.4 and 0.2 (SoC 2006)

I've tried preload 0.2 and 0.4 to compare its effects. Unfortunately my results don't hold with the results obtained some blogs ago: preload 0.2 reduced the boot time by 2 seconds. In this occasion, time was even lost (making me remember my first tests). This may be due to some upgrades had been made to sid since.
First I tried preload 0.2 with default with 1 second lost and a modified configuration with no boot time change.
Then I tried preload 0.4 with default and modified configuration both with no time change.
The bootcharts and log file are availabe at the project webpage.
Yesterday I presented a table with hotspots combinates and unlike it was expected, preload may not be helping anymore (preload 0.4 was used).

NOKUBI Takatsugu: I'm trying to use xenoprof.

In Xen Dom0/U environment, some optimized binaries for the prossessor type i686 work slower than standard Debian binaries. To discover the reason, now I am trying to use xenoprof, some patchsets for Xen 3.0.0. The latest unstable Xen have already merged the patch, but Debian sid's package is still not supported, so I need to use Xen 3.0.0... I hope xenoprof will be merged the Debian Xen related packages.

Evan Prodromou: 21 Thermidor CCXIV

We had a great trip up from wt:Boston yesterday and today. Monday morning, after Wikimania had ended, I went to visit the Cambridge offices of Let's Go publications. Let's Go is a travel guide series researched, written, edited and published exclusively by Harvard students. It's an amazing feat, and I've always liked the quality of the guides and the depth of coverage. Let's Go is far from the most prolific of travel publishers, but they have good writing and high-quality listings. I spent about an hour talking with the publicity manager, editor-in-chief, and publisher, mostly about Let's Go but also about Wikitravel a bit. It was a good time. Catching back up with Maj and Amita June, we had lunch at the Barking Crab, a clam shack on the harbor in Boston. Amita June loved the clam chowder; Maj ordered crab legs, and cracked them open with a big rock. Sated, we headed out of Boston on Massachusetts highway 2, through wt:Concord (Massachusetts) and a few other towns to the Connecticut River. It took a while to get out of Greater Boston, but once we were out it was beautiful country, still very wild after almost 400 years of Europeans. We drove up through wt:Brattleboro to wt:White River Junction and then called it a night -- the baby was wailing something fierce. We got a calzone and a Greek salad delivered by Ramunto's Pizza in wt:West Lebanon (New Hampshire), right across the border. It was a great addition to the otherwise so-so wp:X-Men: The Last Stand that we watched on the hotel movie channel. tags: ramunto's pizza

Today This afternoon was even better. We got up this morning early and were on the road before 9AM. That's always the best time to drive with the baby -- before she gets too crazy. We whizzed past wt:Burlington (Vermont) and up into the Lake Champlain Islands -- a really nice string of communities that reminds me of wt:Prince Edward Island. The baby started wailing around noon, so we stopped at North Hero State Park and waded in the lake a bit. Lake Champlain has a lake serpent like Loch Ness, but this one is named "Champ". I held Amita June carefully to make sure she wasn't swept away by this fossil reptile. After a two-hour nap on the grass (!), we had some delicious sandwiches in wt:Alburg then crossed the border. Maj had to renew her work permit -- she sent in a renewal by mail a couple of months ago, but she hadn't received the permit by the time we left, so she had to re-apply at the border. Once we got through with that, it wasn't long before we were back in Montreal. Home again, home again, though. I guess there was some pretty nasty weather last week in Quebec -- there are huge tree limbs, 3-4 feet in diameter, on the ground across the street in Parc La Fontaine. My lawn out front is positively glowing green, though. tags:

Next.

Previous.