[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#645071: linux-image-2.6.32-5-686-bigmem: init crashes during runlevel switch



On Wed, 2011-10-12 at 14:05 +0300, Matrosov Dmitriy wrote:
> Package: linux-2.6
> Version: 2.6.32-38
> Severity: normal
> Tags: squeeze
> 
> Steps to reproduce:
> 1. Reboot computer.
> 2. Boot into runlevel 2.
> 3. Switch to console and go to single-user runlevel:
> # telinit 1
> 4. Enter root password and switch to runlevel 2 again:
> # telinit 2
> 5. And now, as i understand, second init copy (which run by telinit) will
>    crash.
> 
> I can't reproduce this again without rebooting system, i.e. it occurs only
> after reboot and only once.
> Also, i can't reproduce this with previous kernel (=2.6.32-35squeeze2), and,
> though, i don't sure that this is kernel bug, but it seems, like last kernel
> upgrade (=2.6.32-38) triggers it.

This isn't a crash.

[...]
> [   75.608119] ------------[ cut here ]------------
> [   75.608136] WARNING: at /build/buildd-linux-2.6_2.6.32-38-i386-G9QRBd/linux-2.6-2.6.32/debian/build/source_i386_none/drivers/char/tty_ldisc.c:738 tty_ldisc_reinit+0x3e/0x6c()
> [   75.608144] Hardware name: 6460EDG
> [   75.608148] Modules linked in: acpi_cpufreq cpufreq_stats cpufreq_powersave cpufreq_conservative cpufreq_userspace pppoe pppox ppp_generic slhc binfmt_misc uinput fuse ipt_REJECT ipt_LOG xt_limit xt_tcpudp xt_state iptable_filter ipt_MASQUERADE iptable_nat nf_nat nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4 iptable_mangle ip_tables x_tables ext3 jbd ext2 tp_smapi thinkpad_ec loop firewire_sbp2 snd_hda_codec_analog btusb snd_hda_intel bluetooth arc4 snd_hda_codec sg snd_hwdep ecb iwlagn snd_pcm nouveau iwlcore sr_mod sdhci_pci sdhci ttm snd_seq mac80211 snd_timer firewire_ohci cdrom drm_kms_helper snd_seq_device joydev firewire_core mmc_core cfg80211 drm pcmcia yenta_socket snd thinkpad_acpi soundcore rsrc_nonstatic i2c_algo_bit i2c_i801 wmi uhci_hcd pcmcia_core ricoh_mmc crc_itu_t snd_page_alloc ehci_hcd i2c_core ata_piix ata_generic e1000e rfkill led_class nvram usbcore nls_base processor button ac battery psmouse evdev pcspkr video output serio_raw ext4 mbcache jbd2 crc
>  16 dm_mod sd_mod crc_t10dif ahci libata scsi_mod thermal thermal_sys [last unloaded: kvm]
> [   75.608352] Pid: 2422, comm: init Not tainted 2.6.32-5-686-bigmem #1
> [   75.608357] Call Trace:
> [   75.608369]  [<c1036819>] ? warn_slowpath_common+0x5e/0x8a
> [   75.608378]  [<c103684f>] ? warn_slowpath_null+0xa/0xc
> [   75.608386]  [<c11a38b9>] ? tty_ldisc_reinit+0x3e/0x6c
> [   75.608394]  [<c11a39d6>] ? tty_ldisc_hangup+0xef/0x172
> [   75.608403]  [<c10a5c14>] ? remove_vma+0x43/0x48
> [   75.608413]  [<c119e136>] ? do_tty_hangup+0xd0/0x2b1
> [   75.608422]  [<c119e60d>] ? disassociate_ctty+0x3b/0x1b3
> [   75.608430]  [<c103961a>] ? do_exit+0x212/0x5cd
> [   75.608439]  [<c1039a34>] ? do_group_exit+0x5f/0x82
> [   75.608449]  [<c10449bf>] ? get_signal_to_deliver+0x30d/0x32e
> [   75.608459]  [<c10075b4>] ? do_notify_resume+0x6f/0x713
> [   75.608469]  [<c110a800>] ? security_task_wait+0xc/0xd
> [   75.608478]  [<c103902e>] ? wait_consider_task+0x983/0x990
> [   75.608488]  [<c104a804>] ? remove_wait_queue+0xb/0x2f
> [   75.608496]  [<c10391ea>] ? do_wait+0x1af/0x1e3
> [   75.608504]  [<c10392b6>] ? sys_wait4+0x98/0xa2
> [   75.608514]  [<c1037c44>] ? child_wait_callback+0x0/0x5f
> [   75.608522]  [<c10392d3>] ? sys_waitpid+0x13/0x17
> [   75.608530]  [<c10082f4>] ? work_notifysig+0x13/0x1b
> [   75.608536] ---[ end trace a550edb008c670a3 ]---
[...].

This warning message was added by the bug fix "TTY: ldisc, do not close
until there are readers".  I don't believe that the warning a
regression; it's just reporting a problem that already existed.

If you would like to help us understand and fix the problem, please can
you test the attached patch, following the instructions at
<http://kernel-handbook.alioth.debian.org/ch-common-tasks.html#s-common-official>.  It should replace the warnings with log lines of the form
"tty_ldisc_reinit: refcount of <name> is still <number>" which you
should send back.

Ben.

-- 
Ben Hutchings
Quantity is no substitute for quality, but it's the only one we've got.
From: Jiri Slaby <jslaby@suse.cz>
Date: Mon, 8 Aug 2011 16:00:59 +0200
Subject: [PATCH] TTY: tty_ldisc_wait_idle debug

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
[bwh: Change file path for 2.6.32]
---
 drivers/tty/tty_ldisc.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/drivers/tty/tty_ldisc.c b/drivers/tty/tty_ldisc.c
index 512c49f..0b90801 100644
--- a/drivers/char/tty_ldisc.c
+++ b/drivers/char/tty_ldisc.c
@@ -26,6 +26,7 @@
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/seq_file.h>
+#include <linux/ratelimit.h>
 
 #include <linux/uaccess.h>
 #include <asm/system.h>
@@ -758,11 +759,17 @@ static void tty_reset_termios(struct tty_struct *tty)
 static int tty_ldisc_reinit(struct tty_struct *tty, int ldisc)
 {
 	struct tty_ldisc *ld = tty_ldisc_get(ldisc);
+	int ret;
 
 	if (IS_ERR(ld))
 		return -1;
 
-	WARN_ON_ONCE(tty_ldisc_wait_idle(tty));
+	ret = tty_ldisc_wait_idle(tty);
+	if (ret)
+		printk_ratelimited(KERN_DEBUG "%s: refcount of %ps is still %d\n",
+				__func__,
+				tty->ldisc->ops,
+				atomic_read(&tty->ldisc->users));
 
 	tty_ldisc_close(tty, tty->ldisc);
 	tty_ldisc_put(tty->ldisc);
-- 
1.7.6


Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: