Bug 253349 - pulseaudio aborts on start
Summary: pulseaudio aborts on start
Alias: None
Product: Fedora
Classification: Fedora
Component: pulseaudio   
(Show other bugs)
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Lennart Poettering
QA Contact: Fedora Extras Quality Assurance
Depends On:
Blocks: F8Blocker F8Test3
TreeView+ depends on / blocked
Reported: 2007-08-18 03:57 UTC by Adam Goode
Modified: 2007-11-30 22:12 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-09-10 00:30:01 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Full thread backtrace (4.69 KB, text/plain)
2007-08-18 04:05 UTC, Adam Goode
no flags Details
Full thread backtrace (4.41 KB, text/plain)
2007-08-21 18:27 UTC, Hans de Goede
no flags Details
pulseaudio -vv (2.32 KB, text/plain)
2007-08-28 01:27 UTC, Adam Goode
no flags Details
Full thread backtrace pulseaudio-0.9.7-0.8.svn20070823.fc8 (5.30 KB, text/plain)
2007-08-28 01:28 UTC, Adam Goode
no flags Details
pulseaudio -vv log of segfault before wiping gconf info (5.35 KB, text/plain)
2007-09-05 23:10 UTC, Adam Goode
no flags Details
Backtrace on avahi crash (-vv log in Attachment 188161) (3.44 KB, text/plain)
2007-09-05 23:25 UTC, Adam Goode
no flags Details

Description Adam Goode 2007-08-18 03:57:49 UTC
Description of problem:

pulseaudio fails to start.

Version-Release number of selected component (if applicable):


How reproducible:

Every time.

Steps to Reproduce:
1. run pulseaudio from command line
Actual results:

W: main.c: WARNING: called SUID root, but not in group 'pulse-rt'.
E: pid.c: stale PID file, overwriting.
W: alsa-util.c: Cannot find mixer control "Capture".
pulseaudio: pulsecore/fdsem.c:181: pa_fdsem_after_poll: Assertion
`pa_atomic_dec(&f->waiting) >= 1' failed.

Expected results:

Sweet tunes.

Additional info:


Comment 1 Adam Goode 2007-08-18 04:05:12 UTC
Created attachment 161786 [details]
Full thread backtrace

Comment 2 Adam Goode 2007-08-21 13:16:24 UTC
 $ pulseaudio -vv
W: main.c: WARNING: called SUID root, but not in group 'pulse-rt'.
E: pid.c: stale PID file, overwriting.
I: module-hal-detect.c: Trying capability alsa
D: module-hal-detect.c: Not loaded device
D: module-hal-detect.c: Not loaded device
D: module-hal-detect.c: Not loaded device
D: module-hal-detect.c: Not loaded device
D: module-hal-detect.c: Not loaded device
D: module-hal-detect.c: Not loaded device
D: module-hal-detect.c: Not loaded device
D: module-hal-detect.c: Not loaded device
D: module-hal-detect.c: Loading module-alsa-sink with arguments 'device=hw:1
I: module-alsa-sink.c: Successfully enabled mmap() mode.
I: alsa-util.c: Using mixer control "Master".
I: sink.c: Created sink 0 "alsa_output.pci_1102_4_alsa_playback_0" with sample
spec "s16le 2ch 44100Hz"
I: source.c: Created source 0 "alsa_output.pci_1102_4_alsa_playback_0.monitor"
with sample spec "s16le 2ch 44100Hz"
I: module-alsa-sink.c: Using 4 fragments of size 4408 bytes.
I: module.c: Loaded "module-alsa-sink" (index: #0; argument: "device=hw:1
D: sound-file.c: POSIX_FADV_SEQUENTIAL succeeded.
D: module-alsa-sink.c: Thread starting up
I: module-alsa-sink.c: Starting playback.
D: memblock.c: Memory block too large for pool: 441428 > 16368
pulseaudio: pulsecore/fdsem.c:181: pa_fdsem_after_poll: Assertion
`pa_atomic_dec(&f->waiting) >= 1' failed.

Comment 3 Hans de Goede 2007-08-21 18:26:19 UTC
I have exactly the same problem, attaching my backtrace as well.

Comment 4 Hans de Goede 2007-08-21 18:27:07 UTC
Created attachment 161995 [details]
Full thread backtrace

Note I'm on x86_64 rawhide too.

