A crashing BSD

Ok, now I dunno what is worse that my very stable laptop has gone nuts or that I’m not surprised by it at all.

mentally back tracing events:

using urxvt with zsh
vim running in background during perl file editing session
linux-flock playing my favorite radio station via linux-mplayerplug-in and native mplayer
mv ./myfile.mp3 /tmp/ -> trying to move a file off a sshfs mount to /tmp
system locked up with sound stuck replaying a single note
tried to switch to vtty1
system auto-rebooted, never saw the vtty

On reboot I restarted flock and tried to move the file again, system locked up and rebooted when I tried to switch to vtty0…

Now linux-flock segfaults when I run it and the only other linux app I know that is handy, realplayer also segflauts. I ain’t seen any thing informative in /var/ yet either.

Now, my Windows XP machine Blue Screen of Deaths and occasionally Black Screens of Deaths! On me all the time when listing to music while using the server browser in Raven Shield, if I use any thing other then WMP: trying WinAmp == instanto death and often same with MPlayer using the usual DirectX related sound/video opts.

So why do I find it sad that for me it is not so much of a shocker that with a third party kernel module installed from pre-compiled binary (fuse) that was ported from another OS, moving data from a mounted network file system (sshfs) to the local hard drive through SSH and said driver, while running binary programs designed for an entirely different system (linux flock+mplayerplug-in), could possibly cause a system to crash?

At least it’s got a better damn reason then Windows XP has got looooool

I’ve tried fsck’ing the drive but the Linux ABI still seems FUBAR.. All things considered with SSHFS and SMB/CIFS, I am seriously considering putting both NFS and AFS into testing here to see if either will fill the gap.

The return of NPMs Coding Spider

My first commit to Neo Ports Managers SVN since March… Sheesh I’ve been AWOL on this ain’t I?

Revision 61 – Directory Listing
Modified Fri Apr 4 07:22:12 2008 UTC (5 minutes, 2 seconds ago) by sas_spidey01

searchlet module now uses an internal searching code by default with the ability to use a separate external program for searching ports.

It assumes calling convention is ‘your command’ ‘what to look for’ and the following output parsing convention:

portname description

any white space will do.

ability to set external command not yet implemented [in the GUI I meant]

It’s been so long I had to change my password in order to login to SVN and the websites SSH successfully loool. Oh well, back to work I go!!

My official todo list:

Terry@dixie$ cat ~/code/Python/src/npm/trunk/src/todo.txt                  7:26

searchlet config in settings pages:
external command
fields to search for with internal command

finish the GUI for configuring port build options.

GUI for updating via portsnap/c*sup

help browser

... older notes
Terry@dixie$ 7:30

There is not a lot that actually has to be done before a beta can be released, it’s just it has to get done. Most of the rest is stuff I *want* done first…

I’m usually happier when I’m working on some thing then when I’m groaning about, and honestly I’d rather concentrate on code then my mind wandering off along past explicits.

Well, I have a todo list stored away on Neo Ports Manager and one of the things on my todo was to remove the dependency on the psearch program, namely because it would be faster to update our display as we find stuff in ports rather then parsing the output.

I think I might make another page in the settings to allow one to choose what fields to search in and possibly which to display as details. I plan on embedding the code to search ports right in NPM, but if it doesn’t clog things up I don’t see why not to allow the ability to use an external program. The best reason being if the index file ever changes or is ax’ed and I get hit by a bus, no one has to learn Python to fix NPM lol.

A couple months ago I sat down and started trying to figure out the format of the index file in ports, it was pretty easy and I wrote a small script to search it and print out all the cells of information in each entry of the index that had a matching package-version in it.

This is a quick test script I wrote tonight that searchs for a port and displays a short info on it, being a test I wrote the port to look for in the file test rather then passing sys.argv over to save time. I plan to adopt NPM to using a variation of this for searching ports now.


1: #!/usr/bin/env python
2:
3: # This is as much of the format of /usr/ports/INDEX-* file as I have
4: # been able to reverse engineer by looking at it and a few other things
5: # that didn't come with a nice fat manual page: the source is the documentation!
6: #
7: # Each program is listed on one line with each field separated with the pipe
8: # symbol (|), list values are delimited by a space.
9: #
10: # pkg-ver| -> as listed in pkg_info
11: # location in ports| -> /usr/ports/editors/vim
12: # install prefix| -> /usr/local
13: # short descr| ->
14: # path to pkg-descr| -> /usr/ports/editors/vim/pkg-decsr
15: # maintainer e-mail| -> who@foo.com
16: # listed in categories| -> list of cat, e.g. cat1 cat2
17: # dependencies to build| -> list of pkg-ver required to build this port
18: # dependencies at run time| -> list of pkg-ver required to run this program
19: # website| -> the programs website
20: # | -> unknown
21: # | -> unknown
22: # XXX: the unknowns may relate to internal port opts, e..g use zip, etc
23: ####
24:
25:
26: import re, os.path
27:
28: INDEX="/usr/ports/INDEX-6"
29:
30: # find keys 1,2,4 in index row via regex
31: def search(pattern):
32: idx = open(INDEX)
33: for line in idx:
34: keys = line.split('|')
35: k = (keys[0],os.path.split(keys[1])[1], keys[3])
36: for each in k:
37: if re.search(pattern, each):
38: print 'found'
39: mypp(keys)
40: idx.close()
41:
42: def mypp(table):
43: print "PORT INFORMATION FOR: %s" % table[0]
44: print 'location: %s' % table[1][11:]
45: print 'descr: %s' % table[3]
46: print 'category: %s' % table[6]
47: print 'website: %s' % table[9]
48:
49:
50: if __name__ == "__main__":
51: search("linux-flock")
52:
53:


Writer’s Block: Gotcha.

What is the best April Fools’ Day joke you’ve ever fallen victim to?

Live Journals Writer’s Block

Haha, hands down it has got to be the FreeBSD and NetBSD’s pkgsrc: A strategic synergy for awesomeness posting on the FreeBSD Ports mailing list. I remember seeing it posted in the lounge on forums.pcbsd.org.

It took me a week to realize the original message had been posted April 1st 🙂

Can you say, fooled “big time”?

SSHFS on FreeBSD

The following ports are needed:

sysutils/fusefs-kmod
sysutils/fusefs-sshfs

They depend on sysutils/fusefs-libs, packages are available on each at the moment for 6.3-Release.

Enable FUSE for system start up via rc.conf (I’d suggest rc.conf.local for PC-BSD) by adding this:

# enable File System in User Space
fusefs_enable=”YES”

And fusefs will be ready op on reboot. As an alterntivie to rebooting one could load the module and start fusefs manually.

kldload /usr/local/modules/fuse.ko
/usr/local/etc/rc.d/fusefs start

After that, if you can ssh to the server you can at least mount your home directory via SSH 🙂

sshfs username@host ~/mount_point

Since UNIX uses a numerical user and group id (uid, gid) to check file ownership and what not.. And my user account on my laptop was created in the PC-BSD install my uid & guid are 1001, on my OpenBSD machine hosting the files my UID & GID are set to more ‘personal’ integers, so they have to be mapped for my local account

sshfs -o uid=1001 -o gid=1001 username@host ~/mount_point

the username@host syntax is the same as scp, which means the common $USER@$VECTRA:/what/ever notation I use can be used for this as well, if the :/where/ever part is ommited it will use ones home directly from the server.

I have the fusefs-smbnetfs port installed but I’m not exactly fond of microsoft networking. I’m also very tempted to test a little bit of NFS over SSH, but I don’t have much problem with using SSHFS from my laptop and SMB/CIFS from my desktop.

I’ve created a few SMB Shares on the OpenBSD machine that match up to parts of my home directory, tomorrow I’ll start transferring files over. My Music, Videos, and Pictures directories amount for 2.8GB of files alone. So I don’t have much problem with off loading them.

Since I always back crap up first and the files are non critical I can put up with being unable to use the ‘current’ set of them whenever my file servers off line, which is rare. It’ll also be possible for me to set up a few cron jobs that’ll backup my files more regularly: without needing to use the network (scp/ssh) directly! And I can always write a cronjob to seek and destroy those stupid Thumbs.db files Windows Explorer always makes.

I’m not sure about my ~/Documents and ~/code directories yet, that’s almost 400MB of files right there but I’d rather not have to deal with out of date copies if Vectra goes off line. Although I could always set up my laptop to scp over a compressed nihgtly backup… We’ll see where it goes after some live-testing.

In my ideal world, I think my entire home directory would be residing on the server but I’m not quite ready to trust the hardware here for that yet 0.o

Oh baby where have you been all my life?

I just found the mixer(8) command on my BSD powered laptop when looking through the handbook.

This rocks !

Every now and then I like to adjust my sound volume, on the laptop I usually have music going all of the time. I’ve got kmix docked iso I can open and adjust it but that kind of sucks. Because I have to swap from keyboard to mouse or worse mouse-jet around to go from what I was doing to adjusting the sound. Some times the volume slider in my systray really is the best way for that.

Now when I could just suspend Vim and use mixer to adjust it without leaving my shell, that is perfect!

$ mixer
Mixer vol is currently set to 50:50
Mixer pcm is currently set to 25:25
Mixer speaker is currently set to 81:81
Mixer line is currently set to 75:75
Mixer mic is currently set to 0:0
Mixer cd is currently set to 75:75
Mixer rec is currently set to 0:0
Mixer igain is currently set to 0:0
Mixer ogain is currently set to 50:50
Recording source: mic
$ mixer -s
vol 50:50 pcm 25:25 speaker 81:81 line 75:75 mic 0:0 cd 75:75 rec 0:0 igain 0:0 ogain 50:50 =rec mic%
$ mixer pcm 0:0
Setting the mixer pcm from 25:25 to 0:0.
$ mixer pcm 25:25
Setting the mixer pcm from 0:0 to 25:25.
$

I set the PCM/Wave to 0 and then back to 25% left and right effectively muting an unmuting my sound. Since some programs will modify the PCM/Wave setting when changing the volume, like MPlayer and XMMS do by default. While others like Xine based stuff (Kaffeine and Amarok for example) are poilite enough not to dick with the system sound settings.

I’ve come to setting my Volume to 50% and adjusting the PCM setting at will. I could probably make most programs use there own virtual channel and not screw with the overall sound but on my laptop I rarely have a need for it.

I would rather like it if I could do some thing like that on my Windows machine though, so I could for example adjust volumes independently for some applications that don’t support software mixing on windows. Which means all of there sounds run at the settings in windows control center… Like XFires message beeps (ugh) but with how the sound works on my desktop with the Audigy 4…. I’m just happy if I can play Raven Shield and listen to music in any thing _other_ then WMP and not get a BSOD quite often when using the server browser in Rvs!

Musings about the new GCC

GCC 4.3.0 exposes a kernel bug

Interesting discussion,

I know FreeBSD 7 is moving to GCC4 for the system compiler, iirc 7.0-Release comes with 4.2.x. I have GCC 4.3 installed on this laptop but my primary reason for it is that I wanted to try GCJ, the GNU Compiler for Java :-).

I can’t say the same about Linux distros but I’d expect FreeBSD to always make sure the systems compiler won’t have problems with a build world/kernel cycle.

I’ve only used GCCs 3.x.x C and C++ compilers but I’m not partial, all I expect from a compiler is sufficient standards compliance to the current standards. GCC 3.4.6 might not be perfect but hey, it beats Microsoft’s C Compiler hands down last I tried it :-).

I used to collect some types of software, text editors, terminal emulators, shells, window managers, and sometimes even office suites but I never took to collecting C Compilers. Largely because I don’t want to sit and wait to compile one more often then needed haha.

Flocking great !!!

The other day I sent the port maintainer of linux-flock an e-mail reminding them that flock 1.1 had been released and thanking’em for maintaining the port.

Did a csup of ports and updated flock *my way*:

