December is a bad month for Linux system administration

The system load for Linux is an indication of how busy the system is, and how long you are going to wait to get something done.  When the load is 0.0, that means that the system is ready to do whatever you want immediately.  If the load is 0.50, then half of the time, the system is busy with something else.  If the load is 1.00, the system is doing as much as it can.  If the load is higher than 1, then that’s an indication of the backlog of the amount of tasks the system has to do.  When the system load is 3.14, that means that there is a backlog of things being done, such that there are always π things before your thing.  When the load hits 10, you have trouble.  When the load hits 59, you have serious trouble.  When the load hits 272, something is horribly broken, and the system is not going to recover by itself.

The thing that loads a system is competition for some scarce resource, e.g:

  • CPU time: if you have one CPU in your system, it can only do so much.  If you have 16 CPU’s they can only do 16 times as much as that.  There’s a limit.
  • Disk time: the electronic highway that relays data to and from your disks is only so wide, and you can only go so fast on it.  If the highway is full, then queries must wait in line.  If you need data from the disk, there’s nothing to do but wait.
  • Memory: a computer has only so much memory to do its tasks.  If it runs out of memory, then it has to either stop doing some things, or it has to use slower memory (disk access).

If you care whether your systems are working or not, you monitor the load, and if something goes beep, you have a look. You start like this:

root@dogmatix [~]# uptime
07:55:05 up 23 days, 15:36,  1 user,  load average: 1.05, 2.57, 2.85

That says that for the last 10 minutes, the load has been 2.85, and for the last 1 minute it’s been 1.05. This is not a serious situation. I found another one:

root@kiarapoint [~]# uptime
 16:57:23 up 22 days, 21:42,  1 user,  load average: 66.27, 56.02, 36.21

Okay, that’s pretty bad. 66.27 times as many things to do as we can actually do in a minute. Not cool. Next step is to run vmstat:

root@kiarapoint [~]# vmstat 3 10
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 2 10   3652 104448 1770072 9313432    0    0     8    63    5    4  8  1 84  8  0
 0  4   3652 115168 1770076 9313420    0    0     0    35 1071  476 11  1 18 70  0
 1  5   3652 137784 1770076 9313428    0    0     0    63 1086  670 12  1 36 51  0
 0  5   3652 154716 1770076 9313428    0    0     0    40 1057  402  8  1 31 60  0
 0  5   3652 346420 1770076 9313320    0    0     0     0 1075  529 10  2 22 66  0
 0  6   3652 346880 1770076 9313148    0    0     0    28 1047  259  1  0 11 88  0
 0  6   3652 346624 1770076 9313148    0    0     1     0 1036  315  5  1  0 94  0
 0  6   3652 346168 1770076 9313180    0    0     8   240 1069  173  0  0  0 99  0
 0  6   3652 343216 1770076 9313180    0    0     0    23 1079  304  1  1  0 99  0
 0  6   3652 343832 1770076 9313180    0    0     0    23 1022   86  0  0  0 100  0

If you examine that carefully, you’ll notice that it makes no sense at all. This is in part because the columns don’t line up. This should be better:

procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 2 10   3652 104448 1770072          0    0     8    63    5    4  8  1 84  8  0
 0  4   3652 115168 1770076          0    0     0    35 1071  476 11  1 18 70  0
 1  5   3652 137784 1770076          0    0     0    63 1086  670 12  1 36 51  0
 0  5   3652 154716 1770076          0    0     0    40 1057  402  8  1 31 60  0
 0  5   3652 346420 1770076          0    0     0     0 1075  529 10  2 22 66  0
 0  6   3652 346880 1770076          0    0     0    28 1047  259  1  0 11 88  0
 0  6   3652 346624 1770076          0    0     1     0 1036  315  5  1  0 94  0
 0  6   3652 346168 1770076          0    0     8   240 1069  173  0  0  0 99  0
 0  6   3652 343216 1770076          0    0     0    23 1079  304  1  1  0 99  0
 0  6   3652 343832 1770076          0    0     0    23 1022   86  0  0  0 100 0

That’s better. The columns of interest here are:

  • b — blocked processes (not running) — there are around 6 processes waiting for the disk
  • bi and bo — buffers in and buffers out — this is the actual disk throughput in something like kilobytes per second
  • wa — waiting percentage — well, we’re mostly waiting because we’re waiting for disk.

So this machine is running slow because its disk can only do so much. It’s busy writing out around 1000 blocks per second, which is roughly 8Mbps towards the disk. For this system, that does not indicate a disk performance problem, so we’re just pushing too hard.

Now, we do this — get a list of the processes, and see which ones are in “Disk-wait” state, identified as D preceeded by a space — hence the grep ' D' in the command below:

root@kiarapoint [~]# ps uaxwf | grep ' D'
root       357  0.0  0.0      0     0 ?        D    Nov19   4:20  \_ [pdflush]
root       573  0.0  0.0      0     0 ?        D<   Nov19  13:45  \_ [kjournald]
root     32748  0.0  0.0  61248   756 pts/0    S+   16:58   0:00          \_ grep --color=auto  D
nobody   24458  0.0  0.0  88536 14772 ?        S    Dec06   0:00  \_ /usr/local/apache/bin/httpd -k start -DSSL
mailnull 32444  0.0  0.0  67568  2696 ?        DN   16:55   0:00  |   |   \_ /usr/sbin/sendmail -t -i
nobody   32514  0.0  0.0  88944 14756 ?        D    16:56   0:00  \_ /usr/local/apache/bin/httpd -k start -DSSL
mailnull 31948  0.0  0.0 124048  4800 ?        D    16:50   0:00  |   \_ /usr/sbin/sendmail -FCronDaemon -i -odi -oem -oi -t
root      7620  0.0  0.0  44912  1004 ?        Ss   Dec08   0:00      \_ (ncsa_auth) /etc/squid/passwd
root      7624  0.0  0.0  44912  1004 ?        Ss   Dec08   0:00      \_ (ncsa_auth) /etc/squid/passwd
root      7625  0.0  0.0  44912  1000 ?        Ss   Dec08   0:00      \_ (ncsa_auth) /etc/squid/passwd
root      7626  0.0  0.0  44912  1004 ?        Ss   Dec08   0:00      \_ (ncsa_auth) /etc/squid/passwd
root      7627  0.0  0.0  44912  1000 ?        Ss   Dec08   0:00      \_ (ncsa_auth) /etc/squid/passwd

HOWEVER it is December. December, the only month in the year to have the bad taste to start with D. We have processes that have been running for a few days, which started in December. So, for the entire month, we cannot do this:

ps uaxwf | grep ' D'

but have to do this instead:

ps uaxwf | grep ' D[^e]'

Aargh! Bracket, shift, 6, release shift, e, bracket … Aaaaarrrgh! The injury!

Posted in Stuff | Tagged , , , , , , | Comments Off on December is a bad month for Linux system administration

On Bitcoin

There’s gold in them thair fort

Currencies are based on a scarce and desirable commodity, and as such, can be traded for any goods and services.  Where does this leave Bitcoin – what is the commodity it uses?  Why would anyone want it?

Your currency options at the moment are:

  • Gold and silver – the global supply of these is limited by mining and the effects of hoarding.  Everyone wants gold and silver that they can hoard it.
  • Gold backed national currencies – one upon a time, the dollars in circulation were worth all the gold in Fort Knox.  If you wanted the gold, having a dollar was just as good.
  • Unbacked national currencies – the scarcity of these currencies is artificially created by the reserve bank and the creative efforts of the mint.  The desirability of an unbacked national currency is that it is required to perform meaningful commerce within the country, and other means of exchange are prohibited.
  • Private currencies: if you trust your bank or crime boss, sure.
  • Weird mathematical currencies: Bitcoin.

Unfortunately, much as gold is the real deal, it takes some skill to check its authenticity – a nice dense titanium/osmium mix coated with real gold is relatively cheap, but pretty expensive to distinguish from the real real thing without trying to bend it (titanium is too hard). For practical reasons, it is simpler to trade in something representing the thing than in the thing itself.

That leads us to gold backed currencies, but there’s a problem there too.  The United States scuttled the gold standard when they defaulted on the loans they had run up for the 2nd world war.  Instead of repaying the loans in real money (as promised in writing), they invented currency devaluation, and repaid the loans in what we have now as the US Dollar.  Ever since then they have been printing the things, without adding significantly to the gold in Fort Knox.  (Which brings us to the 2013 fiscal crisis.)

And this brings us to Bitcoin.  The supply of Bitcoin is limited by ever-increasingly complex mathematical problems.  What is the limited commodity that it supplies?  It is the answer to a complex mathematical question.  However, do you want the answer to this complex mathematical question?  No.  Now that’s a problem.

There is something though, which Bitcoin promises, which gold and national currencies do not:

  • truth – the truth about the amount of currency in circulation.
  • freedom – freedom from artificial manipulation.  Governments do not print Bitcoin.  They cannot, because it is hard.

So, do you trust mathematics and your computer more than you trust your government?  You shouldn’t.  Which do you prefer?  Random thefts by clever hackers that have their long fingers in your computer, or systematic and organised appropriation of everything that is yours by government?  Governments should be more trustworthy than random hackers and complex algorithms.  Sadly, this is still an open question.

