Search Results: "xam"

13 July 2008

Russell Coker: Logic and Pants

I just read an interesting post about proposed new laws in the US prohibiting exposing underpants [1]. This is not a new thing and is part of a debate that has been taking place in many countries since the trend of “hip hop” saggy pants. The first thing that occurs to me is to wonder what the difference really is between underpants and bathers. It seems to me that bathers are simply underpants that don’t turn transparent when they get wet (and which are made of materials that don’t degrade easily when exposed to sea water, UV light, and chlorinated water from swimming pools. So it seems that unless there is some clear legal difference between bathers and underpants such laws will not be effective. Could an underwear company produce products that are essentially the same as it’s regular products but which say “swimming attire” on the label to allow it’s customers to escape silly laws? In fact why not label all underwear as “swimming attire” just in case? Would the prudes who object to a glimpse of underwear want police to go checking the labels of underwear to determine if they are permitted to be seen? The fascist trend in first-world countries is already quite bad, I don’t think we want to add underpants inspection to the list of police powers. Also it should be noted that a small portion of the police officers are corrupt, the idea of corrupt cops inspecting underpants is really not appealing… It would be possible to define any clothes worn under other clothes as “underwear”, but this has problems too. For example when I was younger I used to often wear jeans over my bathers when on the way to/from a beach (often there were no adequate facilities for changing clothes near a beach). If I was to wear jeans over my bathers while walking to a beach could I get booked for showing a small section of my bathers over the top of my jeans - and then legally entirely display my bathers while swimming? Of course there are legal nude beaches in many localities, but blurring the distinction between a regular beach and a nude beach by permitting activity that would be “indecent exposure” on all beaches seems likely to have results that would not make the prudes happy. The next logical implication of laws against exposing underpants is that they encourage wearing smaller underpants. My experience is that it is impossible to wear boxer-shorts without them being exposed above the top of my jeans. Should I be essentially prohibited from wearing boxer shorts because of the risk that if my shirt is not tucked in then someone might catch a glimpse of my underwear? Now if “underwear” was defined to be “anything work beneath the outer layer of clothes” then what about the situation of having multiple layers of clothes? For example when an athlete who wears a track-suit over shorts, are those shorts “underwear”? If so do they cease being “underwear” once the track-suit is removed? Is there a race condition [2] where an athlete can wear shorts on the track, a track-suit on the bench, but they have to remove the track-suit as fast as possible because they are committing indecent exposure while removing the track-suit? If underwear is defined as being the innermost layer of clothing, then what of the practice of “free-balling” (the practice of a man wearing a track-suit with no underpants) and the Scottish tradition of “nothing is worn under the kilt”? Can a track-suit or kilt be defined as underwear? If so how would it be enforced, would police look up the kilts of all men to ensure that the kilt is not the underwear? As for “plumber’s crack” the only solution seems to be to compel plumbers to wear overalls. Of course then plumbers would increase their rates to cover the expense and inconvenience involved in a forced change of attire. I think that most people would prefer to hire a cheap plumber who shows some “crack” than an expensive plumber.

Obey Arthur Liu: Back from Zurich

I finally got back from Switzerland. Google invited all the Summer of Code students to visit their offices. I chose to go to the Zurich one. It wasn’t the closest (London was) but it was the largest and it had more engineers than MBAs. img_0164medium It has been very interesting meeting other Summer of Code participants from all Europe and a lot of other people of the free software community. There were about 40 people overall for the meeting at Google, along with free beer, cake and nice food. img_0161medium I gave a talk about Aptitude, how it could be useful and how I worked so far. It was nice to see that nearly a third of the audience used Debian or a derivative. By the way, the proprietary Nvidia X driver seriously messed up with the projector. It just wouldn’t detect the external display at more than 640×480, which Impress didn’t like at all. I didn’t feel like hacking around my xorg.conf while on stage so I went without the slides (well, you could see about a half of each slide actually). I heard that it was because of my old GPU (GeForce 7400) that I had poor support and the impossibility of, for example, doing RandR correctly. I had to restart X and stuff… The talk went smoothly otherwise and Google staff graced some of us with a guided visit of the 6 stories building, complete with slides, cable-cars and 18th century-themed rooms. I had to sign a NDA over whatever secrets I may see and surender my DSLR, but you can find pretty pictures in this blog post from Valleywag.
025_f0
The Google office really lived up to the hype. I wondered: do people actually work in there ? I guess they must do, and very well.

12 July 2008

Kapil Paranjape: Balaram on Institutional Archives

Subbiah Arunachalam forwarded a link to an interview of Professor P. Balaram regarding Open Archives. (Balaram is currently the director of the Indian Institute of Science, Bangalore so he is in a position to influence national policy in such matters). I broadly agreed with his views and I posted a comment which I am reproducing here. Primarily, there are differences between different disciplines. The quotes below are from the interview.
If I publish a paper in Nature, for example, it can be made freely available in my institute's repository after six months. Some journals let archived papers be made available immediately.
... and again later ...
But many publishers have no problem with the open archives approach, even if some still require a delay.
In our discussions with Elsevier we were assured that the policy of that publisher is to allow authors to use institutional repositories at any time (but see the caveats below).
One issue that is yet to be resolved, however, is copyright. I argue that we should be permitted to put in the repository the full text article as it appears in a journal.
There is a difference between "full text" and "as it appears in the journal". If the journal has put in any effort at all into re-formatting your text/images in order to get it to conform with their journal standard, then the copyright for that re-formatting work (usually a combination of manual labour and software) belongs to the journal. For example, Elsevier insists that you do not put the PDF (or other) image file of the exact form of the journal publication in your institute repository. I personally find this quite acceptable since papers in the Mathematical Sciences are perfectly readable in the form in which the authors submit them to the journal. However, re-creating a distributable PDF or other online form of one's paper may be far more difficult in other disciplines --- I have no idea.
For this, countries such as India should have a law specifying that the copyright for articles published with publicly-funded research always vests with the authors and their institutions.
One need not wait for copyright law to change. The directors of each of the research institutes can insist that every paper sent for publication should be made available in the form of a research report with the institute library. By extension, the electronic form of this report would be in the institutional repository. One way to ensure compliance is to only allow reports that are available in the institute library to be used for evaluation (for promotions and the like). The scientists would then refrain from giving up all copyright to their publishers. In my (limited) experience, publishers will not object to authors retaining the right to make copies as long as such copies are not independently sold. Unfortunately, scientists as "the silent compliant mob" does not fit with my experience. In all matters which relate to science administration (and publications are at the centre of that), scientists are by-and-large "status quo"-ists. It will need a strong push from those at the top of the ladder to change the status quo. Professor P. Balaram is certainly one of those at "the top of the ladder" so I would like to see more action to match his words! Update: Fixed the URL thanks to Abhishek Dasgupta. Also clarified the last sentence.

11 July 2008

Bastian Venthur: Maximize vs Maximize to Preferred Size

In times where screen resolutions of 1600x… and above are becoming more and more common, I wonder if the maximize window button which enlarges a window to take all the available space on the desktop is still as useful as it used to be. I noticed that some (if not all, I’m not a Mac user) applications on Mac only maximize their windows depending on the content of the window. For example if you maximize the window of your word processor, the window becomes only as wide as necessary to make the whole page visible. This doesn’t just look better on very large monitors, it is also more usable than a simple maximize since it doesn’t unnecessarily hide other windows. Is there a window manager for Linux which does something similar, or better: is something like this possible with KDE? I know that QT widgets have a “preferred size” — shouldn’t it be possible to have a maximize to preferred size button? It’s surely not useful for every application, but may applications only need a quite small main window and look very ugly when maximized.

Adam Jensen: 11 Jul 2008

Yesterday, 10 July, was the due date for the second milestone of my work on DebGraph. I am happy to report that we are roughly two weeks ahead of schedule, so meeting this milestone was not a cause for worry. We now have support for the following graph operators: The next milestone includes the development of a high-level language (or integration with an existing extension language) that streamlines the construction of complex queries using the operators listed above. We can build arbitrarily complex queries using the C++ operators, but dealing with the static typing and compiler toolchain can be very clunky. As such, I have spent the past week working on Lua bindings for DebGraph, which will enable us to query the graph of Debian packages from a clean, dynamically typed language. Lua has a powerful C API that exposes the Lua stack and lets us move DebGraph information to and from the Lua interpreter. I'm writing documentation that outlines how to use DebGraph from both C++ and Lua in order to make this work accessible to more folks. Sneak peak
As an example, we can utilize the FindCycles operator in Lua as follows:
libdg = package.loadlib("./libdebgraph.so",
"luaopen_libdebgraph")
libdg()
LoadPackages('cache')
-- 'g' is the main graph of unstable binary-arm packages
cycles = FindCycles(g)
print("Found " .. #fc .. " cycles")
for comp_key,comp in pairs(cycles) do
    comp_nodes = ""
    for node_key,node in pairs(comp) do
        prop = GetProperty(node, "Package")
        comp_nodes = comp_nodes .. prop .. " "
    end
    print("* " .. comp_nodes)
end
The above Lua script produces the following result:
reading cache/unstable/main/binary-arm/Packages
Found 61 cycles
* debconf-english debconf-i18n debconf
* perl-modules perl 
* cdebconf fontconfig-config fontconfig gsfonts-x11
libcairo2 libfontconfig1 libgtk2.0-0 libpango1.0-0
libpango1.0-common libxft2 ucf x11-utils xutils
[...]
These are the package names in the strongly connected components, shown in alphabetical order. There is still a lot of work to do before the Lua binding will achieve feature parity with the core library, but we have now laid the foundation (and a brick or two).

Joey Hess: Harvest Table restaurant

We tried the Harvest Table restaurant in Meadowview, Barbara Kingsolver's place and an outgrowth of her book Animal, Vegetable, Miracle: A Year of Food Life (which I have yet to read). All the food is local (or as close as possible) and seasonal. A great time was had by all, and the food was amazingly flavorful and fresh. Nicest of all was that we kept finding ingredients that you just don't normally find in restaurant food -- because typical restaurant's don't bother using quirky local produce. For example, I'd not expect to find lamb sausage in a burrito. Looking forward to going back and enjoying whatever's in season once my wallet has recovered.

10 July 2008

Cyril Brulebois: SysRq trick

While building and testing LiveCDs, QEMU and VirtualBox can speed up development cycles until a bug is encountered: apt-get update hanging on a rename operation. Maybe aufs is at fault? Its author then asks for some data, including what happens when some SysRq keys are pressed. What they are is already quite extensively explained in Documentation/sysrq.txt (Linux sources), but I d like to point to a nice trick for people using emulation and virtualization tools (ever tried to send Ctrl+Alt+Delete to a virtual machine?):
# echo $letter > /proc/sysrq-trigger
where $letter is any of the supported SysRq keys. As an example:
# echo d > /proc/sysrq-trigger
# dmesg   tail -1
[558193.423427] SysRq : HELP : loglevel0-8 reBoot Crashdump tErm Full kIll
saK showMem Nice powerOff showPc show-all-timers(Q) unRaw Sync showTasks
Unmount shoW-blocked-tasks

Steve Kemp: He'll save every one of us!

So recently there have been a few posts by people discussing the idea of distributed bug reporting systems. This is topical, becuse I've been working on something vaguely related - a support system. Why is a support system, or ticketing system, related to a bug tracker? To answer that you must first clarify what you mean by a support system (or a bug tracker for that matter). There are two distinct types of support systems:
"Full"
This is a system which does "everything". Each submitted support, or bug, request has an associated status, severity, priority and work log. It might be assigned to multiple people through its lifetime, and it might be moved around various internal queues. Example: Request Tracker.
"Minimal"
A reported ticket is an email submission. A "ticket" from start to finish is nothing more than a collection of mails upon a particular topic - there is no assigned "owner", no "priority", no object-specific attributes at all.
I've neither the time, patience, or desire to create any system like the first one. But I've become increasingly dissatisfied with my current support system, roundup, for various reasons. So I need something new. Previously I ruled out several support systems and most of my objections still stand, although I admit I've not really looked again. I will certainly do so shortly. So what have I done? Well I figure I care very little about queues, priorities, reports, and all that stuff. (On the basis that priority is mostly in the ticket itself, and that I'm the sole recipient of the submissions. Previously I had a partner to share them, but these days just me.) I want something that is basically e-mail centric. That reduces the functionality of my support system to two distinct parts:
Ticket Submission
An email to sumbit@example.com should result in three actions:
  • A message being sent back to the submitter. "Hey got your ticket. We'll fix it. Love you long time.". (Set the reply-to address appropriately!)
  • A message to the site admin(s) saying "Hey, you've got a new ticket submission. Deal."
  • A new ticket being created/stored somewhere.
(There are additional nice things to have - such as SMS alerts outside 10:00-17:00, etc, but those are trivial bolt-ons.)
Ticket Updates
When a mail comes in to "ticket-XXXX@example.org" - which was setup in the submission process, or when a mail arrives with subject "[issueXXXX]" we need to append the correspondance to the existing ticket. If that ticket doesn't exist we report an error. If the ticket is closed we re-open it.
So, what do we have? A script that is conceptually simple, and can be invoked via a pipe transport of Exim4. A script that just reads the submitted email from STDIN and only has to decide a couple of things based pretty much on the contents of the "To:" and "Subject:" headers. Simple, no? OK it was actually amazingly simple once broken down. The amazing part is that it all works. I figured that I'd manage new tickets by writing them to mbox files - simple to do. Simple to understand. So the process goes: There are a couple of helper scripts: But basically one script and mutt does it all. So far it's been tested and it is rockin'! (Look at me, hangin' with the cool kids!) Obviously it is pretty Steve-specific, and there is only a toy CGI process for viewing history online, but I'm actually feeling pretty good about it. Once I've closed all my existing tickets I will probably migrate over to it. At least this handles (read: ignores) MIME - which makes it a clear winner of roundup, which just eats, bounces, or corrupts submitted multipart messages. ObQuote: Flash Gordon

