Re: Process hanging on 6.0-STABLE

2006-03-30 Thread David Xu
在 Friday 31 March 2006 08:38,Daniel O'Connor 写道:
> On Wednesday 22 March 2006 23:49, Daniel O'Connor wrote:
> > On Wednesday 22 March 2006 18:41, David Xu wrote:
> > > > The problem is that every now and then the process gets stuck and
> > > > becomes unkillable just after forking, ie..
> > >
> > > Are you using pthreads ?
> >
> > Nope.
> 
> Hmm I just found I had an FD leak - I am not sure if it's related.
> 
> Interestingly I had ~1046 FDs open and FD_SET wasn't working properly, eg...
> fd_setfds;
> int   fd;
> 
> fd = 1046;
> FD_ZERO(&fds);
> FD_SET(fd, &fds);
> 
> Results in fds being empty :(
> 
> Does anyone know if that is expected behaviour? And whether this problem 
could 
> cause the second one (eg tickle a bug).
> 
> Thanks.
> 
> -- 
> Daniel O'Connor software and network engineer
> for Genesis Software - http://www.gsoft.com.au
> "The nice thing about standards is that there
> are so many of them to choose from."
>   -- Andrew Tanenbaum
> GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C
> 
In /sys/sys/select.h :
#ifndef FD_SETSIZE
#define FD_SETSIZE  1024U
#endif

so you should define FD_SETSIZE if you have fd which is larger than 1024.

Regards,
David Xu
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Process hanging on 6.0-STABLE

2006-03-30 Thread Daniel O'Connor
On Wednesday 22 March 2006 23:49, Daniel O'Connor wrote:
> On Wednesday 22 March 2006 18:41, David Xu wrote:
> > > The problem is that every now and then the process gets stuck and
> > > becomes unkillable just after forking, ie..
> >
> > Are you using pthreads ?
>
> Nope.

Hmm I just found I had an FD leak - I am not sure if it's related.

Interestingly I had ~1046 FDs open and FD_SET wasn't working properly, eg...
fd_set  fds;
int fd;

fd = 1046;
FD_ZERO(&fds);
FD_SET(fd, &fds);

Results in fds being empty :(

Does anyone know if that is expected behaviour? And whether this problem could 
cause the second one (eg tickle a bug).

Thanks.

-- 
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
  -- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C


pgpMhLAF0G4Tg.pgp
Description: PGP signature


Re: Process hanging on 6.0-STABLE

2006-03-22 Thread Daniel O'Connor
On Wednesday 22 March 2006 18:41, David Xu wrote:
> > The problem is that every now and then the process gets stuck and becomes
> >  unkillable just after forking, ie..
>
> Are you using pthreads ?

Nope.

-- 
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
  -- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C


pgpnn4HoQij9A.pgp
Description: PGP signature


Re: Process hanging on 6.0-STABLE

2006-03-22 Thread David Xu
在 Wednesday 22 March 2006 15:25,Daniel O'Connor 写道:
> Hi,
> I work for a small company that makes radar systems for research 
> organisations and we use FreeBSD on the PCs for data acquisition and 
> processing. We have recently shifted to FreeBSD6/amd64 and one machine in 
> particular is exhibiting a strange problem.
> 
> The acquisition process is a Tcl interpreter with a largish chunk of C code
>  which talks to the hardware (via RS485 and a custom PCI card). Once the 
> system is set up it streams data back via the PCI card and runs it through
>  various data processors (eg dump raw data to disk, FFT, winds, etc..). 
> 
> The actual forking of processes is handled in Tcl and the C code only gets
>  involved to write the data out (to an FD the Tcl layer keeps).
> 
> The problem is that every now and then the process gets stuck and becomes
>  unkillable just after forking, ie..
Are you using pthreads ?

David Xu
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"