all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#7113: 23.2; Crash on invalid path argument to dbus-introspect-xml
@ 2010-09-27  3:08 Thomas Fitzsimmons
  2010-09-27  7:01 ` Ari Roponen
  0 siblings, 1 reply; 12+ messages in thread
From: Thomas Fitzsimmons @ 2010-09-27  3:08 UTC (permalink / raw)
  To: 7113

This bug report will be sent to the Free Software Foundation,
not to your local site managers!
Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.

Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list,
and to the gnu.emacs.bug news group.

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug.  If you can, give
a recipe starting from `emacs -Q':

$ /usr/bin/emacs -Q --eval "(require 'dbus)" --eval '(dbus-introspect-xml :session "org.freedesktop.DBus" "")'
process 23699: arguments to dbus_message_new_method_call() were incorrect, assertion "_dbus_check_is_valid_path (path)" failed in file dbus-message.c line 1078.
This is normally a bug in some application using the D-Bus library.
  D-Bus not built with -rdynamic so unable to print a backtrace
Fatal error (6)Aborted (core dumped)

If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
For information about debugging Emacs, please read the file
/usr/share/emacs/23.2/etc/DEBUG.


In GNU Emacs 23.2.1 (i386-redhat-linux-gnu, GTK+ Version 2.20.1)
 of 2010-06-03 on x86-07.phx2.fedoraproject.org
Windowing system distributor `Fedora Project', version 11.0.10800000
configured using `configure  '--build=i386-redhat-linux-gnu' '--host=i386-redhat-linux-gnu' '--program-prefix=' '--disable-dependency-tracking' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-dbus' '--with-gif' '--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff' '--with-xft' '--with-xpm' '--with-x-toolkit=gtk' 'build_alias=i386-redhat-linux-gnu' 'host_alias=i386-redhat-linux-gnu' 'CFLAGS=-DMAIL_USE_LOCKF -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=at
 om -fasynchronous-unwind-tables''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.utf8
  value of $XMODIFIERS: @im=none
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
M-x r e p o r t - e m a c s - b u g <return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Load-path shadows:
/usr/share/emacs/site-lisp/flim/md4 hides /usr/share/emacs/23.2/lisp/md4
/usr/share/emacs/site-lisp/flim/sha1 hides /usr/share/emacs/23.2/lisp/sha1
/usr/share/emacs/site-lisp/flim/hex-util hides /usr/share/emacs/23.2/lisp/hex-util
/usr/share/emacs/site-lisp/flim/ntlm hides /usr/share/emacs/23.2/lisp/net/ntlm
/usr/share/emacs/site-lisp/flim/sasl-ntlm hides /usr/share/emacs/23.2/lisp/net/sasl-ntlm
/usr/share/emacs/site-lisp/flim/hmac-def hides /usr/share/emacs/23.2/lisp/net/hmac-def
/usr/share/emacs/site-lisp/flim/hmac-md5 hides /usr/share/emacs/23.2/lisp/net/hmac-md5
/usr/share/emacs/site-lisp/flim/sasl-digest hides /usr/share/emacs/23.2/lisp/net/sasl-digest
/usr/share/emacs/site-lisp/flim/sasl-cram hides /usr/share/emacs/23.2/lisp/net/sasl-cram
/usr/share/emacs/site-lisp/flim/sasl hides /usr/share/emacs/23.2/lisp/net/sasl

Features:
(shadow sort mail-extr message idna sendmail regexp-opt ecomplete rfc822
mml easymenu mml-sec password-cache mm-decode mm-bodies mm-encode
mailcap mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev
nnheader gnus-util netrc time-date mm-util mail-prsvr gmm-utils wid-edit
mailheader canlock sha1 sha1-el hex-util hashcash mail-utils emacsbug
tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd
font-setting tool-bar dnd fontset image fringe lisp-mode register page
menu-bar rfn-eshadow timer select scroll-bar mldrag mouse jit-lock
font-lock syntax facemenu font-core frame cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew
greek romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev loaddefs button
minibuffer faces cus-face files text-properties overlay md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process dbusbind system-font-setting
font-render-setting gtk x-toolkit x multi-tty emacs)





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

