From: Takashi Iwai <tiwai@suse.de>
To: "Stephen Barber" <smbarber@chromium.org>
Cc: <alsa-devel@alsa-project.org>, "Dylan Reid" <dgreid@chromium.org>,
"Bhumika Goyal" <bhumirks@gmail.com>,
"Con Kolivas" <con@kolivas.org>,
"Jaroslav Kysela" <perex@perex.cz>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ALSA: usb-audio: don't retry snd_usb_ctl_msg after timeout
Date: Fri, 18 Aug 2017 10:10:53 +0200 [thread overview]
Message-ID: <s5hy3qhe1o2.wl-tiwai@suse.de> (raw)
In-Reply-To: <20170817221746.45403-1-smbarber@chromium.org>
On Fri, 18 Aug 2017 00:17:46 +0200,
Stephen Barber wrote:
>
> A few calls to snd_usb_ctl_msg wrap the function in a retry loop. In
> the worst case, the timeout for snd_usb_ctl_msg is 5 seconds, which when
> retried 10 times (for example, if a device is removed) could cause a
> probe to hang for ~50 seconds.
>
> Example stack trace from 3.14 which triggered a hung task timeout:
> Call Trace:
> [<ffffffffa2c1f720>] ? inet6_set_link_af.part.35+0x12/0x12
> [<ffffffffa2c20309>] schedule+0x6e/0x70
> [<ffffffffa2c1f81c>] schedule_timeout+0xfc/0x13c
> [<ffffffffa2667bbc>] ? rcu_read_unlock_sched_notrace+0x17/0x17
> [<ffffffffa2c20d68>] __wait_for_common+0x153/0x190
> [<ffffffffa2c20d68>] ? __wait_for_common+0x153/0x190
> [<ffffffffa26890e5>] ? wake_up_state+0x12/0x12
> [<ffffffffa2c20e0e>] wait_for_completion_timeout+0x1d/0x1f
> [<ffffffffa2a07c70>] usb_start_wait_urb+0x93/0xf1
> [<ffffffffa2a07daf>] usb_control_msg+0xe1/0x11d
> [<ffffffffc02cd254>] snd_usb_ctl_msg+0x9c/0xf1 [snd_usb_audio]
> [<ffffffffc02ce191>] snd_usb_mixer_set_ctl_value+0x124/0xab1 [snd_usb_audio]
> [<ffffffffc02ce230>] snd_usb_mixer_set_ctl_value+0x1c3/0xab1 [snd_usb_audio]
> [<ffffffffc02ce58e>] snd_usb_mixer_set_ctl_value+0x521/0xab1 [snd_usb_audio]
> [<ffffffffc02cee88>] snd_usb_mixer_add_control+0x36a/0x1264 [snd_usb_audio]
> [<ffffffffc02cf323>] snd_usb_mixer_add_control+0x805/0x1264 [snd_usb_audio]
> [<ffffffffa2a06e11>] ? usb_free_urb+0x1a/0x1c
> [<ffffffffc02cfcf7>] snd_usb_mixer_add_control+0x11d9/0x1264 [snd_usb_audio]
> [<ffffffffc02d000f>] snd_usb_create_mixer+0xbc/0x286 [snd_usb_audio]
> [<ffffffffc02cac18>] 0xffffffffc02cac17
> [<ffffffffa2a0aaf1>] usb_probe_interface+0x17c/0x21c
> [<ffffffffa29a65bc>] driver_probe_device+0xae/0x1fa
> [<ffffffffa29a6767>] __device_attach_driver+0x5f/0x66
> [<ffffffffa29a6708>] ? driver_probe_device+0x1fa/0x1fa
> [<ffffffffa29a4a60>] bus_for_each_drv+0x87/0xaa
> [<ffffffffa29a688a>] __device_attach+0x9d/0x101
> [<ffffffffa29a6913>] device_initial_probe+0x13/0x15
> [<ffffffffa29a5ae6>] bus_probe_device+0x33/0x96
> [<ffffffffa29a3d19>] device_add+0x328/0x547
> [<ffffffffa2a09355>] usb_set_configuration+0x624/0x674
> [<ffffffffa2a11949>] generic_probe+0x45/0x77
> [<ffffffffa2a0a962>] usb_probe_device+0x2d/0x40
> [<ffffffffa29a65bc>] driver_probe_device+0xae/0x1fa
> [<ffffffffa29a6767>] __device_attach_driver+0x5f/0x66
> [<ffffffffa29a6708>] ? driver_probe_device+0x1fa/0x1fa
> [<ffffffffa29a4a60>] bus_for_each_drv+0x87/0xaa
> [<ffffffffa29a688a>] __device_attach+0x9d/0x101
> [<ffffffffa29a6913>] device_initial_probe+0x13/0x15
> [<ffffffffa29a5ae6>] bus_probe_device+0x33/0x96
> [<ffffffffa29a3d19>] device_add+0x328/0x547
> [<ffffffffa29030bc>] ? add_device_randomness+0x111/0x130
> [<ffffffffa2a00967>] usb_new_device+0x2a2/0x3c0
> [<ffffffffa2a02ddc>] hub_thread+0xa3d/0xeed
> [<ffffffffa2c2010d>] ? __schedule+0x41e/0x5ac
> [<ffffffffa26957ce>] ? finish_wait+0x62/0x62
> [<ffffffffa2a0239f>] ? usb_reset_device+0x16a/0x16a
> [<ffffffffa267b255>] kthread+0x108/0x110
> [<ffffffffa267b14d>] ? __kthread_parkme+0x67/0x67
> [<ffffffffa2c23b2c>] ret_from_fork+0x7c/0xb0
> [<ffffffffa267b14d>] ? __kthread_parkme+0x67/0x67
>
> Signed-off-by: Stephen Barber <smbarber@chromium.org>
Applied, thanks.
Takashi
prev parent reply other threads:[~2017-08-18 8:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-17 22:17 Stephen Barber
2017-08-18 8:10 ` Takashi Iwai [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=s5hy3qhe1o2.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=bhumirks@gmail.com \
--cc=con@kolivas.org \
--cc=dgreid@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=smbarber@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®