linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Stack trace when removing Thunderbolt devices while kernel shutting down
@ 2020-02-18 14:18 Nicholas Johnson
  2020-02-18 14:22 ` Bjorn Helgaas
  2020-02-18 15:01 ` Lukas Wunner
  0 siblings, 2 replies; 4+ messages in thread
From: Nicholas Johnson @ 2020-02-18 14:18 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: linux-kernel, linux-pci

Hi Bjorn,

If I surprise remove Thunderbolt 3 devices just as the kernel is 
shutting down, I get stack dumps, when those devices would not normally 
cause stack dumps if the kernel were not shutting down.

Because the kernel is shutting down, it makes it difficult to capture 
the logs without a serial console.

In your mind, is this cause for concern? There is no harm caused and the 
kernel still shuts down. The main thing I am worried about is if this 
means that the locking around the subsystem is not strict enough.

If you think this is worth looking into, I will try to learn about how 
the native interrupts are handled and try to investigate, and I will 
also try to get my serial console working again to capture the details.

Thank you for any thoughts you may give.

Kind regards,
Nicholas Johnson.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Stack trace when removing Thunderbolt devices while kernel shutting down
  2020-02-18 14:18 Stack trace when removing Thunderbolt devices while kernel shutting down Nicholas Johnson
@ 2020-02-18 14:22 ` Bjorn Helgaas
  2020-02-18 15:01 ` Lukas Wunner
  1 sibling, 0 replies; 4+ messages in thread
From: Bjorn Helgaas @ 2020-02-18 14:22 UTC (permalink / raw)
  To: Nicholas Johnson; +Cc: linux-kernel, linux-pci

On Tue, Feb 18, 2020 at 02:18:40PM +0000, Nicholas Johnson wrote:
> Hi Bjorn,
> 
> If I surprise remove Thunderbolt 3 devices just as the kernel is 
> shutting down, I get stack dumps, when those devices would not normally 
> cause stack dumps if the kernel were not shutting down.
> 
> Because the kernel is shutting down, it makes it difficult to capture 
> the logs without a serial console.
> 
> In your mind, is this cause for concern? There is no harm caused and the 
> kernel still shuts down. The main thing I am worried about is if this 
> means that the locking around the subsystem is not strict enough.
> 
> If you think this is worth looking into, I will try to learn about how 
> the native interrupts are handled and try to investigate, and I will 
> also try to get my serial console working again to capture the details.

Yes, I think this is worth looking into.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Stack trace when removing Thunderbolt devices while kernel shutting down
  2020-02-18 14:18 Stack trace when removing Thunderbolt devices while kernel shutting down Nicholas Johnson
  2020-02-18 14:22 ` Bjorn Helgaas
@ 2020-02-18 15:01 ` Lukas Wunner
  2020-02-18 16:57   ` Nicholas Johnson
  1 sibling, 1 reply; 4+ messages in thread
From: Lukas Wunner @ 2020-02-18 15:01 UTC (permalink / raw)
  To: Nicholas Johnson; +Cc: Bjorn Helgaas, linux-kernel, linux-pci

On Tue, Feb 18, 2020 at 02:18:40PM +0000, Nicholas Johnson wrote:
> If I surprise remove Thunderbolt 3 devices just as the kernel is 
> shutting down, I get stack dumps, when those devices would not normally 
> cause stack dumps if the kernel were not shutting down.
> 
> Because the kernel is shutting down, it makes it difficult to capture 
> the logs without a serial console.

Hold a camera in front of the screen and try to capture the messages
as an MP4 movie which can be uploaded to YouTube or something.

If the output moves too fast to capture it, artificially slow it down
by adding a udelay() to call_console_drivers() in kernel/printk/printk.c.

Thanks,

Lukas

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Stack trace when removing Thunderbolt devices while kernel shutting down
  2020-02-18 15:01 ` Lukas Wunner
@ 2020-02-18 16:57   ` Nicholas Johnson
  0 siblings, 0 replies; 4+ messages in thread
From: Nicholas Johnson @ 2020-02-18 16:57 UTC (permalink / raw)
  To: Lukas Wunner; +Cc: Bjorn Helgaas, linux-kernel, linux-pci

On Tue, Feb 18, 2020 at 04:01:24PM +0100, Lukas Wunner wrote:
> On Tue, Feb 18, 2020 at 02:18:40PM +0000, Nicholas Johnson wrote:
> > If I surprise remove Thunderbolt 3 devices just as the kernel is 
> > shutting down, I get stack dumps, when those devices would not normally 
> > cause stack dumps if the kernel were not shutting down.
> > 
> > Because the kernel is shutting down, it makes it difficult to capture 
> > the logs without a serial console.
> 
> Hold a camera in front of the screen and try to capture the messages
> as an MP4 movie which can be uploaded to YouTube or something.
https://www.youtube.com/watch?v=sDcYmbz7GME

The above is unlisted and will not appear in any search, so it will not 
confuse my subscribers, but anybody with the link can view it (public).

I am still not sure I like the sound of my own voice. *cringe*

> 
> If the output moves too fast to capture it, artificially slow it down
> by adding a udelay() to call_console_drivers() in kernel/printk/printk.c.

If you cannot get anything useful out of the aforementioned video, then 
I will do this tomorrow evening. It is almost 1am now.

> 
> Thanks,
> 
> Lukas

By the way, this is not just with Linux v5.6-rcX. I have noticed this 
for some time but it has been lower down my list in terms of priority 
and urgency. I half expected it to be of no interest. I should have 
mentioned it earlier, but before I might not have had as much time to 
help investigate. I am currently looking for new kernel development 
tasks because my previous ones are done.

Thanks,
Nicholas

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-02-18 16:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-18 14:18 Stack trace when removing Thunderbolt devices while kernel shutting down Nicholas Johnson
2020-02-18 14:22 ` Bjorn Helgaas
2020-02-18 15:01 ` Lukas Wunner
2020-02-18 16:57   ` Nicholas Johnson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).