Search Results: "gfa"

1 June 2008

Axel Beckert: One month with Debian Lenny on the EeePC

I ogled with an ASUS EeePC since it was announced, but didn’t want to order one abroad. So I waited until they became available in Switzerland. Digitec is the official EeePC importer for Switzerland and seeems also to be the moving power for yet to come the Swiss localisation of the EeePC. But initially they only offered imported EeePCs with German keyboard layout, but since I really got used to the US layout, I didn’t want to buy ay new laptops or keyboards with German layout. When asking them about US layouts they told me they won’t import from the US and that their competitor Steg Computer is importing US models. But I wasn’t comfortable with Steg and EeePCs also were more expensive there, so I hesitated ordering at Steg. So it was quite unexpected for me when US models showed up on digitec’s website. (Interestingly I never received any mail from their advertised EeePC newsletter, not even when they added 2G models t their repertoire.) So at the end of March (and therefore later as most other geeks ;-) I ordered an ASUS EeePC at digitec. For me, white laptops look like Macs (and Macs are for sissies or masochists ;-) — so I had no problems to decide that I want a black EeePC with US keyboard layout. 2G was to small for my purposes (and also not that much cheaper) and 8G not available. So I went with the 4G, since Debian doesn’t need so much space if you choose the right packages (i.e. neither or at least not that much of GNOME or KDE ;-). I preferred the 4G over the 4G Surf because of the bigger battery capacity (and not because of the webcam which I consider funny but useless:-). Initially the delivery date was set the 28th of March. Then it was subsequently set to “beginning of April”, “mid of April”, “end of April” and “beginning of May”. It finally arrived on 8th of May. In the meanwhile there were reports that even the 4G has been equipped with the smaller battery of the 4G Surf because of some battery shortage after some battery plant burnt down. But fortunately the delivery problems with black 4G US models doesn’t seem to have its reason there and my 4G has a 5200 mAh battery (at least according to its label and ACPI). I also ordered a 2 GB bar of Corsair ValueSelect RAM so that I can pump up the RAM of my EeePC by factor four (for about 10% of the price of the EeePC itself) resulting in having half as much RAM as disk space. Well, I guess, I won’t do suspend to disk in that configuration… ;-) The original Xandros based Linux only noticed 1 GB of the installed 2 GB as already noted on many other places in the web. But that doesn’t really matter, since it only lasted until I found out how to restore it from DVD in case I want to sell the EeePC later (e.g. for getting the successor). It’s fine for novices, but Linuxes feel strange if you can’t even get a console or a terminal with a command line. ;-) The Debian EeePC installer worked fine except that it argued over a checksum error on our mirror which wasn’t reproducable after the installation anymore. I’ve chosen the EeePC to be my first (nearly) pure Lenny installation — compared to the three machines running Sid (i386, amd64 and kfreebsd-i386). It though has a few packages from experimental (mostly xulrunner-1.9) installed. As window managers I have installed ratpoison, FLWM and FVWM. ratpoison — best described as screen for X (although you can’t detach and reattach) since it’s my personal preferences for being productive without big screen resolutions and flwm for a low-resource window manager which can be used intuitivly by both, geeks and non-geeks (and still doesn’t look like Windows at all ;-). And FVWM is installed because it’s my default window manager on all machines with bigger or multiple screens – to be able to compare it with my usual environment. As web browser I’ve got Opera as primary browser (as everywhere else, too) and Conkeror (the EeePC is the test-case for upcoming Debian package of Conkeror) as well as links2 and lynx on the (nearly) text-only side on it, although I need them seldomly. As office programs (as I would ever need some ;-) I’ve got AbiWord and Gnumeric installed since I already use a few GNOME applications (e.g. Network Manager, Twitux, etc.) and OpenOffice.org would take up 170 MB more disk space (then including OOo Draw and OOo Impress) and Siag Office is no more in Debian since years. (Initially I had OpenOffice.org installed instead of AbiWord and Gnumeric until I noticed that I need some of the GNOME libraries anyway.) I also decided that I will need LaTeX then and when so TeX Live also got its chunk of the 4 GB of disk space. I also have a bunch of games on the EeePC. Unfortunately there are a few games which don’t work well on the EeePC due to it’s resolution being smaller than 800x600, so I deinstalled them already again, e.g. I can’t play Cuyo on the EeePC but flobopuyo. Sauerbraten segfaults, but Doom (prboom with freedoom WADs) works fine. Further non-working games unfortunately include Battle of Wesnoth and XFrisk. Still, although quite some parts of GNOME and GNOME Office, TeX Live, ScummVM with Flight of the Amazon Queen and Beneath a Steel Sky, GNU Emacs 22, Iceweasel 3 (aka Mozilla Firefox 3), Icedove (aka Mozilla Thunderbird) and the Iceowl (aka Mozilla Sunbird) are installed, only 2.3 GB of the available hard disk space are used by the installation (i.e. without my home directory). Oh, and btw: Although except the very compact and a little bit wobbly keyboard the EeePC doesn’t feel really small to me (I’ve got quite small hands), but when I sat down in front of my 14” ThinkPad T61 after a day or two with EeePC, the T61, — especially screen and keyboard — felt huge as if it would be some 17” or even bigger notebook. ;-)
ThinkPad vs EeePC ThinkPad vs EeePC ThinkPad vs EeePC ThinkPad vs EeePC
OTOH I still think that a 1920×1200 (which means nearly four xterms in a row) resolution on a 14” notebook would be a good idea, especially compared to the 1440×900 (which means nearly three xterms in a row) my T61 has. ;-) Personal Resumée after one month Pro EeePCContra EeePCPro ThinkPad (in direct comparision)Pro Lenny on the EeePCCon Lenny on the EeePCSummary I’m very happy with the EeePC and I didn’t expect that it would replace my 14” ThinkPad in so many (but still not all) situations. :-)