Kapil Paranjape: DNS cache poisoning quickfix

A number of security sites have announced a DNS protocol problem which was discovered by Dan Kaminsky. For example the advisories for Debian are at: The attack works if the victim machine uses a predictable source port when it makes DNS queries. Thus the current solution to the problem is to try to randomize the source port of the query. Now, the default resolving library that is part of glibc and the resolver that comes with BIND 8 do not randomise source ports and are thus subject to attack. This means that until glibc is patched every machine that uses glibc is vulnerable unless one installs a source port randomising DNS caching resolver on each such machine. Here is what appears to be a simpler alternative:

iptables -t nat -A POSTROUTING -o ! lo -p udp --dport 53 \
    -j MASQUERADE --to-ports 1024-65535 --random
iptables -t nat -A POSTROUTING -o ! lo -p tcp --dport 53 \
    -j MASQUERADE --to-ports 1024-65535 --random

WARNING: The above suggestion may or may not work and may break your machine in all kinds of awful ways! Will someone more knowledgable than me about the various RFC's confirm whether this would indeed be a "quickfix"? Ideally, we should expect a suitably patched glibc soon and that would be a better solution Update: The --random switch only works in Linux kernels with version at least 2.6.22

Robert McQueen: GUADEC, Telepathy and a Party on a Boat

For everyone at GUADEC, there’s a boat party sponsored by Collabora this evening. Our sponsorship was confirmed after the program was printed so it’s listed anonymously, but it’s mostly sponsored by Collabora, of course with huge thanks to Baris and his team for the organisation, and local sponsors for food and discounted beer. The boat leaves from Kabatas at 9pm today (Thursday). It’s actually pretty close to the 3rd anniversary of Collabora’s incorporation, so I think we could call this our birthday party. :D I gave my presentation earlier today about using Telepathy to make collaborative applications. My slides are available, as well as the apps I demoed, which are the python VNC demo based on telepathy-python’s examples, Elliot’s Tic Tac Tube game, and Guillaume and Alban’s quick hack to Empathy and Vinagre to share your desktop over a stream tube. I was followed up by Senko’s presentation (slides also available) which had an overview of the libraries and APIs currently available to embed Telepathy functionality in applications on the desktop. The talks were all recorded so hopefully some videos will turn up on-line too. Speaking about collaborative stuff with Telepathy, we’re really keen to hear from the authors of applications like Abiword, Inkscape, Vinagre, Jokosher, Tomboy, Gobby, etc, to find out how we can help you integrate with Telepathy, what features you need before you can get started, or just try and convince you that it’s a good idea. :) If you’re at GUADEC, come and grab one of the Collaborans or drop by on #telepathy on FreeNode and tell us what you’d like to do and how we can help. Yesterday after the talks on Soylent and the People project, Travis and I met up with the guys behind the People project (Ali Sabil and Johann Prieur) and some of the Online Desktop team (Owen Taylor and Marina Zhurakhinskaya). We sketched out a way of plugging together Telepathy, People, Soylent and the Online Desktop to deal a lot better with meta-contacts on the desktop, providing “first-class” people objects. It all looks pretty promising and hopefully we’ll all find some time to make moves towards our vision. This afternoon at 3:30pm, Olivier is also presenting our work on Farsight 2, which is really cool stuff and should include some exciting demos of the multi-person video conferencing stuff we’ve been doing. More generally, GUADEC is awesome. I’m having a great time in Istanbul (despite it being pretty hot for a pale-faced Brit like me), and enjoying the sights and sounds of such an interesting city and culture. I’ve caught up with many of the usual suspects (like Lennart, who never turns down the chance to turn up at a conference and sample the local bars and clubs), and had some great discussions.

