From owner-freebsd-current@freebsd.org Sat Jun 25 10:16:43 2016 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A06D4B80E08 for ; Sat, 25 Jun 2016 10:16:43 +0000 (UTC) (envelope-from guyyur@gmail.com) Received: from mail-wm0-x235.google.com (mail-wm0-x235.google.com [IPv6:2a00:1450:400c:c09::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 361042ABC for ; Sat, 25 Jun 2016 10:16:43 +0000 (UTC) (envelope-from guyyur@gmail.com) Received: by mail-wm0-x235.google.com with SMTP id r201so53873491wme.1 for ; Sat, 25 Jun 2016 03:16:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=oK+w3Zfb/FF/85damoy2BQqre5cFroYJ15lke9ZUqqQ=; b=ot6Cj3O6eFTCJcizX0k1mdk49BN8VQNbKgEWaCFIG0uMGAutiq+F3xtmMiIDCC/fkS I8G/42ddWUE6JclwQYLKdFbZUavAPfedv1CMwUUzPCrRNvjl6XypYBdGWs1FYJviSTrC XwBFSQJu1kgngHcG7qv2D7eethS/hvjEPjQ1tnVg5gMxi3zn2f839P0NnR507McX/wpZ Zb94iP4fM88Rgppye8qm2aqnrzIQcjdV924+u//5qrYalUG2HSty9N/JRPCiNA8/wBpF C2OTJXv1iNrnOD4L3R9ptr4VNObgQE7Cy0yt/ekP5xGig6mWuSA4uCjSrF6eiKndg4ZI xKHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=oK+w3Zfb/FF/85damoy2BQqre5cFroYJ15lke9ZUqqQ=; b=iUW6ZU7TlT3iBJT9ZuQITcRUoUiYkimeILqBsF7F3KL4fckuT2goy52xoPTOSVdLb1 bCjTFD/qJbZwOh4a7L8beMhKggJYWdYm22UfzssC9EZooy/OUagCzuZ8cWXcsV9L+0nP no8kFpS/A3tghHcuYSqkoGaDZ/8jos2QVQlvyfhMOySVgwiZTKZ3hz9WgGncayBkDm0O boCQxYKGHVDC/0MgfkuAi/WtVRWAmhpJO31P8/urEGJAGhCTpNjszQaJxUqPpEhglva+ d/VqcbCkYaMp/dl9kYL9nd/9V4munwMCPkcu/Zu5zoOEDSVqa+nxa0sW6j75TrxNL8kz nesQ== X-Gm-Message-State: ALyK8tLxwYlCvJt6KF75uTfmGot3u9bQboC9RSfjD6RYrzMJgB+u31G3/ttT3nHSnnb/514Vi5V7z/MXXRY7kg== X-Received: by 10.28.50.131 with SMTP id y125mr2382068wmy.94.1466849801251; Sat, 25 Jun 2016 03:16:41 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.9.142 with HTTP; Sat, 25 Jun 2016 03:16:40 -0700 (PDT) In-Reply-To: <20160625092040.GL38613@kib.kiev.ua> References: <20160625084939.GI38613@kib.kiev.ua> <20160625092040.GL38613@kib.kiev.ua> From: Guy Yur Date: Sat, 25 Jun 2016 13:16:40 +0300 Message-ID: Subject: Re: Samba 4.3 and 4.4 crashes on FreeBSD 11-ALPHA4 To: Konstantin Belousov Cc: Daniel Engberg , freebsd-current Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Jun 2016 10:16:43 -0000 Hi, On Sat, Jun 25, 2016 at 12:20 PM, Konstantin Belousov wrote: > On Sat, Jun 25, 2016 at 11:49:39AM +0300, Konstantin Belousov wrote: >> On Sat, Jun 25, 2016 at 01:03:13AM +0300, Guy Yur wrote: >> > libtdb.so.1`tdb_runtime_check_for_robust_mutexes + 1475 at mutex.c:957 >> > ... >> >> The pointer to tdb_runtime_check_for_robust_mutexes() appeared to be >> most useful, thanks. >> >> The two patches below should fix samba use of robustness. First, >> kernel erronously reset robust lists locations on fork. Second, the >> pthread_mutex_trylock() for owned errorcheck mutex must return EDEADLK >> and not EBUSY. Try that. > > Correction, there was a reason why I initially put the rb list pointers > into zeroed region. It still needs to be zeroed on new thread creation. > Updated patch. > With the patch to the 3 files applied, smbd, nmbd and smbclient no longer crash on my machine. Tested with r302191+patch. Thanks, Guy