unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#1186: 23.0.60; Abort trap when loading dbus in tty
@ 2008-10-16 21:23 Magnus Henoch
  0 siblings, 0 replies; 6+ messages in thread
From: Magnus Henoch @ 2008-10-16 21:23 UTC (permalink / raw)
  To: emacs-pretest-bug

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

emacs -Q -nw
M-x load-library RET dbus RET

At this point, Emacs aborts.

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'.
If you would like to further debug the crash, please read the file
/usr/local/share/emacs/23.0.60/etc/DEBUG for instructions.

#0  abort () at /media/e/src/emacs/src/emacs.c:424
No locals.
#1  0x01946e80 in Fsignal (error_symbol=29046529, data=43871725)
    at /media/e/src/emacs/src/eval.c:1651
        clause = <value optimized out>
        allhandlers = (struct handler *) 0xffffc5a8
        conditions = <value optimized out>
        real_error_symbol = <value optimized out>
        bp = <value optimized out>
#2  0x01946fb4 in xsignal (error_symbol=29046529, data=43871725)
    at /media/e/src/emacs/src/eval.c:1750
No locals.
#3  0x019476b0 in xsignal1 (error_symbol=29046529, arg=<value optimized out>)
    at /media/e/src/emacs/src/eval.c:1767
No locals.
#4  0x018c368c in xd_initialize (bus=<value optimized out>)
    at /media/e/src/emacs/src/dbusbind.c:688
        s = "Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection w"...
        connection = <value optimized out>
        derror = {
  name = 0x0, 
  message = 0x0, 
  dummy1 = 1, 
  dummy2 = 1, 
  dummy3 = 1, 
  dummy4 = 1, 
  dummy5 = 1, 
  padding1 = 0xef7989a0
}
#5  0x018c451c in xd_read_message (bus=29046529)
    at /media/e/src/emacs/src/dbusbind.c:1410
        args = <value optimized out>
        key = <value optimized out>
        value = <value optimized out>
        event = {
  kind = 4018006256, 
  code = -16160, 
  part = 4294951184, 
  modifiers = -277592956, 
  x = 0, 
  y = -277144216, 
  timestamp = 4294951200, 
  padding = {0x2a7, 0x20cb500}, 
  frame_or_window = -16128, 
  arg = -15984
}
        connection = <value optimized out>
        dmessage = <value optimized out>
        iter = {
  dummy1 = 0x20cb500, 
  dummy2 = 0xef7de8f0, 
  dummy3 = 4294951184, 
  dummy4 = -16032, 
  dummy5 = -277598920, 
  dummy6 = -276954060, 
  dummy7 = -16096, 
  dummy8 = -16064, 
  dummy9 = -277296100, 
  dummy10 = 34387200, 
  dummy11 = 29675520, 
  pad1 = 0, 
  pad2 = 0, 
  pad3 = 0xef7e0434
}
        mtype = <value optimized out>
        serial = <value optimized out>
        uname = <value optimized out>
        path = <value optimized out>
        interface = <value optimized out>
        member = <value optimized out>
        __PRETTY_FUNCTION__ = "xd_read_message"
#6  0x01944afc in internal_condition_case_1 (bfun=0x18c44b4 <xd_read_message>, 
    arg=29046553, handlers=28778737, hfun=0x194b314 <Fidentity>)
    at /media/e/src/emacs/src/eval.c:1559
        val = 29046529
        c = {
  tag = 28715009, 
  val = 28715009, 
  next = 0xffffd10c, 
  gcpro = 0x0, 
  jmp = {0, -14848, 27090908, -14944, 26495604, 1149517858, 28452672, 0, 31, 
    30, 28442624, 28442624, 28442624, 28715009, 28442624, 1, 28442624, 
    28442624, 28854276, 0, 1, 28442624, 28715009, 26522388, 25969844, 0, 20, 
    8, -13576, -13584, 25381160, 0 <repeats 47 times>, 1140858914, 0, 31, 
    28442624, 28442624, 28753920, 28442624, 28442624, 28442624, 0, 1, 30, 
    28442624, 1, 28442624, 28442624, 28442624, 26522388, 25969844, -14000, 
    1140858914, 0}, 
  backlist = 0x0, 
  handlerlist = 0xffffd0f8, 
  lisp_eval_depth = 0, 
  pdlcount = 3, 
  poll_suppress_count = 0, 
  interrupt_input_blocked = 0, 
  byte_stack = 0x0
}
        h = {
  handler = 28778737, 
  var = 28715009, 
  chosen_clause = -14880, 
  tag = 0xffffc5bc, 
  next = 0xffffd0f8
}
#7  0x018c352c in xd_read_queued_messages ()
    at /media/e/src/emacs/src/dbusbind.c:1561
No locals.
#8  0x018dc204 in gobble_input (expected=29046529)
    at /media/e/src/emacs/src/keyboard.c:6898
        mask = {
  __bits = {28778737, 28715009, 28715057, 4294952956}
}
#9  0x018dd77c in get_input_pending (addr=0x1b1b838, flags=0)
    at /media/e/src/emacs/src/keyboard.c:6886
No locals.
#10 0x018dd9bc in detect_input_pending ()
    at /media/e/src/emacs/src/keyboard.c:10506
No locals.
#11 0x019867e4 in wait_reading_process_output (time_limit=30, microsecs=0, 
    read_kbd=<value optimized out>, do_display=1, wait_for_cell=28715009, 
    wait_proc=0x0, just_wait_proc=0) at /media/e/src/emacs/src/process.c:4768
        Atemp = {
  fds_bits = {0, 0, 0, 0, 28442624, 28442624, 0, 0}
}
        Ctemp = {
  fds_bits = {0, 0, -13960, 0, 29749760, -13824, 26064712, 0}
}
        timeout_reduced_for_timers = 1
        channel = 0
        nfds = 0
        Available = {
  fds_bits = {32, 0, 0, 0, 0, 0, 0, 0}
}
        Connecting = {
  fds_bits = {0, 0, 0, 0, 0, 0, 0, 0}
}
        check_connect = 0
        check_delay = 0
        no_avail = 28854276
        xerrno = <value optimized out>
        proc = <value optimized out>
        timeout = {
  tv_sec = 0, 
  tv_usec = 479420
}
        end_time = {
  tv_sec = 1224192003, 
  tv_usec = 980558
}
        wait_channel = -1
        got_some_input = 0
#12 0x0180c1c4 in sit_for (timeout=28442624, reading=0, do_display=0)
    at /media/e/src/emacs/src/dispnew.c:6637
        sec = 479420
        usec = 1
#13 0x018e2ac0 in read_char (commandflag=1, nmaps=2, maps=0xffffcf00, 
    prev_event=28715009, used_mouse_menu=0xffffcf70, end_time=0x0)
    at /media/e/src/emacs/src/keyboard.c:2892
        tem0 = <value optimized out>
        delay_level = 4
        buffer_size = <value optimized out>
        c = 28715009
        local_getcjmp = {0, 0, 27090908, -13632, 26090416, 603979842, 
  28452672, 0, 31, 28442624, 28442624, 28753920, 28442624, 28442624, 28442624, 
  0, 28715009, 30, 28442624, 28442624, 28442624, 28442624, 28442624, 38684676, 
  28442624, -1, 20, 20, -1, -1, -1, -1, 0 <repeats 33 times>, 28715009, 
  0 <repeats 34 times>}
        save_jump = {0 <repeats 100 times>}
        key_already_recorded = 0
        tem = <value optimized out>
        save = 28442624
        previous_echo_area_message = 28715009
        also_record = 28715009
        reread = 0
        polling_stopped_here = <value optimized out>
        orig_kboard = (struct kboard *) 0x1b9ac80
