Date: Thu, 4 Jun 2015 05:44:17 +0800 From: Erich Dollansky <erichsfreebsdlist@alogt.com> To: "Andre Meiser" <ortadur@web.de> Cc: freebsd-questions@freebsd.org Subject: Re: Many core dumps in pthread_getspecific - how to debug? Message-ID: <20150604054417.5542bcd7@X220.alogt.com> In-Reply-To: <trinity-cc434a7f-87f5-4308-82d1-72c9e02913aa-1433329779257@3capp-webde-bs60> References: <trinity-75eb1594-6ceb-4d11-84fe-c10f9ce82b04-1433315382930@3capp-webde-bs56> <20150603164756.06961d69@X220.alogt.com> <trinity-cc434a7f-87f5-4308-82d1-72c9e02913aa-1433329779257@3capp-webde-bs60>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, On Wed, 3 Jun 2015 13:09:39 +0200 "Andre Meiser" <ortadur@web.de> wrote: > On Wed, 3 Jun 2015 10:47 +0200 Erich Dollansky wrote: > > Can you get the sources and compile your own FreeBSD? > > I got the source from here: > http://svnweb.freebsd.org/base/releng/10.1/ > this is a good source. > And in lib/libkse/thread/thr_spec.c line 211-214 I found this: > > pthread = _get_curthread(); > > /* Check if there is specific data: */ > if (pthread->specific != NULL && (unsigned int)key < > PTHREAD_KEYS_MAX) { > > If pthread is NULL than this will crash with a core dump. So I made a > quick grep about the sources and at other places the return value of > _get_curthread() is compared with NULL, e.g. thr_kern.c in line 601: > > if ((crit != NULL) && ((curthread = _get_curthread()) != NULL)) > > It looks like _get_curthread() may return NULL and than thr_spec.c > line 214 has to look like this: > > if (pthread != NULL && pthread->specific != NULL && (unsigned > int)key < PTHREAD_KEYS_MAX) { > > But I'm new to FreeBSD, so I'm not sure if this will help to fix the > problem. And I'm not experienced enough to compile my own FreeBSD, > yet. You might be the person with the least experience and the shortest time between start and finding the first error. I would suggest that you file a bug report under: https://bugs.freebsd.org/bugzilla/enter_bug.cgi Include your fix as a diff. Ok, still, I run FreeBSD since decades and never came across this problem. So, you must have another problem on your machine. Erich > > > > Try first the source. The best mailing list for this should be > > 'stable' as it targets only the stable versions like yours. > > Ok, thanks, I'll write it there, too. > > Sincerely yours Andre. > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "freebsd-questions-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150604054417.5542bcd7>