Comment 5 Lennart Poettering 2007-08-26 15:49:38 UTC
Is this an SMP/multicore system?

Comment 6 Lennart Poettering 2007-08-26 15:50:59 UTC
Could you please run this through valgrind and paste the output?

Comment 7 Hans de Goede 2007-08-27 08:18:13 UTC
(In reply to comment #5)
> Is this an SMP/multicore system?

A single core single processor system in my case. I'll attach the valgrind
output when I'm back home (currently @ work).

Comment 8 Hans de Goede 2007-08-27 18:25:35 UTC
Okay, here is the requested valgrind run. Notice this is with the suid root bit
removed, as valgrind otherwise exits with a permission denied error.

 [root@shalem ~]# valgrind pulseaudio --log-target=syslog
==7803== Memcheck, a memory error detector.
==7803== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==7803== Using LibVEX rev 1732, a library for dynamic binary translation.
==7803== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==7803== Using valgrind-3.2.3, a dynamic binary instrumentation framework.
==7803== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==7803== For more details, rerun with: -v
==7803== Syscall param futex(futex) points to uninitialised byte(s)
==7803==    at 0x50734DA: __pthread_initialize_minimal (in
==7803==    by 0x5072DE8: (within /lib64/libpthread-2.6.90.so)
==7803==  Address 0x7FF0007BC is on thread 1's stack
pulseaudio: pulsecore/fdsem.c:181: pa_fdsem_after_poll: Assertion
`pa_atomic_dec(&f->waiting) >= 1' failed.
==7803== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 4 from 1)
==7803== malloc/free: in use at exit: 210,832 bytes in 1,759 blocks.
==7803== malloc/free: 10,031 allocs, 8,272 frees, 3,360,594 bytes allocated.
==7803== For counts of detected errors, rerun with: -v
==7803== searching for pointers to 1,759 not-freed blocks.
==7803== checked 13,106,520 bytes.
==7803== LEAK SUMMARY:
==7803==    definitely lost: 0 bytes in 0 blocks.
==7803==      possibly lost: 23,464 bytes in 390 blocks.
==7803==    still reachable: 187,368 bytes in 1,369 blocks.
==7803==         suppressed: 0 bytes in 0 blocks.
==7803== Rerun with --leak-check=full to see details of leaked memory.
[root@shalem ~]# 

Comment 9 Lennart Poettering 2007-08-27 20:40:48 UTC
Hmm, that valgrind output is not particularly useful. 

Hmm, please run pa through gdb and do a full backtrace of all threads. If you
need help for that, just give me another ping.

Thank you!

Comment 10 Adam Goode 2007-08-27 21:23:02 UTC
Is that any different than what is in attachment 161786 [details] in comment 1, or
attachment 161995 [details] in comment 4?

Comment 11 Lennart Poettering 2007-08-27 21:28:42 UTC
Oh, sorry, I am an idiot. This is just what I was looking for. Sorry.

Comment 12 Adam Goode 2007-08-27 21:58:51 UTC
No problem. Bugzilla confuses the hell out of me... :)

Comment 13 Lennart Poettering 2007-08-27 22:14:27 UTC
Hmm, OK I got myself now an amd64 machine and tried to reproduce this issue. No
luck. I used 0.9.7.svn20070823 which has some modifications ins semaphore
handling so I might have fixed this issue as a side effect.

In the initial bug report you mentioned that you used 0.9.7-0.7.svn20070816.
Could you please retry with 20070823 version from Rawhide? 

Comment 14 Adam Goode 2007-08-27 23:58:19 UTC
Tried with pulseaudio-0.9.7-0.8.svn20070823.fc8. Results identical.

Comment 15 Lennart Poettering 2007-08-28 00:48:03 UTC
Hmm, could you please paste the output of pulseaudio -vv with
pulseaudio-0.9.7-0.8.svn20070823.fc8 here? gdb backtrace would be cool, too!


Comment 16 Adam Goode 2007-08-28 01:27:17 UTC
Created attachment 174841 [details]
pulseaudio -vv

Linux datatype 2.6.23-0.129.rc3.git4.fc8 #1 SMP Wed Aug 22 01:28:57 EDT 2007
x86_64 x86_64 x86_64 GNU/Linux

Comment 17 Adam Goode 2007-08-28 01:28:33 UTC
Created attachment 174861 [details]
Full thread backtrace pulseaudio-0.9.7-0.8.svn20070823.fc8

Comment 18 Lennart Poettering 2007-09-05 18:30:19 UTC
Ok, this was a hard bug to fix. The bug seems to be specific to amd64, and
doesn't appear on x86_64. libatomic_ops doesn't seem to work properly on amd64.
I replaced that implementation now by the native gcc atomic builtins which are
available on amd64, and the problem seems to be gone away. At least on the two
amd64 machines I got access to.

Please, could you try 0.9.7-0.10.svn20070905?

If it works for you as well, I will close the bug.

Comment 19 Hans de Goede 2007-09-05 19:30:42 UTC
I'm afraid it still doesn't work, things have changed, but it still fails for
me, using the pulseaudio packages from here:

Which are the correct ones I assume, I now get this bt:
(gdb) run
Starting program: /usr/bin/pulseaudio 
[Thread debugging using libthread_db enabled]
[New process 3493]
pulseaudio: pulsecore/mutex-posix.c:79: pa_mutex_unlock: Assertion `_r == 0' failed.
[New Thread 46912522439936 (LWP 3493)]

Program received signal SIGABRT, Aborted.
[Switching to Thread 46912522439936 (LWP 3493)]
0x00002aaaac0a2895 in raise () from /lib64/libc.so.6
(gdb) bt
#0  0x00002aaaac0a2895 in raise () from /lib64/libc.so.6
#1  0x00002aaaac0a4340 in abort () from /lib64/libc.so.6
#2  0x00002aaaac09bc9f in __assert_fail () from /lib64/libc.so.6
#3  0x0000000000433c25 in pa_mutex_unlock (m=<value optimized out>)
    at pulsecore/mutex-posix.c:79
#4  0x00002aaaaaee3960 in lt_dlmutex_register () from /usr/lib64/libltdl.so.3
#5  0x000000000040e901 in main (argc=1, argv=0x7fff20fe4558)
    at daemon/main.c:339

Comment 20 Lennart Poettering 2007-09-05 22:58:18 UTC
Ah. That's an issue with a borked libltdl 1.5.22.

You need to update to libtool-ltdl 1.5.24 at least, which is available in
rawhide. I presume you did a manual upgrade of the PA packages and thus left
libltdl at 1.5.22?

Comment 21 Adam Goode 2007-09-05 23:09:09 UTC
It works! Note that I did have the same problem on my Intel x86_64 (not AMD), so
I assume that in Comment 18 you mean to say "doesn't appear on x86" (not x86_64).

Also, I got a segfault until I wiped out /system/pulseaudio stuff in gconf. I'm
attaching that log.

Comment 22 Adam Goode 2007-09-05 23:10:17 UTC
Created attachment 188161 [details]
pulseaudio -vv log of segfault before wiping gconf info

Comment 23 Adam Goode 2007-09-05 23:24:21 UTC
I have reproduced the crash. If you select "Allow other machines in LAN to
browse for local sound devices", thus publishing the sound source, it segfaults
in avahi stuff. I'm attaching the backtrace.

Comment 24 Adam Goode 2007-09-05 23:25:20 UTC
Created attachment 188231 [details]
Backtrace on avahi crash (-vv log in Attachment 188161 [details])

Comment 25 Will Woods 2007-09-07 19:01:58 UTC
Adam, I suspect the crash you mention in comment #21 and later is a different
problem than the original crash.

Original bug: pulseaudio always aborts on startup on x86_64
New bug: pulseaudio aborts on startup on x86_64 *if* avahi is enabled

If that's the case, could you file this new issue in a separate bug report?

Comment 26 Adam Goode 2007-09-09 21:30:45 UTC
Yes, that is correct. I think this bug can be closed.

New bug is #284141.

Comment 27 Adam Goode 2007-09-09 21:35:03 UTC
Oops, didn't really mean to close this bug yet.

Comment 28 Hans de Goede 2007-09-09 21:40:00 UTC
After updating libtool-ltdl it starts for me now too, but no matter what I do
pulseaudio-manager always says connection refused. (and other apps still play
through alsa I believe).

Any clues? This is still on an x86_64 machine.

Comment 29 Will Woods 2007-09-10 00:30:01 UTC
Adam, the original bug here is fixed, so this bug should be closed.

For other pulseaudio problems, either ask on the mailing lists or file new bugs.

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