From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753984AbdKJTrs (ORCPT ); Fri, 10 Nov 2017 14:47:48 -0500 Received: from mail-it0-f50.google.com ([209.85.214.50]:40629 "EHLO mail-it0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753777AbdKJTrp (ORCPT ); Fri, 10 Nov 2017 14:47:45 -0500 X-Google-Smtp-Source: AGs4zMYm1K8MnwkM9b85eYe4HlYQfDwT5+ZIY4pnrJT+GwD794ov5S3+exBx/6uKBOH+DxL7O7S7M833gPdFcHDeTV8= MIME-Version: 1.0 In-Reply-To: References: From: Linus Torvalds Date: Fri, 10 Nov 2017 11:47:43 -0800 X-Google-Sender-Auth: BsnohdjpyhillzDxRTWNtRaNpAY Message-ID: Subject: Re: Kernel crash in free_pipe_info() To: Simon Brewer Cc: Cong Wang , Al Viro , Andrew Morton , linux-fsdevel , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 9, 2017 at 10:07 PM, Simon Brewer wrote: > > This looks familiar... > > https://github.com/moby/moby/issues/34472 > > From the bug report: > "In particular, it looks like either docker-containerd or > docker-containerd-shim (the log is cut off) has a pipe open that is > causing a kernel BUG when attempting to kill the process. Fun times." Interestingly, some of the "reproducers" show a totally different problem, with kernel BUG at /build/linux-5EyXrQ/linux-4.4.0/mm/slub.c:1495! which is this BUG(): 1493 if (unlikely(flags & GFP_SLAB_BUG_MASK)) { 1494 pr_emerg("gfp: %u\n", flags & GFP_SLAB_BUG_MASK); 1495 BUG(); 1496 } which implies a completely invalid gfp mask. The stack trace shows it's unix_stream_sendmsg -> sock_alloc_send_pskb allocation, which uses "sk->sk_allocation". Odd. af_unix just does sk->sk_allocation = GFP_KERNEL_ACCOUNT; That is new since v4.4, though - but before that it should have been set by sock_init_data to just GFP_KERNEL. So there it looks like a socket is entirely corrupted. So that other backtrace looks entirely bogus too. More "that looks like corrupted kernel data structures". Enabling SLUB debugging would be really good here too. But that is still quite an old kernel. I wish somebody could reproduce this with something newer. I added those wishes to the github thing. Linus