mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Duellings <Peter.Duellings@wincor-nixdorf.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: linux-kernel@vger.kernel.org
Subject: Re: kernel error in system call accept() under kernel 2.6.8
Date: Wed, 05 Oct 2005 17:41:06 +0200	[thread overview]
Message-ID: <4343F412.8070208@wincor-nixdorf.com> (raw)
In-Reply-To: <1127230327.6276.1.camel@localhost.localdomain>

Alan,


meanwhile we could generate a strace for the problem.
However, I guess that the strace does not give the desired
information (see parts below).

Additionally we added in the program the output of the return
value of the accept() system call . The return value is -512
and the errno value is 0!
Usually the return value should be -1 and the errno  should
contain the value without the sign of the error.


Any idea or comment on this ?

Thanks,


Peter Düllings

---------<strace>------------
2682  09:25:29.238663 accept(21,  <unfinished ...>
2688  09:25:29.263486 accept(33, {sa_family=AF_INET, sin_port=htons(32811),
sin_addr=inet_addr("127.0.0.1")}, [16]) = 40 <27.171270>
2688  09:25:56.589969 accept(33, 0x82fa7e0, [16]) = ? ERESTARTSYS (To be
restarted) <0.385453>
2688  09:25:56.975563 --- SIGCHLD (Child exited) @ 0 (0) ---
2688  09:25:56.975676 accept(33, 0x82fa7e0, [16]) = ? ERESTARTSYS (To be
restarted) <0.205963>
2688  09:25:57.181770 --- SIGCHLD (Child exited) @ 0 (0) ---
2688  09:25:57.181842 accept(33,  <unfinished ...>
2682  09:25:57.231961 <... accept resumed> {sa_family=AF_INET, 
sin_port=htons
(32882), sin_addr=inet_addr("127.0.0.1")}, [16]) = 43 <27.993066>
2682  09:25:57.234320 accept(21,  <unfinished ...>
2688  09:25:57.538314 <... accept resumed> 0x82fa7e0, [16]) = ? ERESTARTSYS
(To be restarted) <0.356435>
2688  09:25:57.538429 --- SIGCHLD (Child exited) @ 0 (0) ---
2688  09:25:57.538488 accept(33, 0x82fa7e0, [16]) = ? ERESTARTSYS (To be
restarted) <0.015688>
2688  09:25:57.554315 --- SIGCHLD (Child exited) @ 0 (0) ---
2688  09:25:57.554370 accept(33, 0x82fa7e0, [16]) = ? ERESTARTSYS (To be
restarted) <0.192660>
2688  09:25:57.747151 --- SIGCHLD (Child exited) @ 0 (0) ---
2688  09:25:57.747236 accept(33, 0x82fa7e0, [16]) = ? ERESTARTSYS (To be
restarted) <0.097813>
....
.
---------</strace>------------



Alan Cox wrote:

> On Maw, 2005-09-20 at 16:25 +0200, Peter Duellings wrote:
> 
>>Obviously there are some cases where the accept() system call does
>>not set the errno variable if the accept() system call returns
>>with a value less than zero:
> 
> 
> Not actually possible. The kernel returns a positive value, zero or a
> negative value which is the errno code negated. It has no mechanism to
> return a negative value and not error.
> 
> What does strace show for the failing case ?
> 
> 


-- 



  parent reply	other threads:[~2005-10-05 15:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-20 14:25 Peter Duellings
     [not found] ` <20050920150755.GH32751@kvack.org>
2005-09-20 15:20   ` Peter Duellings
2005-09-20 15:28     ` Benjamin LaHaise
2005-09-20 15:32       ` Peter Duellings
2005-09-20 15:35         ` Benjamin LaHaise
2005-09-20 15:32 ` Alan Cox
2005-09-20 15:19   ` Peter Duellings
2005-10-05 15:41   ` Peter Duellings [this message]
2005-10-05 17:39     ` linux-os (Dick Johnson)
2005-10-05 17:53     ` Bernd Petrovitsch

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=4343F412.8070208@wincor-nixdorf.com \
    --to=peter.duellings@wincor-nixdorf.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®