conf_pulse_hook_load_if_running allocates shm at a dangerous time
Submitted by Paul Davis
Assigned to pul..@..op.org
Description
if JACK is started in its default real-time mode (with memlockall in effect), it will trigger a call to the libasound function snd_config_search_definition(). This will eventually result in a call to conf_pulse_hook_load_if_running() within libasound_module_conf_pulse.so, which will in turn eventually call pa_shm_create_rw(), which allocates 64MB of shared memory. JACK's RT mode forces this to be pinned into physical RAM, which on a "small memory" system (e.g. 700MB with Ubuntu 10.10 (32 bit system) will cause JACK to bus error and the overall system to behave very erratically from a user perspective due to OOM-like conditions.
it does not seem appropriate for PA to be allocating shm in response to libasound checking device definitions.