From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#45277: D-Bus crashes and DND errors Date: Wed, 16 Dec 2020 22:58:30 +0200 Organization: LINKOV.NET Message-ID: <87zh2dijdl.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35600"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) To: 45277@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 16 22:07:16 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kpe0x-0009Ap-7b for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 16 Dec 2020 22:07:15 +0100 Original-Received: from localhost ([::1]:60324 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kpe0t-0003Fw-SX for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 16 Dec 2020 16:07:13 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46272) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kpdzm-00022C-6e for bug-gnu-emacs@gnu.org; Wed, 16 Dec 2020 16:06:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50705) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kpdzl-0006Vr-VH for bug-gnu-emacs@gnu.org; Wed, 16 Dec 2020 16:06:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kpdzl-000491-P4 for bug-gnu-emacs@gnu.org; Wed, 16 Dec 2020 16:06:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 16 Dec 2020 21:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 45277 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.160815272515884 (code B ref -1); Wed, 16 Dec 2020 21:06:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 16 Dec 2020 21:05:25 +0000 Original-Received: from localhost ([127.0.0.1]:34018 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kpdzB-000488-By for submit@debbugs.gnu.org; Wed, 16 Dec 2020 16:05:25 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:50174) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kpdz9-000480-Jx for submit@debbugs.gnu.org; Wed, 16 Dec 2020 16:05:24 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46126) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kpdz9-0001Hx-6J for bug-gnu-emacs@gnu.org; Wed, 16 Dec 2020 16:05:23 -0500 Original-Received: from relay7-d.mail.gandi.net ([217.70.183.200]:34045) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kpdz2-0006L9-N0 for bug-gnu-emacs@gnu.org; Wed, 16 Dec 2020 16:05:22 -0500 X-Originating-IP: 91.129.99.98 Original-Received: from mail.gandi.net (m91-129-99-98.cust.tele2.ee [91.129.99.98]) (Authenticated sender: juri@linkov.net) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id A988720005 for ; Wed, 16 Dec 2020 21:05:10 +0000 (UTC) Received-SPF: pass client-ip=217.70.183.200; envelope-from=juri@linkov.net; helo=relay7-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:196223 Archived-At: Sometimes DND causes just errors, sometimes D-BUS events cause Emacs crashes. Here is an example of DND errors when debug-on-error is enabled: Debugger entered--Lisp error: (error "Bad data in VALUES, must be number, cons or string") x-send-client-message(# 21062611 # "XdndStatus" 32 (62914762 0 ((+ -1) . 1) 0 0)) x-dnd-handle-xdnd((drag-n-drop (# nil (854 . 0) 0) ["XdndPosition" # 32 [21062611 0 55967771 54687100 550]]) # # "XdndPosition" 32 [21062611 0 55967771 54687100 550]) x-dnd-handle-drag-n-drop-event((drag-n-drop (# nil (854 . 0) 0) ["XdndPosition" # 32 [21062611 0 55967771 54687100 550]])) funcall-interactively(x-dnd-handle-drag-n-drop-event (drag-n-drop (# nil (854 . 0) 0) ["XdndPosition" # 32 [21062611 0 55967771 54687100 550]])) call-interactively(x-dnd-handle-drag-n-drop-event nil [(drag-n-drop (# nil (854 . 0) 0) ["XdndPosition" # 32 [21062611 0 55967771 54687100 550]])]) command-execute(x-dnd-handle-drag-n-drop-event nil [(drag-n-drop (# nil (854 . 0) 0) ["XdndPosition" # 32 [21062611 0 55967771 54687100 550]])] t) What is worse are sporadic crashes by dbus-handle-event: Thread 1 "emacs" received signal SIGSEGV, Segmentation fault. print_preprocess (obj=obj@entry=XIL(0x55556462e080)) at lisp.h:2204 2204 return XSYMBOL (sym)->u.s.interned != SYMBOL_UNINTERNED; (gdb) bt #0 print_preprocess (obj=obj@entry=XIL(0x55556462e080)) at lisp.h:2204 #1 0x000055555572f234 in print (obj=XIL(0x55556462e080), printcharfun=XIL(0x30), escapeflag=) at print.c:1126 #2 0x000055555572f702 in Fprin1 (object=XIL(0x55556462e080), printcharfun=) at print.c:651 #3 0x0000555555730895 in print_error_message (data=, data@entry=XIL(0x555558492423), stream=stream@entry=XIL(0x30), context=, caller=caller@entry=XIL(0x2aaa9c29dce0)) at print.c:977 #4 0x0000555555692547 in Fcommand_error_default_function (data=XIL(0x555558492423), context=XIL(0x7ffff1c52674), signal=XIL(0x2aaa9c29dce0)) at lisp.h:1564 #5 0x000055555570fa9b in Ffuncall (nargs=4, args=0x7fffffffc050) at lisp.h:2081 #6 0x0000555555711b28 in Fapply (nargs=2, args=0x7fffffffc168) at eval.c:2509 #7 0x000055555570fa9b in Ffuncall (nargs=3, args=args@entry=0x7fffffffc160) at lisp.h:2081 #8 0x000055555574cb54 in exec_byte_code (bytestr=, vector=, maxdepth=, args_template=, nargs=, args=) at bytecode.c:632 #9 0x000055555570f9d7 in Ffuncall (nargs=4, args=0x7fffffffc430) at eval.c:2893 #10 0x000055555570fc38 in call3 (fn=, arg1=arg1@entry=XIL(0x555558492423), arg2=, arg3=arg3@entry=XIL(0x2aaa9c29dce0)) at eval.c:2753 #11 0x00005555556962e6 in cmd_error_internal (data=data@entry=XIL(0x555558492423), context=context@entry=0x7fffffffc490 "") at lisp.h:3910 #12 0x000055555569642b in cmd_error (data=XIL(0x555558492423)) at keyboard.c:956 #13 0x000055555570eb91 in internal_condition_case (bfun=bfun@entry=0x55555569f9c0 , handlers=handlers@entry=XIL(0x90), hfun=hfun@entry=0x555555696310 ) at eval.c:1411 #14 0x00005555556907c4 in command_loop_2 (ignore=ignore@entry=XIL(0)) at lisp.h:1007 #15 0x000055555570eae9 in internal_catch (tag=tag@entry=XIL(0x5c70), func=func@entry=0x5555556907a0 , arg=arg@entry=XIL(0)) at eval.c:1176 #16 0x0000555555690719 in command_loop () at lisp.h:1007 #17 0x0000555555695f1a in recursive_edit_1 () at keyboard.c:720 #18 0x0000555555696256 in Frecursive_edit () at keyboard.c:789 #19 0x000055555570fa9b in Ffuncall (nargs=1, args=args@entry=0x7fffffffc700) at lisp.h:2081 #20 0x000055555574cb54 in exec_byte_code (bytestr=, vector=, maxdepth=, args_template=, nargs=, args=) at bytecode.c:632 #21 0x000055555570f9d7 in Ffuncall (nargs=3, args=0x7fffffffcbb0) at eval.c:2893 #22 0x0000555555711b28 in Fapply (nargs=nargs@entry=2, args=args@entry=0x7fffffffcc50) at eval.c:2509 #23 0x00005555557101f5 in apply1 (arg=XIL(0x555557ee92a3), fn=) at lisp.h:1373 #24 call_debugger (arg=XIL(0x555557ee92a3)) at eval.c:339 #25 0x000055555571092d in maybe_call_debugger (data=XIL(0x555557ee92d3), sig=, conditions=XIL(0x7ffff1e724fb)) at lisp.h:1007 #26 signal_or_quit (error_symbol=, data=XIL(0x555557ee92d3), keyboard_quit=) at eval.c:1727 #27 0x00005555555a14c2 in Fsignal (error_symbol=, error_symbol@entry=XIL(0xf090), data=) at eval.c:1628 #28 0x00005555555a16a8 in xsignal (data=, error_symbol=XIL(0xf090)) at lisp.h:4115 #29 xsignal2 (error_symbol=error_symbol@entry=XIL(0xf090), arg1=arg1@entry=XIL(0xa7d0), arg2=) at eval.c:1787 #30 0x00005555555a070c in wrong_type_argument (predicate=predicate@entry=XIL(0xa7d0), value=) at lisp.h:1007 #31 0x00005555555a0726 in CHECK_TYPE (x=, predicate=XIL(0xa7d0), ok=0) at lisp.h:758 #32 check_number_coerce_marker (x=) at data.c:2377 #33 0x00005555556fd5cd in arithcompare (num1=make_fixnum(1), num2=XIL(0x8550), comparison=comparison@entry=ARITH_EQUAL) at data.c:2390 #34 0x000055555574ead4 in exec_byte_code (bytestr=, vector=, maxdepth=, args_template=, nargs=, args=) at bytecode.c:990 #35 0x000055555570f9d7 in Ffuncall (nargs=nargs@entry=2, args=args@entry=0x7fffffffd218) at eval.c:2893 #36 0x000055555570c175 in Ffuncall_interactively (nargs=2, args=0x7fffffffd218) at callint.c:253 #37 0x000055555570fa9b in Ffuncall (nargs=nargs@entry=3, args=args@entry=0x7fffffffd210) at lisp.h:2081 #38 0x000055555570d68b in Fcall_interactively (function=, record_flag=, keys=) at callint.c:784 #39 0x000055555570fa9b in Ffuncall (nargs=4, args=args@entry=0x7fffffffd448) at lisp.h:2081 #40 0x000055555574cb54 in exec_byte_code (bytestr=, vector=, maxdepth=, args_template=, nargs=, args=) at bytecode.c:632 #41 0x000055555570f9d7 in Ffuncall (nargs=5, args=0x7fffffffd7b0) at eval.c:2893 #42 0x000055555570fc9d in call4 (fn=fn@entry=XIL(0x43b0), arg1=arg1@entry=XIL(0x2aaa9c29dce0), arg2=arg2@entry=XIL(0), arg3=, arg4=arg4@entry=XIL(0x30)) at eval.c:2761 #43 0x000055555569c0a0 in read_char (commandflag=1, map=XIL(0x5555585fc1b3), prev_event=XIL(0), used_mouse_menu=0x7fffffffddfb, end_time=0x0) at lisp.h:1007 #44 0x000055555569e224 in read_key_sequence (keybuf=, prompt=XIL(0), dont_downcase_last=, can_return_switch_frame=true, fix_current_buffer=true, prevent_redisplay=) at keyboard.c:9483 #45 0x000055555569fbbc in command_loop_1 () at lisp.h:1007 #46 0x000055555570eba7 in internal_condition_case (bfun=bfun@entry=0x55555569f9c0 , handlers=handlers@entry=XIL(0x90), hfun=hfun@entry=0x555555696310 ) at eval.c:1415 #47 0x00005555556907c4 in command_loop_2 (ignore=ignore@entry=XIL(0)) at lisp.h:1007 #48 0x000055555570eae9 in internal_catch (tag=tag@entry=XIL(0xd7d0), func=func@entry=0x5555556907a0 , arg=arg@entry=XIL(0)) at eval.c:1176 #49 0x0000555555690763 in command_loop () at lisp.h:1007 #50 0x0000555555695f1a in recursive_edit_1 () at keyboard.c:720 #51 0x0000555555696256 in Frecursive_edit () at keyboard.c:789 #52 0x00005555555a6a39 in main (argc=1, argv=) at emacs.c:2054 Lisp Backtrace: "command-error-default-function" (0xffffc058) "apply" (0xffffc168) 0xf22de0f8 PVEC_COMPILED "recursive-edit" (0xffffc708) "debug" (0xffffcbb8) "dbus-handle-event" (0xffffd220) "funcall-interactively" (0xffffd218) "call-interactively" (0xffffd450) "command-execute" (0xffffd7b8) These crashes occur only in optimized builds. I tried to print DBUS events in dbus-handle-event to stdout, so in case of the crash, at least stdout might show the cause of the problem, but can't find a Lisp function that prints to stdout. I tried to add in dbus-handle-event: (let ((noninteractive t)) (message "DBUS: %S" event)) but it doesn't print to stdout.