#14 0x018e3ecc in read_key_sequence (keybuf=0xffffd018, bufsize=30, 
    prompt=28715009, dont_downcase_last=0, can_return_switch_frame=1, 
    fix_current_buffer=1) at /media/e/src/emacs/src/keyboard.c:9343
        interrupted_kboard = (KBOARD *) 0x1b9ac80
        key = 28442624
        used_mouse_menu = 0
        echo_local_start = 0
        last_real_key_start = 0
        keys_local_start = 0
        local_first_binding = 0
        from_string = 28715009
        count = 2
        t = 0
        echo_start = 0
        keys_start = 0
        nmaps = 2
        nmaps_allocated = 2
        defs = (Lisp_Object * volatile) 0xffffcee0
        submaps = (Lisp_Object * volatile) 0xffffcf00
        orig_local_map = 43769325
        orig_keymap = 28715009
        localized_local_map = 0
        first_binding = 0
        first_unbound = 31
        mock_input = 0
        fkey = {
  parent = 29131685, 
  map = 29131685, 
  start = 0, 
  end = 0
}
        keytran = {
  parent = 28704637, 
  map = 28704637, 
  start = 0, 
  end = 0
}
        indec = {
  parent = 29131725, 
  map = 29131725, 
  start = 0, 
  end = 0
}
        shift_translated = 0
        delayed_switch_frame = 28715009
        original_uppercase = 32
        original_uppercase_position = -1
        starting_buffer = (struct buffer *) 0x1b6c000
        fake_prefixed_keys = 28715009
#15 0x018e5fc8 in command_loop_1 () at /media/e/src/emacs/src/keyboard.c:1621
        cmd = 31272960
        lose = <value optimized out>
        nonundocount = 28442624
        keybuf = {216, 960, -12192, 26502348, 1, -12240, -12192, 26502160, 
  28904265, 27369765, 536870978, 0, 28442624, 0, 28442624, 27402024, 28442624, 
  -12192, -12064, 26499764, 37967665, 28715009, 0, -12184, -12240, 0, 46801, 
  37820137, 28442624, 28442624}
        i = <value optimized out>
        prev_modiff = 11
        prev_buffer = (struct buffer *) 0x1b6c000
        already_adjusted = 0
#16 0x01944df4 in internal_condition_case (bfun=0x18e5da4 <command_loop_1>, 
    handlers=28778737, hfun=0x18e0558 <cmd_error>)
    at /media/e/src/emacs/src/eval.c:1511
        val = 29046529
        c = {
  tag = 28715009, 
  val = 28715009, 
  next = 0xffffd318, 
  gcpro = 0x0, 
  jmp = {28442624, 28442624, 27090908, -12048, 26496372, 603979906, 28452672, 
    28442624, 29417472, 29417472, 28442624, 28442624, 28442624, 1, -10852, 3, 
    -10864, 28715009, 0, 0, 0, 26083328, 28715009, 26083328, 28442624, 
    37946453, 28794049, 43762509, 0, -11776, 1140858946, 28323107, 0, -11904, 
    27349995, 28323102, 27350012, -11544, -11244, 28442624, 1, -11776, 
    28947393, -11808, -11760, -11776, 25273008, 28442624, 27349964, 1, 
    27349960, -11580, 28442624, 0, 0, 27349960, 28715009, -11696, 26501732, 
    25272624, -11760, -11696, 603988002, 29417488, 29417472, 28442624, -11244, 
    28442624, 28442624, 1, 28442624, -11580, 0, 1, 38052369, 27349960, -11696, 
    -11600, 26503196, -11352, -11584, -11664, 0, 0, -11352, -11600, 2, 5, 0, 
    -11600, -11244, 28442624, 28442624, 28442624, 3, 27066368, 27369680, 36, 
    0, -11588}, 
  backlist = 0x0, 
  handlerlist = 0x0, 
  lisp_eval_depth = 0, 
  pdlcount = 2, 
  poll_suppress_count = 0, 
  interrupt_input_blocked = 0, 
  byte_stack = 0x0
}
        h = {
  handler = 28778737, 
  var = 28715009, 
  chosen_clause = 29417472, 
  tag = 0xffffd10c, 
  next = 0x0
}
#17 0x018df9d8 in command_loop_2 () at /media/e/src/emacs/src/keyboard.c:1338
No locals.
  var = 28715009, 
  chosen_clause = 29417472, 
  tag = 0xffffd10c, 
  next = 0x0
}
#17 0x018df9d8 in command_loop_2 () at /media/e/src/emacs/src/keyboard.c:1338
No locals.
---Type <return> to continue, or q <return> to quit---
#18 0x01944f04 in internal_catch (tag=<value optimized out>, 
    func=0x18df99c <command_loop_2>, arg=29046529)
    at /media/e/src/emacs/src/eval.c:1247
        c = {
  tag = 28774809, 
  val = 28715009, 
  next = 0x0, 
  gcpro = 0x0, 
  jmp = {1, 27369604, 27090908, -11504, 26496744, 603979906, 28452672, 
    28442624, 29417472, 29417472, 28442624, 28442624, 28442624, 1, -10852, 3, 
    -10864, 28715009, 0, 0, 0, 0, 0, 28442624, 28442624, 1, 1, 28948553, 
    27369600, -11360, -11264, 26503196, -11032, -11248, -11244, 1, 65535, 56, 
    -11264, -10852, 3, 0, -11264, -10932, 28442624, 28442624, 28442624, 0, 
    27066368, 27371408, 27371400, 28780361, -11248, -11232, -11120, 26736872, 
    3, 8512, 28715009, 28854788, 0, -11096, -11120, 28442624, 28251291, 0, 
    -11248, 27371387, 28251279, 27371404, 0, 25696332, 29197316, 28442624, 
    -11152, 80, 0, 28853760, -11152, 25236688, 28442624, 27371364, 1, 
    27371360, -10932, 28442624, 0, 0, 27371360, 28715009, -11072, 26501732, 
    28442624, 28442624, -11040, 1140858946, 28715009, 28753920, 28990113, 
    28964032}, 
  backlist = 0x0, 
  handlerlist = 0x0, 
  lisp_eval_depth = 0, 
  pdlcount = 2, 
  poll_suppress_count = 0, 
  interrupt_input_blocked = 0, 
  byte_stack = 0x0
}
#19 0x018e0354 in command_loop () at /media/e/src/emacs/src/keyboard.c:1317
No locals.
#20 0x018e0778 in recursive_edit_1 () at /media/e/src/emacs/src/keyboard.c:942
        val = <value optimized out>
#21 0x018e0910 in Frecursive_edit () at /media/e/src/emacs/src/keyboard.c:1004
        buffer = 28715009
#22 0x018d43f4 in main (argc=<value optimized out>, argv=0xffffd6b4)
    at /media/e/src/emacs/src/emacs.c:1728
        newlim = <value optimized out>
        dummy = 0
        stack_bottom_variable = 0 '\0'
        do_initial_setlocale = <value optimized out>
        skip_args = 1
        rlim = {
  rlim_cur = 4440064, 
  rlim_max = 33554432
}
        no_loadup = 0
        junk = 0x0


In GNU Emacs 23.0.60.2 (powerpc-unknown-netbsd4.99.72, X toolkit, Xaw3d scroll bars)
 of 2008-10-16 on zemdatav