* bug#7113: 23.2; Crash on invalid path argument to dbus-introspect-xml
  2010-09-27  3:08 bug#7113: 23.2; Crash on invalid path argument to dbus-introspect-xml Thomas Fitzsimmons
@ 2010-09-27  7:01 ` Ari Roponen
  2010-09-27  7:34   ` Thomas Fitzsimmons
  0 siblings, 1 reply; 12+ messages in thread
From: Ari Roponen @ 2010-09-27  7:01 UTC (permalink / raw)
  To: Thomas Fitzsimmons; +Cc: 7113

Thomas Fitzsimmons <fitzsim@fitzsim.org> writes:

> $ /usr/bin/emacs -Q --eval "(require 'dbus)" --eval '(dbus-introspect-xml :session "org.freedesktop.DBus" "")'
> process 23699: arguments to dbus_message_new_method_call() were incorrect, assertion "_dbus_check_is_valid_path (path)" failed in file dbus-message.c line 1078.
> This is normally a bug in some application using the D-Bus library.
>   D-Bus not built with -rdynamic so unable to print a backtrace
> Fatal error (6)Aborted (core dumped)
>

The crash happens because DBUS uses fatal warnings. Setting the
environment variable DBUS_FATAL_WARNINGS to 0 helps:

  DBUS_FATAL_WARNINGS=0 emacs -Q --eval "(require 'dbus)" --eval
  '(dbus-introspect-xml :session "org.freedesktop.DBus" "")'

This way the warning message is still printed but Emacs doesn't crash.

-- 
Ari Roponen





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

* bug#7113: 23.2; Crash on invalid path argument to dbus-introspect-xml
  2010-09-27  7:01 ` Ari Roponen
@ 2010-09-27  7:34   ` Thomas Fitzsimmons
  2010-09-27  9:07     ` Michael Albinus
  0 siblings, 1 reply; 12+ messages in thread
From: Thomas Fitzsimmons @ 2010-09-27  7:34 UTC (permalink / raw)
  To: Ari Roponen; +Cc: 7113

Ari Roponen <ari.roponen@gmail.com> writes:

> Thomas Fitzsimmons <fitzsim@fitzsim.org> writes:
>
>> $ /usr/bin/emacs -Q --eval "(require 'dbus)" --eval '(dbus-introspect-xml :session "org.freedesktop.DBus" "")'
>> process 23699: arguments to dbus_message_new_method_call() were incorrect, assertion "_dbus_check_is_valid_path (path)" failed in file dbus-message.c line 1078.
>> This is normally a bug in some application using the D-Bus library.
>>   D-Bus not built with -rdynamic so unable to print a backtrace
>> Fatal error (6)Aborted (core dumped)
>>
>
> The crash happens because DBUS uses fatal warnings. Setting the
> environment variable DBUS_FATAL_WARNINGS to 0 helps:
>
>   DBUS_FATAL_WARNINGS=0 emacs -Q --eval "(require 'dbus)" --eval
>   '(dbus-introspect-xml :session "org.freedesktop.DBus" "")'
>
> This way the warning message is still printed but Emacs doesn't crash.

OK, that does improve the situation for me but it doesn't solve the
problem in general.  By default an unsuspecting user developing D-Bus
Lisp code (e.g. in ielm) can easily crash their Emacs session.  Is there
a way for the Emacs D-Bus bindings to disable fatal warnings and/or to
intercept their causes and report the errors?

Thomas





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

* bug#7113: 23.2; Crash on invalid path argument to dbus-introspect-xml
  2010-09-27  7:34   ` Thomas Fitzsimmons
