Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming > #1284

async I/O

From "Mark" <mark_cruzNOTFORSPAM@hotmail.com>
Newsgroups comp.unix.programmer, comp.programming
Subject async I/O
Date 2012-02-05 17:52 -0500
Organization Aioe.org NNTP Server
Message-ID <jgn30i$tio$1@speranza.aioe.org> (permalink)

Cross-posted to 2 groups.

Show all headers | View raw


Hello,

(I've faced quite a complex piece of software using asynchrounous messaging 
and am having a tricky bug, which I believe is relevant to async I/O, so I'd 
like to clarify some concepts).
There are three processes, A,B and C, and A sends control messages to B & C 
through a unix pipe. Now what happens is: process A sends a command to B, if 
network link is not up, B sends command to C('link up') and C later confirms 
to A that it's done, so B can change its state machine state. Also at some 
moment process A sends 'link up' command to C. However state machine in B 
never changes, although when I debug with GDB step-by-step, it functions 
correctly (timings issue etc.?).

Also, another observation - I set breakpoints in both processes B and C, 
then execute A -- every time I start debug session, either B or C will be 
the first to receive the message, so there is no guarantee that B or C is 
always the first to get the message (I don't understand why).

Is it possible that asynchronous messages don't deliver in order, e.g. A 
first sends to B and then to C - can the B receive its message first and A 
gets its message second (first or second in terms of timeline)?

I understand there might be not enough information to make any assumptions, 
but what are the basic approaches to debug async I/O and situations similar 
to mine?

Thanks a lot in advance!


Mark 

Back to comp.programming | Previous | NextNext in thread | Find similar


Thread

async I/O "Mark" <mark_cruzNOTFORSPAM@hotmail.com> - 2012-02-05 17:52 -0500
  Re: async I/O jt@toerring.de (Jens Thoms Toerring) - 2012-02-06 01:18 +0000
    Re: async I/O "Mark" <mark_cruzNOTFORSPAM@hotmail.com> - 2012-02-05 22:43 -0500
  Re: async I/O Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-02-06 00:38 -0500
  Re: async I/O scott@slp53.sl.home (Scott Lurndal) - 2012-02-06 16:11 +0000

csiph-web