Windowing system distributor `The NetBSD Foundation', version 11.0.10402000
configured using `configure  '--with-x-toolkit=athena' '--enable-maintainer-mode''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: C
  value of $LC_CTYPE: en_US.UTF-8
  value of $LC_MESSAGES: eo
  value of $LC_MONETARY: sv_SE
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: nil
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default-enable-multibyte-characters: t







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

* bug#1186: 23.0.60; Abort trap when loading dbus in tty
@ 2008-10-17 21:30 Chong Yidong
  2008-10-19 15:48 ` Michael Albinus
  0 siblings, 1 reply; 6+ messages in thread
From: Chong Yidong @ 2008-10-17 21:30 UTC (permalink / raw)
  To: Magnus Henoch; +Cc: 1186

> emacs -Q -nw
> M-x load-library RET dbus RET
>
> At this point, Emacs aborts.

I can't reproduce this.

Could you recompile Emacs without optimization, using 

  CFLAGS="-g" ./configure && make

and generate another backtrace?

Thanks.






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

* bug#1186: 23.0.60; Abort trap when loading dbus in tty
  2008-10-17 21:30 bug#1186: 23.0.60; Abort trap when loading dbus in tty Chong Yidong
@ 2008-10-19 15:48 ` Michael Albinus
  2008-10-21 22:09   ` Magnus Henoch
       [not found]   ` <mailman.1746.1224628217.25473.bug-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 6+ messages in thread
From: Michael Albinus @ 2008-10-19 15:48 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 1186, Magnus Henoch

Chong Yidong <cyd@stupidchicken.com> writes:

>> emacs -Q -nw
>> M-x load-library RET dbus RET
>>
>> At this point, Emacs aborts.
>
> I can't reproduce this.
>
> Could you recompile Emacs without optimization, using 
>
>   CFLAGS="-g" ./configure && make
>
> and generate another backtrace?

I couldn't reproduce it also (running Ubuntu 8.10). Could you, please,
add the following option to the built:

  make MYCPPFLAGS='-DDBUS_DEBUG -Wall'

By this, debug messages are printed to your terminal, which might be
useful.

> Thanks.

Best regards, Michael.






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

* bug#1186: 23.0.60; Abort trap when loading dbus in tty
  2008-10-19 15:48 ` Michael Albinus
@ 2008-10-21 22:09   ` Magnus Henoch
       [not found]   ` <mailman.1746.1224628217.25473.bug-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 6+ messages in thread
From: Magnus Henoch @ 2008-10-21 22:09 UTC (permalink / raw)
  To: 1186

With more debugging and less optimization I get:

xd_read_message: Event received: DBUS_MESSAGE_TYPE_SIGNAL 2 org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus NameAcquired (:1.10)
Breakpoint 1, abort () at /media/e/src/emacs/src/emacs.c:424              xd_retrieve_arg: s :1.10
424       kill (getpid (), SIGABRT);
(gdb) bt full
#0  abort () at /media/e/src/emacs/src/emacs.c:424
No locals.
#1  0x01a566cc in Fsignal (error_symbol=30504705, data=45395581) at /media/e/src/emacs/src/eval.c:1651
        allhandlers = (struct handler *) 0xffffc408
        conditions = -277077180
        string = -277132056
        real_error_symbol = 190
        bp = (struct backtrace *) 0x25d9273
#2  0x01a56ab4 in xsignal (error_symbol=30504705, data=45395581) at /media/e/src/emacs/src/eval.c:1750
No locals.
#3  0x01a56b18 in xsignal1 (error_symbol=30504705, arg=39686771) at /media/e/src/emacs/src/eval.c:1767
No locals.
#4  0x01986158 in xd_initialize (bus=30504729) at /media/e/src/emacs/src/dbusbind.c:688
        s = "Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection w"...
        connection = (DBusConnection *) 0x0
        derror = {
  name = 0x0, 
  message = 0x0, 
  dummy1 = 1, 
  dummy2 = 0, 
  dummy3 = 0, 
  dummy4 = 0, 
  dummy5 = 0, 
  padding1 = 0xffffb850
}
#5  0x01990700 in xd_read_message (bus=30504729) at /media/e/src/emacs/src/dbusbind.c:1406
        args = 1
        key = -277295760
        value = -17088
        gcpro1 = {
  next = 0xef7be218, 
  var = 0xffffbcf0, 
  nvars = 463
}
        event = {
  kind = ASCII_KEYSTROKE_EVENT, 
  code = -277076012, 
  part = 4017890868, 
  modifiers = 844, 
  x = -277072772, 
  y = 0, 
  timestamp = 35845376, 
  padding = {0xffffc440, 0xef7e087c}, 
  frame_or_window = -17168, 
  arg = -17120
}
        connection = (DBusConnection *) 0xffffbcb0
        dmessage = (DBusMessage *) 0xef7e0434
        iter = {
  dummy1 = 0xef79d290, 
  dummy2 = 0x1, 
  dummy3 = 4017891284, 
  dummy4 = -277076428, 
  dummy5 = 844, 
  dummy6 = -277072772, 
  dummy7 = -17136, 
  dummy8 = -16992, 
  dummy9 = -277295760, 
  dummy10 = -276954060, 
  dummy11 = -17120, 
  pad1 = -17088, 
  pad2 = -277296100, 
  pad3 = 0x1db1e84
}
        dtype = 0
        mtype = 0
        serial = 31137664
        uname = 0x222f400 ""
        path = 0xef78cc1c "\201>\200\034\200\t"
        interface = 0xffffbcb0 "\377\377\275@\357x\315p"
        member = 0xffffbc90 "\377\377\274\260\357x\314\034\002\"\364"
        __PRETTY_FUNCTION__ = "xd_read_message"
#6  0x01a5645c in internal_condition_case_1 (bfun=0x19906d8 <xd_read_message>, arg=30504729, handlers=30236913, hfun=0x1a5f30c <Fidentity>)
    at /media/e/src/emacs/src/eval.c:1559
        val = 1224624586
        c = {
  tag = 30173185, 
  val = 30173185, 
  next = 0xffffd07c, 
  gcpro = 0x0, 
  jmp = {26854, 0, 28547652, -15808, 27616204, 1140850722, 29912704, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, -268525568, -268480888, -10572, -10556, 1084, 28614684, 
    -15808, -15600, 27492528, 56, -15664, -15632, 25218740, 30504753, 30422018, -15600, 25691128, 44756499, 30173185, 30173185, 30173185, 30173185, 8, -277952056, 
    25216028, 30312960, -15600, -15568, 47, 31141084, 47, 31141084, 45699347, 45699347, 48, -15456, 45699395, 30504753, 45126837, 30591093, 4, -15444, -15504, 
    30173185, 30173233, 30393233, -15472, -15376, 27631012, 30173185, 2, 44756499, 30173185, 30173185, 30173185, 30173185, 27487208, 1, 2, 30173185, 2, 45395677, 
    -15456, -14224, 1084, 30389826, -15440, -14912, 27616348, 30173185, 30173185, 30173185, -12164, 45395653, -1, -1, 1084, -15440, -15392, -14864, 27616348, 
    30173185}, 
  backlist = 0x0, 
  handlerlist = 0xffffd238, 
  lisp_eval_depth = 0, 
  pdlcount = 3, 
  poll_suppress_count = 0, 
  interrupt_input_blocked = 0, 
  byte_stack = 0x0
}
        h = {
  handler = 30236913, 
  var = 30173185, 
  chosen_clause = 1140850722, 
  tag = 0xffffc24c, 
  next = 0xffffd238
}
#7  0x01991b4c in xd_read_queued_messages () at /media/e/src/emacs/src/dbusbind.c:1557
No locals.
#8  0x019a5100 in gobble_input (expected=0) at /media/e/src/emacs/src/keyboard.c:6898
No locals.
#9  0x019a5080 in get_input_pending (addr=0x1c7ff80, flags=0) at /media/e/src/emacs/src/keyboard.c:6886
No locals.
#10 0x019ae444 in detect_input_pending () at /media/e/src/emacs/src/keyboard.c:10506
No locals.
#11 0x01ac850c in wait_reading_process_output (time_limit=30, microsecs=0, read_kbd=-1, do_display=1, wait_for_cell=30173185, wait_proc=0x0, just_wait_proc=0)
    at /media/e/src/emacs/src/process.c:4768
        timeout_reduced_for_timers = 1
        channel = 0
        nfds = 0
        Available = {
  fds_bits = {32, 0, 0, 0, 0, 0, 0, 0}
}
        Connecting = {
  fds_bits = {0, 0, 0, 0, 0, 0, 0, 0}
}
        check_connect = 0
        check_delay = 0
        no_avail = 0
        xerrno = 31015172
        proc = 31015172
        timeout = {
  tv_sec = 0, 
  tv_usec = 478075
}
        end_time = {
  tv_sec = 1224625086, 
  tv_usec = 548939
}
        wait_channel = -1
        got_some_input = 0
        count = 2
#12 0x0181883c in sit_for (timeout=240, reading=1, do_display=1) at /media/e/src/emacs/src/dispnew.c:6637
        sec = 30
        usec = 0
#13 0x0199c5fc in read_char (commandflag=1, nmaps=2, maps=0xffffcbf0, prev_event=30173185, used_mouse_menu=0xffffcd2c, end_time=0x0)
    at /media/e/src/emacs/src/keyboard.c:2892
        tem0 = -13984
        timeout = 30
        delay_level = 4
        buffer_size = 1
        c = 30173185
        count = -13984
        jmpcount = 2
        local_getcjmp = {0, 92, 28547652, -14464, 26853240, 1140850722, 29912704, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, -268525568, -268480888, -10572, -10556, 1084, 
  28614684, -14464, 25363576, 40201745, 30173185, 0, 0, -13984, 30311936, 1, 1, 0, 0, -14096, 27485028, 39284552, 111, 29, 1, 192, -14144, -13872, 3, 114, 3, 111, 
  51, 80, 111, 29, 0, 30327458, -14096, -14016, 28165756, 39284552, 111, 29, 51, 39284552, 39284552, -13936, 3, 114, 3, 111, 51, 80, 30212100, -13968, 27712484, 1, 
  -14016, -13968, 28165756, 1, 30212100, 1, 51, 39284552, 39284552, 1, 191, 191, -13968, -13856, 28167456, 30212100, 51, -13888, 51, 0, 0, 191, 1, 51, 50}
        save_jump = {0 <repeats 100 times>}
        key_already_recorded = 0
        tem = 0
        save = 1
        previous_echo_area_message = 30173185
        also_record = 30173185
        reread = 0
        gcpro1 = {
  next = 0x1cc6801, 
  var = 0x0, 
  nvars = -13680
}
        gcpro2 = {
  next = 0xffffcb50, 
  var = 0xffffcbb0, 
  nvars = 1084
}
        polling_stopped_here = 0
        orig_kboard = (struct kboard *) 0x1cfec80
#14 0x019aab40 in read_key_sequence (keybuf=0xffffcf1c, bufsize=30, prompt=30173185, dont_downcase_last=0, can_return_switch_frame=1, fix_current_buffer=1)
    at /media/e/src/emacs/src/keyboard.c:9343
        interrupted_kboard = (KBOARD *) 0x1cfec80
        interrupted_frame = (struct frame *) 0x1ce8a00
        key = 30419017
        used_mouse_menu = 0
        echo_local_start = 0
        last_real_key_start = 0
        keys_local_start = 0
        local_first_binding = 0
        from_string = 30173185
        count = 2
        t = 0
        echo_start = 0
        keys_start = 0
        nmaps = 2
        nmaps_allocated = 2
        defs = (Lisp_Object * volatile) 0xffffcbd0
        submaps = (Lisp_Object * volatile) 0xffffcbf0
        orig_local_map = 45203885
        orig_keymap = 30173185
        localized_local_map = 0
        first_binding = 0
        first_unbound = 31
        mock_input = 0
        fkey = {
  parent = 30589669, 
  map = 30589669, 
  start = 0, 
  end = 0
}
        keytran = {
  parent = 30162813, 
  map = 30162813, 
  start = 0, 
  end = 0
}
        indec = {
  parent = 30589677, 
  map = 30589677, 
  start = 0, 
  end = 0
}
        shift_translated = 0
        delayed_switch_frame = 30173185
        original_uppercase = -12944
        original_uppercase_position = -1
        dummyflag = 0
        starting_buffer = (struct buffer *) 0x1cd0000
        fake_prefixed_keys = 30173185
        gcpro1 = {
  next = 0xffffcd20, 
  var = 0xffffcd50, 
  nvars = 27485092
}
#15 0x01998398 in command_loop_1 () at /media/e/src/emacs/src/keyboard.c:1621
        cmd = 30233201
        lose = 27632324
        nonundocount = 0
        keybuf = {216, 960, 27632004, 0, 30173185, -12384, 30173185, 0, 5, -12400, -268475116, 1936863091, -12464, -12384, 26950560, 28861500, 30173185, 1, 
  30593101, 0, -12512, -12512, 30589061, 30173185, 30938893, 0, 1084, 7, -12400, -12208}
        i = 2
        prev_modiff = 11
        prev_buffer = (struct buffer *) 0x1cd0000
        already_adjusted = 0
#16 0x01a562b0 in internal_condition_case (bfun=0x1997f44 <command_loop_1>, handlers=30236913, hfun=0x1997528 <cmd_error>) at /media/e/src/emacs/src/eval.c:1511
        val = 30593101
        c = {
  tag = 30173185, 
  val = 30173185, 
  next = 0xffffd2a8, 
  gcpro = 0x0, 
  jmp = {0, -12032, 28547652, -12176, 27615784, 1140850754, 29912704, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, -268525568, -268480888, -10572, -10556, 1084, 28614684, 
    -12176, -283565024, 30406681, -268440400, -12032, -11952, 27633564, -268440400, 0, 1, 1, 1, 30238745, 30173185, 30173185, 28829076, 1, -11836, 71, 736, 
    -283565024, -11856, -283570416, -268440400, -11952, 30173185, 27631548, 603996226, 30173185, -11796, 1, 660, 30238537, 30173209, 0, 0, -11836, 1, 26649, 0, 
    30173185, 1, -11836, 0, 327, 30312964, 30406681, 0, -11824, -11280, 28029200, 1124476, -269972992, 30173185, 30312964, -268480888, -11824, -11280, 28326540, 
    31460352, 166, 1, 30312960, 152, 1, -283551692, -2097152, 5, -11776, -11712, 28326712, 0, 10, -11664, -2097152, 152}, 
  backlist = 0x0, 
  handlerlist = 0x0, 
  lisp_eval_depth = 0, 
  pdlcount = 2, 
  poll_suppress_count = 0, 
  interrupt_input_blocked = 0, 
  byte_stack = 0x0
}
        h = {
  handler = 30236913, 
  var = 30173185, 
  chosen_clause = -11632, 
  tag = 0xffffd07c, 
  next = 0x0
}
#17 0x01997a74 in command_loop_2 () at /media/e/src/emacs/src/keyboard.c:1338
        val = -18416
#18 0x01a55b2c in internal_catch (tag=30232985, func=0x1997a40 <command_loop_2>, arg=30173185) at /media/e/src/emacs/src/eval.c:1247
        c = {
  tag = 30232985, 
  val = 30173185, 
  next = 0x0, 
  gcpro = 0x0, 
  jmp = {30655520, 30097208, 28547652, -11616, 27613964, 1140850754, 29912704, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, -268525568, -268480888, -10572, -10556, 1084, 
    28614684, -11616, 30173185, -11844, 12, 28830880, 135, 0, 29710790, 0, -11840, 28830859, 29710778, 28830876, 0, 0, 30097258, 28830859, 28830876, 16, 0, 0, 
    31459072, 1, 30097214, 30655531, 0, -11280, 1, -11344, 63, 30173185, 30800896, 0, -11360, -11328, 28319404, 1207959553, 1, -11296, 28331568, -277763640, 0, 
  handlerlist = 0x0, 
  lisp_eval_depth = 0, 
  pdlcount = 2, 
  poll_suppress_count = 0, 
  interrupt_input_blocked = 0, 
  byte_stack = 0x0
}
        h = {
  handler = 30236913, 
  var = 30173185, 
  chosen_clause = -11632, 
  tag = 0xffffd07c, 
  next = 0x0
}
#17 0x01997a74 in command_loop_2 () at /media/e/src/emacs/src/keyboard.c:1338
        val = -18416
#18 0x01a55b2c in internal_catch (tag=30232985, func=0x1997a40 <command_loop_2>, arg=30173185) at /media/e/src/emacs/src/eval.c:1247
        c = {
  tag = 30232985, 
  val = 30173185, 
  next = 0x0, 
  gcpro = 0x0, 
  jmp = {30655520, 30097208, 28547652, -11616, 27613964, 1140850754, 29912704, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, -268525568, -268480888, -10572, -10556, 1084, 
    28614684, -11616, 30173185, -11844, 12, 28830880, 135, 0, 29710790, 0, -11840, 28830859, 29710778, 28830876, 0, 0, 30097258, 28830859, 28830876, 16, 0, 0, 
    31459072, 1, 30097214, 30655531, 0, -11280, 1, -11344, 63, 30173185, 30800896, 0, -11360, -11328, 28319404, 1207959553, 1, -11296, 28331568, -277763640, 0, 
---Type <return> to continue, or q <return> to quit---
    -11232, -277867900, 0, 30173185, 30312964, 30312964, -11840, 12, -11136, 30406681, 30097208, -11280, -11088, 27633564, 30448289, 30212096, -11184, 30422210, 
    30173185, 2, -11168, 30173185, 28830836, -11232, -11136, 27487208, 0, 30173185, 0, 2, 30212096, 1, 1, 30311960}, 
  backlist = 0x0, 
  handlerlist = 0x0, 
  lisp_eval_depth = 0, 
  pdlcount = 2, 
  poll_suppress_count = 0, 
  interrupt_input_blocked = 0, 
  byte_stack = 0x0
}
#19 0x019979f0 in command_loop () at /media/e/src/emacs/src/keyboard.c:1317
No locals.
#20 0x01996e34 in recursive_edit_1 () at /media/e/src/emacs/src/keyboard.c:942
        count = 1
        val = 100
#21 0x019970a0 in Frecursive_edit () at /media/e/src/emacs/src/keyboard.c:1004
        count = 0
        buffer = 30173185
#22 0x01994d30 in main (argc=3, argv=0xffffd6b4) at /media/e/src/emacs/src/emacs.c:1728
        dummy = -268480888
        stack_bottom_variable = 0 '\0'
        do_initial_setlocale = 1
        skip_args = 1
        rlim = {
  rlim_cur = 4440064, 
  rlim_max = 33554432
}
        no_loadup = 0
        junk = 0x0



So, from frame 1, I see that the immediate cause of the crash is that an
error was thrown while Emacs was waiting for output.  This happens only
when xd_initialize is called with :system as an argument; the system bus
is apparently not correctly configured on my system - the dbus library
finds the socket, sends a Hello message, but never gets any answer, as
seen in the s variable of socket 4.

And when I turn off the system bus and try again, the same thing
happens, but with another message:

#4  0x01986158 in xd_initialize (bus=30504729) at /media/e/src/emacs/src/dbusbind.c:688
        s = "Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory", '\0' <repeats 937 times>, "\360"

I don't understand why this doesn't happen when I run Emacs in X...

Magnus






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

* bug#1186: 23.0.60; Abort trap when loading dbus in tty
       [not found]   ` <mailman.1746.1224628217.25473.bug-gnu-emacs@gnu.org>
