Bug 116709 - xmms playback using alsa stops randomly while using ALSA dmix
Summary: xmms playback using alsa stops randomly while using ALSA dmix
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: xmms
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: John (J5) Palmieri
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-02-24 16:11 UTC by James Laska
Modified: 2013-09-02 05:54 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-08-14 02:18:00 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description James Laska 2004-02-24 16:11:52 UTC
KERNEL: 2.6.3-1.97
PACKAGES:
  xmms-1.2.9-5.p
  xmms-devel-1.2.9-5.p
  xmms-mpg123-1.2.7-21
  xmms-skins-1.2.9-5.p
  alsa-lib-1.0.2-2
  alsa-lib-devel-1.0.2-2
  alsa-utils-1.0.2-2

While playing local ogg|mp3 files through xmms, it recently started
behaving strange.  What seems to be random during playback, xmms will
just hang during playback.  The application is not frozen, since it is
responding to click events and I can still STOP playback.  But the EQ
still shows the time when playback stopped and it appears like it is
still in *play* mode.  The output plugin used is Alsa.  Some
investigation results are below:

(~)> ps -wef | grep xmms
jlaska    7777     1  0 10:43 ?        00:00:01 xmms -e
jlaska    8000     1  0 11:03 ?        00:00:00 xmms -e

Process 8000 attached - interrupt to quit
close(10)                               = 0
close(11)                               = 0
shmget(1025, 131072, IPC_CREAT|0666)    = 15007777
shmat(15007777, 0, 0)                   = 0xb7a2f000
mlock(0xb7a2f000, 131072)               = -1 EPERM (Operation not
permitted)
shmdt(0xb7a2f000)                       = 0
shmctl(15007777, IPC_64|IPC_STAT, 0x6e9a060) = 0
unlink("/tmp/alsa-dmix-7777-1077638593-733438") = 0
shmdt(0xb7a61000)                       = 0
shmctl(14909472, IPC_64|IPC_STAT, 0x6e9a060) = 0
semctl(1933314, 0, IPC_64|IPC_RMID, 0x6e9a0a4) = 0
exit_group(0)         

(~)> strace -p 7777
Process 7777 attached - interrupt to quit
gettimeofday({1077638947, 486147}, NULL) = 0
gettimeofday({1077638947, 486315}, NULL) = 0
ioctl(3, FIONREAD, [0])                 = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7,
events=POLLIN}], 3, 7) = 0
gettimeofday({1077638947, 519870}, NULL) = 0
write(3, ">\2\7\0%\16 \3f\0 \3s\0 \3\252\0\0\0p\0\33\0\231\0\6\0"...,
48) = 48
read(3, "\1\2\234\276\0\0\0\0\272\340\2\3\0\0\0\0\0\0\0\0\1\0\0"...,
32) = 32
gettimeofday({1077638947, 520719}, NULL) = 0
ioctl(3, FIONREAD, [0])                 = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7,
events=POLLIN}], 3, 9) = 0
gettimeofday({1077638947, 612993}, NULL) = 0
write(3, ">\2\7\0%\16 \3f\0 \3s\0 \3\253\0\0\0p\0\33\0\231\0\6\0"...,
48) = 48
read(3, "\1\2\237\276\0\0\0\0\272\340\2\3\0\0\0\0\0\0\0\0\1\0\0"...,
32) = 32
gettimeofday({1077638947, 613828}, NULL) = 0
ioctl(3, FIONREAD, [0])                 = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7,
events=POLLIN}], 3, 9) = 0
gettimeofday({1077638947, 664255}, NULL) = 0
write(3, ">\2\7\0%\16 \3f\0 \3s\0 \3\254\0\0\0p\0\33\0\231\0\6\0"...,
48) = 48
read(3, 0xbff46cc0, 32)                 = -1 EAGAIN (Resource
temporarily unavailable)
select(4, [3], NULL, NULL, NULL)        = 1 (in [3])
read(3, "\1\2\242\276\0\0\0\0\272\340\2\3\0\0\0\0\0\0\0\0\1\0\0"...,
32) = 32
gettimeofday({1077638947, 765484}, NULL) = 0
ioctl(3, FIONREAD, [0])                 = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7,
events=POLLIN}], 3, 0) = 0
write(3, ">\2\7\0%\16 \3f\0 \3s\0 \3\255\0\0\0p\0\33\0\231\0\6\0"...,
48) = 48
read(3, 0xbff46cc0, 32)                 = -1 EAGAIN (Resource
temporarily unavailable)
select(4, [3], NULL, NULL, NULL)        = 1 (in [3])
read(3, "\1\2\245\276\0\0\0\0\272\340\2\3\0\0\0\0\0\0\0\0\1\0\0"...,
32) = 32
gettimeofday({1077638947, 798424}, NULL) = 0
ioctl(3, FIONREAD, [0])                 = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7,
events=POLLIN}], 3, 0) = 0
write(3, ">\2\7\0%\16 \3f\0 \3s\0 \3\256\0\0\0p\0\33\0\231\0\6\0"...,
48) = 48
read(3, 0xbff46cc0, 32)                 = -1 EAGAIN (Resource
temporarily unavailable)
select(4, [3], NULL, NULL, NULL)        = 1 (in [3])
read(3, "\1\2\250\276\0\0\0\0\272\340\2\3\0\0\0\0\0\0\0\0\1\0\0"...,
32) = 32
gettimeofday({1077638947, 799753}, NULL) = 0
ioctl(3, FIONREAD, [0])                 = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7,
events=POLLIN}], 3, 8) = 0

Comment 1 James Laska 2004-02-25 15:01:28 UTC
This is no longer happening with 2.6.3-1.106.  Strange.  Closing the
bug, will reopen if it re-appears.

Could be any one of the following overnight rawhide changes that fixed it:

ypbind-1.17.2-1                               Wed 25 Feb 2004 08:40:17
AM EST
libwnck-devel-2.5.90-1                        Wed 25 Feb 2004 08:40:16
AM EST
eel2-devel-2.5.8-1                            Wed 25 Feb 2004 08:40:14
AM EST
xcdroast-0.98a15-1                            Wed 25 Feb 2004 08:40:11
AM EST
anaconda-9.91-0.20040224191432                Wed 25 Feb 2004 08:40:01
AM EST
kernel-source-2.6.3-1.106                     Wed 25 Feb 2004 08:37:22
AM EST
pciutils-2.1.99.test3-1                       Wed 25 Feb 2004 08:36:26
AM EST
kudzu-devel-1.1.46-1                          Wed 25 Feb 2004 08:36:24
AM EST
ypserv-2.12.1-1                               Wed 25 Feb 2004 08:36:21
AM EST
procps-3.2.0-1                                Wed 25 Feb 2004 08:36:18
AM EST
yum-2.0.5.20040224-1                          Wed 25 Feb 2004 08:36:16
AM EST
pam_krb5-2.0.5-3                              Wed 25 Feb 2004 08:36:14
AM EST
postgresql-server-7.4-7                       Wed 25 Feb 2004 08:36:08
AM EST
xisdnload-3.2-13.p1                           Wed 25 Feb 2004 08:36:05
AM EST
system-config-soundcard-1.2.4-1               Wed 25 Feb 2004 08:36:03
AM EST
postgresql-python-7.4-7                       Wed 25 Feb 2004 08:36:01
AM EST
gnome-keyring-devel-0.1.4-1                   Wed 25 Feb 2004 08:35:59
AM EST
anaconda-runtime-9.91-0.20040224191432        Wed 25 Feb 2004 08:35:57
AM EST
system-config-display-1.0.8-1                 Wed 25 Feb 2004 08:35:54
AM EST
gconf-editor-2.5.4-1                          Wed 25 Feb 2004 08:35:44
AM EST
mysql-server-3.23.58-7                        Wed 25 Feb 2004 08:35:41
AM EST
gnome-desktop-devel-2.5.90-1                  Wed 25 Feb 2004 08:35:39
AM EST
gnome-session-2.5.90-1                        Wed 25 Feb 2004 08:35:34
AM EST
mysql-devel-3.23.58-7                         Wed 25 Feb 2004 08:35:32
AM EST
pkgconfig-0.15.0-1                            Wed 25 Feb 2004 08:35:30
AM EST
libwnck-2.5.90-1                              Wed 25 Feb 2004 08:35:26
AM EST
dia-0.92.2-3                                  Wed 25 Feb 2004 08:34:59
AM EST
nautilus-2.5.8-1                              Wed 25 Feb 2004 08:34:12
AM EST
pciutils-devel-2.1.99.test3-1                 Wed 25 Feb 2004 08:34:08
AM EST
gnome-icon-theme-1.1.8-1                      Wed 25 Feb 2004 08:33:39
AM EST
gnome-vfs2-smb-2.5.8-2                        Wed 25 Feb 2004 08:33:34
AM EST
postgresql-7.4-7                              Wed 25 Feb 2004 08:33:10
AM EST
libgnomeui-devel-2.5.90-1                     Wed 25 Feb 2004 08:33:06
AM EST
libbonoboui-devel-2.5.3-1                     Wed 25 Feb 2004 08:33:02
AM EST
kernel-2.6.3-1.106                            Wed 25 Feb 2004 08:29:21
AM EST
gnome-desktop-2.5.90-1                        Wed 25 Feb 2004 08:28:48
AM EST
eel2-2.5.8-1                                  Wed 25 Feb 2004 08:28:44
AM EST
libgnomeui-2.5.90-1                           Wed 25 Feb 2004 08:28:40
AM EST
gnome-keyring-0.1.4-1                         Wed 25 Feb 2004 08:28:36
AM EST
isdn4k-utils-3.2-13.p1                        Wed 25 Feb 2004 08:28:22
AM EST
kudzu-1.1.46-1                                Wed 25 Feb 2004 08:28:15
AM EST
mysql-3.23.58-7                               Wed 25 Feb 2004 08:28:06
AM EST
coreutils-5.2.0-7                             Wed 25 Feb 2004 08:27:52
AM EST
libselinux-1.6-1                              Wed 25 Feb 2004 08:27:43
AM EST
libgnome-devel-2.5.90-1                       Wed 25 Feb 2004 08:27:41
AM EST
postgresql-libs-7.4-7                         Wed 25 Feb 2004 08:27:35
AM EST
gnome-vfs2-devel-2.5.8-2                      Wed 25 Feb 2004 08:27:32
AM EST
GConf2-devel-2.5.90-1                         Wed 25 Feb 2004 08:27:29
AM EST
libbonoboui-2.5.3-1                           Wed 25 Feb 2004 08:27:23
AM EST
libgnome-2.5.90-1                             Wed 25 Feb 2004 08:27:10
AM EST
gnome-vfs2-2.5.8-2                            Wed 25 Feb 2004 08:27:01
AM EST
GConf2-2.5.90-1                               Wed 25 Feb 2004 08:26:19
AM EST


