"I was in the Woodcraft Folk for a while. They're like Scouts/Guides but more liberal and PC. I think I fit in quite well there..."
"I was in the Woodcraft Folk for a while. They're like Scouts/Guides but more liberal and PC. I think I fit in quite well there..."
I'm using
lapse:~# ip l dev eth0
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:0a:e4:30:43:16 brd ff:ff:ff:ff:ff:ff
# notice: not UP
lapse:~# rmmod e1000
lapse kernel: unregister_netdevice: waiting for eth0 to become free.
Usage count = 1
lapse kernel: unregister_netdevice: waiting for eth0 to become free.
Usage count = 1
[...]
# goes on forever, uninterruptible; thus new shell:
lapse:~# ps u -C rmmod
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 5624 0.0 0.0 1656 480 pts/2 D+ 00:02 0:00 rmmod e1000
As we all well know, state 'D' uninterruptible sleep means: reboot.
Especially since I cannot ssh into the box anymore (doh!), and su and
sudo just end up in state 'D' as well, if I try them.
So, on to reboot. Or wait, that doesn't work as the shutdown process will hang
long before the filesystems get unmounted. Great.
It's become impossible to argue that Linux is the more stable operating
system
Update: a few people responded with workarounds, ranging from use of
watchdog to automate the reboot (this
is my laptop, so it's not really necessary) to various combinations of flags
to /sbin/shutdown or the use of sysrq to force the system to reboot
without cleaning up or unmounting filesystems essentially the same as
pressing the reset button.
Ben Hutchings says:
I think this happens when the driver repeatedly attempts to fix an error condition and keeps scheduling future work (retaining a reference to the device) rather than giving up.I thus ended up filing a bug against the kernel.
Likely<typename T> whose instances hold either a
return value of type T or an exception. A function that
can fail has a specialisation of this template as its return type.
The caller can check for failure if it knows how to handle it, or it
can ignore it - in which case the conversion to T or the
destructor will throw the exception. This is clever but doesn't seem
to be entirely satisfactory. The destructor which throws does first
check that no exception is already being processed, avoiding collision
of the two exceptions and consequent abrupt termination of the
program, but this can result in errors being unexpectedly ignored.
Introduction to Component-Level Testing, John Lakos
A marathon 3-hour talk on designing and testing software,
particularly C++ programs (the subject of his well-known
book) as a set of well-defined components.
Lakos first defined these components as being "physical" i.e. sets
of source files - normally a header file defining an interface, an
implementation file, and a test driver file. They may also include
metadata for the build system. He talked about the value of reusable
components (as if this wasn't obvious!) and the risk of introducing
circular dependencies - which essentially turn many components into
one and reduce reusability - if we fail to keep track of dependencies.
Software built out of components can be viewed as a hierarchy or stack
defined by dependencies. In a large system, components with similar
dependencies and dependents can be grouped together into packages or
package groups to simplify a view of these dependencies.
He explained that the test driver's dependencies count just as much
as the implementation's, because we cannot reasonably test a component
until we have tested its dependencies. Test drivers should also be
written to avoid depending on environmental settings and
configuration, so far as possible.
Finally, and perhaps most importantly, he spent a long time talking
about how to construct test cases and test data. I might try to
summarise this in a later entry if anyone's interested.
The Appliance of Science: Things in Computer Science that every
practitioner should know, Andrei Alexandrescu
Andrei began by complaining that OpenOffice Impress was even worse
than PowerPoint, but being able to use Linux (specifically Ubuntu)
more than made up for the pain.
He briefly presented four key ideas that he believes programmers
should understand and be ready to make use of:
const
std::initializer_list<T> & and when constructed with
this new form of initialiser they will receive this wrapper for a
constant array of element values. For types that do not, the values
in the list are treated as arguments to some other constructor, if one
matches. Otherwise, for compatibility, this may be treated as
aggregate initialisation.
C++ Standard Library report, Alisdair Meredith
There was far too much information here for me to even begin
to summarise. Suffice to say there are lots of good things coming
bu the library committee will have its work cut out to get them
all properly specified in time for the Committe Draft coming late
this year.
"WinSCP deals with line endings properly, and is free software. It also has a NC-style interface, which I prefer to the Filezilla interface. http://www.winscp.net/"Thanks. I'll suggest that some users try WinSCP instead of Filezilla. Ben Hutchings commented:
"Version 4 of SFTP introduced the SSH_FXF_TEXT open flag, but OpenSSH is still stuck at version 3."Why no version 4 in OpenSSH yet, then?
deb http://womble.decadent.org.uk/debian/ distribution/ deb-src http://womble.decadent.org.uk/debian/ distribution/(the repository is signed with my personal GPG key).
/proc/apm....reads various system statistics and updates RRD files...promising so far;
the statistics are very fine-grained since the files are updated every 10 seconds.Ack! The heisenberg principle will probably kick in a bit here, if the hard disk is going to spin up every 10 seconds.
"Pbuilder is great (and cowbuilder even more so). First of all, it makes setting up and upgrading chroots easier (even easier than dchroot etc.), but it will also handle dependencies and do install/removals (well, technically it won't remove stuff, the chroot is just thrown away afterwards). That way, pbuilder helps getting build dependencies right, and ensures the package is currently buildable (not with some library package you still happen to have on your system, but that has been removed from Debian; not uninstallable for some reason etc.). This makes the job easier for porters, since a FTBFS is less likely to be an error in packaging by the maintainer... At some point I had like 6 pbuilder chroots... woody, sarge, unstable, woody with some backports, sarge with SELinux backports, unstable with experimental. Sure, we don't need debhelper either? After all, it just does some cp and mvs, doesn't it? There IS some benefit in having stuff automatized in a standard way; even though we could all do our chroots ourselves, I want to express my thanks to the pbuilder (and cowbuilder) authors and maintainers for making life EASIER for me. A lot easier. I could live without, but I would probably not keep that many chroots."Ken Bloom added:
"One important feature of a pbuilder chroot is that pbuilder installs build-dependencies as you ask it to build debian packages, and removes them as soon as it finishes building the packages. In this sense, pbuilder is specifically intended to replicate the buildd environment, so you can find out whether your packages will break on a buildd (e.g. whether you've remembered to include all of the build-deps in debian/control, because things will break on the buildds if you forgot to add a build-dep because the build-dep was just lying around on your system (or in your unstable chroot)."Sven M ller wrote:
"Well, pbuilder has several benefits, but the most important one to me is that it restarts from a clean system (only base packages + build-essentials installed) on each build. Sure this adds to the time needed for the build, but it also makes sure that I get all build-deps right and that the whole build process is as reproducible as possible."Ben Hutchings commented:
"The major difference between pbuilder's approach and simply building in a chroot'ed installation is that pbuilder tries to build on a minimal system plus the specified build-dependencies. If you always build with pbuilder or similar it's much less likely that you will miss a build-dependency or otherwise produce a package that can't be auto-built elsewhere."I take the clean chroot point as a clear benefit, but it still strikes me that there are easier ways to do the same thing (rsync --delete) without all the waiting around for pbuilder on my slow mipsel. I guess that's the difference with debhelper: debhelper use doesn't seem to slow me down.
Next.