Hi Igor,
Another thing we have just spotted. The mq_receive does not seem to fail.
I have some code which will printf to stdout whenever a mq_receive occurs,
but this does not ever happen. the errors only seem to occur on
mq_timedsend.
This is really puzzling. We have now tried to linit the number of threads
in the system to reduce the number of queues we use but the problem is still
there.
Please can you give me any further thoughts you may have regarding this
problem.
Thanks,
Trev.
“Igor Kovalenko” <kovalenko@attbi.com> wrote in message
news:bpv334$kfq$1@inn.qnx.com…
I was also suspecting what David has said… just wanted to be sure you
don’t have anything going with signals of your own.
You might try to wrap the call to mq_receive into a loop, checking the
return code/errno for EINTR. If the errno happens to be EINTR, just keep
spinning, otherwise bail out for real. This is a common way of dealing
with
EINTR on systems that don’t support SA_RESTART feature.
– igor
“Trev Brown” <> trevorb@ieee.org> > wrote in message
news:bptf10$h78$> 1@inn.qnx.com> …
Hi Igor,
No signals are used in the application. We are doing mq_timedsend with
an
interval time of 5ms. Also to try and stop the signal we have masked
out
all the signals we can, but the EINTR signal still occurs(we assume that
this is because this signal cannot be masked).
Any idea why we would get this signal on a timedsend? We have also
semaphore locked the timedsend function in our code.
Thanks,
Trev.
“Igor Kovalenko” <> kovalenko@attbi.com> > wrote in message
news:bptb7d$emb$> 1@inn.qnx.com> …
EINTR means a syscall was interrupted by an asynchronous signal.
Do you use any signals in the application (for timers, etc) ?
“Trev Brown” <> trevorb@ieee.org> > wrote in message
news:bpt5i5$aib$> 1@inn.qnx.com> …
Hi all,
I am new to QNX and have come up against a problem in the
implementation/use
of POSIX message queues on a ppc platfrom. We are doing a timedsend
to
put
data into our queues and then a timedreceive to take data off the
queues.
The idea being that we send data to the queue at regular intervals
when
it
is ready to send.
As said we then do a timedsend to read data off the queues. If any
data
is
in the queue to be read we read from the queue. If NO we back off
for
a
timedinterval before trying to read from the queues again. When this
is
tried we get success at first but then plenty of “Didn’t send to
message
queue errors” acdcompanied by signal errors of type EINTR.
Everything
then
just grinds to a halt and our target crashes.
What is even more confusing is that on an x86 platform this works
well
with
no errors. Same code in each case.
Any idea what’s happenning? Any advice would be very appreciated.
Thanks in advance,
Trev.
\