[Bugme-new] [Bug 41092] New: INFO: trying to register non-static key (sync_inodes_sb)

bugzilla-daemon at bugzilla.kernel.org bugzilla-daemon at bugzilla.kernel.org
Sat Aug 13 15:07:15 PDT 2011


https://bugzilla.kernel.org/show_bug.cgi?id=41092

           Summary: INFO: trying to register non-static key
                    (sync_inodes_sb)
           Product: File System
           Version: 2.5
    Kernel Version: 3.0.1
          Platform: All
        OS/Version: Linux
              Tree: Mainline
            Status: NEW
          Severity: normal
          Priority: P1
         Component: VFS
        AssignedTo: fs_vfs at kernel-bugs.osdl.org
        ReportedBy: pebolle at tiscali.nl
        Regression: No


0) This showed up in /var/log/messages (that log indicates that this happened
shortly before suspending to ram):

INFO: trying to register non-static key.
the code is fine but needs lockdep annotation.
turning off the locking correctness validator.
Pid: 1561, comm: sync Not tainted 3.0.1.1-1.local0.fc14.x86_64 #1
Call Trace:
 [<ffffffff8108c166>] register_lock_class+0xfc/0x2ca
 [<ffffffff810101ed>] ? native_sched_clock+0x35/0x37
 [<ffffffff810101f8>] ? sched_clock+0x9/0xd
 [<ffffffff8108e463>] ? mark_lock+0x2d/0x1d8
 [<ffffffff8108e6f6>] __lock_acquire+0xe8/0xdd8
 [<ffffffff810f3623>] ? find_get_pages_tag+0xc6/0xf2
 [<ffffffff8100fcb1>] ? paravirt_read_tsc+0x9/0xd
 [<ffffffff810101ed>] ? native_sched_clock+0x35/0x37
 [<ffffffff810101f8>] ? sched_clock+0x9/0xd
 [<ffffffff8107fff5>] ? sched_clock_local+0x12/0x75
 [<ffffffff811638b5>] ? sync_inodes_sb+0x130/0x1f5
 [<ffffffff8108f8b2>] lock_acquire+0xb7/0xfb
 [<ffffffff811638b5>] ? sync_inodes_sb+0x130/0x1f5
 [<ffffffff8108c00f>] ? lock_release_holdtime+0x54/0x5b
 [<ffffffff814eedd3>] _raw_spin_lock+0x36/0x69
 [<ffffffff811638b5>] ? sync_inodes_sb+0x130/0x1f5
 [<ffffffff814ef75f>] ? _raw_spin_unlock+0x2b/0x2f
 [<ffffffff811638b5>] sync_inodes_sb+0x130/0x1f5
 [<ffffffff814ed3ac>] ? wait_for_common+0xbb/0x10a
 [<ffffffff81167215>] ? __sync_filesystem+0x7a/0x7a
 [<ffffffff811671e2>] __sync_filesystem+0x47/0x7a
 [<ffffffff8116722b>] sync_one_sb+0x16/0x18
 [<ffffffff81145c13>] iterate_supers+0x72/0xc7
 [<ffffffff81167160>] sync_filesystems+0x20/0x22
 [<ffffffff8116729e>] sys_sync+0x21/0x33
 [<ffffffff814f6242>] system_call_fastpath+0x16/0x1b

1) I've peeked around a bit in the vmlinux that corresponds with this kernel. I
focused on sync_inodes_sb(). Note that 0x130 == 304.

$ gdb ~/Rpmbuild/BUILD/kernel-3.0.fc14/linux-3.0.x86_64/vmlinux
Reading symbols from
/home/[...]/Rpmbuild/BUILD/kernel-3.0.fc14/linux-3.0.x86_64/vmlinux...done.
(gdb) disassemble /m sync_inodes_sb+304
Dump of assembler code for function sync_inodes_sb:
[...]
1146    
1147            spin_lock(&inode->i_lock);
1148            if ((inode->i_state & (I_FREEING|I_WILL_FREE|I_NEW)) ||
   0xffffffff811638b5 <+304>:    testb  $0x38,0x70(%rbx)
   0xffffffff811638b9 <+308>:    jne    0xffffffff811638c5 <sync_inodes_sb+320>
   0xffffffff811638bb <+310>:    cmpq   $0x0,0x130(%r15)
   0xffffffff811638c3 <+318>:    jne    0xffffffff811638cf <sync_inodes_sb+330>
[...]
(gdb) info line 1147
Line 1147 of "fs/fs-writeback.c" is at address 0xffffffff811638b5
<sync_inodes_sb+304> but contains no code.
(gdb) info line 1147
Line 1147 of "fs/fs-writeback.c" is at address 0xffffffff811638b5
<sync_inodes_sb+304> but contains no code.
(gdb) list 1125,1159
1125    static void wait_sb_inodes(struct super_block *sb)
1126    {
1127        struct inode *inode, *old_inode = NULL;
[...]
1144        list_for_each_entry(inode, &sb->s_inodes, i_sb_list) {
1145            struct address_space *mapping = inode->i_mapping;
1146    
1147            spin_lock(&inode->i_lock);
1148            if ((inode->i_state & (I_FREEING|I_WILL_FREE|I_NEW)) ||
1149                (mapping->nrpages == 0)) {
1150                spin_unlock(&inode->i_lock);
1151                continue;
1152            }
1153            __iget(inode);
1154            spin_unlock(&inode->i_lock);
[...]

wait_sb_inodes() appears to be inlined in sync_inodes_sb().

2) It seems that somehow lockdep is unhappy being fed inode->i_lock. I have no
clue what's going on. (Is it that struct inode *inode is variable only valid in
wait_sb_inodes and thus "non-static"? Is it that the spin_lock() call needs to
be replaced with something with lockdep annotation. If so, how?)

3) Perhaps this is just a one time issue. I recorded it here (with a bit of
analysis) in case some else runs into this too (or I manage to trigger this
again).

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the Bugme-new mailing list