Received: from sog-mx-1.v43.ch3.sourceforge.com ([172.29.43.191] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1WspWb-0002Tt-2d for bitcoin-development@lists.sourceforge.net; Fri, 06 Jun 2014 08:29:21 +0000 Received-SPF: pass (sog-mx-1.v43.ch3.sourceforge.com: domain of gmail.com designates 209.85.223.182 as permitted sender) client-ip=209.85.223.182; envelope-from=laanwj@gmail.com; helo=mail-ie0-f182.google.com; Received: from mail-ie0-f182.google.com ([209.85.223.182]) by sog-mx-1.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1WspWZ-0001xc-Hx for bitcoin-development@lists.sourceforge.net; Fri, 06 Jun 2014 08:29:21 +0000 Received: by mail-ie0-f182.google.com with SMTP id x19so2048644ier.41 for ; Fri, 06 Jun 2014 01:29:13 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.43.155.16 with SMTP id lg16mr3604494icc.65.1402043353168; Fri, 06 Jun 2014 01:29:13 -0700 (PDT) Received: by 10.64.60.195 with HTTP; Fri, 6 Jun 2014 01:29:13 -0700 (PDT) In-Reply-To: <538EF81D.9060301@stud.uni-saarland.de> References: <1401822421.27942.YahooMailNeo@web124505.mail.ne1.yahoo.com> <538EF81D.9060301@stud.uni-saarland.de> Date: Fri, 6 Jun 2014 10:29:13 +0200 Message-ID: From: Wladimir To: Jannis Froese Content-Type: multipart/alternative; boundary=001a11c2d95006827004fb26a885 X-Spam-Score: -0.6 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (laanwj[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 1.0 HTML_MESSAGE BODY: HTML included in message -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Headers-End: 1WspWZ-0001xc-Hx Cc: Bitcoin Dev Subject: Re: [Bitcoin-development] # error "Bitcoin cannot be compiled without assertions." <<< List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jun 2014 08:29:21 -0000 --001a11c2d95006827004fb26a885 Content-Type: text/plain; charset=UTF-8 On Wed, Jun 4, 2014 at 12:42 PM, Jannis Froese < s9jafroe@stud.uni-saarland.de> wrote: I think most concerns about the current use of asserts would be resolved if > the currently used asserts would be changed to a nicer definition which is > independent of NDEBUG, and a second class of debugging asserts would be > introduced, which is exclusively for expensive, redundant checks and is > disabled by NDEBUG. > Also, most assertion errors that happen to people running Bitcoin Core are not caused by software bugs but database corruption errors (usually due to unclean shutdown). For example in case we detect missing/truncated block files or UTXO db consistency we should, instead of raising an assertion error, propose a -reindex - see also https://github.com/bitcoin/bitcoin/issues/2202 . So instead of using assertions we need a fatal error function for those problems which are probably recoverable in a certain specific way. In principle starting a reindex wouldn't even need to take down the entire process (though that's easier for implementation due to cleanup and assumptions made). Wladimir --001a11c2d95006827004fb26a885 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On W= ed, Jun 4, 2014 at 12:42 PM, Jannis Froese <s9jafroe@stud.uni-= saarland.de> wrote:

=20 I think most concerns about the current use of asserts would be resolved if the currently used asserts would be changed to a nicer definition which is independent of NDEBUG, and a second class of debugging asserts would be introduced, which is exclusively for expensive, redundant checks and is disabled by NDEBUG.

Also, most assertion errors that happen t= o people running Bitcoin Core are not caused by software bugs but database = corruption errors (usually due to unclean shutdown).

For example in case we detect missing/truncated block files or UT= XO db consistency we should, instead of raising an assertion error, propose= a -reindex - see also https://github.com/bitcoin/bitcoin/issues/2202 .

So instead of using assertions we need= a fatal error function for those problems which are probably recoverable i= n a certain specific way. In principle starting a reindex wouldn't even= need to take down the entire process (though that's easier for impleme= ntation due to cleanup and assumptions made).

Wladimir

--001a11c2d95006827004fb26a885--