Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Jul 2017 18:38:59 +0300
From:      Michael Zhilin <mizhka@freebsd.org>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        Eric van Gyzen <vangyzen@freebsd.org>, src-committers@freebsd.org,  svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r318539 - head/lib/libthr/thread
Message-ID:  <CAF19XB%2Bh%2B49nFqm5sjqrkGVQWp3qnENzitnVYAGR3H%2BxjT3XeQ@mail.gmail.com>
In-Reply-To: <20170726152313.GF1700@kib.kiev.ua>
References:  <201705191304.v4JD45Sn021851@repo.freebsd.org> <CAF19XB%2B9%2BxFWuF5YLrzyczT83uMajDOhTftVEr4YJ7K4C_PcrA@mail.gmail.com> <20170726152313.GF1700@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
Konstantin,

Thank you for quick reply.

Here is review request to revert field change:
https://reviews.freebsd.org/D11738

Thanks!



On Wed, Jul 26, 2017 at 6:23 PM, Konstantin Belousov <kostikbel@gmail.com>
wrote:

> On Wed, Jul 26, 2017 at 06:09:00PM +0300, Michael Zhilin wrote:
> > Hi Eric, Konstantin,
> >
> > This commit breaks libthread_db a bit, particular change is:
> > -struct pthread_key _thread_keytable[PTHREAD_KEYS_MAX];
> > +static struct pthread_key _thread_keytable[PTHREAD_KEYS_MAX];
> >
> > In libthread_db there is check if _thread_keytable is found in symbols of
> > debugged process:
> > https://svnweb.freebsd.org/base/head/lib/libthread_db/
> libthr_db.c?revision=241720&view=markup#l148
> >
> > LOOKUP_SYM(ph, "_thread_keytable", &ta->thread_keytable_addr);
> >
> > If symbol is not found, pt_ta_new returns "TD_NOLIBTHREAD", even if
> process
> > uses libthr.
> > It impacts sysutils/pstack port, it doesn't work for multithreaded
> > processes anymore.
> >
> > Eric, Konstantin,
> > Could you please advise what is best way to fix it:
> >
> >    - rollback change of "_thread_keytable" (it looks easy)
> >    - or remove "_thread_keytable" from libthread_db
> >
> > ?
>
> The td_ta_tsd_iter() API implementation for libthr depends on the ability
> to lookup the symbol.  I think that the change should be reverted, it is
> easiest solution.
>
> Perhaps a comment should be added noting that the symbol is used by
> libthread_db so that the mistake is not repeated.
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAF19XB%2Bh%2B49nFqm5sjqrkGVQWp3qnENzitnVYAGR3H%2BxjT3XeQ>