NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/54796: 9.0_RC1 audio(4) malloc failed
>Number: 54796
>Category: kern
>Synopsis: 9.0_RC1 audio(4) malloc failed
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Dec 24 12:20:00 +0000 2019
>Originator: Izumi Tsutsui
>Release: NetBSD 9.0_RC1
>Organization:
>Environment:
System: NetBSD 9.0_RC1 (GENERIC) #0: Wed Nov 27 16:14:52 UTC 2019 mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
On my NetBSD/i386 9.0_RC1 machine, kernel audio(9) system
gets following failures on heavy load
(firefox + pulseaudio + HTML5 video + build.sh -j4)
and the kernel stalls (some kernel thread never respond):
---
Dec 23 01:07:33 mirage /netbsd: [ 26653.3844655] audio0: malloc outbuf(30720) failed
Dec 23 01:07:33 mirage /netbsd: [ 26653.3844655] audio0: malloc outbuf(30720) failed
Dec 23 01:07:33 mirage /netbsd: [ 26653.3844655] audio0: malloc input(30720) failed
Dec 23 01:07:33 mirage pulseaudio[792]: [oss] core-error.c: Unable to convert error string to locale, filtering.
Dec 23 01:07:33 mirage pulseaudio[792]: [oss] oss-util.c: open('/dev/audio'): Cannot allocate memory
Dec 23 01:07:33 mirage pulseaudio[792]: [oss] core-error.c: Unable to convert error string to locale, filtering.
Dec 23 01:07:33 mirage pulseaudio[792]: [oss] module-oss.c: Resume failed, device busy (Invalid argument)
Dec 23 01:07:51 mirage /netbsd: [ 26670.5230773] audio0: malloc outbuf(30720) failed
Dec 23 01:07:51 mirage /netbsd: [ 26670.5230773] audio0: malloc outbuf(30720) failed
Dec 23 01:07:51 mirage /netbsd: [ 26670.5230773] audio0: malloc input(30720) failed
Dec 23 01:07:51 mirage pulseaudio[792]: [oss] core-error.c: Unable to convert error string to locale, filtering.
Dec 23 01:07:51 mirage pulseaudio[792]: [oss] oss-util.c: open('/dev/audio'): Cannot allocate memory
Dec 23 01:07:51 mirage pulseaudio[792]: [oss] core-error.c: Unable to convert error string to locale, filtering.
Dec 23 01:07:51 mirage pulseaudio[792]: [oss] module-oss.c: Resume failed, device busy (Invalid argument)
Dec 23 01:09:21 mirage /netbsd: [ 26760.9984991] audio0: malloc outbuf(30720) failed
Dec 23 01:09:21 mirage /netbsd: [ 26760.9984991] audio0: malloc outbuf(30720) failed
Dec 23 01:09:21 mirage /netbsd: [ 26760.9984991] audio0: audio_track_init_freq: malloc(7680) failed
Dec 23 01:09:21 mirage pulseaudio[792]: [oss] core-error.c: Unable to convert error string to locale, filtering.
Dec 23 01:09:21 mirage pulseaudio[792]: [oss] oss-util.c: open('/dev/audio'): Cannot allocate memory
Dec 23 01:09:21 mirage pulseaudio[792]: [oss] core-error.c: Unable to convert error string to locale, filtering.
Dec 23 01:09:21 mirage pulseaudio[792]: [oss] module-oss.c: Resume failed, device busy (Invalid argument)
Dec 23 01:13:21 mirage /netbsd: [ 27001.3593118] audio0: malloc outbuf(30720) failed
Dec 23 01:13:21 mirage /netbsd: [ 27001.3593118] audio0: malloc outbuf(30720) failed
Dec 23 01:13:21 mirage /netbsd: [ 27001.3593118] audio0: audio_track_init_freq: malloc(7680) failed
Dec 23 01:13:21 mirage pulseaudio[792]: [oss] core-error.c: Unable to convert error string to locale, filtering.
Dec 23 01:13:21 mirage pulseaudio[792]: [oss] oss-util.c: open('/dev/audio'): Cannot allocate memory
Dec 23 01:13:21 mirage pulseaudio[792]: [oss] core-error.c: Unable to convert error string to locale, filtering.
Dec 23 01:13:21 mirage pulseaudio[792]: [oss] module-oss.c: Resume failed, device busy (Invalid argument)
Dec 23 01:13:21 mirage /netbsd: [ 27001.3593118] audio0: malloc outbuf(30720) failed
Dec 23 01:13:21 mirage /netbsd: [ 27001.3593118] audio0: malloc outbuf(30720) failed
Dec 23 01:13:21 mirage /netbsd: [ 27001.3593118] audio0: audio_track_init_freq: malloc(7680) failed
Dec 23 01:13:21 mirage pulseaudio[792]: [oss] core-error.c: Unable to convert error string to locale, filtering.
Dec 23 01:13:21 mirage pulseaudio[792]: [oss] oss-util.c: open('/dev/audio'): Cannot allocate memory
Dec 23 01:13:21 mirage pulseaudio[792]: [oss] core-error.c: Unable to convert error string to locale, filtering.
Dec 23 01:13:21 mirage pulseaudio[792]: [oss] module-oss.c: Resume failed, device busy (Invalid argument)
---
>How-To-Repeat:
See above.
>Fix:
isaki@ says we could change the following kern_malloc() and
kern_realloc() to use M_NOWAIT to M_WAITOK in src/sys/dev/audio/audio.c:
https://nxr.netbsd.org/xref/src/sys/dev/audio/audio.c?r=1.33#3067
---
3067 static void *
3068 audio_realloc(void *memblock, size_t bytes)
3069 {
3070
3071 if (memblock != NULL) {
3072 if (bytes != 0) {
3073 return kern_realloc(memblock, bytes, M_NOWAIT);
3074 } else {
3075 kern_free(memblock);
3076 return NULL;
3077 }
3078 } else {
3079 if (bytes != 0) {
3080 return kern_malloc(bytes, M_NOWAIT);
3081 } else {
3082 return NULL;
3083 }
3084 }
3085 }
---
Izumi Tsutsui
Home |
Main Index |
Thread Index |
Old Index