Re: MyODBC, DBUG and multi-threaded clients

2001-09-11 Thread Peter Duffy

Hi Monty,

Michael Widenius wrote:
> 
> Hi!
> 
> > "Sinisa" == Sinisa Milivojevic <[EMAIL PROTECTED]> writes:
> 
> Sinisa> Peter Duffy writes:
> >> Hi Sinisa,
> >>
> >> My problems are within the mysqlclient and MyODBC libraries, both used
> >> directly by the application (and therefore all on the "client" side of
> >> the socket.) Both the mysqlclient and MyODBC libraries do (or in my case
> >> did) contain calls to the DBUG functions.
> >>
> >> Obviously, given the fact that the libraries are being called directly
> >> by the application, the amount of multi-threading done by the
> >> application is most emphatically relevant.
> 
> 
> 
> Just a note about this;  I have now updated the section
> 'How to Make a Thread-safe Client' with more information regarding
> this.  This should be available on our web site shortly.

Thanks - I'll look out for this.


Regards,
Peter

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: MyODBC, DBUG and multi-threaded clients

2001-09-10 Thread Peter Duffy

Hi Monty,

Michael Widenius wrote:
> 
> Hi!
> 
> I have a small comment to this.
> 
> 
> Note that you will get crashes in the DBUG package if you call any
> MySQL function inside a thread that hasn't called mysql_init() or
> mysql_connect().
> 
> If you want to use MySQL functions in threads that doesn't call the
> above functions, you need to call my_thread_init() at the start of the
> thread and my_thread_end() before the thread ends.
> 
> If you think that the DBUG functions are the ones that is causing
> problems, you can always recompile MySQL without --with-debug, in
> which the DBUG macros will not generate any code.
> 
> Regards,
> Monty

Thanks very much for this: I will check the application for these calls. 

Regards,
Peter

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: MyODBC, DBUG and multi-threaded clients

2001-09-06 Thread Michael Widenius


Hi!

I have a small comment to this.

> "Sinisa" == Sinisa Milivojevic <[EMAIL PROTECTED]> writes:



>> I have no interest in any other clients except possibly to investigate
>> whether or not they produced anything like the same behaviour that I am
>> observing with my own application. 
>> 
>> My only key objective is to fix my application, which, to repeat again,
>> is coredumping during calls to DBUG functions within the mysqlclient and
>> MyODBC libraries.
>> 
>> Regards,
>> Peter
>> 

Sinisa> Exactly what I mean. There are several multithreaded clients out there
Sinisa> all using libmysqlclient and some MyODBC and none of them  experience
Sinisa> the problems you describe. 

Note that you will get crashes in the DBUG package if you call any
MySQL function inside a thread that hasn't called mysql_init() or
mysql_connect().


If you want to use MySQL functions in threads that doesn't call the
above functions, you need to call my_thread_init() at the start of the
thread and my_thread_end() before the thread ends.

If you think that the DBUG functions are the ones that is causing
problems, you can always recompile MySQL without --with-debug, in
which the DBUG macros will not generate any code.

Regards,
Monty

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: MyODBC, DBUG and multi-threaded clients

2001-09-06 Thread Michael Widenius


Hi!

> "Sinisa" == Sinisa Milivojevic <[EMAIL PROTECTED]> writes:

Sinisa> Peter Duffy writes:
>> Hi Sinisa,
>> 
>> My problems are within the mysqlclient and MyODBC libraries, both used
>> directly by the application (and therefore all on the "client" side of
>> the socket.) Both the mysqlclient and MyODBC libraries do (or in my case
>> did) contain calls to the DBUG functions. 
>> 
>> Obviously, given the fact that the libraries are being called directly
>> by the application, the amount of multi-threading done by the
>> application is most emphatically relevant.



Just a note about this;  I have now updated the section
'How to Make a Thread-safe Client' with more information regarding
this.  This should be available on our web site shortly.

Regards,
Monty

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: MyODBC, DBUG and multi-threaded clients

2001-09-05 Thread Sinisa Milivojevic

Peter Duffy writes:
> Hi Sinisa,
> 
> My problems are within the mysqlclient and MyODBC libraries, both used
> directly by the application (and therefore all on the "client" side of
> the socket.) Both the mysqlclient and MyODBC libraries do (or in my case
> did) contain calls to the DBUG functions. 
> 
> Obviously, given the fact that the libraries are being called directly
> by the application, the amount of multi-threading done by the
> application is most emphatically relevant.
> 

First of all DBUG_* are not functions but macros and very simple
macros for that fact.

And if there was a bug in any of those macros, it would have surfaced
in our server or in any of our multi-threaded client, like
mysqlmanager.


> 
> I have no interest in any other clients except possibly to investigate
> whether or not they produced anything like the same behaviour that I am
> observing with my own application. 
> 
> My only key objective is to fix my application, which, to repeat again,
> is coredumping during calls to DBUG functions within the mysqlclient and
> MyODBC libraries.
> 
> Regards,
> Peter
> 

Exactly what I mean. There are several multithreaded clients out there
all using libmysqlclient and some MyODBC and none of them  experience
the problems you describe. 

-- 
Regards,
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic <[EMAIL PROTECTED]>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, FullTime Developer
/_/  /_/\_, /___/\___\_\___/   Larnaca, Cyprus
   <___/   www.mysql.com


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: MyODBC, DBUG and multi-threaded clients

2001-09-04 Thread Peter Duffy

Hi Sinisa,


Sinisa Milivojevic wrote:
> 
> Peter Duffy writes:
> > Hi Sinisa,
> >
> >
> > Do you know of any which are specifically accessed by multi-threaded
> > client applications via ODBC? (If so, I'd really like to know, so that I
> > can try to get hold of copies of the client applications to test in my
> > own environment.)
> >
> 
> As you very well know, it is completely irrelevant what kind of
> multi-threaded program it is. Those function perform the same
> regardless if programs listents to the socket or write to the
> socket. DBUG functions have got nothing to do with that.

My problems are within the mysqlclient and MyODBC libraries, both used
directly by the application (and therefore all on the "client" side of
the socket.) Both the mysqlclient and MyODBC libraries do (or in my case
did) contain calls to the DBUG functions. 

Obviously, given the fact that the libraries are being called directly
by the application, the amount of multi-threading done by the
application is most emphatically relevant.

> 
> There are many such programs utilizing DBUG functions, like
> mysqlmanagers in tool directory of 4.0.
> 
> Then several GUI clients. Practically dozens of them. Some of those
> GUI clients utilizing ODBC. Do some research on your side.

I have no interest in any other clients except possibly to investigate
whether or not they produced anything like the same behaviour that I am
observing with my own application. 

My only key objective is to fix my application, which, to repeat again,
is coredumping during calls to DBUG functions within the mysqlclient and
MyODBC libraries.

Regards,
Peter

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: MyODBC, DBUG and multi-threaded clients

2001-09-04 Thread Sinisa Milivojevic


Peter Duffy writes:
> Hi Sinisa,
> 
> 
> Do you know of any which are specifically accessed by multi-threaded
> client applications via ODBC? (If so, I'd really like to know, so that I
> can try to get hold of copies of the client applications to test in my
> own environment.)
> 


As you very well know, it is completely irrelevant what kind of
multi-threaded program it is. Those function perform the same
regardless if programs listents to the socket or write to the
socket. DBUG functions have got nothing to do with that.

There are many such programs utilizing DBUG functions, like
mysqlmanagers in tool directory of 4.0.

Then several GUI clients. Practically dozens of them. Some of those
GUI clients utilizing ODBC. Do some research on your side.