To ฿ or not to ฿.  That is the question.

A word of advice:

Do not lay up for yourselves treasures on earth, where moth and rust destroy and where thieves break in and steal, but lay up for yourselves treasures in heaven, where neither moth nor rust destroys and where thieves do not break in and steal.

(Actually ฿ is the symbol for the Thai Bhat.)

Posted in Stuff | Tagged , , , , , | Comments Off on On Bitcoin

Indecisive justice is indecisive

What are you indecisive about?It has taken 10 years and 7 months for the honourable Eben Jordaan to reach a conclusion in the trial of the right wing “boeremag”. 10 years. What was so complex and difficult in this trial that it could not be addressed in a week?  Too many accused – there were an amazing 19 defendants?  That is not as many as the Nuremburg trials though, which took under a year for some 200 defendants.  What was it then?  Flip, it must be something – it took 10 years for crying out loud.  Nobody knows.

Actually, nobody cares any more.  The sheer absurd duration of this trial gives weight to the protestations of the accused that the court has no jurisdiction over them, and also gives weight to all their other ridiculous and bizarre arguments. Clearly those arguments must have merit if they managed to tie up the state’s attention for 10 years while they try to establish that they are guilty of the charges put to them.

Apparently, says the honourable Eben Jordaan, they are.  Whoopee yay.  It took 10 years.  They must be bad.  In fact, they must be so badly bad that they are actually bad bad.  We know, because it took 10 years to get to the point.

When someone is guilty it is a simple matter of the facts, the testimony and the clear arguments presented by the prosecution (not rebutted by the defence) that establish guilt.  To take 10 years to get to the point means that the point is not the point.  The real point is something to do with the payment of lawyers for their invaluable services, the accumulation of mountains of boxes of paperwork full of finely crafted prose and presumably the great difficulties of scheduling play dates for all the great legal minds when all of their mommies can simultaneously spare them for court.  10 years.  Hell, what’s that about?

By way of comparison, and speaking of hell, this is how the final judgement is scheduled to go down:

When the Son of Man comes in his glory, and all the angels with him, he will sit on his throne in heavenly glory. All the nations will be gathered before him, and he will separate the people one from another as a shepherd separates the sheep from the goats. He will put the sheep on his right and the goats on his left.  Then the King will say to those on his right, ‘Come, you who are blessed by my Father; take your inheritance, the kingdom prepared for you since the creation of the world. For I was hungry and you gave me something to eat, I was thirsty and you gave me something to drink, I was a stranger and you invited me in, I needed clothes and you clothed me, I was sick and you looked after me, I was in prison and you came to visit me.’ Then the righteous will answer him, ‘Lord, when did we see you hungry and feed you, or thirsty and give you something to drink? When did we see you a stranger and invite you in, or needing clothes and clothe you? When did we see you sick or in prison and go to visit you?’ The King will reply, ‘I tell you the truth, whatever you did for one of the least of these brothers of mine, you did for me.’

Then he will say to those on his left, ‘Depart from me, you who are cursed, into the eternal fire prepared for the devil and his angels. For I was hungry and you gave me nothing to eat, I was thirsty and you gave me nothing to drink, I was a stranger and you did not invite me in, I needed clothes and you did not clothe me, I was sick and in prison and you did not look after me.’ They also will answer, ‘Lord, when did we see you hungry or thirsty or a stranger or needing clothes or sick or in prison, and did not help you?’ He will reply, ‘I tell you the truth, whatever you did not do for one of the least of these, you did not do for me.’ Then they will go away to eternal punishment, but the righteous to eternal life.

That is not indecisive.  It’s pretty straightforward – the relevant facts are extracted from the mass of evidence, and the judgement is given.

10 years.  It is despicable.

Posted in Stuff | Tagged , , , , , , , | Comments Off on Indecisive justice is indecisive

rlm_sql_mysql: MySQL error ‘Incorrect integer value: ” for column ‘XAscendDataRate’ at row 1

If you get this on your favourite radius server:

rlm_sql_mysql: MySQL error 'Incorrect integer value: '' for column 'XAscendDataRate' at row 1

it is probably because you have upgraded your FreeRadius with MySQL backend system from RHEL/CentOS 5 to RHEL/CentOS 6, and inherited an upgrade to MySQL 5.1.69 or so. This SQL used to work fine, but no longer does:

INSERT into radonline (
    AcctSessionId, AcctUniqueId, UserName, Realm, NASIPAddress, NASPortId, NASPortType,
    AcctStartTime, AcctSessionTime, AcctAuthentic, ConnectInfo_start, AcctInputOctets,
    AcctOutputOctets, CalledStationId, CallingStationId, ServiceType, FramedProtocol,
    FramedIPAddress, AcctStartDelay, XAscendSessionSvrKey, AcctInputGigawords,
    AcctOutputGigawords, XAscendDataRate,XAscendXmitRate, updated_at, created_at)
VALUES (
    '80b001b3', '37bfe3e37afa39dd', 'user124541@domain', 'somerealm', '196.0.1.60',
    '2159018419', 'Wireless-802.11', DATE_SUB('2013-09-13 09:39:34',INTERVAL (23403 + 238854) SECOND),
    '23403', '', '', '8', '7', 'RhodesPlace', 'FF:FF:FF:63:96:44', '', '',
    '196.22.61.243', '0', '', '0', '0',
    '',
    '',
    from_unixtime(1378819120), now());

The error is:

rlm_sql_mysql: MySQL error 'Incorrect integer value: '' for column 'XAscendDataRate' at row 1

This is because the XAscendDataRate is defined as

  `XAscendDataRate` bigint(32) DEFAULT NULL,

And '' is not really a valid integer. It never has been an integer.

However, this used to work. What has changed?

This newer version or package of mysql creates a file /usr/my.cnf (I kid you not) which says:

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

That means that if the engine wants to substitute something meaningful like NULL in the place of '' it must not. Comment out this line, restart mysqld, and the problem goes away. Strictly the SQL should be fixed to say NULL but this is automatically generated SQL, and I’m not in the mood.

You can see that mysql is willing to be friendly towards your NULL strings like this:

mysql> select @@sql_mode;
+------------+
| @@sql_mode |
+------------+
|            |
+------------+
1 row in set (0.00 sec)
Posted in Stuff | Tagged , , , , , , , , , | Comments Off on rlm_sql_mysql: MySQL error ‘Incorrect integer value: ” for column ‘XAscendDataRate’ at row 1

1977 was 136 years ago in radiator bug land

Radius is this thing that allows one system that manages network to tell another system that manages accounts and stuff how much stuff various people are using.  We get radius data from our upstream people about data and stuff moved.  This is cool.

Well, it was cool, but today (as many days previously) they sent us the following radius accounting packet – an interim update – that says that data and stuff happened in 1977 that we should be interested in:

Accounting-Request Id 114       192.168.21.135:54663 -> 192.168.18.2:1813       (3 packets)     +0.001
User-Name = "suepearson@realm"
X-Ascend-PreSession-Time = 2
X-Ascend-Connect-Progress = LAN-Session-Up
Acct-Input-Octets = 2520292297
X-Ascend-Session-Svr-Key = "835AE85C"
X-Ascend-Pre-Input-Octets = 86
Framed-IP-Address = 172.29.184.9
NAS-Port = 1466813801
X-Ascend-Pre-Output-Octets = 69
Service-Type = Framed
Acct-Authentic = RADIUS
Acct-Session-Time = 527348
NAS-Port-Id = "5/1/0/1001.102"
X-Ascend-Data-Rate = 215040000
Calling-Station-Id = "06914625488"
Acct-Status-Type = Interim-Update
Acct-Output-Gigawords = 2
NAS-IP-Address = 10.31.27.72
Event-Timestamp = "Jul 21 1977 10:19:42 SAST"
Acct-Input-Packets = 15266036
NAS-Port-Type = Ethernet
Acct-Delay-Time = 4294967295
X-Ascend-Xmit-Rate = 215040000
X-Ascend-Pre-Output-Packets = 5
Acct-Input-Gigawords = 1
Acct-Output-Octets = 540902857
Acct-Output-Packets = 16361715
Acct-Session-Id = "5/1/0/1002.102_33357671"
Framed-Protocol = PPP
X-Ascend-Pre-Input-Packets = 4

We received that at 2013-08-27 16:55:59 SAST, also known as 1377615359 in unixtime. (I did fudge this packet information to make it semi-anonymous, after radsniff -x printed it with wonderful details.)

According to the packet we received, our friendly upstream server sat on this packet for 136 years before sending it to us, which is interesting, considering that 21 July 1977 was only around 36 years ago. What?!

The first thing I noticed here, after the 1977 was that this attribute is WRONG:

Acct-Delay-Time = 4294967295

What is that? Well, it’s “-1”. It’s what you get when you interpret “-1” as an unsigned 32 bit integer as a 32 bit signed integer. The sign bit is interpreted as 231, and that with all the other bits add up to 232-1. It’s just mathematics, don’t sweat.

So, the system is trying to tell us that something that happened didn’t happen 1 second ago, but will happen one second in the future. This is just your classical non-causal system, nothing to see, please move along, because you don’t want to get caught up in that wormhole back to 1977. So I pondered this and got nowhere, until I wrote the numbers together …

