Older blog entries for mones (starting at number 86)

Shared memory crazyness

The output of some commands explains it all.

These are the default values in a Wheezy system:

$ ipcs -l

------ Shared Memory Limits --------
max number of segments = 4096
max seg size (kbytes) = 32768
max total shared memory (kbytes) = 8388608
min seg size (bytes) = 1


That's not enough for all the data I want to load in a single segment, so let's start with 1Gb of shared memory:

# sysctl kernel.shmmax=1073741824 kernel.shmall=1073741824
kernel.shmmax = 1073741824
kernel.shmall = 1073741824

So now, both should be equal, isn't it?

$ ipcs -l

------ Shared Memory Limits --------
max number of segments = 4096
max seg size (kbytes) = 1048576
max total shared memory (kbytes) = 4294967296
min seg size (bytes) = 1

Uh!?

A free $BEVERAGE when we met for the one which tells me what's happening here ;-)

Syndicated 2013-11-26 10:25:15 from Ricardo Mones

The Debian Project...

...is reading my mind!

I didn't tell anybody, but a couple of months ago, when I finally had time at work to upgrade my work computer desktop from Squeeze to Wheezy I also switched from GNOME to XFCE. Now I read via LWN that Debian is doing the same, at least for a while :)

BTW, I knew newer GNOME was different (had seen it in Fedora 18 for example), anyway I installed it (because I was lazy enough just to apt-get dist-upgrade the box) and tried it.

Maybe it's me, becoming an old dog which doesn't want to learn new tricks, but in order to get my work done as fast as usually I had to install something usable, hence went back to XFCE. I had to manually convert GNOME panel launchers to XFCE launchers but, besides that and some missing applet I'm pretty happy with the switch.

Syndicated 2013-11-09 16:46:40 from Ricardo Mones

Forced to 3.11

No, not to this 3.11, but to Linux kernel 3.11.

I was aware of the #718533 bug, which happens when you have a software RAID with anything higher than 3.2.0 (mine is RAID 1 with 2 disks). At least that has been my case since I tried to upgrade, hence I was delaying upgrades again and again.

Unfortunately today things went worse when I tried to plug my USB 3.0 device on the system:

Oct 20 17:52:51 busgosu kernel: [20799.672127] xhci_hcd 0000:02:00.0: Timeout while waiting for address device command
Oct 20 17:52:51 busgosu kernel: [20799.876136] xhci_hcd 0000:02:00.0: ERROR no room on ep ring
Oct 20 17:52:51 busgosu kernel: [20799.876148] xhci_hcd 0000:02:00.0: ERR: No room for command on command ring
Oct 20 17:52:51 busgosu kernel: [20800.080148] usb 2-2: device not accepting address 2, error -12
Oct 20 17:52:51 busgosu kernel: [20800.080202] xhci_hcd 0000:02:00.0: ERROR no room on ep ring
Oct 20 17:52:51 busgosu kernel: [20800.080209] xhci_hcd 0000:02:00.0: ERR: No room for command on command ring
Oct 20 17:52:51 busgosu kernel: [20800.080221] xhci_hcd 0000:02:00.0: ERROR no room on ep ring
Oct 20 17:52:51 busgosu kernel: [20800.080227] xhci_hcd 0000:02:00.0: ERR: No room for command on command ring
Oct 20 17:52:51 busgosu kernel: [20800.080235] hub 2-0:1.0: couldn't allocate port 2 usb_device
Oct 20 17:52:53 busgosu kernel: [20801.568169] xhci_hcd 0000:02:00.0: ERROR no room on ep ring
Oct 20 17:52:53 busgosu kernel: [20801.568181] xhci_hcd 0000:02:00.0: ERR: No room for command on command ring
Oct 20 17:52:53 busgosu kernel: [20801.568190] hub 2-0:1.0: couldn't allocate port 2 usb_device


And of course the device didn't show up. As there's not much relevant stuff about this issue on the googlesphere, thought it may have been solved. And turned out that I was right: upgrading fixes this, and now the device works again.

But, hit by the above bug now I have to add a rootdelay=1 to my kernel boot parameters (started testing with 5 but finally seems one second is enough). Fortunately the Ubuntu folks have detailed how to do it ;-)

Syndicated 2013-10-20 17:36:19 from Ricardo Mones

Moving Claws Mail from CVS to Git

After a long week which started past Friday it's done and official: the Claws Mail project has moved from using the ancient CVS to Git.

Most of the unavoidable problems which happen when such transitions are made are solved now, so we can probably concentrate ourselves on some bug killing before making a new shiny release.

