From owner-svn-src-head@freebsd.org Wed Jul 26 16:08:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84C1ED98168; Wed, 26 Jul 2017 16:08:46 +0000 (UTC) (envelope-from mizhka@gmail.com) Received: from mail-ua0-f178.google.com (mail-ua0-f178.google.com [209.85.217.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 383036806E; Wed, 26 Jul 2017 16:08:45 +0000 (UTC) (envelope-from mizhka@gmail.com) Received: by mail-ua0-f178.google.com with SMTP id q25so101597607uah.1; Wed, 26 Jul 2017 09:08:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=g9PN1BrZ+otLND06NKhr2fRszLKvveqN+jgCTsYYCs4=; b=WfHYY5WL376It/NSuJVec2FoQmXXj9uqcXN1K5IK5tt4js/Yt7mALkS+y/AgFNpB46 pFnrnQ9avSWq4YXVN21pLLx4mLxqtv/Qen/qr7cYUBjFWWKWwFwehDhIyCgmjB/XS0pS +6C5DHS5+PySM40kNKIME4FvY7DJuV8mwahrHHXVf0Ata65tNnWR8xVtPaNBMv+gjfHu fwa6w0fBDY19keeYORYSaOXcqwyDqq5IFld3wSLgETyLDpxBipOPBnOhmdjxPhRQqgB9 3uOOCiNdZFDl7tW5mbrOUhITCZ/B4nmXR627qTiBAtphAV3UhOwJ5OjaVwF7QDjazNh0 Z29g== X-Gm-Message-State: AIVw113hPQ5bq148FWJVU+PQRzHJscnZBdbhLWPRUuiGCDhbztvAievp rlgAGSdqBhkDZq0h64DOGg== X-Received: by 10.176.84.153 with SMTP id p25mr970993uaa.174.1501083540916; Wed, 26 Jul 2017 08:39:00 -0700 (PDT) Received: from mail-ua0-f169.google.com (mail-ua0-f169.google.com. [209.85.217.169]) by smtp.gmail.com with ESMTPSA id 34sm3922455uai.50.2017.07.26.08.39.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Jul 2017 08:39:00 -0700 (PDT) Received: by mail-ua0-f169.google.com with SMTP id k43so83030668uaf.3; Wed, 26 Jul 2017 08:39:00 -0700 (PDT) X-Received: by 10.31.13.78 with SMTP id 75mr775435vkn.121.1501083540311; Wed, 26 Jul 2017 08:39:00 -0700 (PDT) MIME-Version: 1.0 Received: by 10.31.32.75 with HTTP; Wed, 26 Jul 2017 08:38:59 -0700 (PDT) In-Reply-To: <20170726152313.GF1700@kib.kiev.ua> References: <201705191304.v4JD45Sn021851@repo.freebsd.org> <20170726152313.GF1700@kib.kiev.ua> From: Michael Zhilin Date: Wed, 26 Jul 2017 18:38:59 +0300 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r318539 - head/lib/libthr/thread To: Konstantin Belousov Cc: Eric van Gyzen , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Jul 2017 16:08:46 -0000 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 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. >