mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Satyam Sharma" <satyam.sharma@gmail.com>
To: "Alan Cox" <alan@lxorguk.ukuu.org.uk>
Cc: "Eric Sandeen" <sandeen@sandeen.net>,
	"Andrea Arcangeli" <andrea@suse.de>,
	"Matt Mackall" <mpm@selenic.com>,
	"Rene Herman" <rene.herman@gmail.com>,
	"Ray Lee" <ray-lk@madrabbit.org>, "Bodo Eggert" <7eggert@gmx.de>,
	"Jeremy Fitzhardinge" <jeremy@goop.org>,
	"Jesper Juhl" <jesper.juhl@gmail.com>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"William Lee Irwin III" <wli@holomorphy.com>,
	"David Chinner" <dgc@sgi.com>,
	"Arjan van de Ven" <arjan@infradead.org>
Subject: Re: [PATCH][RFC] 4K stacks default, not a debug thing any more...?
Date: Sat, 28 Jul 2007 00:01:27 +0530	[thread overview]
Message-ID: <a781481a0707271131j3ab89470o4dea2fe2624fca32@mail.gmail.com> (raw)
In-Reply-To: <20070727183807.2d7dbe7b@the-village.bc.nu>

On 7/27/07, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> > Maybe I should resurrect it & send it out...

Hmm, something that hooks in not only at do_IRQ time (as the present
in-mainline stackoverflow check thing)?

> > (FWIW I think I recall that the warning itself sometimes tipped the
> > scales enough on 4k stacks to bring the box down)
>
> You can always switch stack for the printk and it probably should panic
> at that point and give a trace then die as that is what we are trying to
> prove does not occur

Yes, only yesterday I saw exactly this happening DEBUG_STACKOVERFLOW
when doing a udf -> pktcdvd -> cdrom -> ide_cd thing. It's one of those
reproducible will-crash-4k-stacks tests, especially if you have debug stuff
enabled in your build that would make on-stack structures (where such
exist on the codepath) a bit heavier.

Admittedly, what seems to have happened is a bit pathological:

[  481.836378] cdrom: entering cdrom_count_tracks
[  481.844266] BUG: sleeping function called from invalid context at
include/asm/semaphore.h:98
[  481.844434] do_IRQ: stack overflow: 164
[  481.844540]  [<c0405cfe>] show_trace_log_lvl+0x19/0x2e
[  481.844707]  [<c0405dfe>] show_trace+0x12/0x14
[  481.844867]  [<c0405e14>] dump_stack+0x14/0x16
[  481.845027]  [<c0406ff6>] do_IRQ+0x7b/0xe1
[  481.845186]  [<c040583e>] common_interrupt+0x2e/0x34
[  481.845348]  [<c042b8e7>] printk+0x1b/0x1d
[  481.845507]  [<c0422c05>] __might_sleep+0x81/0xdc
[  481.845668]  [<c066d869>] __reacquire_kernel_lock+0x2d/0x4f
[  481.845833]  [<c066b09b>] schedule+0x78a/0x7a4
[  481.845996]  [<c066b538>] wait_for_completion+0x72/0x97
[  481.846160]  [<c05937a6>] ide_do_drive_cmd+0xeb/0x109
[  481.846324]  [<f89172a2>] cdrom_queue_packet_command+0x40/0xc5 [ide_cd]
[  481.846503]  [<f89175b7>] ide_cdrom_packet+0x86/0xa4 [ide_cd]
[  481.846669]  [<f8854dc1>] cdrom_get_disc_info+0x48/0x87 [cdrom]
[  481.846839]  [<f8854ec6>] cdrom_get_last_written+0x2a/0xfe [cdrom]
[  481.847009]  [<f891831b>] cdrom_read_toc+0x39d/0x3f3 [ide_cd]
[  481.847231]  [<f8918e7e>] ide_cdrom_audio_ioctl+0x130/0x1ce [ide_cd]
[  481.847414]  [<f8854123>] cdrom_count_tracks+0x5c/0x126 [cdrom]
[  481.847583]  [<f8855688>] cdrom_open+0x147/0x79c [cdrom]
[  481.847748]  [<f891799a>] idecd_open+0x75/0x8a [ide_cd]
[  481.847912]  [<c04aac0e>] do_open+0x1d1/0x284
[  481.848079]  [<c04aad89>] __blkdev_get+0x73/0x7e
[  481.848242]  [<c04aada9>] blkdev_get+0x15/0x17
[  481.848411]  [<f8b34b6b>] pkt_open+0x99/0xc6e [pktcdvd]
[  481.848583]  [<c04aaad3>] do_open+0x96/0x284
[  481.848745]  [<c04aad89>] __blkdev_get+0x73/0x7e
[  481.848910]  [<c04aada9>] blkdev_get+0x15/0x17