8 July 2008

Andreas Barth: ldap and webauth / kerberos

I'm currently looking for some software that user can login on the webserver, but for the scripts, it doesn't look too different from basic auth. One example of that kind is webauth, however that requires that all user accounts are in kerberos. I however want to continue to keep accounts in ldap, because that works well for most issues. So, my next step is either to set up kerberos in a way that allows the accounts to be synced with ldap, or find another software with the same effect.

7 July 2008

Simon Richter: Yay

Dammit has learned to arrange files into a tree. This is awesome, because Missing so far: Thus, no new upload yet; example tree below the fold.

Ian Wienand: Whoda' thunk it!

I learned a new word today, thunk. At first, given the context, I thought it meant text (as in program code) hunk, but the Hacker's Dictionary suggests it's actually more a term for a closure. For those not familiar with what a closure is, it's a "thunk" of encapsulated code created by the compiler which is dynamically generated and managed. Stealing the Wikipedia example: Closures Nested functions are probably the closest thing to a closure you can get with C (I've talked about nested functions and trampolines before). However, because the stack disappears it's not nearly as useful, I think the term for these is lexical closures, because it's basically a way to share some stack and restrict name-spaces. Amusingly, the code using the term "thunk" was assembler, so my first search was for thunk gas (as in GNU Assembler). This of course lead to endless articles on the high price of gas — a non-renewable fossil fuel running out and capitalists realising inelastic demand can be used to line their pockets? Whoda' thunk it!

6 July 2008

Martín Ferrari: How to organise DebConf and remain sane

Forget it, there's no fucking way in hell to accomplish that. The last 6 months of my life had been turned upside-down, it's too much work, too much pressure... My performance at the University (which was never too good) degraded, sometimes I took too much time from my paid work, not to mention the abandon of almost all my other Debian duties. That is enough to drive you nuts, but there's more: a couple of event at my jobs resulted in lots of overwork around March-April and even more in the last month... Sum all this up, and you find that the only way to keep doing things is to rob precious sleeping hours: to finish pending work, to prepare the exams, and from time to time to have a little fun. The result is a grumpy mood, a aching back, and a tendency to get into arguments easily. My apologies to all the people that I mistreated, specially Marga, who's in a similar state of madness. So I really hope that DC8 turn out to be a great conference, and that everybody will have a good time. So all this would be justified. Tags: Planet Debian, Planet Lugfi

Russell Coker: Awful Computers for Kids

I have just observed demonstration units of the V-Smile system [1]. They have “educational games” aimed at ages 3-5, 4-7, and some similar ranges. The first thing I noticed was that children who were able to correctly play the games were a lot older than the designated ages. For example 10yo children were playing the Scooby-Doo addition game (supposedly teaching children to add single-digit numbers) and apparently finding the non-addition part of the game challenging (I tried it myself and found catching flying hamburgers while dodging birds to be challenging enough that it was difficult to find numbers). For children who were in the suggested age-range (and a suitable age for learning the basic lessons contained in the games) the only ones who actually managed to achieve the goals were the ones who were heavily directed by their father. So my observation is that the games will either be used by children who are too old for the basic lessons or be entirely directed by parents (I didn’t observe any mother giving the amount of assistance necessary for a 5yo to complete the games but assume that it happens sometimes). I doubt that there are many children who have the coordination needed for a platform game who have not yet learned to recognise printed letters (as supposedly taught in the Winnie the Pooh game). The Thomas the Tank Engine spelling game had a UI that was strange to say the least (using a joystick not to indicate which direction to go but instead to move a cursor between possible tracks) and I doubt that it does any good at teaching letter recognition. There was also a game that involved using a stylus for tracing the outline of a letter, as I had great difficulty in doing this (due to the poor interface and the low resolution of the touch-pad) it seems very unlikely that a young child who is just learning to write letters would gain anything from it. Strangely there was a game that involved using the touch-pad to indicate matching colors. Recognising matching colors is even easier than recognising letters and I don’t think that a child who can’t recognise the colors would be able to manage the touch-pad. The V-Smile system seems to primarily consist of a console designed for connection to a TV but also has hand-held units that take the same cartridges. The same company produces “laptops” which sell for $50 and have a very low resolution screen and only the most basic functionality (and presumably other useless games). Sometimes the old-fashioned methods are best. It seems that crayons are among the best tools for teaching letter recognition and writing. But if there is a desire to use a computer for teaching, then a regular PC or laptop should do. Letter recognition can be taught by reading the text menus needed to launch games. The variety of computer poker games can be used for recognising matching colors and numbers as can the Mahjong series of games. Counting can be taught through the patience games, and the GIMP can be used for teaching computer graphics and general control of the mouse and the GUI. NB I’m not advocating that all education be done on a computer, merely noting the fact that it can be done better with free software on an open platform than on the proprietary systems which are supposedly designed for education. Finally with a PC children can take it apart! I believe that an important part of learning comes from disassembling and re-building toys. While it’s obvious that a PC is not going to compare with a Lego set, I think it’s good for children (and adults) to know that a computer is not a magic box, it’s a machine that they can understand (to a limited extent) and which is comprised of a number of parts that they could also understand if they wanted to learn the details. This idea is advocated by Gever Tulley advocates such disassembly of household items in his TED talk “5 dangerous things you should let your kids do” [2]. Gever runs The Tinkering School [3] which teaches young children how to make and break things. Finally I just checked some auction sites and noticed that I can get reasonably new second-hand laptops for less than $300. A laptop for $250 running Linux should not be much more expensive than a proprietary laptop that starts at $50 once you include the price of all the extra games. For an older laptop (P3) the price is as low as $100 on an auction with an hour to go. Then of course for really cheap laptops you would buy from a company that is getting new machines for their staff. It’s not uncommon for companies to sell old laptops to employees for $50 each. At a recent LUG meeting I gave away a Thinkpad with a 233MHz Pentium-MMX CPU, 96M of RAM, and a 800*600 color display - by most objective criteria such a machine would be much more capable than one of those kids computers (either V-Smile or a competitor). Of course the OLPC [4] is the ideal solution to such problems. It’s a pity that they are not generally available. I have previously written about the planned design for future OLPC machines [5] which makes it a desirable machine for my own personal use.

Kartik Mistry: Misc Life Updates


* Personal: - I am almost settled after one month at Ahmedabad and now early looking for new rented house (ie home), 1 or 2BHK. - Kavin got minor electric shock while playing with switch and socket. Fortunately, my wife was holding him and doctor told that there is nothing to worry. He is difficult to handle and long examination of my fatherhood will start soon when they will be here at Ahmedabad. - Work is going great. I have very good team now! * Debian: - Sandro Tosi will be co-maintainer or probably take over sitecopy package from me and will put it under collab-maint repository. Since, I mentioned that I am bit busy with settling down here and it will not be great if such useful package requires time to fix bugs with patches available already. - D-I translation of Level 1 and 2 for Gujarati language are again 100%. Hunting Level 3 now. - I am not still able to install Debian properly on my macbook! Only useful source for this is, http://wiki.debian.org/MacBook Any other pointers/docs will be :)

4 July 2008

David Moreno Garza: Don't usually take the queen out too soon

And this is the perfect example. While I had a wonderful position, my opponent failed by trying to checkmate me too soon, and it took me some time to figure out a way to mate him myself. I consider a bit disrespectful to take the queen out too soon. See the game here. No more PGNs for you.

3 July 2008

Russell Coker: Shared Context and Blogging

One interesting aspect of the TED conference [1] is the fact that they only run one stream. There is one lecture hall with one presentation and everyone sees the same thing. This is considerably different to what seems to be the standard practice for Linux conferences (as implemented by LCA, OLS, and Linux Kongress) where there are three or more lecture halls with talks in progress at any time. At a Linux conference you might meet someone for lunch and start a conversation by asking “did you attend the lecture on X“, as there are more than two lecture halls the answer is most likely to be “no“, which then means that you have to describe the talk in question before talking about what you might really want to discuss (such as how a point made in the lecture in question might impact the work of the people you are talking two). In the not uncommon situation where there is an interesting implication of combining the work described in two lectures it might be necessary to summarise both lectures before describing the implication of combining the work. Now there are very good reasons for running multiple lecture rooms at Linux conferences. The range of topics is quite large and probably very few delegates will be interested in the majority of the talks. Usually the conference organisers attempt to schedule things to minimise the incidence of people missing talks that interest them, one common way of doing so is to have conference “streams”. Of course when you have for example a “networking” stream, a “security” stream, and a “virtualisation” stream then you will have problems when people are interested in the intersection of some of those areas (virtual servers do change things when you are working on network security). There seem some obvious comparisons between Planet installations (as aggregates of RSS feeds) and conferences (as aggregates of lectures). On Planet Debian [2] there has traditionally been a strong shared context with many blog posts referring to the same topics - where one person’s post has inspired others to write about similar topics. After some discussion (on blogs and by email) it was determined that there would be no policy for Planet Debian and that anyone who doesn’t want to read some of the content should filter the feed. Of course this means that the number of people who read (or at least skim) the entire feed will drop and therefore we lose the shared context. Planet Linux Australia [3] currently has a discussion about the issue of what types of content to aggregate. Michael Davies has just blogged a survey about what types of content to include [4]. I think it’s unfortunate that he decided to name the post after one blogger who’s feed is aggregated on that Planet as that will encourage votes on the specific posts written by that person rather than the general issue. But I think it’s much better to tailor a Planet to the interests of the people who read it than to include everything and encourage readers to read a sub-set. When similar issues were in discussion about Planet Debian I wrote about my ideas on the topic [5]. In summary I think that the Gentoo idea of having two Planet installations (one for the content which is most relevant and one for everything that is written by members) is a really good one. It’s also a good thing to have a semi-formal document about the type of content that is expected - this would be useful both for using a limited feed for people who go significantly off-topic and as a guideline for people who want to write posts that will be appreciated by the majority of the readers. Planet Ubuntu has a guideline, but it was not very formal last time I checked. Finally in regard to short posts, they generally don’t interest me much. If I want to get a list of hot URLs then I could go to any social media site to find some. I write a list post at most once a month, and I generally don’t include a URL in the list unless I have a comment to make about it. I always try to describe each page that I link to in enough detail that if the reader can’t view it then they at least have some idea of what it is about (no “this is cool” or “this sucks” links).

