Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.9.0
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      I got this warning on startup from rhel7 kernel (possible due to debug too, I guess):

      May 23 19:43:15 centos6-0 kernel: ------------[ cut here ]------------
      May 23 19:43:15 centos6-0 kernel: WARNING: at include/linux/slab_def.h:131 class_handle_init+0x2d6/0x4b0 [obdclass]()
      May 23 19:43:15 centos6-0 kernel: Modules linked in: obdclass(OE+) ksocklnd(OE) lnet(OE) sha512_generic crypto_null libcfs(OE) rpcsec_gss_krb5 syscopyarea sysfillrect sysimgblt ttm ata_generic drm_kms_helper pata_acpi drm ata_piix i2c_piix4 virtio_console serio_raw virtio_balloon pcspkr i2c_core virtio_blk libata floppy nfsd ip_tables
      May 23 19:43:15 centos6-0 kernel: CPU: 1 PID: 2911 Comm: insmod Tainted: G           OE  ------------   3.10.0-debug #1
      May 23 19:43:15 centos6-0 kernel: Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011
      May 23 19:43:15 centos6-0 kernel: 0000000000000000 00000000b0550638 ffff8800b07a7c50 ffffffff816fe7c0
      May 23 19:43:15 centos6-0 kernel: ffff8800b07a7c88 ffffffff810773e0 ffffffff81c15020 ffff8800a9675940
      May 23 19:43:15 centos6-0 kernel: ffffffffa04ef000 0000000000000000 ffffffffa03ad120 ffff8800b07a7c98
      May 23 19:43:15 centos6-0 kernel: Call Trace:
      May 23 19:43:15 centos6-0 kernel: [<ffffffff816fe7c0>] dump_stack+0x19/0x1b
      May 23 19:43:15 centos6-0 kernel: [<ffffffff810773e0>] warn_slowpath_common+0x70/0xb0
      May 23 19:43:15 centos6-0 kernel: [<ffffffffa04ef000>] ? 0xffffffffa04eefff
      May 23 19:43:15 centos6-0 kernel: [<ffffffff8107752a>] warn_slowpath_null+0x1a/0x20
      May 23 19:43:15 centos6-0 kernel: [<ffffffffa03278b6>] class_handle_init+0x2d6/0x4b0 [obdclass]
      May 23 19:43:15 centos6-0 kernel: [<ffffffffa04ef000>] ? 0xffffffffa04eefff
      May 23 19:43:15 centos6-0 kernel: [<ffffffffa04ef522>] obdclass_init+0x522/0x1000 [obdclass]
      May 23 19:43:15 centos6-0 kernel: [<ffffffffa04ef000>] ? 0xffffffffa04eefff
      May 23 19:43:15 centos6-0 kernel: [<ffffffff810020e8>] do_one_initcall+0xb8/0x230
      May 23 19:43:15 centos6-0 kernel: [<ffffffff810f3e6e>] load_module+0x138e/0x1bc0
      May 23 19:43:15 centos6-0 kernel: [<ffffffff8139de20>] ? ddebug_proc_write+0xf0/0xf0
      May 23 19:43:15 centos6-0 kernel: [<ffffffff810eff23>] ? copy_module_from_fd.isra.40+0x53/0x150
      May 23 19:43:15 centos6-0 kernel: [<ffffffff810f4876>] SyS_finit_module+0xa6/0xd0
      May 23 19:43:15 centos6-0 kernel: [<ffffffff81711809>] system_call_fastpath+0x16/0x1b
      May 23 19:43:15 centos6-0 kernel: ---[ end trace 3075995fdee801fd ]---
      

      given that smatch complains about

      /home/green/smt/git/lustre-release/lustre/obdclass/lustre_handles.c:261:9: warning: memset with byte count of 1572864
      

      That must be it.
      We probably should convert OBD_ALLOC_LARGE to go straight to vmalloc for >128k allocations as opposed to malloc fist since in rhel7 and probably other places it generates a warning:

      0x308b0 is in class_handle_init (include/linux/slab_def.h:131).
      126			int i;
      127	
      128			if (!size)
      129				return ZERO_SIZE_PTR;
      130	
      131			if (WARN_ON_ONCE(size > KMALLOC_MAX_SIZE))
      132				return NULL;
      133	
      134			i = kmalloc_index(size);
      135	
      

      Attachments

        Activity

          [LU-8196] class_handle_init alloates 1.5M

          patch has landed to master for 2.9

          jgmitter Joseph Gmitter (Inactive) added a comment - patch has landed to master for 2.9

          Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/20420/
          Subject: LU-8196 obd: force very large allocations to use vmalloc
          Project: fs/lustre-release
          Branch: master
          Current Patch Set:
          Commit: 5b8749c4669e93dcafebc4c93aa1974c96ff43c7

          gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/20420/ Subject: LU-8196 obd: force very large allocations to use vmalloc Project: fs/lustre-release Branch: master Current Patch Set: Commit: 5b8749c4669e93dcafebc4c93aa1974c96ff43c7

          Bob Glossman (bob.glossman@intel.com) uploaded a new patch: http://review.whamcloud.com/20420
          Subject: LU-8196 obd: force very large allocations to use vmalloc
          Project: fs/lustre-release
          Branch: master
          Current Patch Set: 1
          Commit: 8caca1cb3e864f111acb562a49683d3da3baeb9c

          gerrit Gerrit Updater added a comment - Bob Glossman (bob.glossman@intel.com) uploaded a new patch: http://review.whamcloud.com/20420 Subject: LU-8196 obd: force very large allocations to use vmalloc Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 8caca1cb3e864f111acb562a49683d3da3baeb9c

          OBD_ALLOC_LARGE() should check against KMALLOC_MAX_SIZE, not 128KB.

          adilger Andreas Dilger added a comment - OBD_ALLOC_LARGE() should check against KMALLOC_MAX_SIZE, not 128KB.
          pjones Peter Jones added a comment -

          Bob

          Could you please address this issue?

          Thanks

          Peter

          pjones Peter Jones added a comment - Bob Could you please address this issue? Thanks Peter

          People

            bogl Bob Glossman (Inactive)
            green Oleg Drokin
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: