all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Ken Raeburn <raeburn@raeburn.org>
Cc: tino.calancha@gmail.com, 25247@debbugs.gnu.org
Subject: bug#25247: 26.0.50; Concurrency crashes
Date: Fri, 23 Dec 2016 12:04:29 +0200	[thread overview]
Message-ID: <83shpfyn9u.fsf@gnu.org> (raw)
In-Reply-To: <80CB3488-9553-4745-82E6-A983B1608E13@raeburn.org> (message from Ken Raeburn on Fri, 23 Dec 2016 04:34:12 -0500)

> From: Ken Raeburn <raeburn@raeburn.org>
> Date: Fri, 23 Dec 2016 04:34:12 -0500
> Cc: Tino Calancha <tino.calancha@gmail.com>,
>  25247@debbugs.gnu.org
> 
> > It doesn't crash or hang here.  Which is not surprising, since the
> > backtraces seem to indicate some issue with X11/xcb and threads.  Ken,
> > could you take a look, please?  Are we violating some X11 protocols by
> > calling redisplay from different threads?
> 
> The documentation for XInitThreads, mentioned in one of the error messages, says it needs to be called before any other Xlib functions if a single display object might be used concurrently from multiple threads.

Yes, I've seen these as well.

> I’m testing out a change, but thus far haven’t been able to reproduce any of the crashes even without the patch, although I did run into the unblock_input_to abort on the concurrency branch, with a similar test program from Elias Mårtenson.

The problems with unblock_input_to should no longer happen on master,
where I installed a fix in xgselect.c to prevent a thread from
accessing the Glib context if it failed to acquire that context.  The
code which could cause several threads to call block_input and
unblock_input, thus stomping on each other's toes, is conditioned on
acquiring the Glib context, so I expected that not to be a problem
anymore.  However, one of the crashes reported by Tino still indicate
that problem exists somehow, because one of the crashes is abort in
unblock_input_to.

> Also, in looking into this, I found a couple vague references about how “it is known” that there are problems with the concurrency support in Xlib in some areas.  Unfortunately there were no details (not even clear if it was an Xlib problem or related to using Java classes that talk to Xlib in ways the developer might not fully control), and I’ll be busy the next few days.  I’ll try to find out more next week.  But if only one thread is talking to a given X display *at a time* (whether displays are assigned to specific threads, or locking is used, or only one thread uses X at all, or whatever), I haven’t seen anything so far that would suggest there would be any problem.

The last crash reported by Tino here:

  https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25247#11

shows an X error even though the non-primary threads don't do any
display.  See the backtrace for the primary thread (the last one) in
that message.  So there could be more than one problem here, and GTK
seems to be involved.





      reply	other threads:[~2016-12-23 10:04 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-22 10:20 bug#25247: 26.0.50; Concurrency crashes Tino Calancha
2016-12-22 17:28 ` Eli Zaretskii
2016-12-23  3:34   ` Tino Calancha
2016-12-23  8:34     ` Eli Zaretskii
2016-12-23 11:32       ` Tino Calancha
2016-12-23 14:14         ` Eli Zaretskii
2016-12-29 11:37           ` bug#25247: 26.0.50; Concurrency crashes with XLib Tino Calancha
2016-12-29 17:44             ` Eli Zaretskii
2016-12-30  3:13               ` Tino Calancha
2016-12-30  7:19             ` Ken Raeburn
2016-12-30  8:37               ` Eli Zaretskii
2016-12-30  9:41                 ` Eli Zaretskii
2016-12-30 10:30                   ` Elias Mårtenson
2016-12-30 11:05                     ` Eli Zaretskii
2016-12-30 11:21                       ` Elias Mårtenson
2016-12-30 18:54                         ` Eli Zaretskii
2016-12-30 20:40                           ` Eli Zaretskii
2016-12-31 11:05                         ` Eli Zaretskii
2016-12-31 15:34                           ` Elias Mårtenson
2016-12-31 15:51                             ` Eli Zaretskii
2016-12-31 16:24                               ` Elias Mårtenson
2016-12-31 17:18                                 ` Eli Zaretskii
2016-12-31 17:28                                   ` Elias Mårtenson
2016-12-31 18:06                                     ` Eli Zaretskii
2016-12-31 18:16                                       ` Elias Mårtenson
2016-12-31 18:29                                         ` Eli Zaretskii
2016-12-31 18:38                                           ` Eli Zaretskii
2016-12-30 13:45                   ` Tino Calancha
2016-12-30 16:57                     ` Eli Zaretskii
2017-01-06  0:03                       ` npostavs
2017-01-06  7:48                         ` Eli Zaretskii
2016-12-23  9:34   ` bug#25247: 26.0.50; Concurrency crashes Ken Raeburn
2016-12-23 10:04     ` Eli Zaretskii [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83shpfyn9u.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=25247@debbugs.gnu.org \
    --cc=raeburn@raeburn.org \
    --cc=tino.calancha@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.