Aha!  36 … 136 … notice something?  100 years!  So, how about this: the Acct-Delay-Time was converted to years, months, days, hours, minutes, and seconds, and the 136 years was truncated to 36 years.  36 years ago, it was 1977.

That’s the largest part of the mystery solved.

So the bug is compound:

  • A clock of something generates timestamps 1 second in the future
  • Acct-Delay-Time is calculated as the difference of timestamps between that clock and another clock, and that is suddenly negative, -1
  • That (signed) number is stored in a 32 bit field as a 32 bit unsigned integer, and becomes 4294967295
  • For the date calculation, the Acct-Delay-Time is converted to YY-MM-DD hh:mm:ss format which might have been okay, but the number is an insane value, so …
  • 100 years is chopped off, changing 136 years to 36 years
  • 2013 – 36 years = 1977. Ta dah!

I suspect this is a bug in radiator, although it might be in a java app that touches the data. If they had just stuck to unixtime, this y2k style bug would not have happened.

I hacked a script to do the more horrible parts of the maths, and it solved the mystery to within 8 minutes, printing out:

Tue Aug 27 17:37:54 ~ $ python x.py
4294967295 seconds in yyyy-mm-dd HH:MM:SS is 136-03-12 06:28:15
Local time less (evil-100years) = 1977-07-21 10:27:44

Here’s the script — rather hacked:

#! /usr/bin/python

import time

localtimestamp = 1377615359
t={}
eviltimestamp = 4294967295
remainder = eviltimestamp
month_days=(31,27,31,30,31,30,31,31,30,31,30,31)

t['yyyy'] = remainder/(365*86400)
remainder = remainder % (365*86400)
t['mm']=1
for days in month_days:
if remainder<86400*days: break
t['mm']+=1
remainder-=86400*days
t['dd']=(remainder/86400)
remainder=remainder % 86400

t['HH']=(remainder/3600)
remainder=remainder % 3600
t['MM']=(remainder/60)
remainder=remainder % 60
t['SS']=remainder

t['yy']=t['yyyy'] % 100
stamp = '%(yyyy)02d-%(mm)02d-%(dd)02d %(HH)02d:%(MM)02d:%(SS)02d' % t
print '%d seconds in yyyy-mm-dd HH:MM:SS is %s' % (eviltimestamp, stamp)
print 'Local time less (evil-100years) = '+\
   time.strftime('%Y-%m-%d %H:%M:%S', \
    time.localtime(localtimestamp- \ 
    (eviltimestamp-(100*365+24)*86400))); # 24 leap years per century ...

I feel like a little boy with a fist full of sand. Yeah!
Keep Calm
ps. Next year this bug will say 1978 …

Posted in Stuff | Tagged , , , , , , , , , | Comments Off on 1977 was 136 years ago in radiator bug land

ERROR 1305 (42000): FUNCTION eval does not exist

MySQL cluster – a wonderful idea.  It’s really nice: you have a front end, and multiple redundant back ends, and all the data is loaded into memory, so things go very fast, even queries that inefficiently scan vast squabs of data, all executing in parallel with failsafe redundancy.  Not only this, but you get to use words like “cluster” and “database” in one sentence, and it’s all very cool until you hit a limit:

  • You run out of space.
  • You have too many rows.
  • You have too many columns.
  • Too many concurrent queries – but they don’t block, they die.
  • Old operations that interfere with new operations.
  • Your query is too big.
  • Your back end dies and you didn’t monitor it, and then they all die.
  • You find that one of the weird restrictions actually matters – like you can’t address both ndbcluster and myisam tables in a trigger, or you can’t do certain types of query that, um, well, are bigly big or something.

So, in the shorter term, you migrate archive data away from the ndbcluster tables and into MyISAM tables.  (Why not innodb?  Because you need to make copies of these things, and tying up your front end to suck out innodb tables is not much fun.)

So today, for the longer term, we’re migrating back to plain InnoDB on some fair to amazing hardware.  This means setting up a slave of a live system, and bringing it into sync – 150Gb of data.  This has proved interesting:

  • Row level replication doesn’t work quite right with triggers and clusters from version 5.1.51-ndb-7.1.10-cluster-gpl-log to 5.6.11 MySQL Community Server (GPL).  Some things simply do not happen — certain UPDATE statements don’t get replicated.  Switching to STATEMENT replication seems to make the replication happen, but of course, it doesn’t really make the two copies the same unless the databases happen to be in sync.
  • The mysqldump of one of the tables made on the cluster could not be loaded, because of multiple entries sharing the same unique key.  It was a less than unique unique key.  I suppose I did run mysqldump with –skip-lock-tables so maybe I deserved this.

