Skip to main content

Unkillable processes

An issue I lately encountered was that a collegue complained about several processes which kept hanging on a Solaris 10 machine. After investigation, processes like format, powermt and even a for diagnostics invoked dtrace kept hanging, and could not even be killed :



# pkill -9 format

2



In such cases, a good old truss session mostly explains what's going on; but in this case, truss came back with a quite peculiar message :

# truss -p 26632
truss: unanticipated system error: 26632
#
# pstack 26632
pstack: cannot examine 26632: unanticipated system error
#
# pfiles 26632
pfiles: unanticipated system error: 26632



In those cases, the only option you have is to rely on the kernel debugger to determine the cause :

# mdb -k
Loading modules: [ unix genunix specfs dtrace ufs sd pcisch md ip hook neti sctp arp usba fcp fctl ssd nca lofs zfs cpc fcip random crypto logindmux ptm nfs ipc ]
> ::pgrep format
S PID PPID PGID SID UID FLAGS ADDR NAME
R 1241 1 942 686 0 0x4a004900 000006001414c060 format
> 000006001414c060::thread
ADDR STATE FLG PFLG SFLG PRI EPRI PIL INTR
000006001414c060 inval/2000 1424 de50 0 0 0 0 n/a

stack pointer for thread 300012b7700: 2a10055cb01
[ 000002a10055cb01 cv_wait+0x38() ]
000002a10055cbb1 PowerSleep+0x14()
000002a10055cc71 PowerGetSema+0xe8()
000002a10055cd31 power_open+0x364()
000002a10055cea1 spec_open+0x4f8()
000002a10055cf61 fop_open+0x78()
000002a10055d011 vn_openat+0x500()
000002a10055d1d1 copen+0x260()
000002a10055d2e1 syscall_trap32+0xcc()



In this case, it was the PowerPath MPIO which was blocked on a semaphore. Further investigation revealed that the drivers for PowerPath were removed from the /etc/system file. Restoring the correct version of that file and a reboot solved the problem.

LinuxVTL

LinuxVTL is an implementation of a VTL in Linux. Not really an appliance, but some software which behaves like a real VTL. Do not expect the performance of a Protectier or a FalconStore, as the changelog show this is really work in progress : the log for one of the last changes shows fixes for silent data corruption.


Data-deduplication isn't included, but you can off course use FUSE-ZFS with dedup on. Also, if you're using LinuxVTL on a separate server, you know you must either have HBA cards, or use iSCSI. Check out the homepage for usefull tips, like setting up an OpenSolaris client, or the settings for your favorite backup software.

Yamaha PSR-E413

Since I'm officially allowed from this year on to have a mid-life crisis, I had to choose between getting either a tattoo, a Harley Davidson, an electric guitar or a synthesizer. Being the geek that I am, I off course chose for the item containing the most knobs and blinkenlights. Unfortunately, synths are quite expensive and above budget range for a new hobby that I'm unsure of persevering. Therefore I opted for a keyboard, which has less impressive sound samples, but fortunately, some keyboards integrate basic synth functions.


I finally bought me a Yamaha PSR-E413 : 32 note polyphony, arpeggiator, pitch bend and synthesizer Control Knobs for real-time control of filter & effects of sounds. Enough features to prevent sounding like the James Last band. It has an education suite, which will hopefully will help me mastering this instrument. Time to brush up my music theory and start playing !

Creating (Open)Solaris packages

(File under : 6yo stuff that I finally integrated into my blog)
Since I became a Unix system administrator, I had the opportunity to create some Solaris packages. We all know how important decent package management is on Unix systems, and I have a decent experience in packaging software with my Debian box at home. Apt-build and such are excellent tools under Debian, so I was a bit surprised that package management seemed so primitive under Solaris.


There are some scripts out there which do the job for you, but as it is the habit with scripts, you don't know what these things are doing on your machine. If you want to know all the tidbits about packaging on Solaris, you're on the right place here.


So here is a HOWTO about creating Solaris packages based on my experience.


Intro and setup


You don't need root access for creating these packages; only if you want to install them, root access is needed. First, create the following directory structure in your homedir :