Sami Haahtinen: Overcommit, your personal friendly salesperson

I just have to say it, memory management is utterly broken in Linux. Luckily it's not as broken as it used to be. Without going in to too much detail, there is a feature called overcommit in Linux. What this means is that it will over allocate memory to applications. At first thought it sounds insane. Why would one want to over allocate memory. It's like eating a cake and having it too. Well, there is a reason why this is done. If you think about resource allocation in general, there are a lot of places where this is being done successfully. For example ISPs always over sell their capacity because most of the users use a fraction of the resources allocated to them. That is why guaranteed capacity is so much more expensive, they literally allocate it for you (most of the times). So in a way memory management is like your friendly sales person from Linux corp. who is happy to sell what over you want because he needs the deal for his own bonus. So it is in fact reasonable to overcommit memory? Bzzt! Wrong! There are always problems with over allocating. ISPs, for example, monitor the usage of their resources and when certain limit is reached they get more resources. With memory it's not so easy, you have a finite amount of memory in your computer. Swap comes to the rescue to a certain degree, but it is critical for the applications to know their limits. If you have 1 MB of RAM available for the application let the application know. In most of the cases the application will crash because it doesn't know how to deal with the out of memory situation, but this is a side effect of the overcommit. Programmers don't run in to this kind of problems and they don't have to deal with them. So what happens when you hit the limit? In Linux there is this thing called oom-killer. oom-killer has just one purpose, to kill processes. While oom-killer has some clever heuristics built in to it, it will most likely end up killing the wrong program. So it's like a big game of core wars on your computer.
Generating locales...
  en_AU.UTF-8... done
  en_BW.UTF-8... done
  en_CA.UTF-8... done
  en_DK.UTF-8... /usr/sbin/locale-gen: line 238:  1971 Killed                  localedef $no_archive --magic=$GLIBC_MAGIC -i $input -c -f $charset $locale_alias $locale
failed
  en_GB.UTF-8... done
  en_HK.UTF-8... done
  ...
This is what happens on one of my hosts, there are not that many services running on this host and for some reason the right process gets killed. After turning overcommit off:
Generating locales...
  en_AU.UTF-8... up-to-date
  en_BW.UTF-8... up-to-date
  en_CA.UTF-8... up-to-date
  en_DK.UTF-8... done
  en_GB.UTF-8... done
  en_HK.UTF-8... done
  ...
Apparently locale generation is one of the things that is capable handling memory as it's supposed to be handled. So how do you turn off overcommit? Sysctl is the way! Easiest way is to add the following to /etc/sysctl.conf and running "/etc/init.d/procps.sh force-reload":
vm.overcommit_ratio = 100
vm.overcommit_memory = 2
The second line is the magic line which turns off overcommit. Insanely enough the other options are 0 (Default) and 1 (Always overcommit), which just doesn't make any sense. If the default is to do overcommit why would I want to set it to always overcommit. The first line defines the maximum amount of memory a program can allocate. This is explained better on a post on fedora-devel. Even with these changes, overcommit isn't completely disabled, but things are a lot better. While overcommit is built because it makes sense, it doesn't work. Lets hope things get even better in the future. Update: Arthur de Jong pointed out that in certain situations overcommit is needed, like when there is a large application running on a server that prevents further memory allocations (thus disabling remote access and so on). That is true, I'm not trying to say that overcommit isn't useful in some cases. I'm just saying that it's just a disaster waiting to happen, unless you have finetuned the environment just right.

Craig Sanders: Introduction to Linux Signals 101

