Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 02 Jul 2012 20:23:31 -0700
From:      Yuri <yuri@rawbw.com>
To:        Alexander Kabaev <kabaev@gmail.com>
Cc:        freebsd-hackers@FreeBSD.org
Subject:   Re: System is flooded with failed read(2) calls: Resource temporarily unavailable (errno=35) coming from xorg unix socket
Message-ID:  <4FF265B3.8050301@rawbw.com>
In-Reply-To: <20120702183232.037dda59@kan.dyndns.org>
References:  <4FEE0D2F.4010808@rawbw.com> <20120702183232.037dda59@kan.dyndns.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On 07/02/2012 15:32, Alexander Kabaev wrote:
> Pardon my possibly naive question, but isn't using errno to detect
> whether the syscall is succesful a wrong techique? Syscall will NOT
> change errno unless unless it actually failed, so unless dtrace's errno
> emulation is more magic than I thought, your script will mistakenly
> attribute error code coming from a distant past to syscalls just
> complete with no errors?

I didn't think about this at all, just picked this script from some website.
But now I did an experiment: in the test process I placed on failing 
open(2) call and next to it a succeeding one.
And this dtrace script only shows one failed open(2) call, not two as 
you would expect if errno was indeed preserved between them.

So maybe there is some magic to it in dtrace functionality.

Someone more familiar with the matter maybe can explain this.

Yuri



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4FF265B3.8050301>