Comment 2 Brian Millett 2004-03-17 16:34:15 UTC
I am using xmms-1.2.10-2.p on core 2 development.  I have the same
proble.  When I play mp3s, xmms will just stop.  I click on the play
button, and it starts the sone again.  I have no problem playing radio
streams however.

I have noticed that any kind of a system load will cause xmms to
stall.  A quiet system will play longer than a used system.

Comment 4 James Laska 2004-05-24 12:21:18 UTC
With an FC2 system, I am unable to reproduce this bug.  Adding Brian
Millett to the CC list to confirm or deny this bug is still active?

Comment 5 Brian Millett 2004-05-24 13:04:21 UTC
Yes it does.  My configuration could be the problem (it has many times
in the past :-) ) I have FC2 loaded and it still randomly stops
playing.  I am using alsa with this "audio device" swmixer, which is
defined in my .asoundrc:
--BEGIN--
pcm.intel8x0 {
   type hw
   card 0
}

ctl.intel8x0 {
   type hw
   card 0
}

pcm.!default {
    type plug
    slave.pcm "swmixer"
}

pcm.swmixer {
    type dmix
    ipc_key 1234
    slave {
        pcm "hw:0,0"
        period_time 0
        period_size 1024
        buffer_size 4096
        rate 44100
    }
}
--END--

Now, if I use eSound output plugin, I have no problem.  My modprobe.conf:

# ALSA portion
alias char-major-116* snd
alias snd-card-0 snd-intel8x0
alias snd-card-1 snd-ac97-codec
alias char-major-14* soundcore
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss
install snd-card-0 /sbin/modprobe --ignore-install snd-card-0 && {
/usr/sbin/alsactl restore >/dev/null 2>&1 || :; }
remove snd-card-0 { /usr/sbin/alsactl store >/dev/null 2>&1 || :; };
/sbin/modprobe -r --ignore-remove
install snd-card-1 /sbin/modprobe --ignore-install snd-card-1 && {
/usr/sbin/alsactl restore >/dev/null 2>&1 || :; }
remove snd-card-1 { /usr/sbin/alsactl store >/dev/null 2>&1 || :; };
/sbin/modprobe -r --ignore-remove


Comment 6 Stephan DECHOUX 2004-06-27 11:08:04 UTC
I've got the same problem with my fedora core 2 ...

I'm using dmix with the same configuration as above ... sometimes xmms
stop playing and i have to stop the song and replay it ...

It appears wen i load mys system (like firefox load a big page, on
when i use file roller) ...

Stéphan

Comment 7 Wesley Tanaka 2004-07-14 13:54:38 UTC
This may be an intel8x0/dmix issue of some sort.  I also experience
this behavior, and am using dmix on top of the snd_intel8x0 alsa module.

Comment 8 Felix Knecht 2004-07-15 19:42:37 UTC
Yep. Happens on my Laptop with intel8x0 audio too. Also using dmix here.

xmms 1.2.10

Comment 9 Barry K. Nathan 2004-07-15 23:02:47 UTC
Nope. I'm having it with snd-ali5451 (but I will retest this with a
very recent fc-devel snapshot sometime later today) and with
snd-powermac (unfortunately I no longer have the hardware to test this
-- so I won't worry about it if the ali5451 case gets fixed).

And I'm definitely not using dmix on the snd-ali5451 (a fresh FC2
reinstall) and probably not on the snd-powermac (basically, a Yellow
Dog 3.0 -> 3.0.1 -> FC 1 -> FC 2 test 1 -> FC 2 upgrade, with each
upgrade phase performed using yum and/or up2date).

Comment 10 Barry K. Nathan 2004-07-16 01:38:56 UTC
Actually, I just realized my problem may be a different one (still
involving XMMS and ALSA however). I'll test more thoroughly tonight,
and if it turns out to be a different problem I'll stop discussing it
in this bug and I'll file a new bug if necessary.

Comment 11 Ozgur AKAN 2004-07-23 08:25:45 UTC
I have same problem on Fedora Core 2 with also plugin. I upgraded to
alsa 1.0.5 but nothing has changed.

Comment 12 Mitch Johnson 2004-08-04 05:10:48 UTC
For those of you with the sound pausing in xmms so you have to restart
the song and it works perfectly, I found a solution.  It is totally
unrelated, I think.

In the ALSA Driver configuration window for XMMS, go to advanced
settings and uncheck Mmap mode.  For some reason, it doesn't happen
any more.  Hope I was of help.