27 May 2008

Stefano Zacchiroli: debian ocaml news

Catching up: some OCaml in Debian news Hei, it looks like I stopped giving updates about OCaml news in Debian, time to catch up. 2 hot news basically:
  1. OCaml 3.10.2 transition is ongoing. Release managers did not forget about our old request of transitioning OCaml to 3.10.2 in time for Lenny, and as soon as the last Perl transition was other they pinged us about the transition. Together with Luk we are now working on it. After some initial issues on arm which was unable to run docbook2html on our poor little policy document without segfaulting(!), it now looks like is not going too bad ... get ready for OCaml 3.10.2 in Debian Lenny!
  2. the "core" OCaml library by Jane St Capital (which I consider a really good replacement for the legacy standard library FWIW) has entered testing a few days ago. It will be released with Debian Lenny, no matter if with 3.10.1 or 3.10.2
Stay tuned!

21 May 2008

Raphael Geissert: hardware failure


Some people may have noticed that I've been completely offline for the
last couple of days.

A few days ago my pc suddenly crashed and every time I tried to boot
(whatever kernel version, even live cd's) a kernel panic, a bus error,
an init segfault, a udev error, and other kind of errors prevented it
from booting. I once got to boot knoppix (I had a cd around...) but in
less than ten minutes the pc, once again, crashed.

After investigating (memtest86'ing and more) it seems like the memory
is damaged; but as I've been busy with school I won't be able to get
it back working before friday, or even saturday :(.

I've been trying to check my mail regularly. but couldn't until yesterday.

Note: this is a blog post via email, just to let people know why I
haven't/won't been/be around.

12 May 2008

MJ Ray: Back from Cuba

I'm just back from a trip to Cuba. Sorry for the abrupt disconnect. I expected to have limited connectivity there, whereas I actually had none at all except for 23 minutes! I hope the other members of the cooperative and the editorial team stepped in suitably well. I'll check in with them now and then start on the emails, but I wanted to put this broadcast out first for those who are watching closely and wondering...

16 April 2008

Simon McVittie: Implementing D-Bus services with telepathy-glib

16:46 < epmf> tp-glib is made of magic

—#telepathy, 2008-04-15

Rob pointed out today that I'd been promising to blog about telepathy-glib for several months and still haven't done so. I think there's too much to cover in one blog post, so I'll start with the oldest part - implementing a service (typically a Telepathy connection manager).

While telepathy-glib is (obviously) intended for Telepathy implementors, I think the ideas we've been implementing are likely to be useful for any D-Bus API, particularly flexible/complex APIs where an object implements many interfaces.

Introduction to telepathy-glib telepathy-glib started out as a collection of code extracted from our XMPP connection manager, telepathy-gabble, but at some point it grew beyond that into a wrapper around/partial replacement for dbus-glib. We've been quite pleased with it, really :-) My first major round of work on telepathy-glib, during the first half of 2007, was to split it out from telepathy-gabble (versions up to 0.5.9 were released as part of Gabble 0.5.x tarballs, in fact), leading to the release of the 0.6.x stable branch in late September. This was very helpful for implementing connection managers - Salut, Idle and telepathy-sofiasip (our connection managers for link-local XMPP, IRC and SIP) all started off by forking/cargo-culting from Gabble, and achieved huge code reductions by porting to telepathy-glib. Also, Will Thompson used it in his Summer of Code project, telepathy-haze, to go from nothing to a working and useful Telepathy implementation based on libpurple in a matter of a few months. The second major round of work, which I'll discuss in a later article, added client code to telepathy-glib, obsoleting the older/worse libtelepathy and allowing client programs like Empathy and telepathy-stream-engine to be written using telepathy-glib. In the process, I accidentally reinvented DBusGProxy :-) More details to come later!
Some background: service-side code generation
The secret Collabora code-generation process

(credit: daf)

Supporting D-Bus in the GObject world has always involved quite a lot of code generation. The core API of dbus-glib is heavily reliant on varargs functions, which aren't type-safe and are easy to get wrong. dbus-glib contains a program called dbus-binding-tool, which is meant to generate reasonably sane GObject APIs for D-Bus objects. Unfortunately, it seems to be intended to generate a whole GObject at a time. Early versions of telepathy-gabble used dbus-binding-tool plus a script called gengobject.py to generate API stubs for the exported objects; developers then filled in the blanks, and hey presto, we had a GObject on D-Bus. This was fine up to a point, but had a couple of major drawbacks. Whenever we changed the D-Bus API (quite common during the early development of Telepathy), there was a very laborious and error-prone merging process. We ended up with the following process:
  • copy the D-Bus introspection XML from the telepathy-spec repository into a directory xml/pristine (actually, the canonical form for the spec was Python for a while, and we had a script that exported a contrived object onto D-Bus and introspected itself to get the XML - but that's another story!)
  • preprocess the introspection XML to add the dbus-glib CFunctionName annotation, resulting in a directory xml/modified
  • run dbus-binding-tool and a Python script gengobject.py to generate C source in xml/src
  • three-way-diff the old version of xml/src, the new version of xml/src, and the real C code in src to create a new version of src
  • pray that the diff process hadn't randomly exchanged functions' implementations
  • update the resulting code in src so it worked
  • check the whole mess back into darcs
  • hope that nobody else had made changes that would result in darcs conflicts
If you haven't yet gathered, this was a bit of a nightmare. Also, it was very easy to return the wrong thing from a method without noticing - because all the APIs were varargs, the compiler didn't notice, and the first we'd know about it was a mysterious segfault under certain circumstances.
How telepathy-glib fixes code generation telepathy-glib improves on this by taking advantage of this innocuous-looking feature in dbus-glib:
commit 355ef78d98d6fc65715845d56232199162cab12a
Author: Steve Frécinaux <steve istique net>
Date:   Thu Aug 17 11:48:20 2006 +0200
    Interface support for bindings.
Instead of running dbus-binding-tool or creating GObjects with D-Bus interfaces, we put the entire Telepathy spec through glib-ginterface-gen.py, a distant descendant of Gabble's gengobject.py. For each interface in the spec, we generate a GInterface that mirrors the D-Bus interface. Any GObject that implements the GInterface automatically gets the D-Bus interface if it's exported onto D-Bus. There are a few non-obvious refinements, though:
  • The signature of the method implementation is always in the mode that dbus-glib calls "asynchronous", where the method implementation can either send a reply message before or after it returns. For "slow" methods, this is the only thing you can do. For instance, many Telepathy D-Bus methods can't return anything until some TCP round-trips to the server have happened. This is also the only thing you can do if you want to extract extra information, like the sender's unique name, from the method-call message (dbus-glib's "synchronous" API doesn't allow this to be done). For "fast" methods, sending a reply message before returning is just as easy as using the "synchronous" API (it's just a difference of syntax), and has an API consistent with that of the "slow" methods, making it easier for service authors.

  • The layout of the GInterface vtable is private, and (auto-generated) accessor functions are used to fill in implementations. This means our ABI doesn't change just because we re-ordered functions in the spec.

  • If no implementation is provided for a method, we just raise an appropriate error (org.freedesktop.Telepathy.Errors.NotImplemented), rather than suffering an assertion failure. This means we can safely add methods to an interface.

  • While we're generating code anyway, we generate some static inline wrapper functions which wrap dbus_g_method_return(), to have type-safe method returns. You can easily check that a method replies with correct types, by checking that the implementation of Foo() replies by calling tp_svc_some_interface_return_from_foo().

  • Similarly, we generate wrapper functions to emit signals, to get type-safe signal emission.

Not all interfaces are stable enough to be included in telepathy-glib's stable API and ABI, so some of our other projects include a copy of the telepathy-glib code-generation tools, and generate their own "mini-telepathy-glib" (traditionally in a /extensions/ directory) for their implementation-specific (drafts of) interfaces. This isn't yet as polished as it ought to be (mainly because we don't want to freeze the augmented-introspection-XML format that we write the Telepathy spec in, because it's rather ad-hoc and hackish in places) but it works quite well in practice. To see what this looks like in practice, have a look at the examples in telepathy-glib, or at a Telepathy connection manager like telepathy-gabble.
Mixins and base classes Another feature of telepathy-glib which makes life easier for connection manager authors is that it provides "mixins" and base classes which implement some of the GInterfaces. There's absolutely nothing magic about the base classes - they don't have any access to private implementation details of the GInterfaces, they just implement them like everyone else does. The "mixins" are only slightly more magical - they store some extra state inside the structures representing GObjects and their classes, and use it to provide default implementations of some or all of the methods on a particular interface (or two interfaces, in the case of the new TpMessageMixin). I'll leave it up to Rob to explain those in greater detail, since I seem to remember that he invented them :-P The examples and regression tests in telepathy-glib are quite good examples of how these work in practice.

15 April 2008

Pablo Lorenzzoni: fisl9.0: T-48h

We are at T-48h of fisl9.0, and everything starts to take form. I spent the whole afternoon getting our icecast infrastructure online. We ve got 6 servers, all with different bandwidth and not all with the same architecture The debian boxes were prevalent (4 of them 1 amd64 and 3 i386), all of them etch. We ll be able to follow the statistics at tvstats website (not all the servers are enlisted yet). In this process I found an evil bug in debian s icecast package, I will have to debug to understand it better: when relaying from a master server (which is our set-up), if the source stops feeding the master, the relay segfaults. The strace shows it just segfaults while pooling I got no explanation for it and I ll have to dissect it if I want to build a proper bug report. In the meantime, I installed the sarge-backports version, and it worked so, the bug report will have to wait until after fisl :-) I took some pictures to show how s everything being put together. Take a look: And some of the infrastructure crew: See you all there!

14 April 2008

MJ Ray: I Can't Dance

My legs hurt. It hurts to sit. It hurts to stand. It hurts to walk. $DEITY knows what it will feel like to ride my bike. How did I do this? It wasn't some bizarre biking accident. I was laying cables under the floor between the two offices at the opposite corners of my building yesterday. I lifted three floorboards and four carpets and drilled one hole. Afterwards, I rebuilt some shelves. How did that hurt my legs??? Today is Blogger Appreciation Day [UNOFFICIAL] so I'd like to thank Steve for Chronicle which is now powering this blog instead of the old homebrew. Meanwhile, messages that came in while I was AFK included a strange one from Paul, Steve being elected as Debian Project Leader (well done!), 'Free Software in Ethics and Practice' - Richard Stallman, Thursday 1st May, Interview: How a hacker became a freedom fighter From New Scientist Print Edition, Understanding Design & Computers: Notes from an Introduction to OpenMoko, by Ole Tange for UKUUG Finally, in a cycling and cooperatives cross-over, this article on Hammond's crash also mentions the other two Brits, who ride for cooperative teams. I watched the race, but didn't see much of them.

4 April 2008

MJ Ray: Tour of Britain launch notes

ToB Taunton Banner The Tour of Britain organisers emailed me to announce their launch. The race this year will be 7th - 14th September (starting stage 2 in my old stomping grounds of MK and finishing stage 3 in Burnham on Sea, the next town south from my home) and they announce daily coverage on itv4
on their front page. Well done ToB and itv! That should be a vast improvement on the 2 hours on the last day that BBC were giving it, although I expect it’s highlights rather than live.

MJ Ray: GP Indurain?

Bernie S again tipped me off that ETBsat is showing the GP Indurain on Saturday. I see they’re listing at 15:50 CET TXIRRINDULARITZA:INDURAIN SARIA “SANTUARIO DE PUY. LIZARRA” which I think might be it. Nice spot again Bernie!

2 April 2008

MJ Ray: Tour of Flanders

Bernie S wrote in: “Bit concerned RTBF not showing Flanders on Sunday (4 hrs last year). Only Eurosport (19 east) and RAI Tre (13 east) I can find so far. I just checked ARD/ZDF no deal there. Also France 3 said on Sunday at CI that Flanders is not live there. So, coverage is a bit sparse, although NOS will probably show but are encrypted.” Thanks Bernie. Eurosport is schedules show it as 13:00-17:00 CET and RAI Tre has it 15:10-18:00 CET (which probably means Eurosport will overrun and not show the presentations, as sadly usual). Unusually, it’s also on SFinfo (13 east) at 13:00 CET. Highlights 15:15 CET Monday and 13:30 CET Wednesday on Eurosport.

30 March 2008

Francois Marier: Debugging concurrency problems: Forcing a process to run on a single CPU

Multi-threading can cause hard-to-diagnose problems and they are especially visible on multi-core CPUs (or multi-CPU systems) where threads actually run concurrently.

Here's a quick way to find out if the segfaults you are experiencing might be due to some concurrency/locking problem: force the application to run on a single CPU using schedtool (part of the schedtool package on Debian/Ubuntu).
schedtool -a 0 -e applicationname
This is just one example of what you can do with the CPU Affinity controls on Linux.

23 March 2008

MJ Ray: Rund um K ln

I’ve a soft spot for this race - it was the first one I saw after putting up my first satellite antenna. WDR (19e, widescreen and in stereo) are showing the race from 10:20 to 16:05 CET.

21 March 2008

MJ Ray: Milan-San Remo

Everyone’s favourite Saturday one-day classic so far this year(!) will be live on RAI Tre (13e) from 14:50 CET. Highlights are on Eurosport (19e) at 17:00 CET. (It’s live on Eurosport 2, but that’s not free-to-air.) Anyone found other free TV coverage? This seems surprisingly sparse, but I guess it competes with skating and swimming championships.

Steve Kemp: Don't you just hate loose ends?

Today I spent a while fixing some more segfault bugs. I guess that this work qualifies as either fixing RC bugs, or potential security bugs. Anyway I did an NMU of libpam-tmpdir a while back to fix all but one of the open bugs against it. I provided a patch for #461625 yelp: segfault while loading info documentation, which fixes the symptoms of bad info-parsing, and avoids the segfault. I also looked into the #466771 busybox cpio: double free or corruption during cpio extraction of hardlinks - but it turns out that was already fixed in Sid. Finally I found a segfault bug open against ftp: To reproduce this bug run:
skx@gold:~$ ftp ftp.debian.org
220 saens.debian.org FTP server (vsftpd)
Name (ftp.debian.org:skx): anonymous
331 Please specify the password
Password: foo@bar.com
ftp> cd debian/doc
250 Directory successfully changed.
ftp> get dedication-2.2.cn.txt dedication-2.2.de.txt dedication-2.2.es.txt ..
local: dedication-2.2.de.txt remote: dedication-2.2.cn.txt
Segmentation fault
You need to repeat the arguments about 50 times. But keep adding more and more copies of the three files to the line until you get the crash. It isn't interesting as a security issue as it is client side only; but as a trivially reproducable issue it becomes fun to solve. Click to read the rest of the entry I mailed the maintainer of FTP and said unless I heard differently I'd NMU and cleanup the package in a week. All being well this entry will be nicely truncated in the RSS feeds as support for the <cut> tag was the main new feature in my previous upload of chronicle - the blog compiler I use/wrote/maintain. ObQuote: Razor Blade Smile

15 March 2008

Daniel Burrows: aptitude 0.4.10 released

I've just released version 0.4.10 of aptitude, a terminal and command-line package management tool for Debian. This release has many user-visible changes (see the changelog below). It also fixes an annoying and much-reported segfault. The Debian packages of this version are built against the new version of cwidget, which is sitting in NEW, but if you're impatient you can compile it by hand by dropping the versioned dependency. The dependency is there to ensure that we don't get dependency skew across architectures (aptitude depending on libcwidget0 on some archs and libcwidget1 on others) and doesn't represent an actual build requirement of aptitude.
[12/15/2007] Version 0.4.10 Oscillating Reindeer
  • New features:
    • In command-line mode, if the resolver fails to produce a solution for whatever reason, then instead of aborting the program entirely aptitude will now display a prompt at which you can fix the dependency problems by hand. Enter r at this prompt to try to automatically fix dependencies again.
    • safe-upgrade will now install new packages to fulfill dependences (but it will never remove packages, downgrade packages, or install a version that's not the default). The option --no-new-installs will disable this behavior.
    • Updates and commands that install, remove, or upgrade packages will now display a brief summary of what changed. For instance:
      There are now 64 updates [+10], 3 new [+1].
      
      Unfortunately, this change requires reading the cache after an update is complete. Passing -q will disable this behavior, but also make the update progress bar less attractive. More work on resolving this tension between features and performance remains to be done.
    • Add an option --allow-untrusted to override trust warnings. (Closes: bug #452201, bug #452541)
    • Recommended packages are now hidden if quiet mode is enabled. (Closes: bug #452202)
    • The options Aptitude::ProblemResolver::Trace-File and Aptitude::ProblemResolver::Trace-Directory allow you to generate a minimal cut of the cache that allows a problem resolver run to be reproduced. The eventual aim is both to simplify bug reporting and to generate a corpus of automatic test cases for the resolver (although more work needs to be done to accomplish the latter).
    • When run in command-line mode, instead of displaying many separate and sometimes duplicative groups of packages (e.g.: installed, auto-installed, auto-installed in a light cream sauce, etc), aptitude displays packages in a few exclusive categories and uses tags (like the existing purge tag) to provide more state information. For instance:
      $ aptitude -s install wesnoth
      The following NEW packages will be installed:
        wesnoth wesnoth-data a  wesnoth-music a 
      $ aptitude -s remove freeciv-data
          (... dependency resolution ...)
      The following packages will be REMOVED:
        freeciv-client-gtk a  freeciv-data freeciv-server a  ggzcore-bin u 
        libggz-gtk1 u  libggz2 u  libggzcore9 u  libggzdmod6 u  libggzmod4 u 
      
      Here a indicates that a package was automatically installed or removed, and u indicates that a package is being removed because it is unused. Hopefully this will be less confusing than the old format.
  • Bug fixes:
    • Crashes and serious errors:
      • Track down and fix a SEGV triggered on the first action after a cache reload (sometimes). There are multiple bugs where this might have been the root cause, but it's confirmed that it was the cause of at least bug #454695, bug #454700, bug #455349, and bug #453362. Bug bug #455865 is almost certainly the same issue, and bug bug #352278 may be another manifestation of it.
      • If StepLimit is set to 0, refuse to solve dependencies instead of going into an infinite loop. (Closes: bug #451311)
    • Minor bugs:
      • Return a failing exit code after jumping from the command-line to visual mode if the last install run failed. (Closes: bug #282408)
      • Return a failing exit code from aptitude update if any download fails. (Closes: bug #233129)
    • Cosmetic and UI bugs:
      • In addition to Enter, Space will now activate checkboxes and radio buttons. (Closes: bug #451765)
      • Abort the program if we get EOF at the resolver prompt instead of claiming the resolver failed.
      • Command-line searches will now only print each result once. (Closes: bug #450798)
    • Documentation bugs:
      • The options menu documentation now minimally describes the new configuration interface.
      • The documentation of the configuration file options has been placed back in alphabetic order after apparently suffering bitrot over the years.
      • Corrected the documented default of Parse-Description-Bullets to match reality.
      • The manpages for aptitude-create-state-bundle and aptitude-run-state-bundle are now generated using DocBook, which should produce higher-quality and more consistent typesetting, as well as making the manpages more maintainable and allowing translators to easily produce localized versions of the manpages.
  • Internal changes:
    • Removed some unit tests that really tested cwidget.
  • Translation updates:
    • French (Christian Perrier)

9 March 2008

Steve Kemp: Some people get by with a little understanding

Since my last example of fixing a bug received some interesting feedback (although I notice no upload of the package in question ..) we'll have another go. Looking over my ~/.bash_history file one command I use multiple times a day is make. Happily GNU make has at least one interesting bug open: I verified this bug by saving the Makefile in the report and running make:
skx@gold:~$ make
make: file.c:84: lookup_file: Assertion  *name != '\0'' failed.
Aborted
(OK so this isn't a segfault; but an assertion failure is just as bad. Honest!) So I downloaded the source to make, and rebuilt it. This left me with a binary with debugging symbols. The execution was much more interesting this time round:
skx@gold:~$ ./make
*** glibc detected ***
  /home/skx/./make: double free or corruption (fasttop): 0x00000000006327b0 ***
======= Backtrace: =========
/lib/libc.so.6[0x2b273dbdd8a8]
/lib/libc.so.6(cfree+0x76)[0x2b273dbdf9b6]
/home/skx/./make[0x4120a5]
/home/skx/./make[0x4068ee]
/home/skx/./make[0x406fb2]
...
[snip mucho texto]
And once I'd allowed core-file creation ("ulimit -c 9999999") I found I had a core file to help debugging. Running the unstripped version under gdb showed this:
(gdb) up
#5  0x00000000004120a5 in multi_glob (chain=0x1c, size=40) at read.c:3106
3106			    free (memname);
So it seems likely that this free is causing the abort. There are two simple things to do here: To get started I did the first of these: Commenting out the free() call did indeed fix the problem, or at least mask it (at the cost of a memory leak):
skx@gold:~$ ./make
make: *** No rule to make target  Erreur_Lexicale.o', needed by  compilateur'.  Stop.
So, now we need to go back to read.c and see why that free was causing problems. The function containing the free() is "multi_glob". It has scary pointer magic in it, and it took me a lot of tracing to determine the source of the bug. In short we need to change this:
free (memname);
To this:
free (memname);
memname = 0;
Otherwise the memory is freed multiple times, (once each time through the loop in that function. See the source for details). Patch mailed.

8 March 2008

MJ Ray: Paris-Nice

Here’s the free-to-air satellite details for the first big French cycle race of the year. Please add any updates in the comments, particularly any RAI or ITV coverage. Sun 09.03 Prologue: Individual Time Trial Amily (5 km) France 4 13:40 - 15:00 (live?); France 3 15:00 - 15:35 (live?); ZDF 16:15 approx -17:00, in ZDF SPORTextra (highlights?); Eurosport 23:30 - 0:15 (highlights); Mon 10.03 1st stage: Amily-Nevers (185 km) Eurosport 15:00 - 16:45; France 4 15:25 - 16:35; Tue 11.03 1st stage highlights: Amily-Nevers (185 km) Eurosport 14:30 - 15:00; 2nd stage: Nevers-Belleville (201 km) Eurosport 15:00 - 16:45; France 4 15:25 - 16:35; Wed 12.03 3rd stage: Fleurie-Saint tienne (165,5 km) Eurosport 14:30 - 16:15; France 4 15:25 - 16:35; Thu 13.034th stage: Mont limar-Mont Ventoux (176 km) Eurosport 15:30 - 16:45; France 4 15:25 - 16:35; Fri 14.03 5th stage: Althen des Paluds-Sisteron (172,5 km) France 4 15:25 - 16:35 (live); Eurosport 17:15 -18:00 (highlights); Sat 15.03 6th stage: Sisteron-Cannes (206 km) France 4 15:25 - 16:35 (live); Eurosport 17:15 -18:15 (highlights); Sun 16.03 7th stage: Nice-Nice (119 km) France 3 15:05 - 16:55 (live); Eurosport 20:00 - 21:00 (highlights); Mon 17.03 7th stage highlights: Nice-Nice (119 km) Eurosport 13:15 -14:15 All times CET. France 3 and 4 are at 5 west (in French), Eurosport is at 19 east (German digital, German and English analogue) and ZDF is at 13 and 19 east (in German). Sources: France 4 Sport, Eurosport.DE, ZDF

13 February 2008

Vincent Fourmond: How to shut wine audio output

As I've mentioned before, I play to Morrowind (III) using Wine. Fine. Thanks to a nice guy on the AppDB Forum, I found out that what was causing Morrowind to segfault was simply that I had not set any audio device in my configuration... So I did with winecfg, and it worked, and I was quite delighted. So far, nothing fantastic. It so happens that I hate to play any game with the game's music/sounds/voices, as I prefer to be quietly listening to music of my taste (I have delicate ears). As in any other game, you can switch them off in Morrowind, which is what I immediately did. However, it happens that some sounds - so far, only the sound corresponding to a shield blocking an attack (a graceful and delicate sound as you imagine) - go through even with all sound volumes are turned down to 0. It is annoying to the point I had to stop using the computer for listening music and falling back to my old CD player. Painful ! Or at least so it was until today, when I finally took my courage and found out how to fool wine into believing it is playing sounds when in fact it is not. First step, create a null ALSA output device, by adding the following to your .asoundrc:
# Null audio output
pcm.null  
  type null               # Null PCM
 
Then, you need to have wine use it (and only this one). For this, a quick look at the Useful Registry Keys showed that I had to add the following to my .wine/user.ref configuration file:
[Software\\Wine\\Alsa Driver] 1202930020
"DevicePCM1"="null"
"AutoScanCards"="N"
"DeviceCount"="1"
Just make sure wine is using ALSA output, and that's all ! Morrowind plays, without sound and does not segfault ! I'll be able to listen to my music again... Note I'm unsure about the value 1202930020. The best is to add the key Software\Wine\Alsa Driver using regedit and then edit the configuration file -- or even do everything with regedit.

8 February 2008

MJ Ray: GP Costa degli Etruschi

RAI Sport Sat (free-to-air 13e) have highlights of GP Costa degli Etruschi at 18:00-18:30 CET today (Saturday 9th). The CyclingNews start list (beware, results will appear higher up on that page) suggests it’s the first time for most of us to see some of the big names on TV this season, including a fairly strong Milram squad supporting Alessandro Petacchi, who’s looking for his fourth win in a row at this event.

24 January 2008

MJ Ray: Cyclocross: Hoogerheide and Treviso-Veneto

Just a quick post about the final cyclocross races: highlights from Hoogerheide are on RAI Sport Sat (free-to-air 13e) at 2255 CET tonight (Thu 24 Jan). Highlights of this weekend’s Treviso-Veneto races (26 and 27 Jan) should be on Eurosport (free-to-air at 19 east), 0900-1000 CET Mon 28 Jan. If you know of other broadcasters showing the race, please leave me a comment. Sven Nys has this pretty tied up, no?

Next.

Previous.