> 
> I'm sorry about your experiences with mpatrol. As I've said, I find it
> superb: it has already been of enormous assistance in fixing memory
> leaks, and in the current situation it gave me information that I could
> not have gained otherwise. Also, I've always found the author of mpatrol
> to be highly responsive and helpful.
> 
> I have not used dmalloc.
> 
> Best regards,
> Peter
> 


Oh, I had no problems by authors of either mpatrol and dmalloc. I just
got reply that my problems lie beyond scopes of their programs and
that they will do it one day when they have time, which is OK.

-- 
Regards,
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic <[EMAIL PROTECTED]>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, FullTime Developer
/_/  /_/\_, /___/\___\_\___/   Larnaca, Cyprus
   <___/   www.mysql.com


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: MyODBC, DBUG and multi-threaded clients

2001-09-03 Thread Peter Duffy

Hi Sinisa,

Sinisa Milivojevic wrote:

> As an example, mysql server is a multi-threaded program and when
> compile --with-debug it uses DBUG function.

I know. As I said, one of my main problems is that MyODBC does not have
a --without-debug option.

> 
> There are literally thousands and thousands of locations where mysql
> server built for debugging is running, without a single problem being
> caused by those routines.

Do you know of any which are specifically accessed by multi-threaded
client applications via ODBC? (If so, I'd really like to know, so that I
can try to get hold of copies of the client applications to test in my
own environment.)

> 
> Furthermore, these routines have not been changed for years and have
> been  thoroughly checked with Purify and Pure Coverage which are much
> better tools then mpatrol.

I don't doubt that the routines have been thoroughly checked. However, I
am talking about specific problems and specific observations in my own
work. The application coredumped; the backtraces (persistently) pointed
me at the DBUG_ calls in MyODBC; I commented-out the calls; the
situation vastly improved. If you could suggest an alternative
explanation and approach, I'd be happy to hear it. 

> 
> I have my own reservations regarding mpatrol and dmalloc. None of
> them, for example, worked with my C++ programs. They just crashed/
> refused to work. I have tried latest versions and wrote to the
> authors. That was more then one year ago. It is possible that
> meanwhile this situation has been fixed.

I'm sorry about your experiences with mpatrol. As I've said, I find it
superb: it has already been of enormous assistance in fixing memory
leaks, and in the current situation it gave me information that I could
not have gained otherwise. Also, I've always found the author of mpatrol
to be highly responsive and helpful.

I have not used dmalloc.

Best regards,
Peter

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: MyODBC, DBUG and multi-threaded clients

2001-09-03 Thread Sinisa Milivojevic

Peter Duffy writes:
> 
> Versions:
> 
> Linux: Redhat 6.2, kernel 2.2.16-3 (using Terje Malmedal's coredump
> patch from http://www.movement.uklinux.net - there are a number of
> patches addressing the threaded coredump issue, but this one was
> specific for my kernel and it sure as hell did the business 8))
> 
> OpenLDAP:  originally 2.0.7, then 2.0.11.
> 
> mysql: 3.23.38
> 
> MyODBC: 2.50.33
> 
> libiodbc: 3.0.5
> 
> mpatrol: 1.4.5 (http://www.cbmamiga.demon.co.uk/mpatrol)
> 

Hi!

As an example, mysql server is a multi-threaded program and when
compile --with-debug it uses DBUG function.

There are literally thousands and thousands of locations where mysql
server built for debugging is running, without a single problem being
caused by those routines.

Furthermore, these routines have not been changed for years and have
been  thoroughly checked with Purify and Pure Coverage which are much
better tools then mpatrol.

I have my own reservations regarding mpatrol and dmalloc. None of
them, for example, worked with my C++ programs. They just crashed/
refused to work. I have tried latest versions and wrote to the
authors. That was more then one year ago. It is possible that
meanwhile this situation has been fixed.

-- 
Regards,
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic <[EMAIL PROTECTED]>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, FullTime Developer
/_/  /_/\_, /___/\___\_\___/   Larnaca, Cyprus
   <___/   www.mysql.com


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php