From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.devel Subject: Re: Crash robustness (Was: Re: Dynamic modules: MODULE_HANDLE_SIGNALS etc.) Date: Wed, 23 Dec 2015 09:56:31 -0800 Message-ID: <567AE04F.1010202@dancol.org> References: <83mvu1x6t3.fsf@gnu.org> <83io4nuc68.fsf@gnu.org> <83r3iht93x.fsf@gnu.org> <838u4psznr.fsf@gnu.org> <56772054.8010401@cs.ucla.edu> <83zix4scgf.fsf@gnu.org> <5677DBC9.6030307@cs.ucla.edu> <83io3rst2r.fsf@gnu.org> <567841A6.4090408@cs.ucla.edu> <567844B9.2050308@dancol.org> <5678CD07.8080209@cs.ucla.edu> <5678D3AF.7030101@dancol.org> <83oadiqxq1.fsf@gnu.org> <5679B33E.9000804@dancol.org> <83y4cmp5y5.fsf@gnu.org> <5679B7F5.9030504@dancol.org> <83twnap4xa.fsf@gnu.org> <5679BE1D.5070903@dancol.org> <83poxxp2rl.fsf@gnu.org> <567ACB0F.9060804@dancol.org> <83a8p1oyxc.fsf@gnu.org> <567ADCC0.6090709@dancol.org> <8360zpoxru.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="KQG3qXhAxoWs6dLm7KluhLKxm9aBJXe4e" X-Trace: ger.gmane.org 1450893423 2700 80.91.229.3 (23 Dec 2015 17:57:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 23 Dec 2015 17:57:03 +0000 (UTC) Cc: aurelien.aptel+emacs@gmail.com, p.stephani2@gmail.com, eggert@cs.ucla.edu, tzz@lifelogs.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 23 18:56:55 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aBnef-0005y6-AE for ged-emacs-devel@m.gmane.org; Wed, 23 Dec 2015 18:56:53 +0100 Original-Received: from localhost ([::1]:57285 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aBnee-0006ik-Pd for ged-emacs-devel@m.gmane.org; Wed, 23 Dec 2015 12:56:52 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47114) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aBneb-0006iZ-7C for emacs-devel@gnu.org; Wed, 23 Dec 2015 12:56:50 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aBneT-0005LP-QU for emacs-devel@gnu.org; Wed, 23 Dec 2015 12:56:49 -0500 Original-Received: from dancol.org ([2600:3c01::f03c:91ff:fedf:adf3]:38493) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aBneT-0005KG-HD; Wed, 23 Dec 2015 12:56:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:Cc:References:To:Subject; bh=RKn+f79R+mjTEwsYpCwvuRb9HNmBRrHLvyfPIGzUVjc=; b=h7cxhurLoJcy9KEw2BMK4CYAsRRr7A5e2ij+vkyetYZAthwnwbPBtKEh0tvV7H7O3HC8q9GkR0ue3WDLjPuH8mSL1aU9wlEPixhmr1Mei5dRUKcHGwQFI1j0PjRF751yY8Yk9mWXh36tMEEuprV0Fc2usvWwyLpsmIDCQxh/SXTBGbKuk+iAZGFYLQ2CIM2ZT1DAzGJyGyOmXgW4Fn6zyboULLO5rNxCGFNFUMJgSw/VcUxyH73xwtSU+ZGL+87rQrt+lScooP3J0XRmpTg4loi8dV5QiuYUuKvC5K88BqDbN8Wv/QgTirVZIZdB0SBvFmpfbHLLyLSNzPm6H34Esw==; Original-Received: from [2620:10d:c090:180::31bb] (helo=[IPv6:2620:10d:c081:1103:2ab2:bdff:fe1c:db58]) by dancol.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84) (envelope-from ) id 1aBneS-00064Z-3c; Wed, 23 Dec 2015 09:56:40 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 In-Reply-To: <8360zpoxru.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2600:3c01::f03c:91ff:fedf:adf3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:196730 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --KQG3qXhAxoWs6dLm7KluhLKxm9aBJXe4e Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 12/23/2015 09:55 AM, Eli Zaretskii wrote: >> Cc: eggert@cs.ucla.edu, aurelien.aptel+emacs@gmail.com, >> p.stephani2@gmail.com, tzz@lifelogs.com, emacs-devel@gnu.org >> From: Daniel Colascione >> Date: Wed, 23 Dec 2015 09:41:20 -0800 >> >>> We could try calling shut_down_emacs from the signal handler, but I'm= >>> not sure if the small alternate stack will be enough for write-region= =2E >>> Something to investigate, I guess. >> >> We can make the alternate signal stack as large as we want. >=20 > Not as large as is safe to run arbitrary Lisp. Then don't run arbitrary lisp after we've segfaulted. >=20 >>>> The next time Emacs starts, we can restore the buffers we've saved >>>> this way and ask users to save them --- just like autosave, but done= >>>> on-demand, at crash time, in C code, on the alternate signal stack. >>> >>> Why "like autosave"? What will be different from actually >>> auto-saving? shut_down_emacs does that automatically. >>> >> >> Er, yes, I noticed that after I wrote the email that we already do wha= t >> I propose, more or less. In this case, we don't lose very much by just= >> deleting the stack overflow code and relying on autosave. >=20 > Auto-save will only save buffers that visit files. >=20 A minimal, C-only autosave run in the signal-handling path could save all buffer content. --KQG3qXhAxoWs6dLm7KluhLKxm9aBJXe4e Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCAAGBQJWeuBPAAoJEN4WImmbpWBlI4kQAIFTmyVWvkJgTuBgTzYhGZie xu1dffxYoHmlUD3mjc/5met1Ih1zN4TMHN339JiaI5LtfLMcse5n9VhLn6kVqaPa kv9h5/AsRiiL+mYe379FymAyKn6aWHKuHmraN+Wtw2xaEaBUetGZj4q4X/qDJfj/ ULwoK1jZ55Xk1ub/Gg5YkftwScT6WQV/Ryz3cH8eBTCIDyHcGTbfBAjQO4xfLKeX X5rtY00UV6InE6vs7XqJ8to1Tg/88PQHwgvP5a010oaEvM3OY/MzJlLHrojittKG XPC+ZQrg7PNfc9PtkD/KzNuv8FqxaEp3fIgymk1irmZsMQbk8hhlgExA3Ybqa9lf hIOZeKK8LMGIJ63ihf4nkhhzZ53jAu57KHZ230Ysh6/5nR4fMw3NyFT/pWOWUPRX 7vhKr1/67Jgu3LKUxVV243GMYLmn2tbF8lONZoCLS1oK+Zt88Zvq9VkGCHzR0lrv 8QArHwCHkRwmC2c+YPVbrFnS97HIYDldvyPj4XXnHdcWpB4fBlieC47pcYiHIW02 EvevffeI4bB28KrfMKXZqOpTsGASuuYtMeOwH8sTy9cvHKuD5ZjQhM9qUZ0RWI4M 9mPObiCdsqoTXaTdmiXu2ILnPyWEGkhz/1ih5GTZlNRHZXq8C5N3/dZxHrOYK50Y CIG0xctRVLVLVnrLgKPa =FlpN -----END PGP SIGNATURE----- --KQG3qXhAxoWs6dLm7KluhLKxm9aBJXe4e--