Date: Wed, 26 Jul 2017 18:23:13 +0300 From: Konstantin Belousov <kostikbel@gmail.com> To: Michael Zhilin <mizhka@freebsd.org> Cc: Eric van Gyzen <vangyzen@freebsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Michael Zhilin <mizhka@gmail.com> Subject: Re: svn commit: r318539 - head/lib/libthr/thread Message-ID: <20170726152313.GF1700@kib.kiev.ua> In-Reply-To: <CAF19XB%2B9%2BxFWuF5YLrzyczT83uMajDOhTftVEr4YJ7K4C_PcrA@mail.gmail.com> References: <201705191304.v4JD45Sn021851@repo.freebsd.org> <CAF19XB%2B9%2BxFWuF5YLrzyczT83uMajDOhTftVEr4YJ7K4C_PcrA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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?20170726152313.GF1700>