linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Janne Huttunen <janne.huttunen@nokia.com>
Cc: linux-kernel@vger.kernel.org,
	"Alexander Shishkin" <alexander.shishkin@linux.intel.com>,
	"Andi Kleen" <ak@linux.intel.com>,
	"Arnaldo Carvalho de Melo" <acme@kernel.org>,
	"Jaroslav Škarvada" <jskarvad@redhat.com>,
	"Jiri Olsa" <jolsa@redhat.com>,
	"Peter Zijlstra" <peterz@infradead.org>,
	kernel-team@lge.com
Subject: Re: [PATCH v2] perf script python: Fix dict reference counting
Date: Wed, 11 Jul 2018 17:14:01 +0900	[thread overview]
Message-ID: <20180711081401.GA25373@sejong> (raw)
In-Reply-To: <1531133990-17485-1-git-send-email-janne.huttunen@nokia.com>

Hell,

On Mon, Jul 09, 2018 at 01:59:50PM +0300, Janne Huttunen wrote:
> The dictionaries are attached to the parameter tuple that steals
> the references and takes care of releasing them when appropriate.
> The code should not decrement the reference counts explicitly.
> E.g. if libpython has been built with reference debugging enabled,
> the superfluous DECREFs will trigger this error when running perf
> script:
> 
>   Fatal Python error: Objects/tupleobject.c:238 object at
>   0x7f10f2041b40 has negative ref count -1
>   Aborted (core dumped)
> 
> If the reference debugging is not enabled, the superfluous DECREFs
> might cause the dict objects to be silently released while they are
> still in use. This may trigger various other assertions or just
> cause perf crashes and/or weird and unexpected data changes in the
> stored Python objects.
> 
> Signed-off-by: Janne Huttunen <janne.huttunen@nokia.com>

Acked-by: Namhyung Kim <namhyung@kernel.org>

Thanks,
Namhyung

  parent reply	other threads:[~2018-07-11  8:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-06  6:53 [PATCH] perf script python: Fix dict reference counting Janne Huttunen
2018-07-08 11:17 ` Jiri Olsa
2018-07-09  9:25   ` Janne Huttunen
2018-07-09  9:41     ` Jiri Olsa
2018-07-09 10:59       ` [PATCH v2] " Janne Huttunen
2018-07-09 14:55         ` Jiri Olsa
2018-07-11  8:14         ` Namhyung Kim [this message]
2018-07-12 14:04         ` [tip:perf/urgent] " tip-bot for Janne Huttunen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180711081401.GA25373@sejong \
    --to=namhyung@kernel.org \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=janne.huttunen@nokia.com \
    --cc=jolsa@redhat.com \
    --cc=jskarvad@redhat.com \
    --cc=kernel-team@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).