@ 2008-10-23 13:29     ` Michael Albinus
  2008-10-23 22:16       ` Magnus Henoch
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Albinus @ 2008-10-23 13:29 UTC (permalink / raw)
  To: 1186

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

Magnus Henoch <mange@freemail.hu> writes:

> With more debugging and less optimization I get:
>
> xd_read_message: Event received: DBUS_MESSAGE_TYPE_SIGNAL 2 org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus NameAcquired (:1.10)
> Breakpoint 1, abort () at /media/e/src/emacs/src/emacs.c:424              xd_retrieve_arg: s :1.10
> 424       kill (getpid (), SIGABRT);
> (gdb) bt full
> #0  abort () at /media/e/src/emacs/src/emacs.c:424
> No locals.
> #1  0x01a566cc in Fsignal (error_symbol=30504705, data=45395581) at /media/e/src/emacs/src/eval.c:1651
>         allhandlers = (struct handler *) 0xffffc408
>         conditions = -277077180
>         string = -277132056
>         real_error_symbol = 190
>         bp = (struct backtrace *) 0x25d9273
> #2  0x01a56ab4 in xsignal (error_symbol=30504705, data=45395581) at /media/e/src/emacs/src/eval.c:1750
> No locals.
> #3  0x01a56b18 in xsignal1 (error_symbol=30504705, arg=39686771) at /media/e/src/emacs/src/eval.c:1767
> No locals.
> #4  0x01986158 in xd_initialize (bus=30504729) at /media/e/src/emacs/src/dbusbind.c:688
>         s = "Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection w"...
>         connection = (DBusConnection *) 0x0
>         derror = {
>   name = 0x0, 
>   message = 0x0, 
>   dummy1 = 1, 
>   dummy2 = 0, 
>   dummy3 = 0, 
>   dummy4 = 0, 
>   dummy5 = 0, 
>   padding1 = 0xffffb850
> }

Thank you for the backtrace, it makes the picture clear. Fsignal must
not be called when reading events in the main loop. But xd_initialize does.

Could you, please, check the appended patch? It ought to prevent Fsignal
calls in this case.

> Magnus

Best regards, Michael.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 18472 bytes --]

*** /home/albinus/src/emacs/src/dbusbind.c.~1~	Sun Oct 19 20:09:34 2008
--- /home/albinus/src/emacs/src/dbusbind.c	Thu Oct 23 14:47:40 2008
***************
*** 63,72 ****
--- 63,101 ----
  /* Whether to debug D-Bus.  */
  Lisp_Object Vdbus_debug;
  
+ /* Whether we are reading a D-Bus event.  */
+ int xd_in_read_queued_messages = 0;
+ 
  \f
  /* We use "xd_" and "XD_" as prefix for all internal symbols, because
     we don't want to poison other namespaces with "dbus_".  */
  
