[MDEV-6161] server hangs in simple query with large strings (myisam) Created: 2014-04-24 Updated: 2015-06-06 Resolved: 2015-06-06 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | OTHER |
| Affects Version/s: | 5.5.35, 5.5.36 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | vde | Assignee: | Unassigned |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | None | ||
| Environment: |
fedora-20 |
||
| Attachments: |
|
| Description |
|
some queries on sample table cause server hang:
with 0 disk activity hanging query:
while next query works fine (in 2.941s):
huffman_dist - small UDF which calculates "BIT_COUNT( a ^ b )' word-by-word for LONG hashes (I can attach compiled one) table in attachment |
| Comments |
| Comment by Elena Stepanova [ 2014-04-25 ] | |||||||
|
Hi, Yes, please attach the function. Can you (also) attach the source code? | |||||||
| Comment by vde [ 2014-04-25 ] | |||||||
|
binary for UDF huffman_dist | |||||||
| Comment by vde [ 2014-04-25 ] | |||||||
|
I'm too ashamed to this code will be here forever so I'll send it by email, OK? | |||||||
| Comment by Elena Stepanova [ 2014-04-25 ] | |||||||
|
Sure, please do. | |||||||
| Comment by Elena Stepanova [ 2014-04-25 ] | |||||||
|
Please also attach your cnf file(s) and/or output of SHOW VARIABLES.
| |||||||
| Comment by vde [ 2014-04-25 ] | |||||||
|
I reproduced this problem on debug server so I can try to help localize it on my side. PS. MariaDB built from sources by rpmbuild with attached SPEC | |||||||
| Comment by Elena Stepanova [ 2014-04-25 ] | |||||||
|
Can you get a stack trace from the running process while it is hanging? | |||||||
| Comment by Elena Stepanova [ 2014-06-01 ] | |||||||
|
Please comment to re-open the report when you have any new information. | |||||||
| Comment by vde [ 2014-06-04 ] | |||||||
|
Sorry for timeout. Unfortunately I can not debug on the production server, and on debug server the bug occures periodically and is not caught. | |||||||
| Comment by vde [ 2014-06-04 ] | |||||||
|
Oops, I can't add attachment | |||||||
| Comment by vde [ 2014-06-09 ] | |||||||
|
Seems that I can't add any attachments until reopening | |||||||
| Comment by Elena Stepanova [ 2014-06-09 ] | |||||||
|
Re-opened, now you should be able to add the attachments. | |||||||
| Comment by vde [ 2014-06-09 ] | |||||||
|
err.txt - "mysqladmin proc" just before hang trace.log - stack trace when some threads hangs | |||||||
| Comment by Elena Stepanova [ 2014-06-10 ] | |||||||
|
Hi, Thanks. Also, how is the CPU usage when it hangs? | |||||||
| Comment by vde [ 2014-06-10 ] | |||||||
|
Once, there is no so much time before hangs. CPU load about 0 - hanging threads don't eats CPU | |||||||
| Comment by Elena Stepanova [ 2014-06-10 ] | |||||||
|
What about stack traces during hanging (not before)? Do they look any different? I'm asking about stack traces and CPU because server that is really hanging (forever waiting for something) and server going through an endless loop often look the same – unavailable, irresponsive. The difference is that for a server in a loop consequent stack traces differ and CPU load is [relatively] high. Since your CPU is about 0, I assume it's not the case. | |||||||
| Comment by vde [ 2014-06-10 ] | |||||||
|
>stack traces during hanging (not before) Yes its seems that threads are waiting for events forever and eventually use up the entire thread pool so server comes irresponsive. | |||||||
| Comment by Elena Stepanova [ 2015-06-06 ] | |||||||
|
I tried again to reproduce it, but there is too much mystery in here. The query quoted in the description hangs in 'Sending data', which can be anything, no way to know without the stack trace and more information (complete process list etc.). It can even be a problem in the UDF function, e.g. something causing an endless loop (only in this case CPU usage should be noticeable). But the attached processlist and stack trace are from a different occasion, a query which starts with SELECT SQL_SMALL_RESULT h.id, h.hashv, huffman_dist(h.hashv,. It stops not on 'Sending data', but on 'Copying to tmp table'). Unfortunately, there is no complete query anywhere, so we can't even know why it wants to create a temporary table in the first place. Also, the stack trace does not look like something hanging, again it looks more like an endless loop – without a few consequent stack traces, there is no way to tell for sure. So, if the problem still exists, we need:
|