Also, before doing this, on my machine at least, pause would also
break it and have the same effect.  Pause works now.

Comment 13 Dawid Gajownik 2004-09-08 19:24:48 UTC
Mitch, your advice works for me :I I've been testing it for a month
and xmms plays now correct without randomly stopping.

So the question is: should this option be disabled by default or mmap
mode should be fixed?

BTW that is this option responsible for? ALSA output is unfortunatelly
undocumented -> http://xmms.org/docs/readme.php :(

Comment 14 Colin Walters 2004-09-22 02:42:59 UTC
Barry, Felix, Ozgur, et al. - Does disabling mmap mode fix this for
you too?



Comment 15 Brian Millett 2004-09-22 13:02:30 UTC
For me it does, even though I use the esound plugin.  
Using the esound plugin with the mmap enabled also causes random stoppage.

Comment 16 Barry K. Nathan 2004-09-23 06:25:37 UTC
My recollection is that disabling mmap mode didn't fix things for me,
*BUT* I need to retest to make sure my memory's not mistaken. I'll be
retesting before the weekend (maybe in the next day or so, even).

Comment 17 Matt Brodeur 2004-11-16 20:42:10 UTC
   If I can jump in here...
   I was seeing this same problem today.  I just moved to a new system
with FC3 (xmms-1.2.10-9), and I saw the same broken pause behavior I
had seen on other machines with FC2.  On this machine I had to enable
dmix to get Gaim sounds working, at which point I started getting the
"random" xmms pauses.  It seems load related, as xmms would usually
continue playing until I switched windows and started working.
   Mitch's suggestion immediately cleared up both problems on this system.


Comment 18 Colin Walters 2004-11-23 21:42:44 UTC
Can you guys try this RPM?

Source:
http://people.redhat.com/walters/xmms-1.2.10-10.src.rpm
Binary i386:
http://people.redhat.com/walters/xmms-1.2.10-10.i386.rpm


Comment 19 Dawid Gajownik 2004-12-01 10:22:29 UTC
I've installed that version, turned on Mmap mode on and after one week
of testing I must say that the problem is not fixed :( It still
randomly freezes.

I've been testing it only on my mp3 files, so I don't know whether my
comment is worthy ;-)

Comment 20 Colin Walters 2004-12-06 21:29:23 UTC
The original strace here seems to show ALSA dmix in use, and Matthew
from comment 17 is also using dmix.  Is anyone else here also using dmix?

Comment 21 Dawid Gajownik 2004-12-06 21:36:09 UTC
I do.

      *<|:{D

Comment 22 Colin Walters 2004-12-06 21:43:44 UTC
I am removing this from the FC3 target tracker then since dmix isn't
our default ALSA configuration.  However, the plan for FC4 is to try
getting dmix/asym working well, so I'm leaving it on that tracker.

Comment 23 Barry K. Nathan 2004-12-07 05:12:20 UTC
I'll reiterate that I am *not* using dmix -- however, it looks like
all of the xmms/ALSA problems I mentioned in this bug are actually bug
140565 (and I've verified that xmms-1.2.10-10 fixes them).

I'm running into some other xmms/ALSA problems, but they all appear to
involve plugins (he-xmms and sexypsf, so far). At some point in the
near future I'll try to test more thoroughly (more plugins, more types
of soundcards & drivers) and see if I get anything I can file in Bugzilla.

Comment 24 Colin Walters 2004-12-10 19:11:01 UTC
Removing FC2 tracker too.

Comment 25 John (J5) Palmieri 2005-04-05 15:48:00 UTC
Removing FC4 tracker as xmms has moved to extras

Comment 26 Rahul Sundaram 2005-08-14 02:18:00 UTC
Closing this bug as xmms has moved over to extras. If you still find this
occuring, open a new bug referring to this one


Note You need to log in before you can comment on or make changes to this bug.