Bug #41810 | Writing from Multiple threads to different tables crashes the application | ||
---|---|---|---|
Submitted: | 31 Dec 2008 18:55 | Modified: | 15 Feb 2009 13:07 |
Reporter: | Mikhail Veygman | Email Updates: | |
Status: | No Feedback | Impact on me: | |
Category: | MySQL Server: C API (client library) | Severity: | S3 (Non-critical) |
Version: | 5.0.51a | OS: | Linux (RHEL 5/Ubuntu 8.04) |
Assigned to: | CPU Architecture: | Any | |
Tags: | Multi thread crash |
[31 Dec 2008 18:55]
Mikhail Veygman
[1 Jan 2009 15:02]
Valeriy Kravchuk
Thank you for a problem report. Please, try to repeat with a newer version, 5.0.67 at least, and inform about the results.
[2 Jan 2009 15:47]
Mikhail Veygman
When running on 5.0.67 the server reports Error CR_COMMANDS_OUT_OF_SYNC. Does this imply that the multiple threads are not being internally arbitrated?
[2 Jan 2009 18:07]
Mikhail Veygman
Tested the same with 5.1.30. Error reporting of SERVER_LOST or SERVER_GONE during the execution or UNKNOWN_ERROR during the read.
[3 Jan 2009 0:04]
Mikhail Veygman
I think I found a problem that may be the cause. I the Connection object is created in one thread an used in a different thread while another connection object is used in the orignal thread the conflict may be producing such results. This would be a problem if the same connection will have to be used from within multiple threads.
[3 Jan 2009 13:10]
MySQL Verification Team
Could you please provide a C test case, it is hard to know if really is a bug you are reporting just describing the use and the error messages, please read: http://dev.mysql.com/doc/refman/5.0/en/threaded-clients.html "Two threads can't send a query to the MySQL server at the same time on the same connection. In particular, you have to ensure that between calls to mysql_query() and mysql_store_result(), no other thread is using the same connection." Thanks in advance.
[4 Jan 2009 16:35]
Mikhail Veygman
I will put together the example, but the documentation answers the issue I had.
[4 Jan 2009 16:37]
Mikhail Veygman
Actually not quite. The thread executions were performed on 2 different connections created within the same thread but from different threads. If the connections are created in different threads I have not observed the issue... yet.
[15 Jan 2009 13:07]
MySQL Verification Team
Changing to need feedback waiting for the C test case.
[16 Feb 2009 0:00]
Bugs System
No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open".