+ /* Raise a signal.  If we are reading events, we cannot signal; we
+    throw to xd_read_queued_messages then.  */
+ #define XD_SIGNAL1(arg)							\
+   do {									\
+     if (xd_in_read_queued_messages)					\
+       Fthrow (Qdbus_error, Qnil);					\
+     else								\
+       xsignal1 (Qdbus_error, arg);					\
+   } while (0)
+ 
+ #define XD_SIGNAL2(arg1, arg2)						\
+   do {									\
+     if (xd_in_read_queued_messages)					\
+       Fthrow (Qdbus_error, Qnil);					\
+     else								\
+       xsignal2 (Qdbus_error, arg1, arg2);				\
+   } while (0)
+ 
+ #define XD_SIGNAL3(arg1, arg2, arg3)					\
+   do {									\
+     if (xd_in_read_queued_messages)					\
+       Fthrow (Qdbus_error, Qnil);					\
+     else								\
+       xsignal3 (Qdbus_error, arg1, arg2, arg3);				\
+   } while (0)
+ 
  /* Raise a Lisp error from a D-Bus ERROR.  */
  #define XD_ERROR(error)							\
    do {									\
***************
*** 76,82 ****
      /* Remove the trailing newline.  */					\
      if (strchr (s, '\n') != NULL)					\
        s[strlen (s) - 1] = '\0';						\
!     xsignal1 (Qdbus_error, build_string (s));				\
    } while (0)
  
  /* Macros for debugging.  In order to enable them, build with
--- 105,111 ----
      /* Remove the trailing newline.  */					\
      if (strchr (s, '\n') != NULL)					\
        s[strlen (s) - 1] = '\0';						\
!     XD_SIGNAL1 (build_string (s));					\
    } while (0)
  
  /* Macros for debugging.  In order to enable them, build with
***************
*** 94,100 ****
      if (!valid_lisp_object_p (object))					\
        {									\
  	XD_DEBUG_MESSAGE ("%d Assertion failure", __LINE__);		\
! 	xsignal1 (Qdbus_error, build_string ("Assertion failure"));	\
        }									\
    } while (0)
  
--- 123,129 ----
      if (!valid_lisp_object_p (object))					\
        {									\
  	XD_DEBUG_MESSAGE ("%d Assertion failure", __LINE__);		\
! 	XD_SIGNAL1 (build_string ("Assertion failure"));		\
        }									\
    } while (0)
  
***************
*** 370,377 ****
  	  unsigned char val = XUINT (object) & 0xFF;
  	  XD_DEBUG_MESSAGE ("%c %d", dtype, val);
  	  if (!dbus_message_iter_append_basic (iter, dtype, &val))
! 	    xsignal2 (Qdbus_error,
! 		      build_string ("Unable to append argument"), object);
  	  return;
  	}
  
--- 399,405 ----
  	  unsigned char val = XUINT (object) & 0xFF;
  	  XD_DEBUG_MESSAGE ("%c %d", dtype, val);
  	  if (!dbus_message_iter_append_basic (iter, dtype, &val))
! 	    XD_SIGNAL2 (build_string ("Unable to append argument"), object);
  	  return;
  	}
  
***************
*** 380,387 ****
  	  dbus_bool_t val = (NILP (object)) ? FALSE : TRUE;
  	  XD_DEBUG_MESSAGE ("%c %s", dtype, (val == FALSE) ? "false" : "true");
  	  if (!dbus_message_iter_append_basic (iter, dtype, &val))
! 	    xsignal2 (Qdbus_error,
! 		      build_string ("Unable to append argument"), object);
  	  return;
  	}
  
--- 408,414 ----
  	  dbus_bool_t val = (NILP (object)) ? FALSE : TRUE;
  	  XD_DEBUG_MESSAGE ("%c %s", dtype, (val == FALSE) ? "false" : "true");
  	  if (!dbus_message_iter_append_basic (iter, dtype, &val))
! 	    XD_SIGNAL2 (build_string ("Unable to append argument"), object);
  	  return;
  	}
  
***************
*** 390,397 ****
  	  dbus_int16_t val = XINT (object);
  	  XD_DEBUG_MESSAGE ("%c %d", dtype, (int) val);
  	  if (!dbus_message_iter_append_basic (iter, dtype, &val))
! 	    xsignal2 (Qdbus_error,
! 		      build_string ("Unable to append argument"), object);
  	  return;
  	}
  
--- 417,423 ----
  	  dbus_int16_t val = XINT (object);
  	  XD_DEBUG_MESSAGE ("%c %d", dtype, (int) val);
  	  if (!dbus_message_iter_append_basic (iter, dtype, &val))
! 	    XD_SIGNAL2 (build_string ("Unable to append argument"), object);
  	  return;
  	}
  
***************
*** 400,407 ****
  	  dbus_uint16_t val = XUINT (object);
  	  XD_DEBUG_MESSAGE ("%c %u", dtype, (unsigned int) val);
  	  if (!dbus_message_iter_append_basic (iter, dtype, &val))
! 	    xsignal2 (Qdbus_error,
! 		      build_string ("Unable to append argument"), object);
  	  return;
  	}
  
--- 426,432 ----
  	  dbus_uint16_t val = XUINT (object);
  	  XD_DEBUG_MESSAGE ("%c %u", dtype, (unsigned int) val);
  	  if (!dbus_message_iter_append_basic (iter, dtype, &val))
! 	    XD_SIGNAL2 (build_string ("Unable to append argument"), object);
  	  return;
  	}
  
***************
*** 410,417 ****
  	  dbus_int32_t val = XINT (object);
  	  XD_DEBUG_MESSAGE ("%c %d", dtype, val);
  	  if (!dbus_message_iter_append_basic (iter, dtype, &val))
! 	    xsignal2 (Qdbus_error,
! 		      build_string ("Unable to append argument"), object);
  	  return;
  	}
  
--- 435,441 ----
  	  dbus_int32_t val = XINT (object);
  	  XD_DEBUG_MESSAGE ("%c %d", dtype, val);
  	  if (!dbus_message_iter_append_basic (iter, dtype, &val))
! 	    XD_SIGNAL2 (build_string ("Unable to append argument"), object);
  	  return;
  	}
  
***************
*** 420,427 ****
  	  dbus_uint32_t val = XUINT (object);
  	  XD_DEBUG_MESSAGE ("%c %u", dtype, val);
  	  if (!dbus_message_iter_append_basic (iter, dtype, &val))
! 	    xsignal2 (Qdbus_error,
! 		      build_string ("Unable to append argument"), object);
  	  return;
  	}
  
--- 444,450 ----
  	  dbus_uint32_t val = XUINT (object);
  	  XD_DEBUG_MESSAGE ("%c %u", dtype, val);
  	  if (!dbus_message_iter_append_basic (iter, dtype, &val))
! 	    XD_SIGNAL2 (build_string ("Unable to append argument"), object);
  	  return;
  	}
  
***************
*** 430,437 ****
  	  dbus_int64_t val = XINT (object);
  	  XD_DEBUG_MESSAGE ("%c %d", dtype, (int) val);
  	  if (!dbus_message_iter_append_basic (iter, dtype, &val))
! 	    xsignal2 (Qdbus_error,
! 		      build_string ("Unable to append argument"), object);
  	  return;
  	}
  
--- 453,459 ----
  	  dbus_int64_t val = XINT (object);
  	  XD_DEBUG_MESSAGE ("%c %d", dtype, (int) val);
  	  if (!dbus_message_iter_append_basic (iter, dtype, &val))
! 	    XD_SIGNAL2 (build_string ("Unable to append argument"), object);
  	  return;
  	}
  
***************
*** 440,447 ****
  	  dbus_uint64_t val = XUINT (object);
  	  XD_DEBUG_MESSAGE ("%c %u", dtype, (unsigned int) val);
  	  if (!dbus_message_iter_append_basic (iter, dtype, &val))
! 	    xsignal2 (Qdbus_error,
! 		      build_string ("Unable to append argument"), object);
  	  return;
  	}
  
--- 462,468 ----
  	  dbus_uint64_t val = XUINT (object);
  	  XD_DEBUG_MESSAGE ("%c %u", dtype, (unsigned int) val);
  	  if (!dbus_message_iter_append_basic (iter, dtype, &val))
! 	    XD_SIGNAL2 (build_string ("Unable to append argument"), object);
  	  return;
  	}
  
***************
*** 449,456 ****
  	XD_DEBUG_MESSAGE ("%c %f", dtype, XFLOAT_DATA (object));
  	if (!dbus_message_iter_append_basic (iter, dtype,
  					     &XFLOAT_DATA (object)))
! 	  xsignal2 (Qdbus_error,
! 		    build_string ("Unable to append argument"), object);
  	return;
  
        case DBUS_TYPE_STRING:
--- 470,476 ----
  	XD_DEBUG_MESSAGE ("%c %f", dtype, XFLOAT_DATA (object));
  	if (!dbus_message_iter_append_basic (iter, dtype,
  					     &XFLOAT_DATA (object)))
! 	  XD_SIGNAL2 (build_string ("Unable to append argument"), object);
  	return;
  
        case DBUS_TYPE_STRING:
***************
*** 460,467 ****
  	  char *val = SDATA (Fstring_make_unibyte (object));
  	  XD_DEBUG_MESSAGE ("%c %s", dtype, val);
  	  if (!dbus_message_iter_append_basic (iter, dtype, &val))
! 	    xsignal2 (Qdbus_error,
! 		      build_string ("Unable to append argument"), object);
  	  return;
  	}
        }
--- 480,486 ----
  	  char *val = SDATA (Fstring_make_unibyte (object));
  	  XD_DEBUG_MESSAGE ("%c %s", dtype, val);
  	  if (!dbus_message_iter_append_basic (iter, dtype, &val))
! 	    XD_SIGNAL2 (build_string ("Unable to append argument"), object);
  	  return;
  	}
        }
***************
*** 509,517 ****
  			    SDATA (format2 ("%s", object, Qnil)));
  	  if (!dbus_message_iter_open_container (iter, dtype,
  						 signature, &subiter))
! 	    xsignal3 (Qdbus_error,
! 		      build_string ("Cannot open container"),
! 		      make_number (dtype), build_string (signature));
  	  break;
  
  	case DBUS_TYPE_VARIANT:
--- 528,535 ----
  			    SDATA (format2 ("%s", object, Qnil)));
  	  if (!dbus_message_iter_open_container (iter, dtype,
  						 signature, &subiter))
! 	    XD_SIGNAL3 (build_string ("Cannot open container"),
! 			make_number (dtype), build_string (signature));
  	  break;
  
  	case DBUS_TYPE_VARIANT:
***************
*** 523,531 ****
  			    SDATA (format2 ("%s", object, Qnil)));
  	  if (!dbus_message_iter_open_container (iter, dtype,
  						 signature, &subiter))
! 	    xsignal3 (Qdbus_error,
! 		      build_string ("Cannot open container"),
! 		      make_number (dtype), build_string (signature));
  	  break;
  
  	case DBUS_TYPE_STRUCT:
--- 541,548 ----
  			    SDATA (format2 ("%s", object, Qnil)));
  	  if (!dbus_message_iter_open_container (iter, dtype,
  						 signature, &subiter))
! 	    XD_SIGNAL3 (build_string ("Cannot open container"),
! 			make_number (dtype), build_string (signature));
  	  break;
  
  	case DBUS_TYPE_STRUCT:
***************
*** 534,542 ****
  	  XD_DEBUG_MESSAGE ("%c %s", dtype,
  			    SDATA (format2 ("%s", object, Qnil)));
  	  if (!dbus_message_iter_open_container (iter, dtype, NULL, &subiter))
! 	    xsignal2 (Qdbus_error,
! 		      build_string ("Cannot open container"),
! 		      make_number (dtype));
  	  break;
  	}
  
--- 551,558 ----
  	  XD_DEBUG_MESSAGE ("%c %s", dtype,
  			    SDATA (format2 ("%s", object, Qnil)));
  	  if (!dbus_message_iter_open_container (iter, dtype, NULL, &subiter))
! 	    XD_SIGNAL2 (build_string ("Cannot open container"),
! 			make_number (dtype));
  	  break;
  	}
  
***************
*** 553,561 ****
  
        /* Close the subiteration.  */
        if (!dbus_message_iter_close_container (iter, &subiter))
