dispatch_handler returns -1

I have 2 simple resource managers written as dynamic loaded library
which declare 2 names each. Not depending on which library is loaded
first, the first call to dispatch_handler() returns -1 with errno=0!

I modified this morning an other application I wrote few months ago with
a thread pool. After rebuilding it I tried to execute it and surprised,
cpu load was 100% ?!?
After some investigations, I discovered that dispatch_handler() allways
return -1 with errno=0!!
BUT, it dispatch correctly all io_msg or io_read I send to it and
answers are correct.

I really don’t understand what is wrong. I suppose there is something, a
structure or I don’t know what, that I commonly set unproperly. What is
strange is that application was running correctly few months ago. Is
there something more critical in 6.1?

How dispatch_handler can return -1 with errno = 0?

Thanks,
Alain.

“Alain Bonnefoy” <alain.bonnefoy@icbt.com> wrote in message
news:3C1769EB.45EE46E8@icbt.com

I have 2 simple resource managers written as dynamic loaded library
which declare 2 names each. Not depending on which library is loaded
first, the first call to dispatch_handler() returns -1 with errno=0!

Does this occur if you load just one resource manager? I’ve written a small
resmgr as a DLL and I don’t see that behaviour. Is it possible that when
you load the second resource manager you’re interposing symbol names? How
are you compiling your DLL’s (ie what flags are you using). Perhaps take a
quick peek at the dlopen() docs, as they talk about symbol resolution which
may be of interest to you.

-Adam

Operating System Tech Support a écrit :

“Alain Bonnefoy” <> alain.bonnefoy@icbt.com> > wrote in message
news:> 3C1769EB.45EE46E8@icbt.com> …
I have 2 simple resource managers written as dynamic loaded library
which declare 2 names each. Not depending on which library is loaded
first, the first call to dispatch_handler() returns -1 with errno=0!

Does this occur if you load just one resource manager? I’ve written a small
resmgr as a DLL and I don’t see that behaviour. Is it possible that when
you load the second resource manager you’re interposing symbol names? How
are you compiling your DLL’s (ie what flags are you using). Perhaps take a
quick peek at the dlopen() docs, as they talk about symbol resolution which
may be of interest to you.

-Adam

I think there is no relationship between the dll and the resource manager
problem. I’m allmost sure there is something wrong in my resmgr init.
As I said, I have the same problem, but much more serious, in the executable I
talked about. In this last application, dispatch_handler() is continuously
returning -1.
It was declaring several names, I tried to remove all unecessary source code to
declare just one name and it’s the same. I’m going to investigate again today.
So, it could be helpfull if you could tell me in which circumstances
dispatch_handler() can return -1 without setting errno to an error value.

Thanks,
Alain.

I think there is no relationship between the dll and the resource manager
problem. I’m allmost sure there is something wrong in my resmgr init.

Can you post your code/testcase so that we can all see what you’re doing?

As I said, I have the same problem, but much more serious, in the
executable I
talked about. In this last application, dispatch_handler() is continuously
returning -1.
It was declaring several names, I tried to remove all unecessary source
code to
declare just one name and it’s the same. I’m going to investigate again
today.
So, it could be helpfull if you could tell me in which circumstances
dispatch_handler() can return -1 without setting errno to an error value.

If you receive a pulse message for which there is no default handler, or a
handler was called but the handler did not report the error properly.

-Adam

Operating System Tech Support a écrit :

I think there is no relationship between the dll and the resource manager
problem. I’m allmost sure there is something wrong in my resmgr init.

Can you post your code/testcase so that we can all see what you’re doing?

As I said, I have the same problem, but much more serious, in the
executable I
talked about. In this last application, dispatch_handler() is continuously
returning -1.
It was declaring several names, I tried to remove all unecessary source
code to
declare just one name and it’s the same. I’m going to investigate again
today.
So, it could be helpfull if you could tell me in which circumstances
dispatch_handler() can return -1 without setting errno to an error value.

If you receive a pulse message for which there is no default handler, or a
handler was called but the handler did not report the error properly.

-Adam

Ok, look at the gzipped tar file.

All names are declared in create_pathnames().

You can get a use message.

Normally, cpu load should be 100%.

Thanks a lot,
Alain.