(... the trace cut off there, and then the box froze hard, no sysrq ...)

The mount(2) hit the wait_for_completion() in ide_do_drive_cmd(),
little stack was left at this point. But then I have no idea why the
__reacquire_kernel_lock() from schedule() gave a might_sleep() there,
the code in sched.c and kernel_lock.c looks obviously correct -- the
down(&kernel_sem) only happens with both irqs and preemption on.

Anyway, the second line of printk() in __might_sleep (the one that
tells us in_atomic() and irqs_disabled()) was about to be printed when
an interrupt decided to join the fun. do_IRQ() comes in, with debug
stackoverflows on, it notices that only 164 bytes worth of stack is left
and decides to dump_stack ... and while we were doing just that,
we died. (this was 2.6.23-rc1-mm1)

  reply	other threads:[~2007-07-27 18:31 UTC|newest]

Thread overview: 105+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <8FO1e-2jW-35@gated-at.bofh.it>
     [not found] ` <8FYWD-2eS-7@gated-at.bofh.it>
     [not found]   ` <8GdsH-8dc-13@gated-at.bofh.it>
     [not found]     ` <8Ghmx-60z-17@gated-at.bofh.it>
     [not found]       ` <8Gj55-hJ-5@gated-at.bofh.it>
     [not found]         ` <8GkNo-2Vb-1@gated-at.bofh.it>
     [not found]           ` <8GtnN-7TG-23@gated-at.bofh.it>
     [not found]             ` <8GVjY-PL-25@gated-at.bofh.it>
2007-07-15 17:17               ` Bodo Eggert
2007-07-15 17:35                 ` Arjan van de Ven
2007-07-15 18:32                   ` Måns Rullgård
2007-07-15 17:46                 ` Rene Herman
2007-07-16 13:43                   ` Bodo Eggert
2007-07-16 22:28                     ` Rene Herman
2007-07-16 22:37                       ` Ray Lee
2007-07-16 22:54                         ` Alan Cox
2007-07-16 22:53                           ` Ray Lee
2007-07-16 23:05                             ` Rene Herman
2007-07-16 23:15                               ` Ray Lee
2007-07-18  0:14                                 ` Alan Cox
2007-07-18  6:39                                   ` Ray Lee
2007-07-17 17:01                           ` William Lee Irwin III
2007-07-17 23:39                             ` Jesper Juhl
2007-07-18  0:22                               ` Rene Herman
2007-07-16 22:54                         ` Jesper Juhl
2007-07-16 23:01                           ` Rene Herman
2007-07-16 23:42                           ` Bodo Eggert
2007-07-16 23:51                             ` Jesper Juhl
2007-07-19 19:34                             ` Denis Vlasenko
2007-07-19 20:04                               ` Bodo Eggert
2007-07-16 22:55                         ` Rene Herman
2007-07-16 23:07                           ` Matt Mackall
2007-07-16 23:12                             ` Rene Herman
2007-07-16 23:27                               ` Matt Mackall
2007-07-16 23:32                                 ` Rene Herman
2007-07-18  2:38                                 ` Rene Herman
2007-07-18 16:54                                   ` Matt Mackall
2007-07-18 17:17                                     ` Rene Herman
2007-07-19  0:15                                 ` Andrea Arcangeli
2007-07-19  0:39                                   ` Alan Cox
2007-07-19  1:33                                     ` Andrea Arcangeli
2007-07-19  1:37                                       ` Matt Mackall
2007-07-19  1:56                                         ` Rene Herman
2007-07-19 11:24                                         ` Andrea Arcangeli
2007-07-19 11:44                                           ` Alan Cox
2007-07-27 13:02                                             ` Eric Sandeen
2007-07-27 17:38                                               ` Alan Cox
2007-07-27 18:31                                                 ` Satyam Sharma [this message]
2007-08-01  3:53                                                   ` Eric Sandeen
2007-08-01  8:11                                                     ` Dan Merillat
2007-08-01 10:04                                                       ` Neil Brown
2007-08-10  4:51                                                         ` Dan Merillat
2007-08-10  4:59                                                           ` Neil Brown
2007-08-01 13:33                                                       ` Andrea Arcangeli
2007-08-01 15:44                                                         ` Alan Cox
2007-08-10  1:03                                                           ` Dan Merillat
2007-07-19  9:23                                       ` Alan Cox
2007-07-19 10:52                                         ` Andrea Arcangeli
2007-07-27 13:03                                     ` Eric Sandeen
2007-07-27 17:18                                       ` Krzysztof Halasa
2007-07-19  0:41                                   ` Matt Mackall
2007-07-19  0:48                                     ` Rene Herman
2007-07-19  1:28                                       ` Matt Mackall
2007-07-16 23:13                           ` Ray Lee
2007-07-16 23:22                             ` Rene Herman
2007-07-16 23:35                               ` Jesper Juhl
2007-07-16 23:40                               ` Ray Lee
2007-07-17  0:57                                 ` Rene Herman
2007-07-17 16:14                                   ` Shawn Bohrer
2007-07-17 16:52                                     ` Rene Herman
2007-07-17 17:45                                       ` Zan Lynx
2007-07-18  0:16                                     ` Alan Cox
2007-07-16 23:45                           ` Bodo Eggert
2007-07-17  0:28                             ` Rene Herman
2007-07-17 10:06                               ` Bodo Eggert
2007-07-17 14:38                                 ` Rene Herman
2007-07-17 23:19                                   ` Bodo Eggert
2007-07-17 23:29                                     ` Arjan van de Ven
2007-07-19 17:20                                       ` Bodo Eggert
2007-07-17 23:57                                     ` Rene Herman
2007-07-19 17:05                                       ` Bodo Eggert
2007-07-16 23:26                       ` utz lehmann
2007-07-16 23:39                         ` Måns Rullgård
2007-07-17  1:00                         ` Rene Herman
2007-07-17 14:45                         ` John Stoffel
2007-07-17 23:46                           ` utz lehmann
     [not found] <8IdHQ-7Pm-25@gated-at.bofh.it>
     [not found] ` <8IdHQ-7Pm-27@gated-at.bofh.it>
     [not found]   ` <8IdHQ-7Pm-29@gated-at.bofh.it>
     [not found]     ` <8IdHQ-7Pm-31@gated-at.bofh.it>
     [not found]       ` <8IdHQ-7Pm-33@gated-at.bofh.it>
     [not found]         ` <8IdHQ-7Pm-35@gated-at.bofh.it>
     [not found]           ` <8IdHQ-7Pm-37@gated-at.bofh.it>
     [not found]             ` <8IdHQ-7Pm-39@gated-at.bofh.it>
     [not found]               ` <8IdHQ-7Pm-41@gated-at.bofh.it>
     [not found]                 ` <8IdHQ-7Pm-43@gated-at.bofh.it>
     [not found]                   ` <8IdHQ-7Pm-45@gated-at.bofh.it>
     [not found]                     ` <8IdHQ-7Pm-47@gated-at.bofh.it>
     [not found]                       ` <8IdHQ-7Pm-49@gated-at.bofh.it>
     [not found]                         ` <8IdHQ-7Pm-23@gated-at.bofh.it>