@ 2010-09-27  9:07     ` Michael Albinus
  2010-09-27  9:51       ` Thomas Fitzsimmons
  2010-10-03  4:58       ` Thomas Fitzsimmons
  0 siblings, 2 replies; 12+ messages in thread
From: Michael Albinus @ 2010-09-27  9:07 UTC (permalink / raw)
  To: Thomas Fitzsimmons; +Cc: 7113, Ari Roponen

Thomas Fitzsimmons <fitzsim@fitzsim.org> writes:

>> The crash happens because DBUS uses fatal warnings. Setting the
>> environment variable DBUS_FATAL_WARNINGS to 0 helps:
>>
>>   DBUS_FATAL_WARNINGS=0 emacs -Q --eval "(require 'dbus)" --eval
>>   '(dbus-introspect-xml :session "org.freedesktop.DBus" "")'
>>
>> This way the warning message is still printed but Emacs doesn't crash.
>
> OK, that does improve the situation for me but it doesn't solve the
> problem in general.  By default an unsuspecting user developing D-Bus
> Lisp code (e.g. in ielm) can easily crash their Emacs session.  Is there
> a way for the Emacs D-Bus bindings to disable fatal warnings and/or to
> intercept their causes and report the errors?

I've committed a patch to the emacs-23 branch, unsetting
$DBUS_FATAL_WARNINGS during initialization:

--8<---------------cut here---------------start------------->8---
*** /home/albinus/src/emacs-23/src/dbusbind.c.~100061~	2010-09-27 10:41:33.251159798 +0200
--- /home/albinus/src/emacs-23/src/dbusbind.c	2010-09-27 10:41:33.315137500 +0200
***************
*** 2132,2137 ****
--- 2132,2139 ----
    Vdbus_debug = Qt;
  #else
    Vdbus_debug = Qnil;
+   /* We do not want to abort.  */
+   unsetenv ("DBUS_FATAL_WARNINGS");
  #endif

    Fprovide (intern_c_string ("dbusbind"), Qnil);
--8<---------------cut here---------------end--------------->8---

> Thomas

Best regards, Michael.





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

* bug#7113: 23.2; Crash on invalid path argument to dbus-introspect-xml
  2010-09-27  9:07     ` Michael Albinus
@ 2010-09-27  9:51       ` Thomas Fitzsimmons
  2010-09-27 12:50         ` Michael Albinus
  2010-10-03  4:58       ` Thomas Fitzsimmons
  1 sibling, 1 reply; 12+ messages in thread
From: Thomas Fitzsimmons @ 2010-09-27  9:51 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 7113, Ari Roponen

Michael Albinus <michael.albinus@tieto.com> writes:

> Thomas Fitzsimmons <fitzsim@fitzsim.org> writes:
>
>>> The crash happens because DBUS uses fatal warnings. Setting the
>>> environment variable DBUS_FATAL_WARNINGS to 0 helps:
>>>
>>>   DBUS_FATAL_WARNINGS=0 emacs -Q --eval "(require 'dbus)" --eval
>>>   '(dbus-introspect-xml :session "org.freedesktop.DBus" "")'
>>>
>>> This way the warning message is still printed but Emacs doesn't crash.
>>
>> OK, that does improve the situation for me but it doesn't solve the
>> problem in general.  By default an unsuspecting user developing D-Bus
>> Lisp code (e.g. in ielm) can easily crash their Emacs session.  Is there
>> a way for the Emacs D-Bus bindings to disable fatal warnings and/or to
>> intercept their causes and report the errors?
>
> I've committed a patch to the emacs-23 branch, unsetting
> $DBUS_FATAL_WARNINGS during initialization:
>
> *** /home/albinus/src/emacs-23/src/dbusbind.c.~100061~	2010-09-27 10:41:33.251159798 +0200
> --- /home/albinus/src/emacs-23/src/dbusbind.c	2010-09-27 10:41:33.315137500 +0200
> ***************
> *** 2132,2137 ****
> --- 2132,2139 ----
>     Vdbus_debug = Qt;
>   #else
>     Vdbus_debug = Qnil;
> +   /* We do not want to abort.  */
> +   unsetenv ("DBUS_FATAL_WARNINGS");
>   #endif
>
>     Fprovide (intern_c_string ("dbusbind"), Qnil);
>
>> Thomas
>
> Best regards, Michael.

Hmm, DBUS_FATAL_WARNINGS is unset when I replicate the crash.

Looking at dbus-internals.c from D-Bus 1.2.24, don't you want to set
DBUS_FATAL_WARNINGS explicitly to 0 so that
fatal_warnings_on_check_failed is FALSE?

Thomas





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

* bug#7113: 23.2; Crash on invalid path argument to dbus-introspect-xml
  2010-09-27  9:51       ` Thomas Fitzsimmons
