Bug 1079700 - [abrt] kernel BUG at net/sunrpc/svc.c:550!
Summary: [abrt] kernel BUG at net/sunrpc/svc.c:550!
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 20
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jeff Layton
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:3f79f4e9ba70a06d58e3d4d8850...
Depends On:
Blocks: 1085774
TreeView+ depends on / blocked
 
Reported: 2014-03-23 10:24 UTC by Raphos
Modified: 2014-05-29 10:42 UTC (History)
9 users (show)

Fixed In Version:
Clone Of:
: 1085774 1190376 (view as bug list)
Environment:
Last Closed: 2014-05-29 10:42:23 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: dmesg (82.70 KB, text/plain)
2014-03-23 10:24 UTC, Raphos
no flags Details
patch - lockd: ensure we tear down any live sockets when socket creation fails during lockd_up (4.37 KB, patch)
2014-03-25 18:30 UTC, Jeff Layton
no flags Details | Diff

Description Raphos 2014-03-23 10:24:09 UTC
Additional info:
reporter:       libreport-2.2.0
kernel BUG at net/sunrpc/svc.c:550!
invalid opcode: 0000 [#1] SMP 
Modules linked in: bnep bluetooth ip6t_rpfilter ip6t_REJECT xt_conntrack ebtable_nat ebtable_broute bridge stp llc ebtable_filter ebtables ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw ip6table_filter ip6_tables iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_mangle iptable_security iptable_raw vfat fat iTCO_wdt iTCO_vendor_support hp_wmi sparse_keymap x86_pkg_temp_thermal coretemp kvm crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_core videodev media snd_hda_codec_hdmi snd_hda_codec_idt snd_hda_intel snd_hda_codec snd_hwdep snd_seq snd_seq_device snd_pcm arc4 rt2800pci rt2800mmio rt2800lib rt2x00pci rt2x00mmio rt2x00lib eeprom_93cx6 mac80211 cfg80211 r8169 microcode crc_ccitt mii rfkill serio_raw lpc_ich mfd_core snd_page_alloc snd_timer sdhci_pci sdhci snd jmb38x_ms mmc_core soundcore memstick mei_me mei shpchp wmi hp_accel lis3lv02d input_polldev nfsd auth_rpcgss nfs_acl lockd sunrpc radeon i915 ttm i2c_algo_bit drm_kms_helper drm i2c_core video
CPU: 2 PID: 913 Comm: rpc.nfsd Not tainted 3.13.6-200.fc20.x86_64 #1
Hardware name: Hewlett-Packard HP ProBook 4740s/1846, BIOS 68IRR Ver. F.40 01/29/2013
task: ffff880146b00000 ti: ffff88003f9b8000 task.ti: ffff88003f9b8000
RIP: 0010:[<ffffffffa0305fa8>]  [<ffffffffa0305fa8>] svc_destroy+0x128/0x130 [sunrpc]
RSP: 0018:ffff88003f9b9de0  EFLAGS: 00010206
RAX: ffff88003f829628 RBX: ffff88003f829600 RCX: 00000000000041ee
RDX: 0000000000000000 RSI: 0000000000000286 RDI: 0000000000000286
RBP: ffff88003f9b9de8 R08: 0000000000017360 R09: ffff88014fa97360
R10: ffffffff8114ce57 R11: ffffea00051c9c00 R12: ffff88003f829600
R13: 00000000ffffff9e R14: ffffffff81cc7cc0 R15: 0000000000000000
FS:  00007f4fde284840(0000) GS:ffff88014fa80000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f4fdf5192f8 CR3: 00000000a569a000 CR4: 00000000001407e0
Stack:
 ffff88003f792300 ffff88003f9b9e18 ffffffffa02de02a 0000000000000000
 ffffffff81cc7cc0 ffff88003f9cb000 0000000000000008 ffff88003f9b9e60
 ffffffffa033bb35 ffffffff8131c86c ffff88003f9cb000 ffff8800a5715008
Call Trace:
 [<ffffffffa02de02a>] lockd_up+0xaa/0x330 [lockd]
 [<ffffffffa033bb35>] nfsd_svc+0x1b5/0x2f0 [nfsd]
 [<ffffffff8131c86c>] ? simple_strtoull+0x2c/0x50
 [<ffffffffa033c630>] ? write_pool_threads+0x280/0x280 [nfsd]
 [<ffffffffa033c6bb>] write_threads+0x8b/0xf0 [nfsd]
 [<ffffffff8114efa4>] ? __get_free_pages+0x14/0x50
 [<ffffffff8114eff6>] ? get_zeroed_page+0x16/0x20
 [<ffffffff811dec51>] ? simple_transaction_get+0xb1/0xd0
 [<ffffffffa033c098>] nfsctl_transaction_write+0x48/0x80 [nfsd]
 [<ffffffff811b8b34>] vfs_write+0xb4/0x1f0
 [<ffffffff811c3f99>] ? putname+0x29/0x40
 [<ffffffff811b9569>] SyS_write+0x49/0xa0
 [<ffffffff810fc2a6>] ? __audit_syscall_exit+0x1f6/0x2a0
 [<ffffffff816962e9>] system_call_fastpath+0x16/0x1b
Code: 31 c0 e8 82 db 37 e1 e9 2a ff ff ff 48 8b 07 8b 57 14 48 c7 c7 d5 c6 31 a0 48 8b 70 20 31 c0 e8 65 db 37 e1 e9 f4 fe ff ff 0f 0b <0f> 0b 66 0f 1f 44 00 00 0f 1f 44 00 00 55 48 89 e5 41 56 41 55 
RIP  [<ffffffffa0305fa8>] svc_destroy+0x128/0x130 [sunrpc]
 RSP <ffff88003f9b9de0>

Comment 1 Raphos 2014-03-23 10:24:25 UTC
Created attachment 877749 [details]
File: dmesg

Comment 2 Jeff Layton 2014-03-25 13:45:35 UTC
Ok, I see the bug. It oopsed because we tried to destroy the svc_xprt while there were still open sockets on the sv_permsocks list:

From make_socks:

        err = create_lockd_family(serv, net, PF_INET);
        if (err < 0)
                goto out_err;

        err = create_lockd_family(serv, net, PF_INET6);
        if (err < 0 && err != -EAFNOSUPPORT)
                goto out_err;


...so what happened is that lockd created the PF_INET sockets and then failed creating the PF_INET6 sockets. From the log, it was -EADDRINUSE error.

If creating the PF_INET6 sockets fails, then we need to tear down the PF_INET sockets before doing the goto out_err.

Comment 3 Jeff Layton 2014-03-25 14:18:01 UTC
Out of curiousity, do you have this machine set up to make lockd listen on a particular set of ports?

Comment 4 Jeff Layton 2014-03-25 17:27:39 UTC
Yeah, I can reproduce this by setting up lockd to listen on a particular port. Then make nc squat on that port and try to start up the nfs server. At that point it oopses.

The fix looks fairly simple, but it's a little difficult to unravel all of the struct net braindamage in this code so I'll need to stare at it a bit longer.

Comment 5 Jeff Layton 2014-03-25 18:30:57 UTC
Created attachment 878612 [details]
patch - lockd: ensure we tear down any live sockets when socket creation fails during lockd_up

This patch seems to fix the bug for me. Does it also fix it for you?

Comment 6 Jeff Layton 2014-03-31 13:59:03 UTC
Bruce has accepted the patch and it should make 3.15 and then be marked for stable.

Comment 7 Jeff Layton 2014-05-29 10:42:23 UTC
Merged in v3.14.4.


Note You need to log in before you can comment on or make changes to this bug.