unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: bug#12007: 24.1.50; Crash in auto-revert-handler
       [not found]     ` <500F4055.4080005@gmail.com>
@ 2012-07-25  2:37       ` Dmitry Antipov
       [not found]         ` <500F6DAE.9010207@gmail.com>
  0 siblings, 1 reply; 7+ messages in thread
From: Dmitry Antipov @ 2012-07-25  2:37 UTC (permalink / raw)
  To: Christoph Scholtes; +Cc: Eli Zaretskii, 12007, Emacs development discussions

[-- Attachment #1: Type: text/plain, Size: 192 bytes --]

On 07/25/2012 04:39 AM, Christoph Scholtes wrote:

> bzr r109196 still crashes after sitting for a while.

Hm... that crash becomes annoying (although I can't reproduce it). Try this.

Dmitry

[-- Attachment #2: buffer_indirection_fix_2.patch --]
[-- Type: text/plain, Size: 1600 bytes --]

=== modified file 'src/buffer.c'
--- src/buffer.c	2012-07-24 06:45:44 +0000
+++ src/buffer.c	2012-07-25 02:29:34 +0000
@@ -1560,14 +1560,6 @@
   if (EQ (buffer, XWINDOW (minibuf_window)->buffer))
     return Qnil;
 
-  /* Notify our base buffer that we don't share the text anymore.  */
-  if (b->base_buffer)
-    {
-      eassert (b->indirections == -1);
-      b->base_buffer->indirections--;
-      eassert (b->base_buffer->indirections >= 0);
-    }
-
   /* When we kill an ordinary buffer which shares it's buffer text
      with indirect buffer(s), we must kill indirect buffer(s) too.
      We do it at this stage so nothing terrible happens if they
@@ -1708,7 +1700,15 @@
   BVAR (b, name) = Qnil;
 
   BLOCK_INPUT;
-  if (! b->base_buffer)
+  /* Notify our base buffer that we don't share the text anymore.  */
+  if (b->base_buffer)
+    {
+      eassert (b->indirections == -1);
+      b->base_buffer->indirections--;
+      eassert (b->base_buffer->indirections >= 0);
+    }
+  else
+    /* No one shares our buffer text, can free it.  */
     free_buffer_text (b);
 
   if (b->newline_cache)
@@ -4897,6 +4897,9 @@
   /* Prevent GC from getting confused.  */
   buffer_defaults.text = &buffer_defaults.own_text;
   buffer_local_symbols.text = &buffer_local_symbols.own_text;
+  /* No one will share the text with these buffers, but let's play it safe.  */
+  buffer_defaults.indirections = 0;
+  buffer_local_symbols.indirections = 0;
   BUF_INTERVALS (&buffer_defaults) = 0;
   BUF_INTERVALS (&buffer_local_symbols) = 0;
   XSETPVECTYPESIZE (&buffer_defaults, PVEC_BUFFER, pvecsize);


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: bug#12007: 24.1.50; Crash in auto-revert-handler
       [not found]         ` <500F6DAE.9010207@gmail.com>
@ 2012-07-25  4:42           ` Dmitry Antipov
  2012-07-25 11:34             ` Christoph Scholtes
  0 siblings, 1 reply; 7+ messages in thread
From: Dmitry Antipov @ 2012-07-25  4:42 UTC (permalink / raw)
  To: Christoph Scholtes; +Cc: Eli Zaretskii, 12007, Emacs development discussions

On 07/25/2012 07:53 AM, Christoph Scholtes wrote:

> Thanks. So far no more crashes.
>
> One other thing to note. I have never seen this crash on GNU/Linux.
> I use Emacs all day at work on that platform and build from trunk
> every morning. Any idea why it would only happen on Windows?

I'm not using Emacs on Windows, so I don't know exactly. But, kill-buffer
is (over?)complicated thing which depends on hooks installed, display state,
processes under the buffer being killed, auto-save state, etc., and these
things may be slightly different under Windows.

Dmitry




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: bug#12007: 24.1.50; Crash in auto-revert-handler
  2012-07-25  4:42           ` Dmitry Antipov
@ 2012-07-25 11:34             ` Christoph Scholtes
  2012-07-25 12:39               ` Dmitry Antipov
  0 siblings, 1 reply; 7+ messages in thread
From: Christoph Scholtes @ 2012-07-25 11:34 UTC (permalink / raw)
  To: Dmitry Antipov; +Cc: Eli Zaretskii, 12007, Emacs development discussions

On 7/24/2012 10:42 PM, Dmitry Antipov wrote:

>> One other thing to note. I have never seen this crash on GNU/Linux.
>> I use Emacs all day at work on that platform and build from trunk
>> every morning. Any idea why it would only happen on Windows?
>
> I'm not using Emacs on Windows, so I don't know exactly. But, kill-buffer
> is (over?)complicated thing which depends on hooks installed, display
> state,
> processes under the buffer being killed, auto-save state, etc., and these
> things may be slightly different under Windows.

OK. I ran this instance over night and it is still running. Usually the 
crash happened after an hour or so.

Can you apply this patch to the trunk?



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: bug#12007: 24.1.50; Crash in auto-revert-handler
  2012-07-25 11:34             ` Christoph Scholtes
