The system crashes due to divide error in bdi_dirty_limits() if dirty_thresh equals zero.

Solution Unverified - Updated -

Issue

  • The system crashes due to divide error in bdi_dirty_limits() if dirty_thresh equals zero.

  • The message observed in the console (dmesg/kernel ring buffer):

    [360028.025883] divide error: 0000 [#1] SMP
    [360028.026049] Modules linked in: fuse rpcsec_gss_krb5 nfsv4 dns_resolver nfs fscache vmw_vsock_vmci_transport vsock coretemp crc32_pclmul ghash_clmulni_intel aesni_intel lrw gf128mul ppdev glue_helper ablk_helper vmw_balloon cryptd pcspkr sg i2c_piix4 vmw_vmci shpchp parport_pc parport nfsd auth_rpcgss nfs_acl lockd grace sunrpc binfmt_misc ip_tables ext4 mbcache jbd2 sr_mod cdrom sd_mod crc_t10dif crct10dif_generic ata_generic pata_acpi vmwgfx crct10dif_pclmul drm_kms_helper crct10dif_common ttm crc32c_intel serio_raw vmxnet3 drm ata_piix vmw_pvscsi libata i2c_core floppy dm_mirror dm_region_hash dm_log dm_mod
    [360028.027083] CPU: 0 PID: 4542 Comm: java Not tainted 3.10.0-327.el7.x86_64 #1
    [360028.027273] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 10/22/2013
    [360028.027486] task: ffff880126157300 ti: ffff880125108000 task.ti: ffff880125108000
    [360028.027681] RIP: 0010:[<ffffffff8163081e>]  [<ffffffff8163081e>] bdi_dirty_limits+0x3d/0x9d
    [360028.027898] RSP: 0018:ffff88012510bc50  EFLAGS: 00010246
    [360028.028122] RAX: 0000000000000000 RBX: ffff880428b89148 RCX: 28f5c28f5c28f5c3
    [360028.028314] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
    [360028.028508] RBP: ffff88012510bc80 R08: ffff88012510bd50 R09: ffff88012510bd60
    [360028.028696] R10: 57ffa8df96481e80 R11: 0000000000000000 R12: ffff88012510bd50
    [360028.028884] R13: 0000000000000000 R14: ffff88012510bd58 R15: ffff88012510bd60
    [360028.029070] FS:  00007f4700365700(0000) GS:ffff88043fc00000(0000) knlGS:0000000000000000
    [360028.029257] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [360028.029433] CR2: 00007f4700768800 CR3: 0000000035135000 CR4: 00000000000407f0
    [360028.029720] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    [360028.029963] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
    [360028.030158] Stack:
    [360028.030291]  0000000000000000 ffff88011f6a5ca8 ffff8800bbb3d650 ffff880428b89148
    [360028.030488]  ffffea0010481e80 800000041207a067 ffff88012510bd98 ffffffff81630977
    [360028.030714]  ffff88012510bcd0 ffffffff8163879e 000000002510bd10 ffffea0010481e80
    [360028.030914] Call Trace:
    [360028.031054]  [<ffffffff81630977>] balance_dirty_pages.isra.19+0xf9/0x5ff
    [360028.031242]  [<ffffffff8163879e>] ? __wait_on_bit+0x7e/0x90
    [360028.031425]  [<ffffffff812f8e62>] ? radix_tree_lookup_slot+0x22/0x50
    [360028.031625]  [<ffffffff81175517>] balance_dirty_pages_ratelimited+0xe7/0x110
    [360028.031841]  [<ffffffff81192d1b>] __do_fault+0x26b/0x510
    [360028.032044]  [<ffffffff81197088>] handle_mm_fault+0x5b8/0xf50
    [360028.032287]  [<ffffffff812cc124>] ? blk_finish_plug+0x14/0x40
    [360028.032510]  [<ffffffff81191de5>] ? SyS_madvise+0x3c5/0x820
    [360028.032716]  [<ffffffff81640e22>] __do_page_fault+0x152/0x420
    [360028.032918]  [<ffffffff81641113>] do_page_fault+0x23/0x80
    [360028.033103]  [<ffffffff8163d408>] page_fault+0x28/0x30
    [360028.033278] Code: f5 41 54 4d 89 c4 53 48 89 fb 41 52 48 89 55 d0 e8 48 47 b4 ff 4d 85 ff 49 89 04 24 74 13 48 8b 55 d0 45 89 ed 48 0f af c2 31 d2 <49> f7 f5 49 89 07 e8 9a ff ff ff 48 01 c0 49 39 04 24 73 22 31
    [360028.033782] RIP  [<ffffffff8163081e>] bdi_dirty_limits+0x3d/0x9d
    [360028.033964]  RSP <ffff88012510bc50>
    
  • Backtrace of panic task:

    crash> bt
    PID: 4542   TASK: ffff880126157300  CPU: 0   COMMAND: "java"
     #0 [ffff88012510b918] machine_kexec at ffffffff81051beb
     #1 [ffff88012510b978] crash_kexec at ffffffff810f2542
     #2 [ffff88012510ba48] oops_end at ffffffff8163e1a8
     #3 [ffff88012510ba70] die at ffffffff8101859b
     #4 [ffff88012510baa0] do_trap at ffffffff8163d860
     #5 [ffff88012510baf0] do_divide_error at ffffffff81014f3e
     #6 [ffff88012510bba0] divide_error at ffffffff81646f8e
        [exception RIP: bdi_dirty_limits+61]
        RIP: ffffffff8163081e  RSP: ffff88012510bc50  RFLAGS: 00010246
        RAX: 0000000000000000  RBX: ffff880428b89148  RCX: 28f5c28f5c28f5c3
        RDX: 0000000000000000  RSI: 0000000000000000  RDI: 0000000000000000
        RBP: ffff88012510bc80   R8: ffff88012510bd50   R9: ffff88012510bd60
        R10: 57ffa8df96481e80  R11: 0000000000000000  R12: ffff88012510bd50
        R13: 0000000000000000  R14: ffff88012510bd58  R15: ffff88012510bd60
        ORIG_RAX: ffffffffffffffff  CS: 0010  SS: 0018
     #7 [ffff88012510bc88] balance_dirty_pages at ffffffff81630977
     #8 [ffff88012510bda0] balance_dirty_pages_ratelimited at ffffffff81175517
     #9 [ffff88012510bdb0] __do_fault at ffffffff81192d1b
    #10 [ffff88012510be40] handle_mm_fault at ffffffff81197088
    #11 [ffff88012510bed0] __do_page_fault at ffffffff81640e22
    #12 [ffff88012510bf28] do_page_fault at ffffffff81641113
    #13 [ffff88012510bf50] page_fault at ffffffff8163d408
        RIP: 00007f471b698bda  RSP: 00007f4700364420  RFLAGS: 00010246
        RAX: 0000000000000000  RBX: 000000000000002a  RCX: 00000000f94d3948
        RDX: 00007f4700768800  RSI: 00007f471169ffb0  RDI: 77453fb02eb5c0ea
        RBP: 00000000f94d3858   R8: 0000000000000000   R9: 0000000000000000
        R10: 0000000000000008  R11: 0000000000000000  R12: 0000000000000000
        R13: 0000000000000200  R14: 00007f4700364380  R15: 00007f46bdf1a800
        ORIG_RAX: ffffffffffffffff  CS: 0033  SS: 002b
    

Environment

  • Red Hat Enterprise Linux 7.2 (kernel-3.10.0-327.el7)

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content