dixie# fastest_cvsup -c us -q
dixie# vi /root/ports-supfile # make sure the server is set correct
dixie# cd /usr/ports/www/linux-flock ; ls
Makefile distinfo files pkg-descr pkg-plist
dixie# less Makefile # confirm it's 1.1 in ports
dixie# pkg_delete linux-flock-1.0.3
dixie# make install distclean
...

Fired up flock from another aterm logged into my regular user account so I could see any messages that popped up on stdout/stderr, all good and even got the “Successfully updated flock” page.

Checklist:

Settings unchanged — yes
(Linux) Flash player plugin v7 — works
(Linux) Mozilla MPlayer plugin — works, using FreeBSD MPlayer build 😉

And I can see that Flock has finally implemented the one feature I really wanted from them, the ability to customize the ‘My World’ page. I removed the new friend activity widget and put back the favorites sites window, popped off the multimedia panel too. Because I don’t really use it, got my RSS feeds there.

The RSS|Friends|Multimedia layout I got on first start of 1.1 added a scroll bar at my typical window size (~1240×500 or so I’d guess by eye), which losing was one of the nice things of the style changes from flock 0.9 to 1.0. I’m really looking forward to more advancements in the My World page concept and to be honest it is an improvement over Operas “Speed Dial” feature which I used and abused back when I used Opera regularly.

I remember when I installed flock the flashplayer setup from PC-BSD worked out of the box, not very important to me but good to have. My great dislike for every thing Adobe remains but I lifted my ‘ban’ on them after Flashplayer 9 was released for Linux. I had installed the linux-mplayerplug-in port some time ago but it never worked and crashed flock with an error about loading files, I figured it was an issue of using a linux browser plugin but only having MPlayer compiled for FreeBSD installed. So I removed the stuff from my profile and solved the problem.

Earlier today I was surfing the web and saw the MPlayer plugin load up and I was like what the heck !? It works!!! So now I can listen to my favorite radio station without having to open a konqueror window for it ;-), I’m used to keeping flock loaded 24/7 on my laptop any way because its still a heavy weight program even if it runs faster then firefox 3 alpha and 2.x, seamonkey 1.x, and (Linux) netscape 9 did on here. I actually prefer the mozilla plugin to the KMPlayer plugin in konqueror which IMHO is not even as good as the Kaffeine plugin. This is actually a good thing for me, I don’t have to swap to konqueror to multimedia files — which is why I tried installing the linux-mplayerplug-in port in the first place xD

I think I will take a the new GMail / Yahoo! Mail integration features 🙂

Flock N Roll

So close, yet so farfetched.

I’ve begun implementing Style 1 for NPM’s user interface but it is much less functional then style 2. I think style 1 is a lot more conventional, it’s based on an idea I had a long time ago. After I installed Qt3 bindings for Ruby I thought about writing a ports front end with that kind of layout.

I personally like style 2, it has a ‘orthodox’ file manager like style to it, since I’ve never gotten to use such a file manager a lot that might be why I like it lool. I stil need to write the loading code but that won’t be difficult in python.

It is however the most obvious thing in the world to me that as soon as my family is up and about there is not even a snow balls chance in hell of getting further work done.

Which as this case proves, means it’s time to kill some time until bed time… So I can get back to coding in piece and start work on my PC-BSD test machine.

Yet that dream still naggs at my mind….

I figure for today, I can probably work on updating my PC-BSD test machine to using FreeBSD 7, for updating the ports that will likely have to wait for later. With luck I can leave it running over night.

I want to spend some time working on the user-interface for NPM, I know what I want but I am not sure what value it will have. Essentially my idea is for the user to select from several implementations of the main window including the ability to use custom made modules for it.

I also want to implement an option by which each module is checked against a given list of checksums, if the module fails the checksum it won’t be allowed to load. With this method one could theroectically restrict any non-NPM supplied window layouts from being loaded but it’s probably a useless feature but one I’d like to tinker with just for the fun of it lol.

I also know if I don’t get a few things out of my head I’m going to pop.. Maybe coding will help :.