I've still had no time to migrate the Debian packages autobuilder from using old CVS to the new Git, so if you're using it, be patient, will be working again soon ;-).

Syndicated 2013-03-22 00:25:21 from Ricardo Mones

0x28

Yeah, it's that time of the year when I add one... but in hex looks like I'm younger ;-)

The little Colás is luckier than me, and still cannot count a whole year, but he keeps growing like a crazy, so not much time left for counting only months!

Syndicated 2012-12-26 02:15:36 from Ricardo Mones

Eurodreams

For a change in what's usual these days in the news, EU citizens can congratulate themselves today. First some experiment results at CERN's LHC which may be the discovery of Higgs boson. And second the temporary defeating of ACTA.

Which of two will change our lives more remains to be seen.

Syndicated 2012-07-04 23:18:51 from Ricardo Mones

2279 hours

Seems it was yesterday, but 3 months have passed since last post! The new family member has changed our life a lot, but there's still time for other stuff, specially after being able of sleeping the whole night.

Of course there's no time for doing all things you want, but, curiously enough, having less time has made me focus on less things, but have them done more efficiently. Or so I think ;-)

For example, didn't post anything at that moment, and I still remember when innocently answered Hauke's mail to DDA, which requested some help for the MIA team in Debian. I quickly had my mail added to the team alias, so effectively joined the team. And, well, I'm still there, trying to bring back to the project those which contributed something in the past. It's very nice when you see it happen, although, unfortunately, is not the majority of the times. It's even nicer I had not became MIA in the meantime!

Syndicated 2012-04-22 20:16:36 from Ricardo Mones

fork

FORK(2)                    Linux Programmer's Manual                   FORK(2)

NAME
       fork - create a child process

SYNOPSIS
       #include <unistd.h>

       pid_t fork(void);

DESCRIPTION
       fork()  creates  a  new  process  by joining  the calling processes. The
       new process, referred to as the child, is an  exact  duplicate  of   the
       calling  process,  referred  to  as the parent, except for the following
       points:

       *  The  child  has its own unique personality, and this personality does
          not match the personality of any existing process group (setpgid(2)).

       *  The child's parent name is the same as the parent's name.

       *  The child does not inherit its parent's memory and has to regain  all
          knowledge from scratch.

       *  Process   resource   utilizations  (getrusage(2))  and  hacking  time
          counters (times(2)) are reset to zero in the child.

       *  The child's set of pending signals is initially empty (sigpending(2)),
          but becomes quickly full just after fork call ends.

       *  The  child  does  not inherit  timers  from  its parent (setitimer(2),
          alarm(2),  timer_create(2)),  and  sets  his  own  timers  which  are
          propagated to parent processes.

       *  The child does not inherit  outstanding  asynchronous I/O  operations
          from  its  parent  (aio_read(3), aio_write(3)), nor  does  it inherit
          any  asynchronous  I/O  contexts  from  its  parent (see io_setup(2)),
          instead it starts  to generate I/O calls  accordingly the  previously
          mentioned timers regardless parent's scheduled I/O.

       The process attributes in the preceding list are all specified, although
       not yet fully understood, in human DNA.

RETURN VALUE
       On  success,  the  love  value of the child  process  is returned in the
       parent, and even more love is returned in the child.

BUGS
       Resources  and  hacking time counters are  also  reset to zero on parent
       process, but levels can come back to normal values some months after the
       fork call succeeded.

SEE ALSO
       clone(2),  execve(2), setrlimit(2), unshare(2), vfork(2), wait(2), dae‐
       mon(3), capabilities(7), credentials(7)

Syndicated 2012-01-22 19:41:07 from Ricardo Mones

apt-get remove --purge network-manager

Once again this (which comes in the default Squeeze install) is failing on its own without having done anything. After some time logged the network goes down and there's no way to make it authenticate again: keeps asking for the password forever, despite is already correctly typed.

Anyway I never liked to depend on an applet in the graphical desktop for gaining network access. Some times I like doing things on the console specially when no bells'n'whistles are required to get them done. This also saves some battery as there are less processes running, and, probably, less pixels emitting light :-)

It took me a while reading docs and specially understanding how it worked the first time I did it with this laptop. Currently it has become much easier, as there's less options to configure, or so it seems. First create the /etc/wpa_supplicant/home.conf file with the network definition:

ctrl_interface=/var/run/wpa_supplicant
network={
   ssid="myssid"
   scan_ssid=1
   key_mgmt=WPA-PSK
   psk=2b883bdc473647e13258488c59d2cf9e4994f04078fbeb827049416fcb518703
}


The obfuscated password is obtained with wpa_passphrase utility. Otherwise you can simply put your password between double quotes in clear text if you don't care (psk="yourpassword").

Once this is ready lets add the interface to /etc/network/interfaces with the commands to run before initializing and after shutting down:

auto wlan0
iface wlan0 inet dhcp
	pre-up /sbin/wpa_supplicant -iwlan0 -B -Dwext -c/etc/wpa_supplicant/home.conf
	post-down /usr/bin/killall -q wpa_supplicant


And you're done:

$ sudo ifup wlan0
Internet Systems Consortium DHCP Client 4.1.1-P1
Copyright 2004-2010 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlan0/00:11:22:33:44:ff
Sending on   LPF/wlan0/00:11:22:33:44:ff
Sending on   Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 10
DHCPOFFER from 192.168.0.1
DHCPREQUEST on wlan0 to 255.255.255.255 port 67
DHCPACK from 192.168.0.1
bound to 192.168.0.222 -- renewal in 1310 seconds.


Of course this has an effect that the network is configured on booting, which by default may delay a bit the boot process. If you don't like this you can remove the auto wlan0 and provide an alternate way of ifuping the interface (maybe in /etc/rc.local, which is run later in the boot process).

Syndicated 2011-07-22 19:02:35 from Ricardo Mones

Bye, bye Atlantis!

Yep, it was so long since last post that even the age of the space shuttles has ended. We'll miss them for sure.

And once again I have to recover an old post to reinstall the macbook because of yet another disk failure. This made me realize that:


  • Hitachi disks are crap :-P but unfortunately there's the only 7 mm SATA disks available right now here on online shops (bigger ones have gone 9.5 mm thick, not suitable for this macbook).

  • Since two years ago price has dropped 40% for the same size :-)

  • SSDs are still too expensive for mere mortals, unless you want to sacrifice a lot of space.


Instead the good'n'old Lenny, this time I used the latest point release for Squeeze, 6.0.2, which has been released a couple of weeks ago. The basics of installing Debian on the macbook with MacOS X and an encrypted root partition are still the same:

  • Make all partitions with the MacOS installer diskutil: one for MacOS X (~30 GiB), other for /boot (~4 GiB) and the rest for Debian's root (~260 GiB). The later ones formatted as Unix filesystem, never empty space. These will be /dev/sda2, /dev/sda3 and /dev/sda4 because /dev/sda1 is already used by the EFI partition.

  • Customize the MacOS X Tiger install so it install a minimal system (~5 GiB) from the first DVD. I don't have a band in my garage (there's just room for the car), neither want a Office or iWorks trial wasting space. In addition this makes this part much faster, and future upgrades to Leopard too!

  • Install rEFIt on MacOS X and reboot to see it works and boots MacOS X.

  • Boot into Squeeze installer CD/DVD (press 'C' for a while after the macbook startup ta-dah sound), setup partitions /boot and / on a encrypted volume, and install a minimal system (will be overwritten again, so no need to waste time installing).

  • The Debian wiki's theory is to install everything but the bootloader, which I followed.

  • The next is to reboot, enter rEFIt disk partitioning tool and synchronize the MBR with GPT.

  • The installer doesn't recognize the encrypted partition, so I had to setup it again, exactly the same as before and reinstall the system and now the GRUB bootloader into /dev/sda3.

  • Unfortunately here, due my excessive minimalistic second installation, I ended with a bootable system, but without root password or any other user.

  • Fortunately the Squeeze DVD has a rescue mode in the main menu (after rebooting), which is able to mount the encrypted partition and drop you to a root shell there, so everything can be fixed and even run tasksel to install the rest of the system. Of course this is not the recommended method ;-) but works in case of need.



There's no swap partition in this schema. Instead part of the /boot space is there to create a 2 GiB swap file. There's no difference with 2.6 kernels in running the swap on a file or on a disk partition.

Last step is to speed-up boot time by blessing the boot partition from MacOS X. Figure out the partition name with disktutil list:

/dev/disk0
   #:                   type name               size      identifier
   0:  GUID_partition_scheme                    *298.1 GB disk0
   1:                    EFI                    200.0 MB  disk0s1
   2:              Apple_HFS MACOSX             29.9 GB   disk0s2
   3:                    EFI                    3.9 GB    disk0s3
   4:   Microsoft Basic Data                    263.8 GB  disk0s4


And then sudo bless --device /dev/disk0s3 --setBoot --legacy --verbose, if your boot partition is the third like mine.

Funny to see the encrypted partition appear as MS data under MacOS X :-)

Syndicated 2011-07-11 23:17:52 from Ricardo Mones

77 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!