Linux, mplayer and ipcrm

For the past few days, and after a few hours of uptime, mplayer refused to play videos. It was hanging while trying to open the ALSA audio. I could verify this because using -ao none as a command-line argument to mplayer fixed (as in being able to play a video with no sound) the problem.

Tired of this, I decided to strace mplayer. I could see it was hanging on the semop() system call for a semaphore with an ID of 32768. Looking at /proc/sysvipc/sem I could see that semaphore ID 32768 existed even when mplayer was not running, and that this IPC resource was created by a process running as me.

I used the ipcrm -s 32768 command to kill this IPC resource, and I saw that this fixed the problem: I could listen to audio and videos again. I haven’t been able to determine if mplayer has a bug that prevents it from freeing/destroying IPC semaphores or if this is a bug of the ALSA library, though.

Advertisements

One thought on “Linux, mplayer and ipcrm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s