Lisp HUG Maillist Archive

Profiling oddity

Hello,

I would like to profile a multi-processing application.

The application reads and writes data on the serial port using non-blocking I/O.  The serial port is accessed with a thin lisp wrapper around the read, write and select Posix calls.

When I launch DO-PROFILING, the serial port process stops because of an error while reading the file descriptor: "Resource temporary unavailable".  I have noticed that I get the same error when using the stepper.

So, if the Serial I/O process is disrupted with the profiler or the stepper, accessing the file descriptor ends with an error from the operating system.  However if I use the stepper with another process, the error does not occur, which would tend to highlight some affinity between the lisp scheduler and operating system I/O.

I would be curious if someone has an idea on what could cause this error and how to work around it?


Best regards,
Camille


_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Re: Profiling oddity

I forgot to specify that this happens on Mac OS X.


On 27 août 2013, at 00:44, Camille Troillard <camille@osculator.net> wrote:

> Hello,
> 
> I would like to profile a multi-processing application.
> 
> The application reads and writes data on the serial port using non-blocking I/O.  The serial port is accessed with a thin lisp wrapper around the read, write and select Posix calls.
> 
> When I launch DO-PROFILING, the serial port process stops because of an error while reading the file descriptor: "Resource temporary unavailable".  I have noticed that I get the same error when using the stepper.
> 
> So, if the Serial I/O process is disrupted with the profiler or the stepper, accessing the file descriptor ends with an error from the operating system.  However if I use the stepper with another process, the error does not occur, which would tend to highlight some affinity between the lisp scheduler and operating system I/O.
> 
> I would be curious if someone has an idea on what could cause this error and how to work around it?
> 
> 
> Best regards,
> Camille
> 
> 
> _______________________________________________
> Lisp Hug - the mailing list for LispWorks users
> lisp-hug@lispworks.com
> http://www.lispworks.com/support/lisp-hug.html
> 


_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Re: Profiling oddity

OK, so I found the problem is in fact has nothing to do with LispWorks.  "Resource temporary unavailable" is EAGAIN, and must be dealt with when working with non-blocking I/O.  My process was stopping because of this unhanded error.

Now, I still wonder why the profiler happens to cause this error, since the processing is interrupted for so long.  I will try with different settings.

Sorry for the noise!


On 27 août 2013, at 00:44, Camille Troillard <camille@osculator.net> wrote:

> 
> Hello,
> 
> I would like to profile a multi-processing application.
> 
> The application reads and writes data on the serial port using non-blocking I/O.  The serial port is accessed with a thin lisp wrapper around the read, write and select Posix calls.
> 
> When I launch DO-PROFILING, the serial port process stops because of an error while reading the file descriptor: "Resource temporary unavailable".  I have noticed that I get the same error when using the stepper.
> 
> So, if the Serial I/O process is disrupted with the profiler or the stepper, accessing the file descriptor ends with an error from the operating system.  However if I use the stepper with another process, the error does not occur, which would tend to highlight some affinity between the lisp scheduler and operating system I/O.
> 
> I would be curious if someone has an idea on what could cause this error and how to work around it?
> 
> 
> Best regards,
> Camille
> 
> 
> _______________________________________________
> Lisp Hug - the mailing list for LispWorks users
> lisp-hug@lispworks.com
> http://www.lispworks.com/support/lisp-hug.html
> 


_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Updated at: 2020-12-10 08:35 UTC