@ 2012-07-25 12:39               ` Dmitry Antipov
       [not found]                 ` <50294F85.8080504@gmail.com>
  0 siblings, 1 reply; 7+ messages in thread
From: Dmitry Antipov @ 2012-07-25 12:39 UTC (permalink / raw)
  To: Christoph Scholtes; +Cc: Eli Zaretskii, 12007, Emacs development discussions

On 07/25/2012 03:34 PM, Christoph Scholtes wrote:

> OK. I ran this instance over night and it is still running. Usually the crash happened after an hour or so.
>
> Can you apply this patch to the trunk?

It's already done at 109201.

Dmitry




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: bug#12007: 24.1.50; Crash in auto-revert-handler
       [not found]                   ` <83r4rak33b.fsf@gnu.org>
@ 2012-08-15 14:55                     ` Dmitry Antipov
  2012-08-15 15:08                       ` Drew Adams
  2012-08-15 17:05                       ` Eli Zaretskii
  0 siblings, 2 replies; 7+ messages in thread
From: Dmitry Antipov @ 2012-08-15 14:55 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Christoph Scholtes, 12007, Emacs development discussions

On 08/13/2012 11:24 PM, Eli Zaretskii wrote:

> Perhaps related, the current trunk (revision 109586) segfaults on
> startup ("emacs -Q") on GNU/Linux, with the following backtrace:
>
>    #0  0x00007ffff5bc0131 in g_type_check_instance_cast ()
>       from /usr/lib/libgobject-2.0.so.0
>    #1  0x00000000005d6de6 in xg_mark_data () at gtkutil.c:2173
>    #2  0x0000000000692f28 in Fgarbage_collect () at alloc.c:5472
>    #3  0x000000000068bd27 in maybe_gc () at lisp.h:3536
>    #4  0x00000000006bc2ab in eval_sub (form=23619014) at eval.c:2056
>    #5  0x0000000000706a9c in readevalloop (readcharfun=15433282,
>        stream=0x168a720, sourcename=23641873, printflag=0, unibyte=15317634,
>        readfun=15317634, start=15317634, end=15317634) at lread.c:1814
>    #6  0x0000000000704998 in Fload (file=23634305, noerror=15317682,
>        nomessage=15317682, nosuffix=15317634, must_suffix=15317634)
>        at lread.c:1308
>    #7  0x00000000006bf216 in Ffuncall (nargs=4, args=0x7fffffffc358)
>        at eval.c:2827
>    #8  0x000000000072e4de in exec_byte_code (bytestr=12100273, vector=12100389,
>        maxdepth=20, args_template=15317634, nargs=0, args=0x0) at bytecode.c:898
>    #9  0x00000000006c006c in funcall_lambda (fun=12100229, nargs=1,
>        arg_vector=0xb8a325) at eval.c:3043
>    #10 0x00000000006bf458 in Ffuncall (nargs=2, args=0x7fffffffc838)
>        at eval.c:2860
>    #11 0x000000000072e4de in exec_byte_code (bytestr=12099201, vector=12099309,
>        maxdepth=16, args_template=15317634, nargs=0, args=0x0) at bytecode.c:898
>    #12 0x00000000006c006c in funcall_lambda (fun=12099133, nargs=2,
>        arg_vector=0xb89eed) at eval.c:3043
>    #13 0x00000000006bf458 in Ffuncall (nargs=3, args=0x7fffffffcd18)
>        at eval.c:2860
>    #14 0x000000000072e4de in exec_byte_code (bytestr=12099633, vector=12099829,
>        maxdepth=16, args_template=15317634, nargs=0, args=0x0) at bytecode.c:898
>    #15 0x00000000006c006c in funcall_lambda (fun=12099565, nargs=1,
>        arg_vector=0xb8a0f5) at eval.c:3043
>    #16 0x00000000006bf458 in Ffuncall (nargs=2, args=0x7fffffffd1f8)
>        at eval.c:2860
>    #17 0x000000000072e4de in exec_byte_code (bytestr=12140633, vector=12142301,
>        maxdepth=72, args_template=0, nargs=0, args=0x7fffffffd758)
>        at bytecode.c:898
>    #18 0x00000000006bfc09 in funcall_lambda (fun=12140581, nargs=0,
>        arg_vector=0x7fffffffd758) at eval.c:2977
>    #19 0x00000000006bf458 in Ffuncall (nargs=1, args=0x7fffffffd750)
>        at eval.c:2860
>    #20 0x000000000072e4de in exec_byte_code (bytestr=12136441, vector=12136893,
>        maxdepth=32, args_template=0, nargs=0, args=0x7fffffffdb90)
>        at bytecode.c:898
>    #21 0x00000000006bfc09 in funcall_lambda (fun=12136389, nargs=0,
>        arg_vector=0x7fffffffdb90) at eval.c:2977
>    #22 0x00000000006bf81f in apply_lambda (fun=12136389, args=15317634)
>        at eval.c:2920
>    #23 0x00000000006bd037 in eval_sub (form=15547702) at eval.c:2204
>    #24 0x00000000006bc15f in Feval (form=15547702, lexical=15317634)
>        at eval.c:2021
>    #25 0x00000000005e31f3 in top_level_2 () at keyboard.c:1161
>    #26 0x00000000006ba27c in internal_condition_case (
>        bfun=0x5e31d6 <top_level_2>, handlers=15369330, hfun=0x5e2cb6 <cmd_error>)
>        at eval.c:1308
>    #27 0x00000000005e322d in top_level_1 (ignore=15317634) at keyboard.c:1169
>    #28 0x00000000006b9b39 in internal_catch (tag=15365202,
>        func=0x5e31f5 <top_level_1>, arg=15317634) at eval.c:1065
>    #29 0x00000000005e3151 in command_loop () at keyboard.c:1124
>    #30 0x00000000005e2502 in recursive_edit_1 () at keyboard.c:752
>    #31 0x00000000005e28dd in Frecursive_edit () at keyboard.c:816
>    #32 0x00000000005e033f in main (argc=2, argv=0x7fffffffe5c8) at emacs.c:1666
>
>    Lisp Backtrace:
>    "load" (0xffffc360)
>    0xb8a280 PVEC_COMPILED
>    "tty-find-type" (0xffffcd20)
>    "tty-run-terminal-initialization" (0xffffd200)
>    "command-line" (0xffffd758)
>    "normal-top-level" (0xffffdb90)
>
> The file it tries to load is term/xterm.elc.

