Wednesday, July 25, 2007

Bros wedding



Date was July 1, 2007 - Had fun in shoe robbery case - Pics are awesome - Full album soon

Alsa troubled me again - ubuntu

hey there

Last week, mplayer and vlc started complaining about video port being blocked by another process (no clue which one).

ps -A gave a quick look at a process which got defunct (has to do with some lockup issues). Explicitly killing that process (kill -9 ) solved the video problem. The video port got free and videos were back online. But a new problem started out. Sound was gone. Alsa complained that another process is blocking the sound card. Strange !! Sound just worked a few minutes back and now its gone.

After a long time looking out for what was the problem, got on this page (https://bugs.launchpad.net/ubuntu/+source/alsa-lib/+bug/85157). Apparently the process which was killed contained the shared memory access to the sound device and it died with that. So, none of the other process got the sound card.

The solution was simple, though one among the best solutions I have seen

$ strace -o /tmp/out mplayer -ao alsa file.mp3

$ grep shmget /tmp/out

get one important line:
shmget(5678293, 384, IPC_CREAT|0660) = 48824355

$ ipcrm -M 5678293


Phew, sound was back !