mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-31 22:25:33 -04:00
No description
This fixes a crash that happens if the bluetooth headset is the only non-monitor source in the system and the last "phone" stream dies. When the stream dies, the native protocol calls pa_source_output_unlink() and would call pa_source_output_unref() next, but without this patch, things happen during the unlinking, and the unreffing ends up being performed on a stream that is already freed. pa_source_output_unlink() fires the "unlink" hook before doing anything else. module-bluetooth-policy then switches the headset profile from HSP to A2DP within that hook. The HSP source gets removed, and at this point the dying stream is still connected to it, and needs to be rescued. Rescuing fails, because there are no other sources in the system, so the stream gets killed. The native protocol has a kill callback, which again calls pa_source_output_unlink() and pa_source_output_unref(). This is the point where the native protocol drops its own reference to the stream, but another unref call is waiting to be executed once we return from the original unlink call. I first tried to avoid the double unreffing by making it safe to do unlinking recursively, but I found out that there's code that assumes that once unlink() returns, unlinking has actually occurred (a reasonable assumption), and at least with my implementation this was not guaranteed. I now think that we must avoid situations where unlinking happens recursively. It's just too hairy to deal with. This patch moves the bluetooth profile switch to happen at a time when the dead stream isn't any more connected to the source, so it doesn't have to be rescued or killed. BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=97906 |
||
|---|---|---|
| doc | ||
| doxygen | ||
| m4 | ||
| man | ||
| po | ||
| scripts | ||
| shell-completion | ||
| src | ||
| vala | ||
| .gitignore | ||
| .mailmap | ||
| .travis.yml | ||
| autogen.sh | ||
| bootstrap.sh | ||
| configure.ac | ||
| git-version-gen | ||
| GPL | ||
| LGPL | ||
| libpulse-mainloop-glib.pc.in | ||
| libpulse-simple.pc.in | ||
| libpulse.pc.in | ||
| LICENSE | ||
| Makefile.am | ||
| NEWS | ||
| orc.mak | ||
| PROTOCOL | ||
| pulseaudio-text.svg | ||
| pulseaudio.supp | ||
| pulseaudio.svg | ||
| PulseAudioConfig.cmake.in | ||
| PulseAudioConfigVersion.cmake.in | ||
| README | ||
| todo | ||
PULSEAUDIO SOUND SERVER
WEB SITE:
http://pulseaudio.org/
GIT:
git://anongit.freedesktop.org/pulseaudio/pulseaudio
GITWEB/CGIT:
http://cgit.freedesktop.org/pulseaudio/pulseaudio/
MAILING LIST:
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
GIT COMMITS MAILING LIST:
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-commits
TRAC/BUGZILLA TICKET CHANGES MAILING LIST:
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-bugs
IRC:
#pulseaudio on irc.freenode.org
FRESHMEAT:
http://freshmeat.net/projects/pulseaudio/
OHLOH:
http://www.ohloh.net/projects/4038
AUTHORS:
Several
HACKING:
In order to run pulseaudio from the build dir __OPTIMIZE__ should be
disabled (look at src/pulsecore/core-util.h::pa_run_from_build_tree()),
this can be done by passing "CFLAGS=-O0" to the configure script:
./autogen.sh
CFLAGS="-ggdb3 -O0" LDFLAGS="-ggdb3" ./configure
make
./src/pulseaudio -n -F src/default.pa -p $(pwd)/src/
SPELLING:
PulseAudio