Bug 742087

Summary: undefined symbol in libpulsedsp.so breaks padsp and OSS compatibility
Product: [openSUSE] openSUSE 12.1 Reporter: B. Wielens <Uniacke1>
Component: SoundAssignee: Scott Reeves <sreeves>
Status: RESOLVED WONTFIX QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P5 - None CC: ncutler, tiwai, Uniacke1
Version: Final   
Target Milestone: ---   
Hardware: x86-64   
OS: SUSE Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description B. Wielens 2012-01-18 12:39:48 UTC
User-Agent:       Mozilla/5.0 (X11; Linux i686; rv:8.0) Gecko/20100101 Firefox/8.0

Attempting to use padsp to run OSS apps fails. 
/dev/dsp device is inaccessible to the application.

Terminal output with LD_DEBUG=libs enabled results in the following (snipped) output:

     1967:     calling init: /usr/lib/libpulsecommon-1.1.so
      1967:
      1967:
      1967:     calling init: /usr/lib/libpulse.so.0
      1967:
      1967:
      1967:     calling init: /usr/lib/libpulsedsp.so
      1967:
      1967:
      1967:     initialize program: touch
      1967:
      1967:
      1967:     transferring control: touch
      1967:
      1967:     /usr/lib/libpulsedsp.so: error: symbol lookup error: undefined symbol: __padsp_disabled__ (fatal)
touch: cannot touch `/dev/dsp': Connection refused

This issue occurs on OpenSuSE 12.1 both x86 and x86_64 systems. 

Reproducible: Always

Steps to Reproduce:
1. Open terminal
2. (Optional) enter 'export LD_DEBUG=libs' 
3. Issue command 'padsp touch /dev/dsp'

Actual Results:  
See main report for output. 
Note that my x64 system also complains that libpulsedsp.so in LD_PRELOAD cannot be preloaded. (An effect of the library itself being broken).

As a result, there is no sound in OSS apps, which complain about /dev/dsp not existing.


Expected Results:  
/dev/dsp should be created, and allow access for OSS apps.

Entire console output:
 export LD_DEBUG=libs
user@CoreDuo-2000:~> padsp touch /dev/dsp
      1967:     find library=libreadline.so.6 [0]; searching
      1967:      search path=/lib/bash/4.2/tls/i686/sse2:/lib/bash/4.2/tls/i686:/lib/bash/4.2/tls/sse2:/lib/bash/4.2/tls:/lib/bash/4.2/i686/sse2:/lib/bash/4.2/i686:/lib/bash/4.2/sse2:/lib/bash/4.2         (RUNPATH from file /bin/sh)
      1967:       trying file=/lib/bash/4.2/tls/i686/sse2/libreadline.so.6
      1967:       trying file=/lib/bash/4.2/tls/i686/libreadline.so.6
      1967:       trying file=/lib/bash/4.2/tls/sse2/libreadline.so.6
      1967:       trying file=/lib/bash/4.2/tls/libreadline.so.6
      1967:       trying file=/lib/bash/4.2/i686/sse2/libreadline.so.6
      1967:       trying file=/lib/bash/4.2/i686/libreadline.so.6
      1967:       trying file=/lib/bash/4.2/sse2/libreadline.so.6
      1967:       trying file=/lib/bash/4.2/libreadline.so.6
      1967:      search cache=/etc/ld.so.cache
      1967:       trying file=/lib/libreadline.so.6
      1967:
      1967:     find library=libncurses.so.5 [0]; searching
      1967:      search cache=/etc/ld.so.cache
      1967:       trying file=/lib/libncurses.so.5
      1967:
      1967:     find library=libdl.so.2 [0]; searching
      1967:      search cache=/etc/ld.so.cache
      1967:       trying file=/lib/libdl.so.2
      1967:
      1967:     find library=libc.so.6 [0]; searching
      1967:      search cache=/etc/ld.so.cache
      1967:       trying file=/lib/libc.so.6
      1967:
      1967:
      1967:     calling init: /lib/libc.so.6
      1967:
      1967:
      1967:     calling init: /lib/libdl.so.2
      1967:
      1967:
      1967:     calling init: /lib/libncurses.so.5
      1967:
      1967:                                                                                                                                                  
      1967:     calling init: /lib/libreadline.so.6                                                                                                          
      1967:                                                                                                                                                  
      1967:                                                                                                                                                  
      1967:     initialize program: /bin/sh                                                                                                                  
      1967:                                                                                                                                                  
      1967:                                                                                                                                                  
      1967:     transferring control: /bin/sh                                                                                                                
      1967:
      1967:     find library=libpulsedsp.so [0]; searching
      1967:      search cache=/etc/ld.so.cache
      1967:       trying file=/usr/lib/libpulsedsp.so
      1967:
      1967:     find library=librt.so.1 [0]; searching
      1967:      search cache=/etc/ld.so.cache
      1967:       trying file=/lib/librt.so.1
      1967:
      1967:     find library=libc.so.6 [0]; searching
      1967:      search cache=/etc/ld.so.cache
      1967:       trying file=/lib/libc.so.6
      1967:
      1967:     find library=libpulse.so.0 [0]; searching
      1967:      search cache=/etc/ld.so.cache
      1967:       trying file=/usr/lib/libpulse.so.0
      1967:
      1967:     find library=libpulsecommon-1.1.so [0]; searching
      1967:      search cache=/etc/ld.so.cache
      1967:       trying file=/usr/lib/libpulsecommon-1.1.so
      1967:
      1967:     find library=libpthread.so.0 [0]; searching
      1967:      search cache=/etc/ld.so.cache
      1967:       trying file=/lib/libpthread.so.0
      1967:
      1967:     find library=libdl.so.2 [0]; searching
      1967:      search cache=/etc/ld.so.cache
      1967:       trying file=/lib/libdl.so.2
      1967:
      1967:     find library=libjson.so.0 [0]; searching
      1967:      search cache=/etc/ld.so.cache
      1967:       trying file=/usr/lib/libjson.so.0
      1967:
      1967:     find library=libdbus-1.so.3 [0]; searching
      1967:      search cache=/etc/ld.so.cache
      1967:       trying file=/lib/libdbus-1.so.3
      1967:
      1967:     find library=libm.so.6 [0]; searching
      1967:      search cache=/etc/ld.so.cache
      1967:       trying file=/lib/libm.so.6
      1967:
      1967:     find library=libX11-xcb.so.1 [0]; searching
      1967:      search cache=/etc/ld.so.cache
      1967:       trying file=/usr/lib/libX11-xcb.so.1
      1967:
      1967:     find library=libX11.so.6 [0]; searching
      1967:      search cache=/etc/ld.so.cache
      1967:       trying file=/usr/lib/libX11.so.6
      1967:
      1967:     find library=libxcb.so.1 [0]; searching
      1967:      search cache=/etc/ld.so.cache
      1967:       trying file=/usr/lib/libxcb.so.1
      1967:
      1967:     find library=libSM.so.6 [0]; searching
      1967:      search cache=/etc/ld.so.cache
      1967:       trying file=/usr/lib/libSM.so.6
      1967:
      1967:     find library=libICE.so.6 [0]; searching
      1967:      search cache=/etc/ld.so.cache
      1967:       trying file=/usr/lib/libICE.so.6
      1967:
      1967:     find library=libXtst.so.6 [0]; searching
      1967:      search cache=/etc/ld.so.cache
      1967:       trying file=/usr/lib/libXtst.so.6
      1967:
      1967:     find library=libwrap.so.0 [0]; searching
      1967:      search cache=/etc/ld.so.cache
      1967:       trying file=/lib/libwrap.so.0
      1967:
      1967:     find library=libsndfile.so.1 [0]; searching
      1967:      search cache=/etc/ld.so.cache
      1967:       trying file=/usr/lib/libsndfile.so.1
      1967:
      1967:     find library=libXau.so.6 [0]; searching
      1967:      search cache=/etc/ld.so.cache
      1967:       trying file=/usr/lib/libXau.so.6
      1967:
      1967:     find library=libuuid.so.1 [0]; searching
      1967:      search cache=/etc/ld.so.cache
      1967:       trying file=/lib/libuuid.so.1
      1967:
      1967:     find library=libXext.so.6 [0]; searching
      1967:      search cache=/etc/ld.so.cache
      1967:       trying file=/usr/lib/libXext.so.6
      1967:
      1967:     find library=libFLAC.so.8 [0]; searching
      1967:      search cache=/etc/ld.so.cache
      1967:       trying file=/usr/lib/libFLAC.so.8
      1967:
      1967:     find library=libvorbisenc.so.2 [0]; searching
      1967:      search cache=/etc/ld.so.cache
      1967:       trying file=/usr/lib/libvorbisenc.so.2
      1967:
      1967:     find library=libspeex.so.1 [0]; searching
      1967:      search cache=/etc/ld.so.cache
      1967:       trying file=/usr/lib/libspeex.so.1
      1967:
      1967:     find library=libogg.so.0 [0]; searching
      1967:      search cache=/etc/ld.so.cache
      1967:       trying file=/usr/lib/libogg.so.0
      1967:
      1967:     find library=libvorbis.so.0 [0]; searching
      1967:      search cache=/etc/ld.so.cache
      1967:       trying file=/usr/lib/libvorbis.so.0
      1967:
      1967:
      1967:     calling init: /lib/libpthread.so.0
      1967:
      1967:
      1967:     calling init: /lib/libc.so.6
      1967:
      1967:
      1967:     calling init: /lib/libm.so.6
      1967:
      1967:
      1967:     calling init: /usr/lib/libogg.so.0
      1967:
      1967:
      1967:     calling init: /usr/lib/libvorbis.so.0
      1967:
      1967:
      1967:     calling init: /usr/lib/libspeex.so.1
      1967:
      1967:
      1967:     calling init: /usr/lib/libvorbisenc.so.2
      1967:
      1967:
      1967:     calling init: /usr/lib/libFLAC.so.8
      1967:
      1967:
      1967:     calling init: /lib/libdl.so.2
      1967:
      1967:
      1967:     calling init: /usr/lib/libXau.so.6
      1967:
      1967:
      1967:     calling init: /usr/lib/libxcb.so.1
      1967:
      1967:
      1967:     calling init: /usr/lib/libX11.so.6
      1967:
      1967:
      1967:     calling init: /usr/lib/libXext.so.6
      1967:
      1967:
      1967:     calling init: /lib/libuuid.so.1
      1967:
      1967:
      1967:     calling init: /usr/lib/libsndfile.so.1
      1967:
      1967:
      1967:     calling init: /lib/libwrap.so.0
      1967:
      1967:
      1967:     calling init: /usr/lib/libXtst.so.6
      1967:
      1967:
      1967:     calling init: /usr/lib/libICE.so.6
      1967:
      1967:
      1967:     calling init: /usr/lib/libSM.so.6
      1967:
      1967:
      1967:     calling init: /usr/lib/libX11-xcb.so.1
      1967:
      1967:
      1967:     calling init: /lib/librt.so.1
      1967:
      1967:
      1967:     calling init: /lib/libdbus-1.so.3
      1967:
      1967:
      1967:     calling init: /usr/lib/libjson.so.0
      1967:
      1967:
      1967:     calling init: /usr/lib/libpulsecommon-1.1.so
      1967:
      1967:
      1967:     calling init: /usr/lib/libpulse.so.0
      1967:
      1967:
      1967:     calling init: /usr/lib/libpulsedsp.so
      1967:
      1967:
      1967:     initialize program: touch
      1967:
      1967:
      1967:     transferring control: touch
      1967:
      1967:     /usr/lib/libpulsedsp.so: error: symbol lookup error: undefined symbol: __padsp_disabled__ (fatal)
touch: cannot touch `/dev/dsp': Connection refused
Comment 1 Takashi Iwai 2012-01-20 17:49:11 UTC
Looks like a packaging issue (or due to libtool?)

Scott, could you take a look?
Comment 2 B. Wielens 2012-01-20 18:57:27 UTC
I will attempt to build pulse from scratch this weekend and see whether it makes a difference. Will post results when finished.

I would add that using snd-pcm-oss in combination with pasuspender is an emergency workaround, but defeats the purpose of using padsp, as it  still limits you to a single application accessing /dev/dsp.
Comment 3 B. Wielens 2012-01-20 21:56:39 UTC
I can confirm this issue does NOT exist with pulse built from source.

padsp functions as it should, and programs no longer complain about /dev/dsp not existing.

HOWEVER, I do still see the symbol lookup error in the LD_DEBUG output. (and I now get a "connection refused" error on accessing /dev/dsp.

Will update as I discover more.
Comment 4 B. Wielens 2012-01-21 01:09:17 UTC
Another update: padsp causes programs to hang on startup now (from the clean source build).

for example, mplayer -ao oss <somefile> does not play the file.

However, with sudo it will play the file (but gives the /dev/dsp connection refused error).

I suspect that is a permissions issue - insufficient permissions as regular user to access what's needed, but as superuser no permission to access the pulseaudio server (since it's run in userland)

the hang on startup issue has also been seen with iceweasel
(bugs.debian.org/550674) but no resolution exists.
Comment 5 Nathan Cutler 2017-08-13 01:29:37 UTC
openSUSE 12.1 is no longer maintained. If the issue persists, please open a new bug against a recent version of openSUSE.