@ 2010-09-27 12:50         ` Michael Albinus
  2010-09-27 13:24           ` Ari Roponen
  0 siblings, 1 reply; 12+ messages in thread
From: Michael Albinus @ 2010-09-27 12:50 UTC (permalink / raw)
  To: Thomas Fitzsimmons; +Cc: 7113, Ari Roponen

Thomas Fitzsimmons <fitzsim@fitzsim.org> writes:

> Looking at dbus-internals.c from D-Bus 1.2.24, don't you want to set
> DBUS_FATAL_WARNINGS explicitly to 0 so that
> fatal_warnings_on_check_failed is FALSE?

Good point. I've changed it accordingly.

> Thomas

Best regards, Michael.





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

* bug#7113: 23.2; Crash on invalid path argument to dbus-introspect-xml
  2010-09-27 12:50         ` Michael Albinus
@ 2010-09-27 13:24           ` Ari Roponen
  2010-09-27 13:30             ` Michael Albinus
  0 siblings, 1 reply; 12+ messages in thread
From: Ari Roponen @ 2010-09-27 13:24 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 7113, Thomas Fitzsimmons

Michael Albinus <michael.albinus@gmx.de> writes:

>
> Good point. I've changed it accordingly.
>

Thank you. A minor correction, though:

     Vdbus_debug = Qnil;
     /* We do not want to abort.  */
  -  unsetenv ("DBUS_FATAL_WARNINGS");
  +  setenv ("DBUS_FATAL_WARNINGS", 0, 1);

The second parameter should be "0" (a string).

-- 
Ari Roponen





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

* bug#7113: 23.2; Crash on invalid path argument to dbus-introspect-xml
  2010-09-27 13:24           ` Ari Roponen
@ 2010-09-27 13:30             ` Michael Albinus
  2010-09-27 14:45               ` Andreas Schwab
  0 siblings, 1 reply; 12+ messages in thread
From: Michael Albinus @ 2010-09-27 13:30 UTC (permalink / raw)
  To: Ari Roponen; +Cc: 7113, Thomas Fitzsimmons

Ari Roponen <ari.roponen@gmail.com> writes:

> Thank you. A minor correction, though:
>
>      Vdbus_debug = Qnil;
>      /* We do not want to abort.  */
>   -  unsetenv ("DBUS_FATAL_WARNINGS");
>   +  setenv ("DBUS_FATAL_WARNINGS", 0, 1);
>
> The second parameter should be "0" (a string).

