Ahha! I see your point. The delay waiting for the other thread is causing the
timeout. Perhaps a null message back while waiting would satify the problem.

I think the strategy should be:

owlib:
  ow_server.c
  loop on any "NULL" return messages from owserver

owserver:
  Each "handler" routine should start a second (ping) thread that sends a NULL
message every 1.5 seconds.
  On handler success, kill the ping thread (but protect the actual message
sneding so that partial pings aren't sent) and return the real response.

This way if we still timeout, owserver really has a problem and perhaps
"reconnect" should be done.

Do you want to implement this, Chrstian, or should I?

Paul


-----Original Message-----
From: [EMAIL PROTECTED] on behalf of Christian
Magnusson
Sent: Tue 2/14/2006 2:44 AM
To: [email protected]
Subject: RE: [Owfs-developers] Timeout again
 

I'm not using the CVS right now... I goal was to make sure the latest
released version owfs-2.2p0RC.tar.gz was stable for all my systems at
home.

The needed timeout is very dependent to how many clients try to access
the 1-wire bus. I have made a script that shows it's not even enough
with 5 seconds timeout. (making 5 concurrent temperature reads.)
The two last read-requests are aborted due to the timeout.

[EMAIL PROTECTED] root]# ./ow
[EMAIL PROTECTED] root]#       25.875     25.9375     25.9375
cat: /tmp/3/uncached/1F.90C202000000/main/28.E3015F000000/temperature:
Input/output error
cat: /tmp/4/uncached/1F.90C202000000/main/28.E3015F000000/temperature:
Input/output error


Test-script
-----------------------------
ow
-----------------------------
#!/bin/bash

#DEBUG="--foreground --error_level=9 --error_print=2"

mkdir -p /tmp/1 /tmp/2 /tmp/3 /tmp/4 /tmp/5
owserver -P/tmp/pid1.pid -u -p 5000 ${DEBUG} &
#owserver -P/tmp/pid2.pid -s 5000 -p 5001 ${DEBUG} &
#owserver -P/tmp/pid3.pid -s 5001 -p 5002 ${DEBUG} &

CONNECTPORT=5000
owfs -P/tmp/pid4.pid -s ${CONNECTPORT} ${DEBUG} /tmp/1 &
owfs -P/tmp/pid5.pid -s ${CONNECTPORT} ${DEBUG} /tmp/2 &
owfs -P/tmp/pid6.pid -s ${CONNECTPORT} ${DEBUG} /tmp/3 &
owfs -P/tmp/pid7.pid -s ${CONNECTPORT} ${DEBUG} /tmp/4 &
owfs -P/tmp/pid8.pid -s ${CONNECTPORT} ${DEBUG} /tmp/5 &

sleep 2
SENSOR=uncached/1F.90C202000000/main/28.E3015F000000/temperature
cat /tmp/1/${SENSOR} &
cat /tmp/2/${SENSOR} &
cat /tmp/3/${SENSOR} &
cat /tmp/4/${SENSOR} &
cat /tmp/5/${SENSOR} &

-----------------------------
ow-kill
-----------------------------

#!/bin/tcsh -f

foreach a (`ls /tmp/pid*.pid`)
        kill `cat $a`
end

-----------------------------



On Mon, 2006-02-13 at 18:54 -0500, Alfille, Paul H.,M.D. wrote:
> I'm sure we're both using the CVS version.
> 
> I found listing a large directory, of asking for individual temperatures
worked
> when I uppped the timeout.
> 
> I haven't yet tried the "cat /1wire/uncached/10*/temperature". Perhaps that
call
> sums the latency of both the directory listing and the temperature conversion.
> 
> I'll test tomorrow.
> 
> Paul Alfille
> 
> 
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Gregg C
> Levine
> Sent: Monday, February 13, 2006 6:45 PM
> To: [email protected]
> Subject: RE: [Owfs-developers] Timeout again
> 
> 
> Hello from Gregg C Levine
> This is definitely an interesting case we've got here. And an
> interesting test case for both OWFS, and even FUSE, and certainly the
> One-Wire technology.
> 
> Several questions remain for you Christian:
> Question One
>     Were these tests managed using the contents of CVS? Or did you use
> a new release?
> 
> Question Two
>      Was this managed using the currently released version of FUSE or
> was it done using CVS for FUSE?
>  
> Question Three
>      And which distribution did you use? I know Paul uses Suse, but
> are you using Debian? Or even my distribution of choice Slackware?
> 
> The obvious but not asked here ones will come up later.          
> -----
> Gregg C Levine [EMAIL PROTECTED]
> ---
> "Remember the Force will be with you. Always." Obi-Wan Kenobi 
> 
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> [mailto:owfs-developers-
> > [EMAIL PROTECTED] On Behalf Of Christian Magnusson
> > Sent: Monday, February 13, 2006 5:23 PM
> > To: [email protected]
> > Subject: [Owfs-developers] Timeout again
> > 
> > 
> > Nope... 2 seconds isn't enough...  Can't tell you why, but it's not
> > working for me at least..
> > 
> > /Christian
> > 
> > 
> > [EMAIL PROTECTED] owfs]# cat /var/1wire/uncached/1*/temperature
> >      26.5625     20.4375       19.75     15.9375        9.25
> 22.0625
> > 0.125cat: /var/1wire/uncached/10.762047000800/temperature:
> Input/output
> > error
> > cat: /var/1wire/uncached/10.A22840000800/temperature: Input/output
> error
> > cat: /var/1wire/uncached/10.B3E166000800/temperature: Input/output
> error
> > cat: /var/1wire/uncached/10.E2C746000800/temperature: Input/output
> error
> >      21.3125
> > [EMAIL PROTECTED] owfs]# cat /var/1wire/uncached/1*/temperature
> >         26.5     20.4375       19.75     15.9375      9.3125
> 22.125
> > 0.125     20.1875      21.375      26.625     18.4375     21.3125
> > [EMAIL PROTECTED] owfs]# cat /var/1wire/uncached/1*/temperature
> > cat: /var/1wire/uncached/10.061847000800/temperature: Input/output
> error
> > cat: /var/1wire/uncached/10.1A9246000800/temperature: Input/output
> error
> > cat: /var/1wire/uncached/10.233B40000800/temperature: Input/output
> error
> > cat: /var/1wire/uncached/10.2BD346000800/temperature: Input/output
> error
> > cat: /var/1wire/uncached/10.4D8746000800/temperature: Input/output
> error
> > cat: /var/1wire/uncached/10.5D1947000800/temperature: Input/output
> error
> >        0.125     20.1875        21.5     26.6875     18.4375
> 21.3125
> > [EMAIL PROTECTED] owfs]#
> > 
> > 
> > 
> > 
> > 
> > -------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc. Do you grep through
> log files
> > for problems?  Stop!  Download the new AJAX search engine that makes
> > searching your log files as easy as surfing the  web.  DOWNLOAD
> SPLUNK!
> >
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=1216
> 42
> > _______________________________________________
> > Owfs-developers mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/owfs-developers
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://sel.as-us.falkag.net/sel?cmd=k&kid3432&bid#0486&dat1642
> _______________________________________________
> Owfs-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/owfs-developers
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
>
http://sel.as-us.falkag.net/sel?cmd_____________________________________________
__
> Owfs-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/owfs-developers



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers

<<winmail.dat>>

Reply via email to