! 	xsignal2 (Qdbus_error,
! 		  build_string ("Cannot close container"),
! 		  make_number (dtype));
      }
  }
  
--- 569,576 ----
  
        /* Close the subiteration.  */
        if (!dbus_message_iter_close_container (iter, &subiter))
! 	XD_SIGNAL2 (build_string ("Cannot close container"),
! 		    make_number (dtype));
      }
  }
  
***************
*** 677,683 ****
    /* Parameter check.  */
    CHECK_SYMBOL (bus);
    if (!((EQ (bus, QCdbus_system_bus)) || (EQ (bus, QCdbus_session_bus))))
!     xsignal2 (Qdbus_error, build_string ("Wrong bus name"), bus);
  
    /* Open a connection to the bus.  */
    dbus_error_init (&derror);
--- 692,698 ----
    /* Parameter check.  */
    CHECK_SYMBOL (bus);
    if (!((EQ (bus, QCdbus_system_bus)) || (EQ (bus, QCdbus_session_bus))))
!     XD_SIGNAL2 (build_string ("Wrong bus name"), bus);
  
    /* Open a connection to the bus.  */
    dbus_error_init (&derror);
***************
*** 691,697 ****
      XD_ERROR (derror);
  
    if (connection == NULL)
!     xsignal2 (Qdbus_error, build_string ("No connection"), bus);
  
    /* Return the result.  */
    return connection;
--- 706,712 ----
      XD_ERROR (derror);
  
    if (connection == NULL)
!     XD_SIGNAL2 (build_string ("No connection"), bus);
  
    /* Return the result.  */
    return connection;
***************
*** 715,721 ****
    /* Request the name.  */
    name = dbus_bus_get_unique_name (connection);
    if (name == NULL)
!     xsignal1 (Qdbus_error, build_string ("No unique name available"));
  
    /* Return.  */
    return build_string (name);
--- 730,736 ----
    /* Request the name.  */
    name = dbus_bus_get_unique_name (connection);
    if (name == NULL)
!     XD_SIGNAL1 (build_string ("No unique name available"));
  
    /* Return.  */
    return build_string (name);
***************
*** 836,842 ****
  					   SDATA (method));
    UNGCPRO;
    if (dmessage == NULL)
!     xsignal1 (Qdbus_error, build_string ("Unable to create a new message"));
  
    /* Check for timeout parameter.  */
    if ((i+2 <= nargs) && (EQ ((args[i]), QCdbus_timeout)))
--- 851,857 ----
  					   SDATA (method));
    UNGCPRO;
    if (dmessage == NULL)