Reproduced with current trunk (109630) and under X by running

DISPLAY= ./src/emacs -Q

will take a look...

Dmitry



^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: bug#12007: 24.1.50; Crash in auto-revert-handler
  2012-08-15 14:55                     ` Dmitry Antipov
@ 2012-08-15 15:08                       ` Drew Adams
  2012-08-15 17:05                       ` Eli Zaretskii
  1 sibling, 0 replies; 7+ messages in thread
From: Drew Adams @ 2012-08-15 15:08 UTC (permalink / raw)
  To: 'Dmitry Antipov', 'Eli Zaretskii'
  Cc: 'Christoph Scholtes', 12007,
	'Emacs development discussions'

Please do not send bug reports to both the bugs list and Emacs Devel.  Thx.




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: bug#12007: 24.1.50; Crash in auto-revert-handler
  2012-08-15 14:55                     ` Dmitry Antipov
  2012-08-15 15:08                       ` Drew Adams
@ 2012-08-15 17:05                       ` Eli Zaretskii
  1 sibling, 0 replies; 7+ messages in thread
From: Eli Zaretskii @ 2012-08-15 17:05 UTC (permalink / raw)
  To: Dmitry Antipov; +Cc: emacs-devel

> Date: Wed, 15 Aug 2012 18:55:44 +0400
> From: Dmitry Antipov <dmantipov@yandex.ru>
> CC: Christoph Scholtes <cschol2112@googlemail.com>, 
>  12007@debbugs.gnu.org, 
>  Emacs development discussions <emacs-devel@gnu.org>
> 
> Reproduced with current trunk (109630) and under X by running
> 
> DISPLAY= ./src/emacs -Q
> 
> will take a look...

Thanks.



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-08-15 17:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <86pq7p8d9o.fsf@googlemail.com>
     [not found] ` <83mx2t1aut.fsf@gnu.org>
     [not found]   ` <500B2BB0.1000402@gmail.com>
     [not found]     ` <500F4055.4080005@gmail.com>
2012-07-25  2:37       ` bug#12007: 24.1.50; Crash in auto-revert-handler Dmitry Antipov
     [not found]         ` <500F6DAE.9010207@gmail.com>
2012-07-25  4:42           ` Dmitry Antipov
2012-07-25 11:34             ` Christoph Scholtes
2012-07-25 12:39               ` Dmitry Antipov
     [not found]                 ` <50294F85.8080504@gmail.com>
     [not found]                   ` <83r4rak33b.fsf@gnu.org>
2012-08-15 14:55                     ` Dmitry Antipov
2012-08-15 15:08                       ` Drew Adams
2012-08-15 17:05                       ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).