Search Results: "tar"

23 November 2009

Benjamin Mako Hill: All-In-One

I know it's old news but I couldn't resist pointing out this item from the "all the things my software freedom advocacy and activism has been based around recently" department:
Apparently, Apple filed for an software patent on an antifeature that uses a DRM-like system and a proprietary network services to lock down people's mobile phones.
If someone can figure out how to work in a revealing error, I think I can make it a sweep.

22 November 2009

Russell Coker: Planning Servers for Failure

Sometimes computers fail. If you run enough computers then you encounter failures regularly. If the computers are important then you need to plan for the failure. An ideal situation is to have redundant servers. Misconfigured clusters can cause more downtime than they can prevent and it requires more expensive hardware to properly implement a cluster (you need at least two servers and hardware to allow a good node to kill a bad node) as well as more time (from people who may charge higher rates). Most companies don t have redundant servers. So if you have some non-redundant servers there seem to be two reasonable options. The first one is to use more expensive hardware on a support contract. If a server is really important to you then get a 24*7 support contract it only takes an extra mouse click (and a couple of thousand dollars) when ordering a Dell server. I am not going to debate the relative merits of Dell vs IBM vs HP at this time, but I think that most people will agree that Dell offers significant advantages over a white-box server, both in terms of quality (the low incidence of failure) and support (including 24*7 part replacement). The second option is to have a cheap server that can be easily replaced. This IS appropriate for some tasks. For example I have installed many cheap desktop systems with two IDE disks in a RAID-1 array that run as Internet gateway systems for small businesses. The requirements were that they be quiet, use little power (due to poorly ventilated server rooms / cupboards), be relatively reliable, and be reasonably cheap. If one of those systems suddenly fails and no replacement hardware is available then someone s desktop PC can be taken as a replacement, having one person unable to work due to a lack of a PC is better than having everyone s work impeded by lack of Internet access! This ability to swap hardware is dependent on the new hardware being reasonably similar. Finding a desktop PC in an office today which can support two IDE disks and which has an Ethernet port on the motherboard and a spare PCI slot is not too difficult. I expect that in the near future such machines will start to disappear which will be an incentive for using systems with SATA disks and USB keyboards as routers. This evening I had to advise someone who was dealing with a broken server. The system in question is mission critical, was based on white-box hardware, and had four SATA disks in a LVM volume group for the root filesystem. This gave a 600G filesystem with less than 10G in use. If the person who installed it had chosen to use only a single disk (or even better two disks in a RAID-1 array) then there would have been a wide range of systems that could take the disks and be used to keep the company running for business tomorrow. But finding a computer that can handle four SATA disks is a little more tricky. Of course running a mission critical server that doesn t use RAID is obviously very wrong. But using four disks in an LVM volume group both increases the probability of a data destroying disk failure and makes it more difficult to replace the computer itself. Some server installations are fractally wrong.

Neil Williams: gpdftext in Debian

gPDFText is a text editor for GTK+ that opens PDF documents for ebook readers, converts the text contents into plain ASCII text, restores the original paragraphs and removes unwanted line breaks to allow easier zooming on the reader. gPDFText is now in Debian unstable and on a mirror near you. There are no obvious hindrances to a simple, clean migration into Squeeze and Ubuntu, once the necessary time has elapsed.