Anyhow, this brought us to reducing the size of the tables so that we could actually work with them.  That has been fun, and this is where we ran into problems with a mass DELETE statement with some odd error that means “I’m busy with the stuff you said, so I can’t do more right now, sorry.”

So there was this idea:

Why don’t we generate the SQL statements using SQL!

Now this is truly the daftest idea that was had all day.  And fortunately, MySQL seemed to agree:

mysql> select eval('select 1');
ERROR 1305 (42000): FUNCTION eval does not exist

What a relief! Sanity prevailed! A language which had the foresight not to implement that one thing that makes script languages eval.

Or so we thought, until this gem, which is eval for mysql:

mysql> set @string='select 1'; prepare eval from @string; execute eval;
Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.01 sec)
Statement prepared

+---+
| 1 |
+---+
| 1 |
+---+
1 row in set (0.00 sec)

So that’s eval for mysql. It was ugly. Fortunately, nobody did this. Equally fortunate is that it takes two statements to do this, which seriously limits the opportunities for SQL injection from applications.

Posted in Stuff | Tagged , , | Comments Off on ERROR 1305 (42000): FUNCTION eval does not exist

Defy not to buy in July

Game is advertising a “34 litre mirror finish grill microwave oven (DMO343)” for “R1090” with features including:

  • 1000W Cooking power
  • 5 power levels
  • 60 minute timer
  • 24 month guarantee

Don’t buy it.  It’s a fine microwave oven, but it is made by Defy, which means that the guarantee is worthless for many important cases. You can read more about Defy microwaves here on their flash wielding web site or you can read on, and find out why they are oven non garuantua.

We have one of these, which we bought from Dion a few years ago around the time when it became a sister company of Game who have this amazing offer:

DSCN1097

Interesting notes about the item:

  • It’s not plugged in (why, you may wonder)
  • It’s off (well, that’s because it’s unplugged)
  • When we do plug it in, it intermittently trips the power when it is steamed up, when the door is opened, and when the door is closed and at other odd times we can’t figure out. Between tripping power, it can also cook food, which is nice.

When did this start?  Well within the guarantee period.  We returned it for repair or replacement well within the guarantee period along with detailed instructions about how to trip it (boil 2 litres of water for 15 minutes, then open the door), and it was returned to us with no small amount of stupid time wasting as “no fault found”, and no repairs were made, and no explanation given.  Yet, it was still broken.  It is still broken.  It will never be fixed.

A year ago we met some people in a shop buying a new microwave.  We told them about ours.  “Oh yes,” they said, “our Defy also did that, that’s why we’re buying this one.” So there we have it.  It was not just us: it’s either incompetence in that they do not know about this widespread fault, or that Defy routinely dishonours their warranty.

We are not particularly upset that the stupid thing is faulty: it’s a highly complex piece of machinery which flings electromagnetic radiation at food.  That is absolutely amazing stuff.  If that were not enough, it has an oven built in — an actual oven!  Failing to trip the power is a very small part of its operation.  What does bother us is that Defy shipped broken goods, and simply does not care to fix them.  (Update: I am told that the convection part of the oven trips the power quite reliably lately.)

We don’t buy Defy stuff anymore, but every now and then we think of replacing our Defy with one that doesn’t trip the power, and then we see these advertisements.

We can not ever rely on Defy.  We are limited to using Defy, but always do so with a lack of confidence.

The actual microwave equipment inside is made by Daewoo anyhow.

ps. If you’re from Defy, and you’d like to get to the bottom of this design or production flaw in your stuff, please contact us and maybe we can arrange a swop.  This is what product recalls are for.

Update: It’s August, and it has now died entirely.  The lights came on, the fan ran, but all pretence of doing actual heating was stopped.  We gave it away to a man who thinks he repairs stuff, one Wilson.

Posted in Stuff | Tagged , , , , , | Comments Off on Defy not to buy in July

La Manif Pour Tous – The Demonstration for All

So I’ve been listening to Learn French in your Car in my car, which has emboldened me to try and read French stuff on the internet.  Doing that, I discovered I still haven’t got a clue.  French seems to be a way of clustering prefixes and suffixes around tiny syllables so that you can talk very quickly without any English people understanding a thing, and written French is an additional coding system around that providing a set of symbols to represent the parts that nobody ever says.

So with echoes of incorrectly spelled “Oe la banc?” (where is the banc?) coursing though my mind, I came across a big deal French movement against redefining marriage as something other than a man and a woman – La Manif Pour Tous.  This rather impressive movement has entirely escaped the attention of the English media, perhaps because they are pushing back against the irrational ideas that are being promoted from lunacy into law by liberals all over the world:

The “Manif Pour Tous” is a spontaneous and peaceful grassroots movement, which, beyond any religious, partisan or gender concerns, works to preserve the unity of the equal, man-woman parentage guaranteed by French law in civil marriage.

La Manif have been following their elected representatives around since those representatives bulldozered a strange redefinition of marriage through parliament. There are pictures on the internet of their large and (they say) entirely peaceful demonstrations.  It seems they are getting under their skin, because the police were authorised to shoot at the crowd (you know, just in case, like one does occasionally need to shoot at crowds).

They put their objections pretty well:

The “Mariage pour tous” bill wreaks havoc on the Civil Code, replacing the words “husband” and “wife”, “father” and “mother” by unisex, undifferentiated terminology (notable “parents”). This bill intends to erase sexual differentiation and complementarity from the law and jeopardize the foundation of human identity: sexual difference and the resulting structure of parentage. It paves the way for a new, “social” parentage unrelated to human reality. It creates a framework for a new anthropological order founded not on sex but on gender, that is, sexual preference.

I think the French have their language set up to value marriage above other relationships.  French is pretty big on gender roles – everything is masculine or feminine – there is no “it” (pourquoi you may ask, and I don’t know).  The label “Boyfriend” and “girlfriend” which might pass as something of an official status in English is “mon petit ami” – my little friend. Not very encouraging or official. How can you and a little friend hope to bring up children? Children need something better than that – they need grown ups!  They need parents!  It was fine and well to cast off king and church, but there’s no reason to reject proper grammar!

“La Manif Pour Tous” has this cool pinkish logo showing what parentage means: it means everyone has a mother and a father:

Logo of La Manif Pour Tous

Logo of La Manif Pour Tous

Of course, if every family had but one boy and one girl, the population would be on a rapid decline towards zero.  This is, however, easily rectified:
La Manif Pour Plus de TousThere, I fixed it!  We might need a bigger home for all that.  Good thing we have that seven seater.

Posted in Family stuff | Tagged , , , , , | Comments Off on La Manif Pour Tous – The Demonstration for All

ICASA is immoral

In the spirit of “I’m with stupid”, ICASA, the Independent Communications Authority of South Africa has granted a license to TopTV to broadcast porn. This means that from now, when you drive to work, sit in your house, work in your garden, or walk your dog, the faint tickle the 8m band from their satellite broadcast will brush against you with the colour of encrypted pornography.

The amazing thing about this is how ICASA explains their decision:

The Authority has also considered all submissions made in respect of this application from all interested stakeholders and it was found that most of the representations made were based on moral grounds; rather than a research evidence to demonstrate some of the conclusive remarks linking pornography and gender-based violence. It is the Authority’s view that indeed there is no basis or law for the rejection of Top TV’s application.

So, they listened carefully to everyone, and on weighing the arguments, decided that the arguments against were on grounds of morality.  They then said that morality is not supported by a carefully chosen avenue of research, and chose to take the side of “law” against the side of “morality”.  They chose to accept the lies of lawyers, and chose to reject moral imperatives.

There is a word for people who reject morality: they are immoral.

This is not really a change for ICASA – they are the same ICASA that effectively terminated Radio Pulpit by banishing them to AM, and scuttled many community radio stations because they published a Christian message or targeted an Afrikaans audience.  The only blip on the non-evil detector is that they actually did their job of regulating the use of the radio frequency spectrum a few short weeks ago (pulling the plug on some of WBS’s unlicensed transmitters).  However, that might be a false positive, since they are judge and jury of applications as well as executioner.

Here is the ICASA press release:

ICASA Authorises On-Digital Media’s application for three adult video channels
Posted on 4/24/2013 in Media Release

Johannesburg – The Independent Communications Authority of South Africa hereby gives notice that it has authorised On Digital Media (operating as TopTV) to broadcast the three adult content channels Playboy TV, Desire TV and Private Spice within the watershed period.

The authorisation of this application follows an extensive public consultation process which the Authority undertook prior to granting the application by On Digital Media (ODM).

The Authority upholds the view that there is no law of general application prohibiting the production and distribution of adult content in the Republic. Only the production and distribution of child pornography is expressly prohibited by law.

The authorisation therefore limits the broadcast of the adult content to the watershed period i.e. period from 20h00 to 05h00.

The Authority approved the application on the basis that the licensee shall ensure that programming on this channel which contains sexually explicit scenes, conduct and/or offensive language intended for adult audiences shall not be broadcast before the watershed period; and all the security measures including the double pin code as outlined in the application are in place to safeguard children’s rights.

The Authority has also considered all submissions made in respect of this application from all interested stakeholders and it was found that most of the representations made were based on moral grounds; rather than a research evidence to demonstrate some of the conclusive remarks linking pornography and gender-based violence. It is the Authority’s view that indeed there is no basis or law for the rejection of Top TV’s application.

To this end, the Authority has decided to authorise Top TV to broadcast the three adult entertainment channels as applied for, with more emphasis on the compliance with the licence terms and conditions, the Code of Conduct and all underlying statutes.

ENDS…

For all enquiries please contact:
Paseka Maleka
Tel: 011 566 3455
Cell: 079 509 0702
Email: pmaleka@icasa.org.za
Tags: Media Release

Ps. did you notice the part about porn only being allowed after 8pm?  Why is that there?  If you’re for immorality, why not have immorality during the day? What is the “Therefore” there for? Where’s the antecedant? Being evil makes you stupid.  Fortunately, it does seem that TopTV is in some kind of financial pinch, so it is possible that their evil will be short lived.

Posted in Stuff | Tagged , , , , , | Comments Off on ICASA is immoral

MD and LVM ate my file system … and gave it back

So we have this computer that has two 250Gb disks. In the interest of keeping the data, for evah I set them up as RAID1 using Linux MD RAID. This was cool. Much as a proper technical person does not keep backups of his personal stuff, having two copies seemed cool. The partitions were something like:

/dev/sda1 + /dev/sdb2 = /dev/md0 <= /boot
/dev/sda2 + /dev/sdb2 = /dev/md1 <= /dev/vg volume group

On Friday the one disk died (when it woke up in the morning it had SMART errors and 4093 relocated sectors and didn't work so well). To make our life complete, the system wouldn't boot. Ubuntu booted up to a recovery shell, which I used to try to make the RAID run, which was stupid, since I didn't actually know which disk was faulty. After this exercise, it booted up to "GRUB rescue>" which means that the system is poked, and you're about to work through supper time to fix it.

I got out my trusty usb-creator and booted a rescue system, and found .. um, that all the data was gone. The partitions were there, but the system refused to mount them, saying that they were RAID partitions. Now I suppose at this point I should have wiped the RAID signature, but I didn't. I couldn't start the RAID, I couldn't open the volume group, I could do zip. I installed mdadm, I installed lvm. I ran pvscan, lvscan with odd options. Nothing worked. My RAID was unraidable, and the LVM physical volume it contained was unusable.

So what I did was I had a look to see if I could maybe find the filesystem by brute force - :

for ((a=0;a<2048;a++)); do 
  dd if=/dev/sda2 bs=$((1024*1024)) count=1 skip=$a | file -
done

That said that there were bits of ext4 filesystem (the superblock, perhaps?) at 1 Mbyte, 7 Mbytes and some other odd position, so I tried to mount them - the theory being that when something gets mounted it stays mounted:

for ((a=0;a<2048;a++)); do 
  losetup -d /dev/loop2
  losetup /dev/loop2 /dev/sda2 --offset $((a * 1024 * 1024))
  mount /dev/loop2 /mnt && break
done

Sadly, that didn't work. So then I decided to go ahead with the reinstallation of the system on the good disk, since the data on the disks was not actually so important. The installer complained though: it said it couldn't partition the disks, since /dev/sda2 was in use.

That's odd.

Wanting to get the system installed, I had a look, and discovered that the LVM volume groups from the lost system had reappeared. That's very odd, but without delaying to complain, I made a copy of the original filesystem, and happiness ensued. I got the complete filesystem data, made a tar file, and then nuked the half confused system with a new installation to frustrate the cause of science.

So what happened? When the system was making loopback devices and attempting to mount them as filesystems, the device mapper woke up and said "aha, I see thee, thou LVM physical volume /dev/loop2". Once the kernel and/or udev had automatically attached the LVM subsystem to the /dev/loop2 device, subsequent attempts to unmap the device failed - so the first thing that worked became permanent.

So now, it's official. Brute force mounting doesn't necessarily work, but for accidentally finding LVM volume groups on intransigent physical devices, it seems to work just fine. When all else fails, try it:

for ((a=0;a<2048;a++)); do 
  losetup -d /dev/loop2
  losetup /dev/loop2 /dev/sda2 --offset $((a * 1024 * 1024))
  mount /dev/loop2 /mnt && break
done

(Which reminds me: for years I have used "a" and "b" as loop variables, but recently I have learned that "i" and "j" are more popular. I don't care. I think that the supposed advantages of "i" and "j" are purely imaginary.)

Posted in Stuff | Tagged , , , , , , | Comments Off on MD and LVM ate my file system … and gave it back