BenV's notes

Archive for September, 2009

Pulseaudio, slackware and udev

by on Sep.11, 2009, under Software

Yesterday I found a release notice in the pulseaudio mailinglist announcing version 0.9.16.
Today, I found another release note in the mailinglist that announced pulseaudio version 0.9.17. Gee, another fuckup? (but that’s part of the release process I guess ;))

Anyway, I decided to upgrade my 0.9.15 installation since it still glitches every now and then. (continue reading…)

Leave a Comment :, , , , more...

Pokemon OS, rsync/ssh and MAC

by on Sep.11, 2009, under Software

So yesterday at work I ran into the famous ssh MAC failure like this:

wouter@wouter-laptop:~:0> rsync -varP ./vmware/ wouter@192.168.1.2:/archive/archive2/programs/vmware/
Password:
sending incremental file list
./
Keys
116 100% 0.00kB/s 0:00:00 (xfer#1, to-check=8/10)
linux/
linux/VMware-server-2.0.1-156745.i386.tar.gz
32768 0% 800.00kB/s 0:10:11 Received disconnect from 192.168.1.2: 2: Corrupted MAC on input.

rsync: writefd_unbuffered failed to write 4 bytes to socket [sender]: Broken pipe (32)
rsync: connection unexpectedly closed (53 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(600) [sender=3.0.6]

No, that has nothing to do with Apple/Mac computers or Media Access Control, it’s
part of the SSH protocol (and others) called Messenge Authentication Code. This blog has a nice explanation: Jan Pechanec on SSH messages.

Funny thing, my brother also had this exact issue with the same kind of laptop. Well…. in his case it was putty failing his connection from a windows machine to this laptop.
The reason? Same as ever, checksum offloading.
You can check if your card does this with the ethtool program:

wouter@wouter-laptop:~:0> sudo ethtool -k eth0
Offload parameters for eth0:
Cannot get device flags: Operation not supported
rx-checksumming: on
tx-checksumming: on
scatter-gather: on
tcp-segmentation-offload: off
udp-fragmentation-offload: off
generic-segmentation-offload: on
generic-receive-offload: off
large-receive-offload: off

And the fix for this:

wouter@wouter-laptop:~:85> sudo ethtool -K eth0 tx off

Fixed.

Wait, what does Pokemon OS have to do with this?
Well, isn’t that obvious? It’s supposed to magically work, and it doesn’t! 😉
Probably more a kernel thing though… oh well.

Leave a Comment :, , , more...

Boost, qBitTorrent and lib64

by on Sep.05, 2009, under Morons, Software

After toying around a bit on the news sites I decided it would be interesting to see if qBitTorrent would run on slackware 64.
So we go to the download site, copy the url, and see if Slackbuild likes it. Slackbuild leeches, untars, gives the configure options (which are a bit buggy, I know, will be fixed next release), runs configure. Configure crashes out with “blabla boost blabla”. (continue reading…)

2 Comments :, , , , more...

P4-Clockfuck

by on Sep.03, 2009, under Software

You know what’s really annoying?

Try this:

root@Uil:/sys/devices/system/cpu/cpu0/cpufreq:0>echo ondemand > scaling_governor
root@Uil:/sys/devices/system/cpu/cpu0/cpufreq:0>dmesg
[1325843.712549] ondemand governor failed, too long transition latency of HW, fallback to performance governor

Apparently this is caused by the p4-clockmod module.
You know, this piece of junk:

p4-clockmod

p4-clockmod


Also known as “CONFIG_X86_P4_CLOCKMOD“.

The reason?
Well, the ondemand and the conservative governors want to be able to switch to a different speed before their calculations become invalid.
The p4-clockmod thing apparently makes the latency of switching so BIG that it becomes impossible. Or so they think.
Which leaves only the sucky powersave and performance governors. (and of course userspace).

The kernel menuconfig help states:

This driver should be only used in exceptional
circumstances when very low power is needed because it causes severe
slowdowns and noticeable latencies. Normally Speedstep should be used
instead.

Lovely. I’ll keep that in mind, thanks.
*enables CONFIG_X86_ACPI_CPUFREQ instead*

Note that when they’re both compiled in (as opposed to modules) the retarded thing seems to go for the clockmod. Just great.

1 Comment :, , more...

Phpbb wtf

by on Sep.01, 2009, under Software

Today, phpbb decided to fuck with me.
Or with lotjuh that is. She went to our forum, blank page.
I went there to check, works fine for me. Meh. Probably firefox fucking up as usual.
She tries lynx. Blank.
She tries telnet….

benv@janeman:~:1>telnet forum.handofhades.eu 80
Trying 80.69.76.81...
Connected to forum.handofhades.eu.
Escape character is '^]'.
GET / HTTP/1.0
Host: forum.handofhades.eu

HTTP/1.1 200 OK
Date: Tue, 01 Sep 2009 07:50:04 GMT
Server: Apache/2.2.12 (Unix) mod_ssl/2.2.12 OpenSSL/0.9.8h DAV/2 PHP/5.2.10 SVN/1.4.6
X-Powered-By: PHP/5.2.10
Content-Length: 0
Connection: close
Content-Type: text/html

Connection closed by foreign host.

What. the Fuck.

So, I check the server logs. Nothing.
NOTHING!!!!

Restarted apache. Nothing (surprise!)

Started php myself on index.php. Nothing.
Strace on php to try to figure out what the fuck.
And then I get a glimpse of where it goes wrong when I see it enter a cache dir.
The cache dir has tons of stuff, but most of them look like these:

-rw------- 1 www www 316 2009-08-23 18:42 sql_a10522de103f7e26c0338f4a3982efe0.php
-rw------- 1 www www 316 2009-08-24 21:38 sql_a12f21b584712a564d6bde0b3f733ef2.php
-rw------- 1 www www 316 2009-08-23 00:46 sql_a1386e2adab2812fb0a9076cfbb0fa1a.php
-rw------- 1 www www 316 2009-08-24 11:22 sql_a14603b084ca6516a8f591651a4f0286.php
-rw------- 1 www www 316 2009-08-24 23:02 sql_a1aaa40aaac9978cb292881202667264.php
-rw------- 1 www www 316 2009-08-24 18:23 sql_a1cb1e3ad6332900edb533b9e2a904e4.php
-rw------- 1 www www 316 2009-08-30 18:56 sql_a1cbb2008b00faafb8957bafc7082453.php
-rw------- 1 www www 316 2009-08-22 12:36 sql_a1d2e08e3641f1b8f7c03ceda2e78981.php
-rw------- 1 www www 316 2009-08-24 15:58 sql_a1eac242296c2e713f78618b8b49ad15.php

You get the point.


root@blue:/www/vhosts/forum.handofhades.eu/cache# rm sql_*.php

Fixed. Piece of cancer. Thanks for telling me…

Leave a Comment : more...

Xen and Power Saving

by on Sep.01, 2009, under Software

Or more specific: CPU frequency scaling.

On my laptop this is one of the first things I enabled to make my battery last longer.
Now that we’re going to put a server in a rack where they will bill us depending on the amount of power consumed, this sounds like a welcome thing to have enabled.

Our latest Xen install has Xen 3.4, on which they’ve enabled it by default. Isn’t that nice?
So basically, if your processor etc is good enough to support it, you can mess around with it using the xenpm tool.

For instance we can check the parameters for CPU 0 like this:

root@xenbro:~# xenpm get-cpufreq-para 0
cpu id : 0
affected_cpus : *0 1 2 3
cpuinfo frequency : max [2600000] min [800000] cur [800000]
scaling_driver :
scaling_avail_gov : userspace performance powersave ondemand
current_governor : ondemand
ondemand specific :
sampling_rate : max [10000000] min [10000] cur [20000]
up_threshold : 80
scaling_avail_freq : 2600000 1900000 1400000 *800000
scaling frequency : max [2600000] min [800000] cur [800000]

As you can see, it’s very much like the whole cpufreq ordeal. It has an ondemand governor, a powersave one, etc. Right now this CPU is using the ondemand governor, which will ramp up the clock when demand increases.
However, since this is a quad core and not a real quad processor machine we can only change the governor for all 4 cores at the same time, not for individual ones. (would be cool to have 1 core burning away power while the rest idles by….).

Anyway, the xenpm tool allows us to monitor and change various aspects of this.
For instance this will do a little benchmark and show the processor states during the benchmark.

root@xenbro:~# xenpm start 10
Timeout set to 10 seconds
Start sampling, waiting for CTRL-C or SIGINT or SIGALARM signal ...
Elapsed time (ms): 10003

CPU0: Residency(ms) Avg Res(ms)
C0 49 ( 0.50%) 0.04
C1 9953 (99.50%) 7.19

Avg freq 800000 KHz

CPU1: Residency(ms) Avg Res(ms)
C0 13 ( 0.14%) 0.07
C1 9989 (99.86%) 48.49

Avg freq 800000 KHz

CPU2: Residency(ms) Avg Res(ms)
C0 83 ( 0.83%) 0.21
C1 9919 (99.17%) 25.05

Avg freq 800000 KHz

CPU3: Residency(ms) Avg Res(ms)
C0 28 ( 0.28%) 0.10
C1 9973 (99.72%) 33.92

Avg freq 800000 KHz

As you can see my processor is mostly idle.
State C0 is the most active state, C1 is sleeping with use of the HLT instruction.
Your processor can have many more states, like my laptop which has 4.

Anyway, I put the change to ondemand governor in my /etc/rc.d/rc.local, so let’s hope it helps.

To read some more about the details of this stuff you can check out the Xenpm wiki page.

4 Comments :, , more...

Archives

  • 2018 (1)
  • 2016 (1)
  • 2015 (7)
  • 2014 (4)
  • 2013 (11)
  • 2012 (27)
  • 2011 (26)
  • 2010 (25)
  • 2009 (68)