2007-07-18 11:09                           ` Nick Craig-Wood
     [not found] <8HfVl-71J-15@gated-at.bofh.it>
     [not found] ` <8Hgoq-7Cd-21@gated-at.bofh.it>
     [not found]   ` <8Hz7K-38K-37@gated-at.bofh.it>
     [not found]     ` <8HHeZ-7R1-21@gated-at.bofh.it>
     [not found]       ` <8HHoA-835-21@gated-at.bofh.it>
     [not found]         ` <8HHI2-8r2-27@gated-at.bofh.it>
     [not found]           ` <8HI1k-Dn-25@gated-at.bofh.it>
     [not found]             ` <8HIb2-PD-11@gated-at.bofh.it>
     [not found]               ` <8HIun-1e7-33@gated-at.bofh.it>
     [not found]                 ` <8HJA3-2Nq-9@gated-at.bofh.it>
     [not found]                   ` <8HXWo-8t2-17@gated-at.bofh.it>
     [not found]                     ` <8HYzd-PZ-25@gated-at.bofh.it>
     [not found]                       ` <8HZlt-27o-7@gated-at.bofh.it>
2007-07-18  8:37                         ` Nick Craig-Wood
     [not found]           ` <8HHRD-rK-19@gated-at.bofh.it>
     [not found]             ` <8HI1j-Dn-21@gated-at.bofh.it>
     [not found]               ` <8HIb2-PD-5@gated-at.bofh.it>
     [not found]                 ` <8IrUr-4SZ-9@gated-at.bofh.it>
     [not found]                   ` <8IsdO-5g4-7@gated-at.bofh.it>
     [not found]                     ` <8It9R-6Eb-3@gated-at.bofh.it>
     [not found]                       ` <8IAkZ-WW-1@gated-at.bofh.it>
2007-07-19 13:37                         ` Bodo Eggert
2007-07-11 17:16 Jesper Juhl
2007-07-11 17:54 ` Zan Lynx
2007-07-11 20:05   ` Daniel Phillips
2007-07-11 22:09     ` Neil Brown
2007-07-12  3:15       ` Daniel Phillips
2007-07-12  4:16 ` David Chinner
2007-07-12  4:59 ` Ray Lee
2007-07-12 20:24   ` Jesper Juhl
2007-07-13  0:34     ` Jeremy Fitzhardinge
2007-07-13  2:25       ` Jesper Juhl
2007-07-13  4:14         ` Jeremy Fitzhardinge
2007-07-13  9:19           ` Jan Engelhardt
2007-07-13 13:20           ` Rene Herman
2007-07-14 19:17             ` Matt Mackall
2007-07-14 22:19               ` Rene Herman
2007-07-16 23:38                 ` Matt Mackall
2007-07-17 13:46                   ` Rene Herman
2007-07-18 17:19               ` Phillip Susi
2007-07-18 17:32                 ` Rene Herman
2007-07-18 17:32                 ` Alan Cox
2007-07-18 17:33                   ` Phillip Susi
2007-07-14 19:42         ` Matt Mackall
2007-07-12  6:08 ` Jeremy Fitzhardinge
2007-07-12  6:37   ` David Chinner

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=a781481a0707271131j3ab89470o4dea2fe2624fca32@mail.gmail.com \
    --to=satyam.sharma@gmail.com \
    --cc=7eggert@gmx.de \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=andrea@suse.de \
    --cc=arjan@infradead.org \
    --cc=dgc@sgi.com \
    --cc=jeremy@goop.org \
    --cc=jesper.juhl@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpm@selenic.com \
    --cc=ray-lk@madrabbit.org \
    --cc=rene.herman@gmail.com \
    --cc=sandeen@sandeen.net \
    --cc=wli@holomorphy.com \
    /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®