[Pkg-pulseaudio-devel] Bug#491270: pulseaudio: PulseAudio freezes the boot process in some situations
Gabriel Kerneis
kerneis at enst.fr
Sat Jul 19 05:48:22 UTC 2008
reopen 491270
thank you
On Fri, Jul 18, 2008 at 01:22:51PM +0200, CJ van den Berg wrote:
> I’m going to close this now, but if you find something that causes
> pulseaudio to block on start-up, please let me know.
I found the bug thanks to strace: it loops for ever with
open("/dev/urandom",O_RDONLY|O_LARGEFILE) = -1 EACCES (Permission denied)
I guess it comes from src/pulsecore/random.c, line 64:
/* $Id: random.c 1971 2007-10-28 19:13:50Z lennart $ */
[snip - device = "/dev/urandom"]
while (*device) {
ret = 0;
if ((fd = open(*device, O_RDONLY)) >= 0) {
if ((r = pa_loop_read(fd, ret_data, length, NULL)) < 0 || (size_t) r != length)
ret = -1;
pa_close(fd);
} else
ret = -1;
if (ret == 0)
break;
}
It can't open /dev/urandom (because of wrong file permission) and thus never
gets out of the while loop. I think it would be safer to exit (with a failure
code) when /dev/urandom is not available.
Kind regards,
--
Gabriel Kerneis
More information about the Pkg-pulseaudio-devel
mailing list