trinity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Jones <davej@codemonkey.org.uk>
To: Vegard Nossum <vegard.nossum@oracle.com>
Cc: trinity@vger.kernel.org
Subject: Re: trinity: execve() returns 0?
Date: Mon, 12 Dec 2016 09:07:32 -0500	[thread overview]
Message-ID: <20161212140732.k5ivd4z4ldcq3a4j@codemonkey.org.uk> (raw)
In-Reply-To: <4ce14b7f-a2bd-e99a-53c9-d80ae3ee27c5@oracle.com>

On Mon, Dec 12, 2016 at 01:05:05PM +0100, Vegard Nossum wrote:
 > Hi Dave,
 > 
 > I'm debugging what seems to be a race between execve() and ioctl() (!),
 > and I noticed that the execve records in the trinity child logs indicate
 > that it's returning 0:
 > 
 > [child9:20816] [0] 
 > execve(name="/sys/devices/virtual/bdi/7:5/power/runtime_status", 
 > argv=0x2cd9b30, envp=0x2ca51e0) = 0
 > [child9:22112] [0] execve(name="/proc/134/net/pnresource", 
 > argv=0x2c57130, envp=0x2d01bd0) = 0
 > [child9:22678] [0] execve(name=".//proc/45/maps", argv=0x2ce5800, 
 > envp=0x2cfbb70) = 0
 > [child9:23754] [0] execve(name="/proc/1177/task/1177/net/ipx/socket", 
 > argv=0x2cf5b10, envp=0x2b431b0) = 0
 > [child9:23754] [1] 
 > execve(name="/sys/module/tcp_cubic/parameters/hystart", argv=0x2d1fe60, 
 > envp=0x2d24f50) = 0
 > [child9:27614] [0] execve(name="/proc/30/net/stat/rt_cache", 
 > argv=0x2cf5b10, envp=0x2d07cd0) = 0
 > 
 > I'm guessing this has something to do with the subchild code that
 > trinity uses (since execve() does not return on success), although I see
 > other execve calls that do return -1 as expected and I wouldn't expect
 > execve() on the above files to actually succeed, so I guess the question
 > is what does the = 0 mean?

Hm, I suspect do_extrafork needs to set rec->retval appropriately, looks
like we're currently neglecting to do that, so it's remaining 0.

	Dave

      reply	other threads:[~2016-12-12 14:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-12 12:05 trinity: execve() returns 0? Vegard Nossum
2016-12-12 14:07 ` Dave Jones [this message]

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=20161212140732.k5ivd4z4ldcq3a4j@codemonkey.org.uk \
    --to=davej@codemonkey.org.uk \
    --cc=trinity@vger.kernel.org \
    --cc=vegard.nossum@oracle.com \
    /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).