!     XD_SIGNAL1 (build_string ("Unable to create a new message"));
  
    /* Check for timeout parameter.  */
    if ((i+2 <= nargs) && (EQ ((args[i]), QCdbus_timeout)))
***************
*** 887,893 ****
      XD_ERROR (derror);
  
    if (reply == NULL)
!     xsignal1 (Qdbus_error, build_string ("No reply"));
  
    XD_DEBUG_MESSAGE ("Message sent");
  
--- 902,908 ----
      XD_ERROR (derror);
  
    if (reply == NULL)
!     XD_SIGNAL1 (build_string ("No reply"));
  
    XD_DEBUG_MESSAGE ("Message sent");
  
***************
*** 1018,1024 ****
  					   SDATA (interface),
  					   SDATA (method));
    if (dmessage == NULL)
!     xsignal1 (Qdbus_error, build_string ("Unable to create a new message"));
  
    /* Check for timeout parameter.  */
    if ((i+2 <= nargs) && (EQ ((args[i]), QCdbus_timeout)))
--- 1033,1039 ----
  					   SDATA (interface),
  					   SDATA (method));
    if (dmessage == NULL)
!     XD_SIGNAL1 (build_string ("Unable to create a new message"));
  
    /* Check for timeout parameter.  */
    if ((i+2 <= nargs) && (EQ ((args[i]), QCdbus_timeout)))
***************
*** 1061,1067 ****
    /* Send the message.  The message is just added to the outgoing
       message queue.  */
    if (!dbus_connection_send_with_reply (connection, dmessage, NULL, timeout))
!     xsignal1 (Qdbus_error, build_string ("Cannot send message"));
  
    XD_DEBUG_MESSAGE ("Message sent");
  
--- 1076,1082 ----
    /* Send the message.  The message is just added to the outgoing
       message queue.  */
    if (!dbus_connection_send_with_reply (connection, dmessage, NULL, timeout))
!     XD_SIGNAL1 (build_string ("Cannot send message"));
  
    XD_DEBUG_MESSAGE ("Message sent");
  
***************
*** 1120,1127 ****
        || (!dbus_message_set_destination (dmessage, SDATA (service))))
      {
        UNGCPRO;
!       xsignal1 (Qdbus_error,
! 		build_string ("Unable to create a return message"));
      }
  
    UNGCPRO;
--- 1135,1141 ----
        || (!dbus_message_set_destination (dmessage, SDATA (service))))
      {
        UNGCPRO;
!       XD_SIGNAL1 (build_string ("Unable to create a return message"));
      }
  
    UNGCPRO;
***************
*** 1159,1165 ****
    /* Send the message.  The message is just added to the outgoing
       message queue.  */
    if (!dbus_connection_send (connection, dmessage, NULL))
!     xsignal1 (Qdbus_error, build_string ("Cannot send message"));
  
    /* Flush connection to ensure the message is handled.  */
    dbus_connection_flush (connection);
--- 1173,1179 ----
    /* Send the message.  The message is just added to the outgoing
       message queue.  */
    if (!dbus_connection_send (connection, dmessage, NULL))
!     XD_SIGNAL1 (build_string ("Cannot send message"));
  
    /* Flush connection to ensure the message is handled.  */
    dbus_connection_flush (connection);
***************
*** 1216,1223 ****
        || (!dbus_message_set_destination (dmessage, SDATA (service))))
      {
        UNGCPRO;
!       xsignal1 (Qdbus_error,
! 		build_string ("Unable to create a error message"));
      }
  
    UNGCPRO;
--- 1230,1236 ----
        || (!dbus_message_set_destination (dmessage, SDATA (service))))
      {
        UNGCPRO;
!       XD_SIGNAL1 (build_string ("Unable to create a error message"));
      }
  
    UNGCPRO;
***************
*** 1255,1261 ****
    /* Send the message.  The message is just added to the outgoing
       message queue.  */
    if (!dbus_connection_send (connection, dmessage, NULL))
!     xsignal1 (Qdbus_error, build_string ("Cannot send message"));
  
    /* Flush connection to ensure the message is handled.  */
    dbus_connection_flush (connection);
--- 1268,1274 ----
    /* Send the message.  The message is just added to the outgoing
       message queue.  */
    if (!dbus_connection_send (connection, dmessage, NULL))
!     XD_SIGNAL1 (build_string ("Cannot send message"));
  
    /* Flush connection to ensure the message is handled.  */
    dbus_connection_flush (connection);
***************
*** 1340,1346 ****
  				      SDATA (signal));
    UNGCPRO;
    if (dmessage == NULL)
!     xsignal1 (Qdbus_error, build_string ("Unable to create a new message"));
  
    /* Initialize parameter list of message.  */
    dbus_message_iter_init_append (dmessage, &iter);
--- 1353,1359 ----
  				      SDATA (signal));
    UNGCPRO;
    if (dmessage == NULL)
!     XD_SIGNAL1 (build_string ("Unable to create a new message"));
  
    /* Initialize parameter list of message.  */
    dbus_message_iter_init_append (dmessage, &iter);
***************
*** 1375,1381 ****
    /* Send the message.  The message is just added to the outgoing
       message queue.  */
    if (!dbus_connection_send (connection, dmessage, NULL))
!     xsignal1 (Qdbus_error, build_string ("Cannot send message"));
  
    /* Flush connection to ensure the message is handled.  */
    dbus_connection_flush (connection);
--- 1388,1394 ----
    /* Send the message.  The message is just added to the outgoing
       message queue.  */
    if (!dbus_connection_send (connection, dmessage, NULL))
!     XD_SIGNAL1 (build_string ("Cannot send message"));
  
    /* Flush connection to ensure the message is handled.  */
    dbus_connection_flush (connection);
***************
*** 1557,1566 ****
       Lisp errors during the call.  */
    if (HASH_TABLE_P (Vdbus_registered_functions_table))
      {
!       internal_condition_case_1 (xd_read_message, QCdbus_system_bus,
! 				 Qerror, Fidentity);
!       internal_condition_case_1 (xd_read_message, QCdbus_session_bus,
! 				 Qerror, Fidentity);
      }
  }
  
--- 1570,1579 ----
       Lisp errors during the call.  */
    if (HASH_TABLE_P (Vdbus_registered_functions_table))
      {
!       xd_in_read_queued_messages = 1;
!       internal_catch (Qdbus_error, xd_read_message, QCdbus_system_bus);
!       internal_catch (Qdbus_error, xd_read_message, QCdbus_session_bus);
!       xd_in_read_queued_messages = 0;
      }
  }
  

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

* bug#1186: 23.0.60; Abort trap when loading dbus in tty
  2008-10-23 13:29     ` Michael Albinus
@ 2008-10-23 22:16       ` Magnus Henoch
  0 siblings, 0 replies; 6+ messages in thread
From: Magnus Henoch @ 2008-10-23 22:16 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 1186

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

> Could you, please, check the appended patch? It ought to prevent Fsignal
> calls in this case.

The patch fixes the problem for me.  Thanks!

Magnus






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

end of thread, other threads:[~2008-10-23 22:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-17 21:30 bug#1186: 23.0.60; Abort trap when loading dbus in tty Chong Yidong
2008-10-19 15:48 ` Michael Albinus
2008-10-21 22:09   ` Magnus Henoch
     [not found]   ` <mailman.1746.1224628217.25473.bug-gnu-emacs@gnu.org>
2008-10-23 13:29     ` Michael Albinus
2008-10-23 22:16       ` Magnus Henoch
  -- strict thread matches above, loose matches on Subject: below --
2008-10-16 21:23 Magnus Henoch

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).