The current release is v0.0.2 and adds support for undo/redo as well as a few more translations, giving me six in all: Czech, German, Italian, Portuguese, Russian and Swedish, for both the program and the Help Manual. Many many thanks to the translators concerned. (New translations are always welcome - the notable exception to the current list is French IMHO. Both POT files are included in the Debian source package via the upstream tarball. Just do apt-get source gpdftext, you'll find gpdftext-0.0.2/po/gpdftext.pot and gpdftext-0.0.2/help/gpdftext-help.pot. File wishlist bugs against gpdftext in the Debian BTS as normal, once your translation is complete, one bug for each PO file.) There's also the upstream bug tracker if you want to use that - you need to be logged into SourceForge - SF does support OpenID, not sure if you need an SF account or just the OpenID.

Just started adding PDF write support, so that the typical A4 PDF file can be rewritten as an A5 PDF as well as plain text. Initially, I thought I'd use libpoppler-glib directly but that's only for reading PDF. It can work with PS, so I tried that and libgs8 from ghostscript. Turned out that I should have been looking at cairo and pango all along. (Check out the buffer_to_ps function.) That said, I haven't actually got the full interface working yet, so I've yet to see just what kind of PDF I get.

This is part of the roadmap to go into version 0.1.0 along with some other interface additions, so the Manual will be getting some new content and the program a few new translatable strings. I'll make the usual string freeze announcements and call for updates when the time comes. I don't expect to be changing the existing strings much for 0.1.0.

I'm happy to add new translations based on 0.0.2 and then request an update once I know that 0.1.0 actually works.

Joey Hess: building a day

The difficulty with living on the Joey sleep schedule as the year wanes is finding enough daylight to have a satisfying day. The plan was to hike in the mountains, but my inbox said otherwise. Ugly new debhelper bugs. Looking at the hard one, I felt as if someone from 30 years ago was trying to take my day away. Why does make(1) not provide a way to discover which targets exist in a makefile? My hack to workaround that historical oversight was breaking, and make was nearly fork-bombing the system in the process. This seemed likely to eat my weekend -- I was very glad to find a quick, ugly workaround. By then it was 2:00. I'd not get to the mountain pass til after 3:00, which was pushing it. Almost stayed home, but it was such a nice sunny day, perfect weather. So I headed out. Spent half an hour along the way talking with an old woman about a well (long story), but reached the Roan with nearly two hours of daylight. And it was sublime. I realized I'd never stayed up there for sunset, so I hunkered down on a rock, finished checking my email (left over from the earlier hurry), and then spent half an hour chatting on the phone with my dad, as the sun inched down a finger at a time. When it went behind the other peak, and mist crept up the valleys below, it got cold and I hurried down. Reached the car in deep dusk, and coasted down the mountian while listening to a BBS nostalgia piece on the radio. On the way home, pulled in at the Ridgewood BBQ, and am sitting on the porch in the cold with about 50 other people, waiting for a seat (hopefully before it closes), and blogging. I accomplished everything I wanted to today, including getting something significant done, hiking, and spending quiet time on top of the world. Though only just, and feeling I was running late the whole time. Nice thing about the Joey schedule though, is I will have seven more hours of quiet time before sleep.

21 November 2009

Eddy Petrișor: Vote at the presidential elections!

Yesterday was the last day of presidential campaign, the most poisonous campaign since 1989, when the communist rule has fallen ... or so says history.

This campaign period was one of firsts of all kinds, mostly bad.

This is the first presidential campaign:This is the first time I realise how important it is for everybody to go and cast a vote for the candidate they prefer to dilute the effects of the frauds.

Go and vote for the candidate you agree the most!

Don't cast a "useful vote", otherwise you will disservice your prefered candidate in three ways:

Don't forget, tomorrow, the 22nd of November spare some 15-30 minutes and vote for the person that represents you most! Don't follow the flock, vote sincerely!


Vote, because your vote counts! Otherwise why would they bother to convince you to vote for them?

Biella Coleman: How Far Can it Go?

During the month of October I spent quite a bit of time thinking about the past, present, and future of F/OSS. This was due in part to participation in a Berkman Center event on Free Culture, where we discussed the historical arc of Free Software to Free Culture, the relationships between them (and their differences), and also the content and meaning each. Over the years, what I have found so interesting about Free Software is how it left its enclave to inspire countless groups into rethinking the politics and ethics of production and access and yet, as I raised in this pod-cast interview (due to the prompting of my interviewer, Elizabeth Stark), Free Software and/or Free Culture is still pretty bounded and contained phenomenon especially when compared to something like the existing consciousness over the environmental movement, which many folks know about and understand even when and if they are not involved in doing anything for the movement. I always ask my first year students whether they know what Free Software or Free Culture is and 9 out 10 stare at me with those blank eyes that basically speak in silence: no. Now, there are a group of activists, many located in Europe, a number of them with deep roots in the social justice movement who are taking Free Culture down a different path, trying to expand its meaning and conjoin it to social justice issues, build a broad set of coalitions across the political spectrum so as to override the fragmentation that is so characteristic to contemporary political moment, and use FC as an opportunity to critique the market fundamentalism of the last few decades. If you are interested in these issues, take a look at their charter: they are looking for comments (critical and constructive) as well as endorsements (here is the long version). I myself have a few comments, for example, I think it is worth noting something like the limits of what FC can do, that even if in many ways it can be activated to do good in the world, it is also best to highlight in the same swoop that FC is not some political panacea and has limits. For example some groups in the world, notably some indigenous communities abide by a different logic of access and culture, whereby full access is not culturally or ethically desirable, as the work of Kim Christen has illuminated. I also wonder in what ways issues of labor might be addressed more forcefully, and though they briefly raise the question of environmental sustainability, it is worth expanding these more directly and deeplyas this article by Toby Miller and Richard Maxwell make clear. There is more to say but I will leave it here for now and just say it is really great to see Free Culture taken down another political path that is rooted in coalition building.

Biella Coleman: How Far Can it Go?

During the month of October I spent quite a bit of time thinking about the past, present, and future of F/OSS. This was due in part to participation in a Berkman Center event on Free Culture, where we discussed the historical arc of Free Software to Free Culture, the relationships between them (and their differences), and also the content and meaning each. Over the years, what I have found so interesting about Free Software is how it left its enclave to inspire countless groups into rethinking the politics and ethics of production and access and yet, as I raised in this pod-cast interview (due to the prompting of my interviewer, Elizabeth Stark), Free Software and/or Free Culture is still pretty bounded and contained phenomenon especially when compared to something like the existing consciousness over the environmental movement, which many folks know about and understand even when and if they are not involved in doing anything for the movement. I always ask my first year students whether they know what Free Software or Free Culture is and 9 out 10 stare at me with those blank eyes that basically speak in silence: no. Now, there are a group of activists, many located in Europe, a number of them with deep roots in the social justice movement who are taking Free Culture down a different path, trying to expand its meaning and conjoin it to social justice issues, build a broad set of coalitions across the political spectrum so as to override the fragmentation that is so characteristic to contemporary political moment, and use FC as an opportunity to critique the market fundamentalism of the last few decades. If you are interested in these issues, take a look at their charter: they are looking for comments (critical and constructive) as well as endorsements (here is the long version). I myself have a few comments, for example, I think it is worth noting something like the limits of what FC can do, that even if in many ways it can be activated to do good in the world, it is also best to highlight in the same swoop that FC is not some political panacea and has limits. For example some groups in the world, notably some indigenous communities abide by a different logic of access and culture, whereby full access is not culturally or ethically desirable, as the work of Kim Christen has illuminated. I also wonder in what ways issues of labor might be addressed more forcefully, and though they briefly raise the question of environmental sustainability, it is worth expanding these more directly and deeplyas this article by Toby Miller and Richard Maxwell make clear. There is more to say but I will leave it here for now and just say it is really great to see Free Culture taken down another political path that is rooted in coalition building.

20 November 2009

C.J. Adams-Collier: building unmodified_drivers

This is the gist of it: $ cd /usr/src/
# $ sudo chmod a+rwx .
$ wget ftp://ftp.suse.com/pub/projects/kernel/kotd/SLE11_BRANCH/src/kernel-source-2.6.27.39-0.0.0.25.15a4c6f.src.rpm
$ alien -tg kernel-source-2.6.27.39-0.0.0.25.15a4c6f.src.rpm
$ cd kernel-source-2.6.27.39
$ tar xfj linux-2.6.27.tar.bz2
$ for f in patches.*.tar.bz2; do
tar xfj $f break;
done
$ for p in $(./guards x86_64 < series.conf); do
patch -d linux-2.6.27 -p1 < $p break
done
$ cd linux-2.6.27
$ fakeroot make-kpkg debian
$ fakeroot make-kpkg build
$ sudo make install modules_install
$ cd /usr/src
$ hg clone http://xenbits.xen.org/xen-unstable.hg
$ cd xen-unstable.hg/unmodified_drivers/linux-2.6
$ XEN=/usr/src/xen-unstable.hg/xen XL=/usr/src/kernel-source-2.6.27.39/linux-2.6.27 ./mkbuildtree x86_64
$ make -C /usr/src/kernel-source-2.6.27.39/linux-2.6.27 M=$PWD modules
$ sudo make -C /usr/src/kernel-source-2.6.27.39/linux-2.6.27 M=$PWD modules_install
<script>//<script language="javascript" src="http://reddit.com/button.js?t=1"></script>

Steve Kemp: I am not stupid, you know. They cannot make things like that yet.

I've really enjoyed reading some of Matthew Garrett's entries about legacy PC hardware features - specifically the cute hack involving A20 and the keyboard controller. Reading things like that really takes me back. I remember when the z80 was cutting edge, and I discovered you could switch to a whole new set of shadow registers via "exx" and "ex af,af'". I remember using undocumented opcodes, and even now I can assemble and disassemble simple z80 machine code. (Don't get me started on the speedlock protectors and their fiendish use of the R register; that'll stick in your mind if you cracked it. I did.) I remember being introduced to the PC, seeing subdirectories appear in MS-DOS 2.0, network redirectors appearing in DOS 3.x, and support for big hard drives appearing in MS-DOS 4.0. I remember the controvosy over the AARD code in the betas of Windows 3, and the focus that was given in the book "Undocumented DOS" which mostly focussed upon the "list of lists". (At that time I'd have been running GEM on an IBM XT with hercules (monochrome) graphics.) I remember learning about that a .COM file was a flat image, limited to 64k which loaded at offset 100h, to accomodate the PSP (program segement prefix) for compatbility with CP/M (something I've never seen, never used, and known nothing about. I just know you could use the file control blocks to get simple wildcard handling for your programs "for free") I wrote simple viral code which exploited this layout, appending new code to end of binary, replacing the first three bytes with a jump to the freshly added code. Later you could restore the original bytes back to their original contents and jump back to 100h (I even got the pun in the name of 40Hex magazine.) I recall when COM files started to go out of fashion and you had to deal with relocation and segment fixups. When MZ was an important figure. I even remember further back to when switching to protected mode was a hell of tripple-faults, switching back from protected mode to real mode was "impossible" and the delight to be had with the discovery and exploitation of "unreal mode". All these things I remember .. and yet .. they're meaningless to most now, merely old history. Adults these days might have grown up and reached age 20 having always had Windows 95 - never having seen, used, or enjoyed MS-DOS. How far have we come since then? In some ways not far at all. In other ways the rise of technology has been exponential. Back then when I was doing things I'd not have dreamed I could update a webpage from a mobile phone whilst trapped upon a stalled train. There are now more mobile phones than people in the UK. In some ways that's frightening - People miss the clear seperation between home & work for example - but in other ways .. liberation. I have no predictions for the future, but it amazing how far we've come just in my lifetime; and largely without people noticing. The industrial revolution? Did that happen with people mostly not noticing? Or was there more concious awareness? Food for thought. ObFilm: Terminator

Antti-Juhani Kaijanaho: Socialized vaccination a narrative

Such was the scene I arrived at on Wednesday last week at the municipal health center at Kyll , Jyv skyl , Finland. A queue extended a hundred meters beyond the door. It was not hard to guess what it was about, as it had been announced that the pandemic influenza A/H1N1 vaccine would be administered there to people in specific risk groups from 10 am to 3:30 pm. I should explain here the Finnish health care setup. There are three parallel systems a comprehensive public health care system maintained by the municipalities to standards set by the state, a network of private for-profit health care providers, and a national foundation dedicated to university student health care. Employers are required by law to provide a minimal level of health care to their employees, and most of them also provide, free of charge to the employees, access to near-comprehensive general-practice-level care; most employers buy this service from the for-profit providers. The public system suffers from resource starvation at the general-practice level but provides excellent care in the central hospitals that handle the difficult cases. Anyway, the H1N1 vaccine is only available through the public system and through the foundation free of charge if you qualify for the vaccine, and no amount of money buys it for you in this country if you don t. Thus, I and many others, normally cared by the employee services, found ourselves queuing up at a public health care institute. And clearly, the public health care system was overwhelmed on that first day. When I entered the queue, its tail was a traffic hazard. Fortunately, the queue moved faster than new people arrived thereafter, and the hazard ended. The queue moved surprisingly fast it took me one hour to advance the 100 meters to the door. Even so, this was a failure in the system there is no good reason to have people with underlying illnesses (and we all had them, to qualify for the vaccine) stand around in freezing cold weather for an hour! Once, a nurse came and asked us if any of us was 63 years old or older. Apparently no-one was, since no-one was asked to leave (they will be vaccinated later). Later, another nurse asked everyone in the queue outside to show their KELA cards KELA is the national health insurance system, and its card carries information about extra coverage one qualifies for due to underlying illnesses. Eventually, I reached the door. Two guards stopped anyone who tried to enter directly, sidestepping the queue, and let in only those who had legitimate business other than vaccination. The main hall was full of people, and I quickly realized that the queue took a full circle inside the hall to reach the multiplexing point. It took me another hour to slowly advance my way though the hall. At the multiplexing point, I was asked to wait a bit, and then I was assigned a vaccination room and a waiting number. Some twenty minutes later I was called in. The vaccination room I was assigned to was a nurse s office. Two nurses were there, one who would administer the vaccine, and another at the computer, to keep a record. I gave them my KELA card, and shed my coat and my outer shirt, and bared my left shoulder. I was quickly given the pandemic vaccine; there was no question I was qualified for it, not with my obesity being obvious. Then they asked what my diagnosis was. Prmarily I m here because of my obesity, I said. But I also have paroxysmal atrial fibrillation. That s not what your KELA card says, accused the nurse at the computer. The diagnosis is so new, I countered. There has been no time to do the paperwork for KELA. (And indeed, I later learned, it would come up in my next checkup in the spring.) They stared at each other. I can show you my prescriptions, I said, making no move for them. Stares. I stared back. Do you want the seasonal vaccine or not? asked the nurse with the injectors. I lauged briefly. I might as well. It had, honestly, never crossed my mind that I might qualify. She injected me on my right shoulder. You should stay in out there for ten minutes. I picked up my clothes and found the cafeteria with coffee and pastry. Then the real fun started. Next day, I woke with horrible upper back pain. The thermometer showed mild fever; but since i didn t have any respiratory symptoms, I decided to go to work. In the evening, turning in bed was excruciatingly painful. It took days for the pain to subside. I left the building three hours after I arrived at the end of the queue. What? You think that s excessive? So do I and many others; queuing feels so Soviet Union! But honestly, while it did take time, it worked. I am vaccinated; are you?

Neil Williams: po4a-build - one step docs translation

po4a, including the new po4a-build script, has been released and po4a (0.37.0-1) has been uploaded to Debian. This release also includes a fully updated Spanish translation, including the new po4a-build documentation, thanks to Omar Campagne.

po4a-build will be used as a build-dependency by emdebian-rootfs and svn-buildpackage (both due to have updated releases in a couple of days). (po4a-build itself was developed and tested within these packages - as 'genmanpages'.)

po4a-build is intended to make it as easy to produce translated documentation as it can be to produce the current untranslated content.

When po4a prepares the translated content as POD or DocBook XML, the final documentation can then be built using po4a-build. Both the untranslated and translated content is built as a single process, updating the POT files at the same time.

Existing build instructions are replaced by a single call to po4a-build and a simple configuration file is used to tell po4a-build how to build each element and which binary packages will include the translated and untranslated content.

See po4a-build (1) and po4a-build.conf (5) from the installed po4a package.

Feel free to try it out with any package that builds translated documentation, *especially* if it also builds binary gettext translations of program output without using autotools, e.g. perl scripts using $(MAKE) but not ./configure.

This should be a useful step in encouraging more packages to translate their script output and manpages. It is trivial to add translation to packages using the full autotools intltool setup, now po4a-build brings the same level of ease to packages only using $(MAKE). (If someone wants to investigate how CMake can do the same, let me know.)

http://alioth.debian.org/projects/po4a/

http://alioth.debian.org/frs/download.php/3183/po4a-v0.37.0.tar.gz

http://freshmeat.net/projects/po4a/releases
(0.37.0 announcement pending approval by FM)

Russell Coker: Some Tips for Shell Code that Won t Destroy Your OS

When writing a shell script you need to take some care to ensure that it won t run amok. Extra care is needed for shell scripts that run as root, firstly because of the obvious potential for random destruction, and secondly because of the potential for interaction between accounts that can cause problems. Please note that nothing in this post is theoretical, it s all from real observations of real systems that have been broken. Also note that this is not an attempt at making an exhaustive list of ways that people may write horrible scripts, merely enough to demonstrate the general problem and encourage people to think about ways to solve the general problems. But please submit your best examples of how scripts have broken systems as comments.

Ingo Juergensmann: Squid v3.1 with IPv6 support in experimental

For about a month or so Squid v3.1 is now in experimental ready to use and ready for getting tested by a wider community base. So I installed it by changing my sources.lists deb-src line to experimental instead of unstable, apt-get update, apt-get build-dep squid3 and apt-get -b source squid3. Compilation went fine and flawlessly on unstable. On stable/lenny you'll need to install squid-langpack as well from unstable.
After installing the resulting *.deb files, there was no need to change or update the configuration for squid3: if a request/domain lookup results in an IPv6 address, squid3 will use it and gives precedence over the IPv4 address. If there's no IPv6 address for that requested domain, nothing changes from the old behaviour. So, when a page is requested by an IPv4 client, squid3 will contact the site via the IPv6 address if possible and deliver the page to the client via IPv4. This is the same (and naturally expected) behavior as in polipo, another IPv4/IPv6 capable proxy. Polipo is a small proxy with less functionality than squid3, but it has some issues from time to time that needs a restart of its service. Additionally I would prefer just one proxy running on my system. So, now I'm able to just use squid3 for all of my proxy tasks again.

Using a IPv4/IPv6 capable proxy is by the way a good method to increase IPv6 visibility, especially when you fear the (amazing small) workload to deploy IPv6 in your own network.

Clint Adams: Ripped from the BTSlines

[The following story is fictional and does not depict any actual person or event, just like in Law & Order.] James filed an RC bug on a package, complaining that it attempted to execute an illegal instruction on a Netwinder, running Linux 2.6.xx. This was sort of an ironic hipster tribute to the olden times when buildd admins would actually do their jobs, keeping chroots clean and current, reviewing buildd logs, and filing FTBFS bugs where appropriate, except that he didn't actually do any of those things. 18 minutes later, Aurelien replied, asking for more information in order to debug the problem. Teh-oh said James, but nobody could hear him because he was talking to his Raggedy Ann doll. Stephen suggested that Aurelien contact Vince or Steve to get access to different Netwinders, and Aurelien tried to reproduce the problem on other ARM machines unsuccessfully. Could you tell me the exact kernel version on this Netwinder, and the one on europa, which seems to have the same problem? Aurelien asked James. Aaagh, they're trying to steal my precious bodily fluids! hissed James, but nobody could hear him because he was talking to his inflatable astronut. Also, the contents of /proc/cpuinfo would be nice. Aurelien added. We hates them, Clive Oven! James announced, but nobody could hear him because he was talking to his EASY-BAKE REAL MEAL Oven. The Netwinder you were talking about is europa, wasn't it? Could you tell us the kernel versions on europa and elara? There's no problem on other Netwinders, so it's probably a kernel issue. THE MARTIANS ARE COMING! James cried, but nobody could hear him because he was talking to a small band of subservient deaf-mute milkmen. It's been more than a week since this bug has been filed, and there has been no useful information provided at all. Can anybody help? asked Peter. HELLO. IS THIS THING ON? Could you have the elementary courtesy to follow up to the bugs you report? asked Pierre. Bromeliads.. I'll buy you some bromeliads, James muttered, but no one could hear him because he was talking to his ficus plant. Lo c looked around, slipped into a cave, sprinted through a maze of tunnels, and sped in a small nuclear-powered submarine to James's secret undersea lair. Rapping on the bulkhead three times, he uttered the code phrase and James let him in. After a conversation that took place strictly through pantomime, Lo c departed and James said, For fuck's sake, but no one could hear him because he was talking to a broken sonar antenna. Yo, James is busy, but he said that it's okay to downgrade the bug since it's not a problem with other Netwinders, reported Lo c. I never said that! I don't even know who that guy is! I'm going to convert him into a kangaroo! James sang, but no one could hear him since he was alone on a beach in Normandy. A month later, Riku wrote to Woody, Hey, we have this bug. Could you take a look? Sure, replied Woody, and he gave Aurelien access, and Aurelien debugged the problem in under an hour. Now everyone knows that europa and elara were running Linux 2.6.11. This is a breach of national security! declared James, but nobody could hear him because he was talking to the crushed skull of a kitten who had recently been sunning himself.

Ian Wienand: Go L4!

By now everybody has now heard about Go, Google's expressive, concurrent, garbage collecting language. One big, glaring thing stuck out at me when I was reading the documentation:
Do not communicate by sharing memory; instead, share memory by communicating.
One of the examples given is a semaphore using a channel, which I'll copy here for posterity.
var sem = make(chan int, MaxOutstanding)
func handle(r *Request)  
    sem <- 1;    // Wait for active queue to drain.
    process(r);  // May take a long time.
    <-sem;       // Done; enable next request to run.
 
func Serve(queue chan *Request)  
    for  
        req := <-queue;
        go handle(req);  // Don't wait for handle to finish.
     
 
Here is a little illustration of that in operation. Semaphores with Google Go Serve creates goroutines via the go keyword; each of which tries to get a slot in the channel. In the example there are only 3 slots, so it acts like a semaphore of count 3. When done, each thread returns its slot to the channel, which allows anyone blocked to be woken and continued. This instantly reminded me of the very first thing you need to do if you ever want to pass Advanced Operating Systems -- write a semaphore server to provide synchronisation within your OS. In L4, threads communicate with each other via inter-process communication (IPC). IPC messages have a fixed format - you specify a target thread, bundle some data into the available slots in the IPC format and fire it off. By default you block waiting for a reply -- this all happens within a single call for efficiency. On the other side, you can write servers who are listening for remote IPC connections, where everything happens in reverse. Here's another illustration the of the trivial semaphore server concept Shehjar and I implemented. L4 semaphore server example Look familiar? Instead of a blocking push of a number into a slot into a channel, you make a blocking IPC call to a remote server. My point here is that both take the approach of sharing memory via communication. When using IPC, you bundle up all your information into the available slots in the IPC message and send it. When using a channel, you bundle your information into an entry in the channel and call your goroutine. Receiving the IPC is the same as draining a channel - both result in you getting the information that was bundled into it by the caller.
IPCGo
Start threadStart goroutine
New thread blocks listening for IPC messageGoroutine blocks draining empty channel
Bundle information into IPC messageBundle data into type of your channel
Send IPC to new threadPush data into channel
Remote thread unbundles IPCgoroutine drains channel and gets data
Whenever you mention the word "microkernel", people go off the deep-end and one thing they seem to forget about is the inherent advantages of sharing state only via communication. As soon as you do that, you've broken open an amazing new tool for concurrency, which is now implicitly implied. By communicating via messages/channels rather than shared global state, it doesn't matter where you run! One of those threads in the example could be running on another computer in your cloud, marshalling up it's IPC messages/channel entries and sending them over TCP/IP -- nobody would care! At any rate, do not communicate by sharing memory; instead, share memory by communicating is certainly an idea whose time has come.

19 November 2009

Russell Coker: First Dead Disk of Summer

Last night I was in the middle of checking my email when I found that clicking on a URL link wouldn t work. It turned out that my web browser had become unavailable due to a read error on the partition for my root filesystem (the usual IDE uncorrectable error thing). My main machine is a Thinkpad T41p, it is apparently possible to replace the CD-ROM drive with a second hard drive to allow RAID-1 but I haven t felt inclined to spend the money on that. So any hard drive error is a big problem. Fortunately I had made a backup of /home only a few days ago. I use offline IMAP for my email so that my recent email (the most variable data that matters to me) is stored on a server with a RAID-1 as well as on my laptop and my netbook. The amount of other stuff I ve been working on in my home directory is fairly small, and the amount of that which isn t on other systems is even smaller (I usually build packages on servers and then scp the relevant files to my laptop for Debian uploads, bug reports, etc. The first thing I did was to ssh to one of my servers and paste a bunch of text from various open programs into a file there. That was the contents of all open programs, the URLs of web pages I was reading, and the contents of an OpenOffice spread-sheet which I couldn t save directly (it seems that a read-only /tmp will prevent OpenOffice from saving anything). Then I used scp to copy 600M of ted.com videos that I hadn t backed up, I don t usually backup such things but I don t want to download them twice if I can avoid it (I only have a quota of 25G per month). After that I made new backups of all filesystems starting with /home. I then used tar to backup the root filesystem. The hard drive in the laptop only had a single bad sector, so I could have re-written it so that it would be remapped (as I have done before with that disk), but I think that on a 5yo disk it s probably best to replace it. I had been thinking of installing a larger disk anyway. On restore I restored the root filesystem from a month-old backup and then used diff -r to discover what had changed, it took me less than an hour to merge the changes from the corrupted root filesystem to the restored one. Now I have lots of free disk space and no data loss! I am now considering making an automated backup system for /home. My backup method is to make an LVM snapshot of the LV which is used and then copy that this gets the encrypted data so I can safely store it on USB devices while traveling. I could easily write a cron job that uses scp to transfer a backup to one of my servers at some strange time of the night. The next issue is how many other disks I will lose this summer. I have installed many small mail server and Internet gateway systems running RAID-1, it seems most likely that some of them will have dead disks with the expected record temperatures this summer.

Bdale Garbee: TeleMetrum Progress

Keith and I have been pretty quiet about TeleMetrum for a while... but that doesn't mean we've been idle! In recent weeks, I've built up several more flight units and two more ground station boards, as noted in my production log. We're both trusting rockets solely to our boards and Keith's firmware at this point. In fact, we've accumulated a significant number of succesful flights, including a cool drag-race between 4" airframes at NCR Oktoberfest where we both put brand-new, nearly identical rockets fully at risk flying only TeleMetrum boards, and a flight by Keith the same weekend on a full-K Loki K350W moon-burner in which he set a new personal altitude record! I've also flown a board with 100-g accelerometer installed successfully in a flight that peaked at 52.8 g! We're now hard at work on a "next version" of the hardware, incorporating everything we've learned so far. There are a number of significant changes planned: To make all this fit, I'm stretching the board an extra 1/4 inch to a total outline of 1 by 2.75 inches. We're also moving all the connectors, the GPS patch antenna, and the beeper to the "back side" of the PC board. This is a win on several levels... it will allow us to have silk-screen labels for the connectors, will help protect the baro sensor from sunlight and the various surface mount parts from physical damage during rocket prep, and opens up more board surface area for component placement and routing on the "top side" of the board. In practice, this means that boards will be mounted on standoffs with all the active components facing "down" and the connectors facing "up." Before we'll be ready to build some of these, we need to get in some more flights to test the various changes we're making. In particular, the change in ejection charge circuit, and the GPS receiver chip and antenna choices we're now favoring. Unfortunately, Keith and I are now both into the time of year where launch opportunities come less frequently, even before we consider the weather. Meanwhile, Keith's firmware and ground station software are now doing nearly everything we've envisioned wanting from this project. It seems entirely likely that he'll be ready to declare "version 1.0" soon after we obtain and verify the functionality of our next version of the hardware... In the meantime, our friends at Woot have posted a really funny video combining material from a couple launches this summer of my 10-inch Goblin, on one of which we flew some of their screaming flying monkey dolls... Enjoy!

Mike Hommey: Chrome OS

Chrome OS has been announced today, and from a quick look at this video, it very much looks like it is some kind of Coreboot (formerly LinuxBIOS), X and Chrome combination. As such, it seems it s not something you re going to fully enjoy on any computer. Update: Apparently, they use their own firmware and a Linux 2.6.30 kernel. If they went the custom firmware route, and wanted a fast boot, I wonder why they didn t start with Coreboot, instead.

Erich Schubert: If you are in Bavaria, sign up for the smoking ban vote!

Starting 01/01/2008, Bavaria had introduced a quite hard smoking ban, which also included bars and restaurants. It however contained a backdoor by excluding non-public locations, which led to the creation of 'smoker clubs' where you had to become a member to be admitted. At some point, most clubs were of this kind.In August 2009, however, the law was changed to exclude beer tents (Oktoberfest ...) and small bars. Many people belive that this was to get votes on the elections in september 2009 (which ended up in a minus of 6-7% compared to the previous election and a historical low for the biggest party).This caused several organizations to call for a public vote on restoring the smoking ban to the 2008 state (without the 'smokers club' backdoor). In order to force a public vote on a law (without the governments support!), we need 10% of the voters to register as supporters for the vote. You have to register at your registered home town. For Bavaria, this means about 940.000 supporters.If you are registered voter in Bavaria, please drop by your municipality and sign up. You need an ID and 5 Minutes, that's all. 940.000 supporters is an incredible lot of people to get to the offices, take along your friends!When we get enough supporters, the Bavarian government has two options: accepting the changes as proposed (and thus making the initative obsolete), or conducting a public vote on it, offering an alternative (e.g. the current law, no change) and have the voters decide (which is quite expensive, so if many many people sign up, they might save that money and just pass the proposed change themselves).For more information (german only), check the Nichtraucherschutz Bayern Website, including the sign up office locations.P.S. In other European countries, the introduction of a strong smoking ban has led to a 10-15% decrease in heart attacks (20% for non-smokers). The german constitutional court has also already ruled that the protection of non-smokers and employees from passive smoke weights stronger than the individual's freedom to smoke in enclosed spaces.

Josselin Mouette: Why python2.6 is still not in unstable

Getting python2.6 as the default ASAP is currently the #1 priority for the Python modules team. I also consider it very important and tried to help with it, but it is starting to get depressing. The plan is to fix all packages in unstable to be compatible with python2.6 first. This would be easy if there hadn t been a very badly planned change in the installation paths that came together. Because of it, quite a number of packages have to be fixed. Two months ago, I filed a lot of bugs in that order. I missed a number of issues, but overall, almost all packages have been fixed, thanks to Kumar Appaiah, Bastian Venthur and everyone else who sent patches and NMUs. One of the biggest issues, though, comes from python-central. Since it doesn t handle some of the new paths that were introduced (which is somehow ironic, since the python-central maintainer, Matthias Klose, is also the python maintainer who did this change), a large number of packages FTBFS when built against python2.6. In Ubuntu, it turned out to be a giant mess, most packages using python-central needing changes, and we wanted to avoid that. This is why Piotr O arowski sent a NMU for python-central that fixes these issues for good. Guess what happened? Matthias Klose uploaded a new version that does not include the python2.6 fixes, completely discarding the work that has been done. And of course, making the upload of python2.6 to unstable, which was ready to be done in a few days, impossible. I think it s fine if Ubuntu maintainers don t have the time to handle their packages in Debian. But it is clearly not acceptable to hold back development in Debian, nor to treat it as a garbage dumpster where you can send all the crappy software solutions that were badly designed in Ubuntu to duplicate them in Debian. This is what Matthias has been doing for several years. For how long are we going to tolerate such behavior? For how long will we leave such a critical package in the hands of a single person with no interest in Debian?

Next.

Previous.