From patchwork Mon Aug 12 14:13:55 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sylvain Munaut X-Patchwork-Id: 2843087 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2749A9F239 for ; Mon, 12 Aug 2013 14:14:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 743C820221 for ; Mon, 12 Aug 2013 14:14:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 50AF720351 for ; Mon, 12 Aug 2013 14:14:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756628Ab3HLOOA (ORCPT ); Mon, 12 Aug 2013 10:14:00 -0400 Received: from mail-pd0-f177.google.com ([209.85.192.177]:62982 "EHLO mail-pd0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756611Ab3HLON4 (ORCPT ); Mon, 12 Aug 2013 10:13:56 -0400 Received: by mail-pd0-f177.google.com with SMTP id y10so3479711pdj.22 for ; Mon, 12 Aug 2013 07:13:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=Q+BsS9Tow40vfUddIWeBX9MVlsRwBzjAODt/30Nhr2M=; b=SDj3DPQiCxv53d67598P9yrqaaPFqz4yYlNlKyvo9M60opjN5IVYJC/SzUx4M8d7KL 4p32wja1QFr5E6ZwtQQHgxiWTJNJ/VKQzR0GqLW/t8k+xkKr7ANJglZuH3hsZApWTSFH J0hQUlUlsL2s+poiZiKUkaBnkXnnaWMZuapyYeztCd6x82x1F167J6ZLE5/Cnj+jV6lD hJUOa7zSKDV64cFkrYF99+SKrSNilzAQ5F9WmtghgnzpQkuJR6EL6iBnzG0ysUBHvodo 8yDzNox2zvQ533xxokQSRixsjWqq1YAaZNMX7sq0Fh/QxdrgXbVEX0THA36V+omTd1Rr L2vg== X-Gm-Message-State: ALoCoQl5aW9jnVgo8aDCQ85LA8+o45+gK5Ccnumko0MXmecmUoDwbLY2taZ6tfnP6dLwfJ14AUZt MIME-Version: 1.0 X-Received: by 10.66.221.8 with SMTP id qa8mr24514313pac.188.1376316835954; Mon, 12 Aug 2013 07:13:55 -0700 (PDT) Received: by 10.70.30.164 with HTTP; Mon, 12 Aug 2013 07:13:55 -0700 (PDT) In-Reply-To: <6035A0D088A63A46850C3988ED045A4B62F43442@BITCOM1.int.sbss.com.au> References: <20130419064524.GQ11427@reaktio.net> <6035A0D088A63A46850C3988ED045A4B62D9DA64@BITCOM1.int.sbss.com.au> <6035A0D088A63A46850C3988ED045A4B62E86BF8@BITCOM1.int.sbss.com.au> <6035A0D088A63A46850C3988ED045A4B62F433FE@BITCOM1.int.sbss.com.au> <6035A0D088A63A46850C3988ED045A4B62F43442@BITCOM1.int.sbss.com.au> Date: Mon, 12 Aug 2013 16:13:55 +0200 Message-ID: Subject: Re: [Xen-devel] Xen blktap driver for Ceph RBD : Anybody wants to test ? :p From: Sylvain Munaut To: James Harper Cc: =?ISO-8859-1?Q?Pasi_K=E4rkk=E4inen?= , "ceph-devel@vger.kernel.org" , "xen-devel@lists.xen.org" Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Spam-Status: No, score=-9.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi, >> > > tapdisk[9180]: segfault at 7f7e3a5c8c10 ip 00007f7e387532d4 sp >> > 00007f7e3a5c8c10 error 4 in libpthread-2.13.so[7f7e38748000+17000] >> > > tapdisk:9180 blocked for more than 120 seconds. >> > > tapdisk D ffff88043fc13540 0 9180 1 0x00000000 You can try generating a core file by changing the ulimit on the running process http://superuser.com/questions/404239/setting-ulimit-on-a-running-process A backtrace would be useful :) > Actually maybe not. What I was reading only applies for large number of bytes written to the pipe, and even then I got confused by the double negatives. Sorry for the noise. Yes, as you discovered but size < PIPE_BUF, they should be atomic even in non-blocking mode. But I could still add assert() there to make sure it is. I did find a bug where it could "leak" requests which may lead to hang. But it shouldn't crash ... Here's an (untested yet) patch in the rbd error path: Cheers, Sylvain --- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/block-rbd.c b/drivers/block-rbd.c index 68fbed7..ab2d2c5 100644 --- a/drivers/block-rbd.c +++ b/drivers/block-rbd.c @@ -560,6 +560,9 @@ err: if (c) rbd_aio_release(c); + list_move(&req->queue, &prv->reqs_free); + prv->reqs_free_count++; + return rv; }