From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Liang Wang Newsgroups: gmane.emacs.devel Subject: Re: emacs daemon exits when emacsclient connects to it again Date: Mon, 9 Feb 2009 18:29:41 +0800 Message-ID: References: <877i40rlfg.fsf@kobe.laptop> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1234175456 16524 80.91.229.12 (9 Feb 2009 10:30:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 9 Feb 2009 10:30:56 +0000 (UTC) Cc: emacs-devel@gnu.org To: Giorgos Keramidas Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 09 11:32:11 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LWTQa-0001oc-9n for ged-emacs-devel@m.gmane.org; Mon, 09 Feb 2009 11:31:49 +0100 Original-Received: from localhost ([127.0.0.1]:58431 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LWTPG-0007gL-My for ged-emacs-devel@m.gmane.org; Mon, 09 Feb 2009 05:30:26 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LWTOb-0007bp-0k for emacs-devel@gnu.org; Mon, 09 Feb 2009 05:29:45 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LWTOZ-0007aM-MO for emacs-devel@gnu.org; Mon, 09 Feb 2009 05:29:44 -0500 Original-Received: from [199.232.76.173] (port=54132 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LWTOZ-0007aB-Fq for emacs-devel@gnu.org; Mon, 09 Feb 2009 05:29:43 -0500 Original-Received: from wa-out-1112.google.com ([209.85.146.176]:13769) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LWTOY-0004sk-SY for emacs-devel@gnu.org; Mon, 09 Feb 2009 05:29:43 -0500 Original-Received: by wa-out-1112.google.com with SMTP id k17so887152waf.26 for ; Mon, 09 Feb 2009 02:29:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=aUnHy9itfQEaE+hdy9ewO8r5MBiWR2MWGiyUFyhveY0=; b=Iaubh3GcxM3stpVui7tu/QJNuyPsxFMRvbstevICSO0tjvWm3eB3VmpBOSwk5rehD0 y1Ez5BEH24sadK74j+bQIBtsLqyvoOmKk8BEAnLlWck8S65rDiryRqoF5QCdXmpLMBD1 DIxZZgCeW+NJ3vb6mLcukjtwjHo4fDLNY2n5A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=mDCx6kEF5xhFaMFZYXNxT8bqVsNL0KllU7q2pHi+2RViTcFBLT9ZeJeamkCVQ/l7zl tDcJiE1SnTTLBXbNC9mYTxfuhviehb8SG/+/DIfmheTFHbjInkIQleKuAR8MTWlqHcLf bQs/X/TTwFpb4lAHIRy9u05GTNpTVhRAGl7zs= Original-Received: by 10.114.181.6 with SMTP id d6mr3493627waf.94.1234175381562; Mon, 09 Feb 2009 02:29:41 -0800 (PST) In-Reply-To: <877i40rlfg.fsf@kobe.laptop> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:108885 Archived-At: On Mon, Feb 9, 2009 at 5:47 PM, Giorgos Keramidas wrote: > On Mon, 9 Feb 2009 17:11:45 +0800, Liang Wang wrote: >> Emacs daemon exits or crashes when emacsclient connect to it again. >> Below is my command line operation. >> >> [liang@localhost ~]$ emacs --daemon -Q >> ("emacs" "-Q") >> Starting Emacs daemon. >> [liang@localhost ~]$ pgrep -l emacs >> 2813 emacs >> [liang@localhost ~]$ emacsclient -c # succeed to connect >> Waiting for Emacs... >> [liang@localhost ~]$ pgrep -l emacs >> 2813 emacs >> [liang@localhost ~]$ emacsclient -c # fail to connect >> Waiting for Emacs... >> [liang@localhost ~]$ pgrep -l emacs >> [liang@localhost ~]$ > > Which version of Emacs are you running? Can you attach to the > background process using gdb and see where it crashes? > > GNU Emacs 23.0.90.1 (i686-pc-linux-gnu, GTK+ Version 2.14.7) of 2009-02-09 on localhost.localdomain I am not familiar with gdb. Below is the output of gdb session. It seems that something is wrong when emacsclient connects to daemon initially. (gdb) attach 2970 (gdb) c Continuing. Couldn't write registers: Input/output error. (gdb) bt #0 0x00aa1b60 in _dl_debug_state () from /lib/ld-linux.so.2 #1 0x00a99473 in _dl_map_object_from_fd () from /lib/ld-linux.so.2 #2 0x00a9a363 in _dl_map_object () from /lib/ld-linux.so.2 #3 0x00aa567d in dl_open_worker () from /lib/ld-linux.so.2 #4 0x00aa0db6 in _dl_catch_error () from /lib/ld-linux.so.2 #5 0x00aa4f5e in _dl_open () from /lib/ld-linux.so.2 #6 0x00c57c2c in dlopen_doit () from /lib/libdl.so.2 #7 0x00aa0db6 in _dl_catch_error () from /lib/ld-linux.so.2 #8 0x00c5805c in _dlerror_run () from /lib/libdl.so.2 #9 0x00c57b61 in dlopen@@GLIBC_2.1 () from /lib/libdl.so.2 #10 0x009f7547 in g_module_open () from /lib/libgmodule-2.0.so.0 #11 0x05e8625c in ?? () from /usr/lib/libgtk-x11-2.0.so.0 #12 0x009de840 in g_type_module_use () from /lib/libgobject-2.0.so.0 #13 0x05e86147 in gtk_theme_engine_get () from /usr/lib/libgtk-x11-2.0.so.0 #14 0x05e0a855 in ?? () from /usr/lib/libgtk-x11-2.0.so.0 #15 0x05e0b3e8 in ?? () from /usr/lib/libgtk-x11-2.0.so.0 #16 0x05e0b9f7 in ?? () from /usr/lib/libgtk-x11-2.0.so.0 #17 0x05e0bbac in ?? () from /usr/lib/libgtk-x11-2.0.so.0 #18 0x05e0bda8 in ?? () from /usr/lib/libgtk-x11-2.0.so.0 #19 0x05e0c167 in gtk_rc_reparse_all_for_settings () from /usr/lib/libgtk-x11-2.0.so.0 #20 0x05e290d2 in gtk_settings_get_for_screen () from /usr/lib/libgtk-x11-2.0.so.0 ---Type to continue, or q to quit--- #21 0x05dd75e2 in ?? () from /usr/lib/libgtk-x11-2.0.so.0 #22 0x009c8e8c in g_cclosure_marshal_VOID__OBJECT () from /lib/libgobject-2.0.so.0 #23 0x009bc1fb in g_closure_invoke () from /lib/libgobject-2.0.so.0 #24 0x009d2655 in ?? () from /lib/libgobject-2.0.so.0 #25 0x009d3d6c in g_signal_emit_valist () from /lib/libgobject-2.0.so.0 #26 0x009d408d in g_signal_emit_by_name () from /lib/libgobject-2.0.so.0 #27 0x0054057a in gdk_display_open () from /usr/lib/libgdk-x11-2.0.so.0 #28 0x005194b5 in gdk_display_open_default_libgtk_only () from /usr/lib/libgdk-x11-2.0.so.0 #29 0x05dbdf4f in gtk_init_check () from /usr/lib/libgtk-x11-2.0.so.0 #30 0x05dbdf84 in gtk_init () from /usr/lib/libgtk-x11-2.0.so.0 #31 0x080de89e in x_term_init (display_name=138116043, xrm_option=0x0, resource_name=0xa0982a4 "emacs") at xterm.c:10041 #32 0x080e9e4a in Fx_open_connection (display=138116043, xrm_string=137952577, must_succeed=137952577) at xfns.c:4152 #33 0x0819130b in Ffuncall (nargs=4, args=0xbfec1550) at eval.c:3050 #34 0x081c61b0 in Fbyte_code (bytestr=137094467, vector=137094484, maxdepth=) at bytecode.c:678 #35 0x08193103 in funcall_lambda (fun=137094436, nargs=0, arg_vector=0xbfec1694) at eval.c:3231 #36 0x0819102b in Ffuncall (nargs=1, args=0xbfec1690) at eval.c:3101 #37 0x081c61b0 in Fbyte_code (bytestr=136883131, vector=136883148, ---Type to continue, or q to quit--- maxdepth=) at bytecode.c:678 #38 0x08193103 in funcall_lambda (fun=136883076, nargs=2, arg_vector=0xbfec17c4) at eval.c:3231 #39 0x0819102b in Ffuncall (nargs=3, args=0xbfec17c0) at eval.c:3101 #40 0x081c61b0 in Fbyte_code (bytestr=138933147, vector=139885484, maxdepth=) at bytecode.c:678 #41 0x08193103 in funcall_lambda (fun=139885724, nargs=3, arg_vector=0xbfec1904) at eval.c:3231 #42 0x0819102b in Ffuncall (nargs=4, args=0xbfec1900) at eval.c:3101 #43 0x081c61b0 in Fbyte_code (bytestr=138911675, vector=139498700, maxdepth=) at bytecode.c:678 #44 0x08192ca4 in Feval (form=140780757) at eval.c:2381 #45 0x08193831 in internal_lisp_condition_case (var=138423401, bodyform=140780757, handlers=140809693) at eval.c:1456 #46 0x081c6ada in Fbyte_code (bytestr=138926347, vector=138391620, maxdepth=) at bytecode.c:868 #47 0x08192ca4 in Feval (form=140785629) at eval.c:2381 #48 0x0819070a in internal_catch (tag=168375953, func=0x81927c0 , arg=140785629) at eval.c:1247 #49 0x081c6b20 in Fbyte_code (bytestr=138926427, vector=138391780, maxdepth=) at bytecode.c:853 #50 0x08193103 in funcall_lambda (fun=139503164, nargs=2, arg_vector=0xbfec1e64) at eval.c:3231 ---Type to continue, or q to quit--- #51 0x0819102b in Ffuncall (nargs=3, args=0xbfec1e60) at eval.c:3101 #52 0x08192652 in Fapply (nargs=2, args=0xbfec1eb0) at eval.c:2532 #53 0x081927a4 in apply1 (fn=168375225, arg=140895629) at eval.c:2796 #54 0x081c999d in read_process_output_call (fun_and_args=140895637) at process.c:5149 #55 0x081903f6 in internal_condition_case_1 ( bfun=0x81c9980 , arg=140895637, handlers=137995705, hfun=0x81c99a0 ) at eval.c:1559 #56 0x081c92db in read_process_output (proc=141290092, channel=) at process.c:5338 #57 0x081cd831 in wait_reading_process_output (time_limit=0, microsecs=0, read_kbd=-1, do_display=1, wait_for_cell=137952577, wait_proc=0x0, just_wait_proc=0) at process.c:4991 #58 0x08130439 in kbd_buffer_get_event () at keyboard.c:4078 #59 read_char (commandflag=1, nmaps=2, maps=0xbfec3630, prev_event=137952577, used_mouse_menu=0xbfec36e4, end_time=0x0) at keyboard.c:3038 #60 0x08132151 in read_key_sequence (keybuf=0xbfec3794, bufsize=30, prompt=137952577, dont_downcase_last=0, can_return_switch_frame=1, fix_current_buffer=1) at keyboard.c:9415 #61 0x08134274 in command_loop_1 () at keyboard.c:1640 #62 0x08190630 in internal_condition_case (bfun=0x8134090 , handlers=137995705, hfun=0x812e8f0 ) at eval.c:1511 ---Type to continue, or q to quit--- #63 0x0812de45 in command_loop_2 () at keyboard.c:1357 #64 0x0819070a in internal_catch (tag=137991729, func=0x812de20 , arg=137952577) at eval.c:1247 #65 0x0812e73f in command_loop () at keyboard.c:1336 #66 0x0812eacb in recursive_edit_1 () at keyboard.c:951 #67 0x0812ec14 in Frecursive_edit () at keyboard.c:1013 #68 0x0812321f in main (argc=3, argv=0xbfec3e14) at emacs.c:1852 (gdb) c Continuing. Program received signal SIGSEGV, Segmentation fault. 0x00000003 in ?? () (gdb) bt #0 0x00000003 in ?? () #1 0x00000007 in ?? () #2 0xbfec0490 in ?? () #3 0x009b025c in freopen64 () from /lib/libglib-2.0.so.0 #4 0x009b025c in freopen64 () from /lib/libglib-2.0.so.0 #5 0x00000004 in ?? () #6 0xbfec0418 in ?? () #7 0x00928c0a in g_string_append_vprintf () from /lib/libglib-2.0.so.0 Backtrace stopped: previous frame inner to this frame (corrupt stack?) (gdb)