/export/home/youruser
!
+--- pkg
!
+--- src
!
+--- usr
!
+--- local

We will extract and build our software in the ~/src dir. Installation will happen in the ~/pkg/usr/local dir. So you really don't need to setup a chrooted environment as you see so many times explained in other places.


The procedure



  1. Extract your source in ~/pkg/src/foo-0.1 and cd into that directory.

  2. First, configure the software with

    $ ./configure --exec-prefix=/export/home/youruser/pkg/usr/local --prefix=/export/home/youruser/pkg/usr/local.

  3. Build your software and install it in your ~/pkg/usr/local dir :

    $ make && make install

  4. Now move to the installed software :

    $ cd /export/home/youruser/pkg/usr/local/

  5. We will now create the prototype file with


  6. Edit the prototype file and add i pkginfo=./pkginfo
    You'll get something like :

    i pkginfo=./pkginfo
    d none lib 0755 kristof users
    f none lib/libslang.a 0644 kristof users
    d none include 0755 kristof users
    f none include/slang.h 0644 kristof users
    f none include/slcurses.h 0644 kristof users

  7. Change in your prototype file all file owner info into bin:bin
    You should have something like :

    i pkginfo=./pkginfo
    d none lib 0755 bin bin
    f none lib/libslang.a 0644 bin bin
    d none include 0755 bin bin
    f none include/slang.h 0644 bin bin
    f none include/slcurses.h 0644 bin bin

    You should add pre- and postinstall scripts with a line like the pkginfo one.

  8. The part I allways forget is creating the pkginfo file :

    PKG="SCprog"
    NAME="prog"
    ARCH="intel"
    VERSION="1.00"
    CATEGORY="application"
    VENDOR="Foo, Inc."
    EMAIL="foo@net.net"
    PSTAMP="Mr Pink"
    BASEDIR="/usr/local"
    CLASSES="none"

    The most important entry is the BASEDIR line - it will specify where your software will be installed.

  9. Make the package with
    $ pkgmk -r `pwd`

  10. Go to the package dir :
    $ cd /var/spool/pkg

  11. Now create the package file itself :
    $ pkgtrans -s `pwd` ~/pkg/foo-0.1

  12. Go to your package (cd ~/pkg) and optionally install it with
    $ pkgadd -d foo-0.1

  13. Gzip it with gzip foo-0.1

  14. Don't forget to clean up your ~/pkg/usr/local dir :
    $ rm -rf ~/pkg/usr/local/ && mkdir -p ~/pkg/usr/local/




That's it ! Your package has been created !

Fosdem 2010

The 10th edition of Fosdem was quite crowdy, even in that degree that even the larger rooms were completely filled. In the AW building, some sessions had to disallow people in order to prevent security problems. One might suggest another campus for future editions...
Just like last year, lots of cloud-based talks, and also remarkble, lots of talks about cross-distro management. Anyhow, this is my track :

  1. Cloudlets, universal server images for the cloud

  2. apt-get for Android

  3. Cross-distro packaging with (top)git

  4. Large scale data analysis made easy with Apache Hadoop

  5. Scaling Facebook with Open Source tools

  6. Continuous packaging with project-builder.org

  7. Debian secrets : power tools for power users



Also, in a stunning breach with traditions, I decided not to buy a Debian t-shirt, but a Gnome one instead...

Sunset

 $ wget http://www.sun.com

--2010-02-07 19:06:09-- http://www.sun.com/
Resolving www.sun.com... 72.5.124.61
Connecting to www.sun.com
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://www.oracle.com [following]



After the official news of the approval by the EU, things changed fast. Since then, the sun.com website officially points to oracle.com. Lights out for Sun, the same for Solaris ?

Linux support for the Lexmark X1250 printer/scanner

Sweet ! I was about to install drivers in a Windows7 virtualbox for my el-cheapo Lexmark X1250 printer/scanner, when the Sane dialog popped up on my Linux desktop when I switched on the power. I decided to have a quick look if it was supported under Linux (without much hope, I must say), when I stumbled on this page with detailled instructions. I didn't had to copy the libsane shared lib, so eventually, the scanner was supported with the following instructions :

and voila ! Scanning time...