or ^C doesn’t kill processes, SIGINT does On the LUV mailing list recently, the perils of tty handling when booting with “init=/bin/bash” came up, and somebody asked why running ‘ping’ (without remembering to run stty or openvt first) will result in you having to reboot. i.e. “why doesn’t ^C work in emergency mode”? I wrote a fairly detailed, but comprehensible to a novice, answer and a friend suggested i should have written it as a blog post - which was the point of me setting up a blog in the first place. So here’s a slightly edited version of it: > Couldn’t you just open another console, run “top” and find the PID for
> ping and kill it? Or ps aux grep ping and kill it? Is a reboot the
> only way to kill a ping where ^C is not available? there’s nothing special about ^C except that by long convention it is mapped to the interrupt signal aka intr aka SIGINT. So, ^C itself doesn’t kill a program, the fact that it generates an interrupt signal does. If you’ve rebooted for emergency maintenance (e.g. “init=/bin/bash” on the LILO or GRUB command line) then all you get is ONE instance of /bin/bash. Nothing else is running and nothing else has been run (because you’ve overriden the usual init with /bin/bash). No setup has been done on the terminal, and no other virtual terminals have been opened. The emergency environment is minimal (and deliberately so - you asked for it, you got it). It’s up to you to do whatever is needed to set up the environment so that you can do the required maintenance/repair work. So if you run ping *before* remembering to set up the terminal (’stty sane’) then ^C doesn’t work because ^C doesn’t generate SIGINT so there’s no way of telling ping to quit, and if you haven’t opened another virtual terminal with openvt (aka “open” - it got renamed some time ago) then there is no other shell available to run top or ps or kill. BTW, it’s not just ping. You’ll see the same problem in the same environment with ANY program that runs continuously until it gets a signal to terminate it. ping’s just the most obvious and common example. Most programs, especially simple programs like ping, don’t have a ^C handler. They don’t need one. They have a signal handler which, amongst other things, handles SIGINT however it’s generated - it can be generated by pressing ^C in a normal tty environment, or by sending the program a SIGINT (e.g. “kill -2″). That, BTW, is a core difference between a SIGTERM (just plain ‘kill’ or ‘kill -15′) and SIGKILL (’kill -9′). SIGTERM is usually handled by the program by setting up a signal handler for it, and it voluntarily terminates when it receives the signal (usually cleaning up, closing files, etc before it does so). If the program hasn’t set up a handler for SIGTERM then the default action is to just terminate. A program can set up a handler which does nothing on SIGTERM, which effectively just ignores the signal. SIGKILL is handled by the kernel and it just kills the process immediately - it can not be blocked or intercepted by the program. (By common convention, SIGHUP or ‘kill -1′ tells a long running daemon process to just reload it’s config files. It’s also generated when the tty that the program is running on is terminated - e.g. you log out or the modem hangs up or the ssh session dies, hence the name “HUP” aka “HANGUP”. That’s why you need to use something like nohup or screen if you want a program to continue running after you log out) In a way, ‘kill’ is a bit of a misnomer. It’s actually a generic tool for sending signals to running processes, but the default action for most of those signals is to terminate the program. Here’s a list of the signals which can be sent.
$ kill -l
 1) SIGHUP	 2) SIGINT	 3) SIGQUIT	 4) SIGILL
 5) SIGTRAP	 6) SIGABRT	 7) SIGBUS	 8) SIGFPE
 9) SIGKILL	10) SIGUSR1	11) SIGSEGV	12) SIGUSR2
13) SIGPIPE	14) SIGALRM	15) SIGTERM	16) SIGSTKFLT
17) SIGCHLD	18) SIGCONT	19) SIGSTOP	20) SIGTSTP
21) SIGTTIN	22) SIGTTOU	23) SIGURG	24) SIGXCPU
25) SIGXFSZ	26) SIGVTALRM	27) SIGPROF	28) SIGWINCH
29) SIGIO	30) SIGPWR	31) SIGSYS	34) SIGRTMIN
35) SIGRTMIN+1	36) SIGRTMIN+2	37) SIGRTMIN+3	38) SIGRTMIN+4
39) SIGRTMIN+5	40) SIGRTMIN+6	41) SIGRTMIN+7	42) SIGRTMIN+8
43) SIGRTMIN+9	44) SIGRTMIN+10	45) SIGRTMIN+11	46) SIGRTMIN+12
47) SIGRTMIN+13	48) SIGRTMIN+14	49) SIGRTMIN+15	50) SIGRTMAX-14
51) SIGRTMAX-13	52) SIGRTMAX-12	53) SIGRTMAX-11	54) SIGRTMAX-10
55) SIGRTMAX-9	56) SIGRTMAX-8	57) SIGRTMAX-7	58) SIGRTMAX-6
59) SIGRTMAX-5	60) SIGRTMAX-4	61) SIGRTMAX-3	62) SIGRTMAX-2
63) SIGRTMAX-1	64) SIGRTMAX
See the man pages for init(8), kill(1), and especially signal(7) for more info on this topic. Syndicated from Craig Sanders' Errata: Tech Notes and Miscellaneous Thoughts Introduction to Linux Signals 101

Next.

Previous.