From: Chong Yidong <cyd@gnu.org>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: martin rudalics <rudalics@gmx.at>, emacs-devel@gnu.org
Subject: Re: emacs 24 randomly hanging
Date: Wed, 22 Feb 2012 18:55:29 +0800 [thread overview]
Message-ID: <87aa4byw66.fsf@gnu.org> (raw)
In-Reply-To: <m2zkcbutqs.fsf@igel.home> (Andreas Schwab's message of "Wed, 22 Feb 2012 10:01:31 +0100")
[-- Attachment #1: Type: text/plain, Size: 4600 bytes --]
Andreas Schwab <schwab@linux-m68k.org> writes:
> This is just doctoring the symptoms. There is an invariant that *every*
> live frame is on Vframe_alist. If that invariant is violated then this
> is the bug that must be fixed.
That's apparently indeed the problem. I patched next_frame to abort
when the target frame isn't on Vframe_list (patch attached), and got the
following backtrace with Adam's recipe.
The problem is that x-create-frame calls x_set_menu_bar_lines, which
calls window-configuration-change-hook. Because that hook is called in
the middle of x-create-frame, the (half-initialized) frame isn't on
Vframe_list yet.
Patch welcome; I don't have time to work on this further right now.
394 kill (getpid (), SIGABRT);
(gdb) bt
#0 abort () at emacs.c:394
#1 0x00000000004226d7 in next_frame (frame=17277365, minibuf=12761602)
at frame.c:944
#2 0x000000000042307e in Fnext_frame (frame=17277365, miniframe=12761602)
at frame.c:1101
#3 0x000000000060637a in eval_sub (form=20840342) at eval.c:2347
#4 0x000000000060271b in Fsetq (args=20840470) at eval.c:455
...
#14 0x0000000000603f3c in Fcatch (args=20841622) at eval.c:1237
...
#21 0x0000000000607c8e in Ffuncall (nargs=1, args=0x7fffffff8d08)
at eval.c:3057
#22 0x000000000060713a in call0 (fn=21122898) at eval.c:2750
#23 0x000000000048bb27 in run_funs (funs=14101542) at window.c:2872
#24 0x000000000048be39 in run_window_configuration_change_hook (f=0x107a1b0)
at window.c:2933
#25 0x00000000005100ab in x_set_menu_bar_lines (f=0x107a1b0, value=0,
oldval=12761602) at xfns.c:1269
#26 0x000000000042701f in x_set_frame_parameters (f=0x107a1b0, alist=12761602)
at frame.c:2929
#27 0x000000000042a0dd in x_default_parameter (f=0x107a1b0, alist=19012854,
prop=12942274, deflt=0, xprop=0x0, xclass=0x0, type=RES_TYPE_NUMBER)
at frame.c:3938
#28 0x0000000000513ce8 in Fx_create_frame (parms=19012854) at xfns.c:3327
#29 0x00000000006079cb in Ffuncall (nargs=2, args=0x7fffffff91b0)
at eval.c:2996
#30 0x0000000000653cc0 in exec_byte_code (bytestr=9928737, vector=9928773,
maxdepth=16, args_template=12761602, nargs=0, args=0x0) at bytecode.c:785
#31 0x00000000006083f2 in funcall_lambda (fun=9928669, nargs=1,
arg_vector=0x7fffffff9688) at eval.c:3227
#32 0x0000000000607bda in Ffuncall (nargs=2, args=0x7fffffff9680)
at eval.c:3045
...
#56 0x0000000000607113 in apply1 (fn=21078306, arg=14151190) at eval.c:2739
#57 0x0000000000660a34 in read_process_output_call (fun_and_args=14151174)
at process.c:5002
#58 0x00000000006047e1 in internal_condition_case_1 (
bfun=0x660a06 <read_process_output_call>, arg=14151174, handlers=12761602,
hfun=0x660a36 <read_process_output_error_handler>) at eval.c:1547
#59 0x000000000066110b in read_process_output (proc=20995733, channel=3123)
at process.c:5201
#60 0x00000000006603d3 in wait_reading_process_output (time_limit=30,
microsecs=0, read_kbd=-1, do_display=1, wait_for_cell=12761602,
wait_proc=0x0, just_wait_proc=0) at process.c:4844
#61 0x000000000041f8da in sit_for (timeout=120, reading=1, do_display=1)
at dispnew.c:6063
#62 0x000000000056977c in read_char (commandflag=1, nmaps=2,
maps=0x7fffffffd5a0, prev_event=12761602, used_mouse_menu=0x7fffffffd6e8,
end_time=0x0) at keyboard.c:2690
#63 0x0000000000577285 in read_key_sequence (keybuf=0x7fffffffd8b0,
bufsize=30, prompt=12761602, dont_downcase_last=0,
can_return_switch_frame=1, fix_current_buffer=1) at keyboard.c:9302
#64 0x0000000000566f26 in command_loop_1 () at keyboard.c:1448
#65 0x000000000060467a in internal_condition_case (
bfun=0x566b41 <command_loop_1>, handlers=12813794,
hfun=0x566406 <cmd_error>) at eval.c:1509
#66 0x0000000000566830 in command_loop_2 (ignore=12761602) at keyboard.c:1159
#67 0x0000000000604031 in internal_catch (tag=12809586,
func=0x56680a <command_loop_2>, arg=12761602) at eval.c:1266
#68 0x00000000005667e3 in command_loop () at keyboard.c:1138
#69 0x0000000000565f4a in recursive_edit_1 () at keyboard.c:758
#70 0x00000000005660ed in Frecursive_edit () at keyboard.c:822
#71 0x000000000056418e in main (argc=1, argv=0x7fffffffe198) at emacs.c:1715
Lisp Backtrace:
"next-frame" (0xffff7c20)
"setq" (0xffff7ec8)
"while" (0xffff80f8)
"let*" (0xffff8378)
"catch" (0xffff86c8)
"cl-block-wrapper" (0xffff8838)
"block" (0xffff89a8)
"loop" (0xffff8b18)
"walk-frames" (0xffff8d10)
"x-create-frame" (0xffff91b8)
"x-create-frame-with-faces" (0xffff9688)
"make-frame" (0xffff9b68)
"make-frame-on-display" (0xffffa078)
"server-create-window-system-frame" (0xffffa5e0)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: frame.c.patch --]
[-- Type: text/x-diff, Size: 517 bytes --]
=== modified file 'src/frame.c'
*** src/frame.c 2012-01-19 07:21:25 +0000
--- src/frame.c 2012-02-22 10:43:37 +0000
***************
*** 935,940 ****
--- 935,949 ----
forever. Forestall that. */
CHECK_LIVE_FRAME (frame);
+ passed = 0;
+ for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail))
+ if (EQ (frame, XCAR (tail)))
+ passed++;
+
+ if (passed == 0)
+ abort ();
+
+ passed = 0;
while (1)
for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail))
{
next prev parent reply other threads:[~2012-02-22 10:55 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-19 5:28 emacs 24 randomly hanging Adam
2012-02-19 9:45 ` Adam
2012-02-19 9:54 ` Andreas Schwab
2012-02-20 7:23 ` Adam
2012-02-20 15:34 ` Dan Nicolaescu
2012-02-21 10:10 ` Adam
2012-02-21 10:43 ` Adam
2012-02-21 15:41 ` Dan Nicolaescu
2012-02-21 16:54 ` martin rudalics
2012-02-21 18:42 ` Adam
2012-02-22 8:26 ` martin rudalics
2012-02-22 9:01 ` Andreas Schwab
2012-02-22 9:41 ` martin rudalics
2012-02-22 14:49 ` Stefan Monnier
2012-02-24 18:43 ` martin rudalics
2012-02-22 10:55 ` Chong Yidong [this message]
2012-02-22 16:28 ` Eli Zaretskii
2012-02-23 8:05 ` Chong Yidong
2012-02-23 14:03 ` Christopher Schmidt
2012-02-23 16:39 ` Christopher Schmidt
2012-02-23 17:42 ` Chong Yidong
2012-02-24 18:43 ` martin rudalics
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87aa4byw66.fsf@gnu.org \
--to=cyd@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=rudalics@gmx.at \
--cc=schwab@linux-m68k.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.