Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 08 Feb 2021 20:09:51 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 253318] lldb: aborted when debugging named
Message-ID:  <bug-253318-227-8qg4gLcSO3@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-253318-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-253318-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D253318

--- Comment #5 from Dimitry Andric <dim@FreeBSD.org> ---
Looking at the stack trace, it seems the line editor was processing a tab
keypress (while being in libedit via el_wgets), and then the autocompletion
stuff got some error, which it tried to print via PrintAsync.

That uses a non-recursive mutex 'm_output_mutex' in the EditLine class, whi=
ch
is also locked just before calling into el_wgets(). So I think it's getting=
 a
EDEADLK, as described in lib/libthr/thread/thr_mutex.c:

   885  static int
   886  mutex_self_lock(struct pthread_mutex *m, const struct timespec
*abstime)
   887  {
   888          struct timespec ts1, ts2;
   889          int ret;
   890
   891          switch (PMUTEX_TYPE(m->m_flags)) {
   892          case PTHREAD_MUTEX_ERRORCHECK:
   893          case PTHREAD_MUTEX_ADAPTIVE_NP:.
   894                  if (abstime) {
...
   904                  } else {
   905                          /*
   906                           * POSIX specifies that mutexes should retu=
rn
   907                           * EDEADLK if a recursive lock is detected.
   908                           */
   909                          ret =3D EDEADLK;
   910                  }

I think this is an upstream bug. But it would be handy to have an easier
reproduction scenario.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-253318-227-8qg4gLcSO3>