I would swear I have done it. But you are right, I did it wrong :-(

Fixed.

Thanks, and best regards, Michael.





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

* bug#7113: 23.2; Crash on invalid path argument to dbus-introspect-xml
  2010-09-27 13:30             ` Michael Albinus
@ 2010-09-27 14:45               ` Andreas Schwab
  2010-09-28 13:46                 ` Michael Albinus
  0 siblings, 1 reply; 12+ messages in thread
From: Andreas Schwab @ 2010-09-27 14:45 UTC (permalink / raw)
  To: Michael Albinus; +Cc: Ari Roponen, 7113, Thomas Fitzsimmons

Michael Albinus <michael.albinus@gmx.de> writes:

> Ari Roponen <ari.roponen@gmail.com> writes:
>
>> Thank you. A minor correction, though:
>>
>>      Vdbus_debug = Qnil;
>>      /* We do not want to abort.  */
>>   -  unsetenv ("DBUS_FATAL_WARNINGS");
>>   +  setenv ("DBUS_FATAL_WARNINGS", 0, 1);

setenv is less portable than putenv.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."





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

* bug#7113: 23.2; Crash on invalid path argument to dbus-introspect-xml
  2010-09-27 14:45               ` Andreas Schwab
@ 2010-09-28 13:46                 ` Michael Albinus
  0 siblings, 0 replies; 12+ messages in thread
From: Michael Albinus @ 2010-09-28 13:46 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Ari Roponen, 7113, Thomas Fitzsimmons

Andreas Schwab <schwab@linux-m68k.org> writes:

> setenv is less portable than putenv.

I've changed it.

> Andreas.

Best regards, Michael.





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

* bug#7113: 23.2; Crash on invalid path argument to dbus-introspect-xml
  2010-09-27  9:07     ` Michael Albinus
  2010-09-27  9:51       ` Thomas Fitzsimmons
@ 2010-10-03  4:58       ` Thomas Fitzsimmons
  2010-10-03 13:22         ` Michael Albinus
  1 sibling, 1 reply; 12+ messages in thread
From: Thomas Fitzsimmons @ 2010-10-03  4:58 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 7113, Ari Roponen

Michael Albinus <michael.albinus@tieto.com> writes:

> Thomas Fitzsimmons <fitzsim@fitzsim.org> writes:
>
>>> The crash happens because DBUS uses fatal warnings. Setting the
>>> environment variable DBUS_FATAL_WARNINGS to 0 helps:
>>>
>>>   DBUS_FATAL_WARNINGS=0 emacs -Q --eval "(require 'dbus)" --eval
>>>   '(dbus-introspect-xml :session "org.freedesktop.DBus" "")'
>>>
>>> This way the warning message is still printed but Emacs doesn't crash.
>>
>> OK, that does improve the situation for me but it doesn't solve the
>> problem in general.  By default an unsuspecting user developing D-Bus
>> Lisp code (e.g. in ielm) can easily crash their Emacs session.  Is there
>> a way for the Emacs D-Bus bindings to disable fatal warnings and/or to
>> intercept their causes and report the errors?
>
> I've committed a patch to the emacs-23 branch, unsetting
> $DBUS_FATAL_WARNINGS during initialization:
>
> *** /home/albinus/src/emacs-23/src/dbusbind.c.~100061~	2010-09-27 10:41:33.251159798 +0200
> --- /home/albinus/src/emacs-23/src/dbusbind.c	2010-09-27 10:41:33.315137500 +0200
> ***************
> *** 2132,2137 ****
> --- 2132,2139 ----
>     Vdbus_debug = Qt;
>   #else
>     Vdbus_debug = Qnil;
> +   /* We do not want to abort.  */
> +   unsetenv ("DBUS_FATAL_WARNINGS");
>   #endif
>
>     Fprovide (intern_c_string ("dbusbind"), Qnil);

This putenv is only run when initialization is not skipped (e.g.,
running src/temacs).  When initialization is skipped (e.g., running
src/emacs) the putenv is not executed and D-Bus warnings are fatal as
before.

Thomas





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

* bug#7113: 23.2; Crash on invalid path argument to dbus-introspect-xml
  2010-10-03  4:58       ` Thomas Fitzsimmons
@ 2010-10-03 13:22         ` Michael Albinus
  0 siblings, 0 replies; 12+ messages in thread
From: Michael Albinus @ 2010-10-03 13:22 UTC (permalink / raw)
  To: Thomas Fitzsimmons; +Cc: 7113, Ari Roponen

Thomas Fitzsimmons <fitzsim@fitzsim.org> writes:

> This putenv is only run when initialization is not skipped (e.g.,
> running src/temacs).  When initialization is skipped (e.g., running
> src/emacs) the putenv is not executed and D-Bus warnings are fatal as
> before.

Ah, indeed. One could see this only when emacs was dumped, for instance
after `make bootstrap'.

I've moved the code to Fdbus_init_bus. Seems to work now.

> Thomas

Thanks, and best regards, Michael.





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

end of thread, other threads:[~2010-10-03 13:22 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-27  3:08 bug#7113: 23.2; Crash on invalid path argument to dbus-introspect-xml Thomas Fitzsimmons
2010-09-27  7:01 ` Ari Roponen
2010-09-27  7:34   ` Thomas Fitzsimmons
2010-09-27  9:07     ` Michael Albinus
2010-09-27  9:51       ` Thomas Fitzsimmons
2010-09-27 12:50         ` Michael Albinus
2010-09-27 13:24           ` Ari Roponen
2010-09-27 13:30             ` Michael Albinus
2010-09-27 14:45               ` Andreas Schwab
2010-09-28 13:46                 ` Michael Albinus
2010-10-03  4:58       ` Thomas Fitzsimmons
2010-10-03 13:22         ` Michael Albinus

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.