[IMX8MMINILPD4-EVK - Audio] PyAudio/Alsa lib segment fault (core dumped) with root user

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

[IMX8MMINILPD4-EVK - Audio] PyAudio/Alsa lib segment fault (core dumped) with root user

1,502 Views
expman99
Contributor II

Hi,

I am using pyaudio on iMX8MM board that runs yocto-L4.14.98_2.0.0_ga.

But it's always be crashed after creating audio interface by codes:

   import pyaudio

   pyaudio.PyAudio()

Debug stack shows:

#0 __GI_raise (sig=sig@entry=6) at /usr/src/debug/glibc/2.27-r0/git/sysdeps/unix/sysv/linux/raise.c:51
#1 0x0000ffffbf3011b0 in __GI_abort () at /usr/src/debug/glibc/2.27-r0/git/stdlib/abort.c:79
#2 0x0000ffffbf2f98b8 in __assert_fail_base (fmt=0xffffbf3f0218 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0xffffbee4b988 "bitofs % 8 == 0",
file=file@entry=0xffffbee4b958 "../../../alsa-lib-1.1.5/src/pcm/pcm_local.h", line=line@entry=572, function=function@entry=0xffffbee49ff0 "snd_pcm_channel_area_addr")
at /usr/src/debug/glibc/2.27-r0/git/assert/assert.c:92
#3 0x0000ffffbf2f9934 in __GI___assert_fail (assertion=0xffffbee4b988 "bitofs % 8 == 0", file=0xffffbee4b958 "../../../alsa-lib-1.1.5/src/pcm/pcm_local.h", line=572,
function=0xffffbee49ff0 "snd_pcm_channel_area_addr") at /usr/src/debug/glibc/2.27-r0/git/assert/assert.c:101
#4 0x0000ffffbedaf24c in ?? () from /usr/lib/libasound.so.2
#5 0x0000ffffbee09f7c in ?? () from /usr/lib/libasound.so.2
#6 0x00000000005dea80 in ?? ()

Or:

#0 0x0000ffffbedd47ac in snd_pcm_area_silence () from /usr/lib/libasound.so.2
#1 0x0000ffffbee09f7c in ?? () from /usr/lib/libasound.so.2
#2 0x00000000005ddd10 in ?? ()

And this issue only occurs with root user. I created regular user (uid: 1000) for testing, pyaudio.PyAudio() worked.

Have anyone got similar?

Update: The cause maybe in audio group, any user that has audio group permission will encounter this issue. When remove it from audio group, the problem disappears. But I need this permission to use mic, speaker.

Thanks,

0 Kudos
Reply
2 Replies

1,218 Views
igorpadykov
NXP Employee
NXP Employee

Hi Mai

one can try Demo Images

Linux Binary Demo Files - i.MX 8MMini EVK

and use Chapter 7 Audio attached Linux Manual, sect.7.3.1.1 Audio-only playback

Linux Guide.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

1,218 Views
expman99
Contributor II

Thank igorpadykov,

I tried as you recommended. But the issue still occurs sometime.

0 Kudos
Reply