Bug 11284
Summary: | WARNING: at drivers/base/power/main.c:82 device_pm_add | ||
---|---|---|---|
Product: | Drivers | Reporter: | Michael S. Tsirkin (m.s.tsirkin) |
Component: | USB | Assignee: | power-management_other |
Status: | CLOSED DUPLICATE | ||
Severity: | normal | CC: | bunk, stern |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 2.6.27-rc2 | Subsystem: | |
Regression: | Yes | Bisected commit-id: | |
Bug Depends on: | |||
Bug Blocks: | 7216, 11167 |
Description
Michael S. Tsirkin
2008-08-07 23:14:36 UTC
Reply-To: akpm@linux-foundation.org (switched to email. Please respond via emailed reply-to-all, not via the bugzilla web interface). On Thu, 7 Aug 2008 23:14:37 -0700 (PDT) bugme-daemon@bugzilla.kernel.org wrote: > http://bugzilla.kernel.org/show_bug.cgi?id=11284 > > Summary: WARNING: at drivers/base/power/main.c:82 device_pm_add > Product: Power Management > Version: 2.5 > KernelVersion: 2.6.27-rc2 > Platform: All > OS/Version: Linux > Tree: Mainline > Status: NEW > Severity: normal > Priority: P1 > Component: Hibernation/Suspend > AssignedTo: power-management_other@kernel-bugs.osdl.org > ReportedBy: m.s.tsirkin@gmail.com > This is int device_pm_add(struct device *dev) { int error; pr_debug("PM: Adding info for %s:%s\n", dev->bus ? dev->bus->name : "No Bus", kobject_name(&dev->kobj)); mutex_lock(&dpm_list_mtx); if (dev->parent) { if (dev->parent->power.status >= DPM_SUSPENDING) { dev_warn(dev, "parent %s is sleeping, will not add\n", dev->parent->bus_id); WARN_ON(true); } coming via USB again. This was reported, diagnosed, discussed a week or two ago, I thought. > Latest working kernel version: 2.6.26 > Earliest failing kernel version: 2.6.27-rc2 (2.6.27-rc1 not tested yet) > with b8d62e336c9775365db94c6719f8e5702efe64a6 reverted > Distribution: ubuntu gutsy > Hardware Environment: T60p > Software Environment: > Problem Description: > > Upon suspend to ram and resume I get a lot of messages like the following. > Are these benign? > I see some instability in resume, but not easily reproducible. > Could this be a symptom? > The reason I revert b8d62e336c9775365db94c6719f8e5702efe64a6 > is because otherwise laptop won't resume at all. > > > [ 4391.095856] hub 5-0:1.0: legacy resume > [ 4391.095909] sd 0:0:0:0: legacy resume > [ 4391.095919] sd 0:0:0:0: [sda] Starting disk > [ 4391.425849] ide-cdrom 0.0: legacy resume > [ 4391.432009] hda: host max PIO4 wanted PIO255(auto-tune) selected PIO4 > [ 4391.432009] hda: UDMA/33 mode selected > [ 4391.432266] psmouse serio2: legacy resume > [ 4391.432289] tpm_tis tpm_tis: resume > [ 4391.432323] usb 4-1: legacy resume > [ 4391.543224] usb 4-1: reset full speed USB device using uhci_hcd and > address > 2 > [ 4391.696872] hci_usb 4-1:1.0: no reset_resume for driver hci_usb? > [ 4391.696876] hci_usb 4-1:1.1: no reset_resume for driver hci_usb? > [ 4391.697864] PM: Removing info for No Bus:usbdev4.2_ep83 > [ 4391.698092] PM: Removing info for No Bus:usbdev4.2_ep03 > [ 4391.698306] PM: Adding info for No Bus:usbdev4.2_ep83 > [ 4391.698311] usb_endpoint usbdev4.2_ep83: parent 4-1:1.1 is sleeping, will > not add > [ 4391.698322] ------------[ cut here ]------------ > [ 4391.698325] WARNING: at drivers/base/power/main.c:82 > device_pm_add+0xde/0x110() > [ 4391.698329] Modules linked in: battery ac thinkpad_acpi nvram thermal fan > button ppp_async crc_ccitt ppp_generic slhc authenc xfrm_user xfrm4_tunnel > tunnel4 ipcomp xfrm_ipcomp esp4 aead ah4 hci_usb bluetooth uinput ppdev > parport_pc lp parport acpi_cpufreq cpufreq_stats container ipv6 af_packet > ipt_LOG xt_limit ipt_addrtype xt_owner xt_state xt_tcpudp xt_conntrack > nf_nat_irc nf_conntrack_irc nf_nat_ftp nf_nat nf_conntrack_ipv4 > nf_conntrack_ftp nf_conntrack iptable_filter ip_tables x_tables deflate > zlib_deflate des_generic af_key tpm_tis tpm tpm_bios joydev pcmcia > snd_hda_intel snd_pcm_oss snd_mixer_oss snd_pcm snd_seq_oss > snd_seq_midi_event > snd_seq arc4 yenta_socket ecb snd_timer rsrc_nonstatic psmouse snd_seq_device > pcmcia_core snd serio_raw soundcore snd_page_alloc intel_agp shpchp agpgart > pci_hotplug video output rfkill led_class evdev ext3 jbd mbcache ide_cd_mod > cdrom ata_piix sg sd_mod piix ahci libata ide_pci_generic ehci_hcd uhci_hcd > scsi_mod usbcore dock processor fuse cbc aes_i586 aes_generic sha1_generic > sha256_generic dm_crypt crypto_blkcipher dm_mod [last unloaded: mac80211] > [ 4391.698462] Pid: 11398, comm: bash Tainted: G W > 2.6.27-rc2-mst-suspend #32 > [ 4391.698468] [<c0127c54>] warn_on_slowpath+0x54/0x70 > [ 4391.698477] [<c032fffd>] ? _spin_unlock+0x1d/0x20 > [ 4391.698486] [<c01d0d33>] ? sysfs_add_one+0x13/0x50 > [ 4391.698495] [<c032ed3a>] ? mutex_lock_nested+0x19a/0x260 > [ 4391.698502] [<c027ac61>] ? device_pm_add+0x41/0x110 > [ 4391.698509] [<c027ac61>] ? device_pm_add+0x41/0x110 > [ 4391.698515] [<c0128beb>] ? printk+0x1b/0x20 > [ 4391.698521] [<c027acfe>] device_pm_add+0xde/0x110 > [ 4391.698543] [<c0274b1f>] device_add+0x3ef/0x590 > [ 4391.698551] [<c0274cd2>] device_register+0x12/0x20 > [ 4391.698565] [<f88ac510>] usb_create_ep_files+0x170/0x2b0 [usbcore] > [ 4391.698618] [<f88ab946>] usb_create_sysfs_intf_files+0x76/0xb0 [usbcore] > [ 4391.698663] [<f88a7969>] usb_set_interface+0x119/0x1a0 [usbcore] > [ 4391.698706] [<f88a9090>] usb_unbind_interface+0x60/0xa0 [usbcore] > [ 4391.698883] [<c0276899>] __device_release_driver+0x59/0x90 > [ 4391.698898] [<c02769a3>] device_release_driver+0x23/0x40 > [ 4391.698924] [<f88a8c5b>] usb_driver_release_interface+0x9b/0xa0 [usbcore] > [ 4391.698993] [<f8d3af2d>] hci_usb_disconnect+0x3d/0x80 [hci_usb] > [ 4391.699032] [<f88a6484>] ? usb_disable_interface+0x34/0x50 [usbcore] > [ 4391.699119] [<f88a907e>] usb_unbind_interface+0x4e/0xa0 [usbcore] > [ 4391.699213] [<c0276899>] __device_release_driver+0x59/0x90 > [ 4391.699227] [<c02769a3>] device_release_driver+0x23/0x40 > [ 4391.699251] [<f88a8c5b>] usb_driver_release_interface+0x9b/0xa0 [usbcore] > [ 4391.699337] [<f88a8c85>] usb_rebind_intf+0x25/0x70 [usbcore] > [ 4391.699397] [<c014998b>] ? trace_hardirqs_on+0xb/0x10 > [ 4391.699441] [<f88a8d65>] do_unbind_rebind+0x75/0x80 [usbcore] > [ 4391.699524] [<f88a8dc5>] usb_external_resume_device+0x55/0x80 [usbcore] > [ 4391.699609] [<f88a8e15>] usb_resume+0x25/0x30 [usbcore] > [ 4391.699669] [<c027a8da>] device_resume+0x3ba/0x430 > [ 4391.699681] [<c023da1d>] ? acpi_set_firmware_waking_vector+0x16/0x42 > [ 4391.699701] [<c0153a19>] suspend_devices_and_enter+0x79/0x170 > [ 4391.699714] [<c0153cd8>] enter_state+0x198/0x1b0 > [ 4391.699726] [<c0153d7f>] state_store+0x8f/0xd0 > [ 4391.699737] [<c0153cf0>] ? state_store+0x0/0xd0 > [ 4391.699749] [<c020e234>] kobj_attr_store+0x24/0x30 > [ 4391.699763] [<c01d0222>] sysfs_write_file+0xa2/0x100 > [ 4391.699777] [<c0189909>] vfs_write+0x99/0x130 > [ 4391.699790] [<c01d0180>] ? sysfs_write_file+0x0/0x100 > [ 4391.699804] [<c0189e4d>] sys_write+0x3d/0x70 > [ 4391.699816] [<c0103c15>] sysenter_do_call+0x12/0x35 > [ 4391.699830] ======================= > [ 4391.699837] ---[ end trace ffe4ac9917363b1d ]--- > [ 4391.700063] PM: Adding info for No Bus:usbdev4.2_ep03 > [ 4391.700073] usb_endpoint usbdev4.2_ep03: parent 4-1:1.1 is sleeping, will > not add > ... On Friday, 8 of August 2008, bugme-daemon@bugzilla.kernel.org wrote: > http://bugzilla.kernel.org/show_bug.cgi?id=11284 > > > > > > ------- Comment #1 from anonymous@kernel-bugs.osdl.org 2008-08-07 23:36 > ------- > Reply-To: akpm@linux-foundation.org > > > (switched to email. Please respond via emailed reply-to-all, not via the > bugzilla web interface). > > On Thu, 7 Aug 2008 23:14:37 -0700 (PDT) bugme-daemon@bugzilla.kernel.org > wrote: > > > http://bugzilla.kernel.org/show_bug.cgi?id=11284 > > > > Summary: WARNING: at drivers/base/power/main.c:82 device_pm_add > > Product: Power Management > > Version: 2.5 > > KernelVersion: 2.6.27-rc2 > > Platform: All > > OS/Version: Linux > > Tree: Mainline > > Status: NEW > > Severity: normal > > Priority: P1 > > Component: Hibernation/Suspend > > AssignedTo: power-management_other@kernel-bugs.osdl.org > > ReportedBy: m.s.tsirkin@gmail.com > > > > This is > > int device_pm_add(struct device *dev) > { > int error; > > pr_debug("PM: Adding info for %s:%s\n", > dev->bus ? dev->bus->name : "No Bus", > kobject_name(&dev->kobj)); > mutex_lock(&dpm_list_mtx); > if (dev->parent) { > if (dev->parent->power.status >= DPM_SUSPENDING) { > dev_warn(dev, "parent %s is sleeping, will not > add\n", > dev->parent->bus_id); > WARN_ON(true); > } > > coming via USB again. This was reported, diagnosed, discussed a week > or two ago, I thought. Yes, it was. The problem is known, but unfortunately quite difficult to fix and the warning only indicates that something is done in a wrong way, although in this particular case it actually works. The message is misleading, because the device is added to the list, I'll fix that. In principle we could drop the WARN_ON() temporarily, but it is actually useful, because it tells us what needs to be changed. Previously there was a hack in the USB code that prevented this warning from being printed, but it stopped to work after recent PM core changes. (In reply to comment #2) > > coming via USB again. This was reported, diagnosed, discussed a week > > or two ago, I thought. > > Yes, it was. > > The problem is known, but unfortunately quite difficult to fix and the > warning > only indicates that something is done in a wrong way, although in this > particular case it actually works. The message is misleading, because the > device is added to the list, I'll fix that. > > In principle we could drop the WARN_ON() temporarily, but it is actually > useful, because it tells us what needs to be changed. > > Previously there was a hack in the USB code that prevented this warning from > being printed, but it stopped to work after recent PM core changes. In my opinion "user sees scary kernel messages for working setup" is a regression, and if not fixed properly the WARN_ON should be disabled in 2.6.27. (In reply to comment #0) > Latest working kernel version: 2.6.26 > Earliest failing kernel version: 2.6.27-rc2 (2.6.27-rc1 not tested yet) > with b8d62e336c9775365db94c6719f8e5702efe64a6 reverted > Distribution: ubuntu gutsy > Hardware Environment: T60p > Software Environment: > Problem Description: > > Upon suspend to ram and resume I get a lot of messages like the following. > Are these benign? > I see some instability in resume, but not easily reproducible. What exactly is this instability? Does 2.6.26 work fine? > Could this be a symptom? > The reason I revert b8d62e336c9775365db94c6719f8e5702efe64a6 > is because otherwise laptop won't resume at all. What is commit b8d62e336c9775365db94c6719f8e5702efe64a6 ? I'm not seeing it in Linus' tree. On Thu, Aug 07, 2008 at 11:36:02PM -0700, Andrew Morton wrote:
>
> (switched to email. Please respond via emailed reply-to-all, not via the
> bugzilla web interface).
>
> On Thu, 7 Aug 2008 23:14:37 -0700 (PDT) bugme-daemon@bugzilla.kernel.org
> wrote:
>
> > http://bugzilla.kernel.org/show_bug.cgi?id=11284
> >
> > Summary: WARNING: at drivers/base/power/main.c:82 device_pm_add
> > Product: Power Management
> > Version: 2.5
> > KernelVersion: 2.6.27-rc2
> > Platform: All
> > OS/Version: Linux
> > Tree: Mainline
> > Status: NEW
> > Severity: normal
> > Priority: P1
> > Component: Hibernation/Suspend
> > AssignedTo: power-management_other@kernel-bugs.osdl.org
> > ReportedBy: m.s.tsirkin@gmail.com
> >
>
> This is
>
> int device_pm_add(struct device *dev)
> {
> int error;
>
> pr_debug("PM: Adding info for %s:%s\n",
> dev->bus ? dev->bus->name : "No Bus",
> kobject_name(&dev->kobj));
> mutex_lock(&dpm_list_mtx);
> if (dev->parent) {
> if (dev->parent->power.status >= DPM_SUSPENDING) {
> dev_warn(dev, "parent %s is sleeping, will not add\n",
> dev->parent->bus_id);
> WARN_ON(true);
> }
>
> coming via USB again. This was reported, diagnosed, discussed a week
> or two ago, I thought.
Oh, uh, should have googled it.
Sorry.
ce6fce4295ba727b36fdc73040e444bd1aae64cd(In reply to comment #4) > (In reply to comment #0) > > Latest working kernel version: 2.6.26 > > Earliest failing kernel version: 2.6.27-rc2 (2.6.27-rc1 not tested yet) > > with b8d62e336c9775365db94c6719f8e5702efe64a6 reverted > > Distribution: ubuntu gutsy > > Hardware Environment: T60p > > Software Environment: > > Problem Description: > > > > Upon suspend to ram and resume I get a lot of messages like the following. > > Are these benign? > > I see some instability in resume, but not easily reproducible. > > What exactly is this instability? X often crashes on resume, sometimes ACPI seems to stop working after resume. I am trying to figure exact way to reproduce first, or get some relevant logs, then I'll report. > > Does 2.6.26 work fine? yes > > Could this be a symptom? > > The reason I revert b8d62e336c9775365db94c6719f8e5702efe64a6 > > is because otherwise laptop won't resume at all. > > What is commit > b8d62e336c9775365db94c6719f8e5702efe64a6 ? I'm not seeing it in Linus' tree. > sorry that was ce6fce4295ba727b36fdc73040e444bd1aae64cd there is a separate bugzilla entry for this. (In reply to comment #3) > (In reply to comment #2) > > > > coming via USB again. This was reported, diagnosed, discussed a week > > > or two ago, I thought. > > > > Yes, it was. > > > > The problem is known, but unfortunately quite difficult to fix and the > warning > > only indicates that something is done in a wrong way, although in this > > particular case it actually works. The message is misleading, because the > > device is added to the list, I'll fix that. > > > > In principle we could drop the WARN_ON() temporarily, but it is actually > > useful, because it tells us what needs to be changed. > > > > Previously there was a hack in the USB code that prevented this warning > from > > being printed, but it stopped to work after recent PM core changes. > > In my opinion "user sees scary kernel messages for working setup" is a > regression, and if not fixed properly the WARN_ON should be disabled in > 2.6.27. > FWIW I agree. |