UEK3/Beta 1 - Using USDT stucks mysqld to 100% CPU
Hello,
To follow up with some DTrace testing, I've enabled USDT with MySQL 5.6.13 CE on Oracle Linux 6.4 with UEK3/DTrace and this is what I get:
1/- To install MySQL:
I've changed the cmake/dtrace.cmake file as below:
git diff dtrace.cmake
diff --git a/dtrace.cmake b/dtrace.cmake
index 771a28b..5539368 100644
--- a/dtrace.cmake
+++ b/dtrace.cmake
@@ -93,7 +93,7 @@ FUNCTION(DTRACE_INSTRUMENT target)
ADD_DEPENDENCIES(${target} gen_dtrace_header)
# Invoke dtrace to generate object file and link it together with target.
- IF(CMAKE_SYSTEM_NAME MATCHES "SunOS")
+ IF(CMAKE_SYSTEM_NAME MATCHES "SunOS" OR CMAKE_SYSTEM_NAME MATCHES "Linux")
SET(objdir ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${target}.dir)
SET(outfile ${objdir}/${target}_dtrace.o)
GET_TARGET_PROPERTY(target_type ${target} TYPE)
@@ -151,7 +151,7 @@ ENDFUNCTION()
# run them again through dtrace -G to generate an ELF file that links
# to mysqld.
MACRO (DTRACE_INSTRUMENT_STATIC_LIBS target libs)
-IF(CMAKE_SYSTEM_NAME MATCHES "SunOS" AND ENABLE_DTRACE)
+IF((CMAKE_SYSTEM_NAME MATCHES "SunOS" OR CMAKE_SYSTEM_NAME MATCHES "Linux") AND ENABLE_DTRACE)
# Filter out non-static libraries in the list, if any
SET(static_libs)
FOREACH(lib ${libs})
You can follow the instructions here MySQL :: MySQL 5.6 Reference Manual :: 2.9.2 Installing MySQL Using a Standard Source Distribution
2/- Probes are available from mysqld:
dtrace -c /usr/local/mysql/bin/mysqld -l |grep "query-exec-start"
123 mysql21269 mysqld _ZN13sp_instr_stmt9exec_coreEP3THDPj query-exec-start
124 mysql21269 mysqld _Z11mysql_parseP3THDPcjP12Parser_state query-exec-start
125 mysql21269 mysqld _ZN18Prepared_statement7executeEP6Stringb query-exec-start
126 mysql21269 mysqld _Z17mysql_open_cursorP3THDP13select_resultPP18Server_side_cursor query-exec-start
923 mysql21349 mysqld _ZN13sp_instr_stmt9exec_coreEP3THDPj query-exec-start
924 mysql21349 mysqld _Z11mysql_parseP3THDPcjP12Parser_state query-exec-start
925 mysql21349 mysqld _ZN18Prepared_statement7executeEP6Stringb query-exec-start
926 mysql21349 mysqld _Z17mysql_open_cursorP3THDP13select_resultPP18Server_side_cursor query-exec-start
3/- MySQL is working; however when we start DTrace
ps -fu mysql
UID PID PPID C STIME TTY TIME CMD
mysql 21269 21166 0 21:38 pts/3 00:00:01 /usr/local/mysql/bin/mysqld --basedir=/usr/
# dtrace -n :mysqld::'{ trace(arg0); }'
dtrace: description ':mysqld::' matched 162 probes
It becomes impossible to use the server; one of the mysqld thread uses 100% CPU like in the top below:
top - 21:59:34 up 3:56, 4 users, load average: 1.00, 0.98, 1.09
Tasks: 22 total, 1 running, 21 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.0%us, 50.2%sy, 0.0%ni, 49.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.2%st
Mem: 2040288k total, 1654172k used, 386116k free, 26216k buffers
Swap: 4194300k total, 2624k used, 4191676k free, 878564k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
21362 mysql 20 0 1013m 438m 5616 R 100.2 22.0 4:56.39 mysqld
21269 mysql 20 0 1013m 438m 5616 S 0.0 22.0 0:00.81 mysqld
21273 mysql 20 0 1013m 438m 5616 S 0.0 22.0 0:00.01 mysqld
21274 mysql 20 0 1013m 438m 5616 S 0.0 22.0 0:00.02 mysqld
21275 mysql 20 0 1013m 438m 5616 S 0.0 22.0 0:00.01 mysqld
Trying to strace to process just kills it.
It might be that the build process is just plain wrong considering USDT use is not documented yet. However, you might want to have a look.
Best Regards,
Gregory
Hello,
For more information, below is the strace output when I attach to the process:
# strace -f -p 21269
Process 21269 attached with 22 threads - interrupt to quit
[pid 21293] rt_sigtimedwait([HUP QUIT ALRM TERM TSTP], NULL, NULL, 8 <unfinished ...>[pid 21292] restart_syscall(<... resuming interrupted call ...> <unfinished ...>[pid 21291] restart_syscall(<... resuming interrupted call ...> <unfinished ...>[pid 21290] futex(0x1688b84, FUTEX_WAIT_PRIVATE, 1, NULL <unfinished ...>[pid 21362] --- SIGILL (Illegal instruction) @ 0 (0) ---
[pid 21289] select(0, NULL, NULL, NULL, {0, 2862} <unfinished ...>[pid 21288] futex(0x16889d4, FUTEX_WAIT_PRIVATE, 3, NULL <unfinished ...>[pid 21287] select(0, NULL, NULL, NULL, {0, 966463} <unfinished ...>[pid 21286] restart_syscall(<... resuming interrupted call ...> <unfinished ...>[pid 21285] restart_syscall(<... resuming interrupted call ...> <unfinished ...>[pid 21284] restart_syscall(<... resuming interrupted call ...> <unfinished ...>[pid 21282] io_getevents(139912766763008, 1, 256, <unfinished ...>[pid 21281] io_getevents(139912766775296, 1, 256, <unfinished ...>[pid 21280] io_getevents(139912766787584, 1, 256, <unfinished ...>[pid 21279] io_getevents(139912766799872, 1, 256, <unfinished ...>[pid 21278] io_getevents(139912767021056, 1, 256, <unfinished ...>[pid 21277] io_getevents(139912767033344, 1, 256, <unfinished ...>[pid 21276] io_getevents(139913278910464, 1, 256, <unfinished ...>[pid 21275] io_getevents(139913278922752, 1, 256, <unfinished ...>[pid 21274] io_getevents(139912767008768, 1, 256, <unfinished ...>[pid 21362] write(2, "20:01:59 UTC - mysqld got signal"..., 37 <unfinished ...>[pid 21273] io_getevents(139912766996480, 1, 256, <unfinished ...>[pid 21362] <... write resumed> ) = 37
[pid 21269] restart_syscall(<... resuming interrupted call ...> <unfinished ...>[pid 21362] write(2, "This could be because you hit a "..., 226) = 226
[pid 21362] write(2, "We will try our best to scrape u"..., 177) = 177
[pid 21362] write(2, "key_buffer_size=8388608\n", 24) = 24
[pid 21362] write(2, "read_buffer_size=131072\n", 24) = 24
[pid 21362] write(2, "max_used_connections=1\n", 23) = 23
[pid 21362] write(2, "max_threads=151\n", 16) = 16
[pid 21362] write(2, "thread_count=1\n", 15) = 15
[pid 21362] write(2, "connection_count=1\n", 19) = 19
[pid 21362] write(2, "It is possible that mysqld could"..., 139) = 139
[pid 21362] write(2, "Hope that's ok; if not, decrease"..., 66) = 66
[pid 21362] write(2, "Thread pointer: 0x166a170\n", 26) = 26
[pid 21362] write(2, "Attempting backtrace. You can us"..., 159) = 159
[pid 21362] futex(0x3a1d191600, FUTEX_WAKE_PRIVATE, 2147483647) = 0
[pid 21289] <... select resumed> ) = 0 (Timeout)
[pid 21289] gettimeofday({1378670519, 5535}, NULL) = 0
[pid 21289] gettimeofday({1378670519, 5692}, NULL) = 0
[pid 21289] select(0, NULL, NULL, NULL, {1, 0} <unfinished ...>[pid 21362] write(2, "stack_bottom = 7f3fed4a6e28 thre"..., 49) = 49
[pid 21362] writev(2, [{"/usr/local/mysql/bin/mysqld", 27}, {"(", 1}, {"my_print_stacktrace", 19}, {"+0x", 3}, {"35", 2}, {")", 1}, {"[0x", 3}, {"8d8ce5", 6}, {"]\n", 2}], 9) = 64
[pid 21362] writev(2, [{"/usr/local/mysql/bin/mysqld", 27}, {"(", 1}, {"handle_fatal_signal", 19}, {"+0x", 3}, {"40b", 3}, {")", 1}, {"[0x", 3}, {"64df1b", 6}, {"]\n", 2}], 9) = 65
[pid 21362] writev(2, [{"/lib64/libpthread.so.0", 22}, {"[0x", 3}, {"3a1d20f500", 10}, {"]\n", 2}], 4) = 37
[pid 21362] writev(2, [{"/lib64/libc.so.6", 16}, {"(", 1}, {"shutdown", 8}, {"+0x", 3}, {"b", 1}, {")", 1}, {"[0x", 3}, {"3a1cee99cb", 10}, {"]\n", 2}], 9) = 45
[pid 21362] writev(2, [{"/usr/local/mysql/bin/mysqld", 27}, {"(", 1}, {"vio_shutdown", 12}, {"+0x", 3}, {"16d", 3}, {")", 1}, {"[0x", 3}, {"b4098d", 6}, {"]\n", 2}], 9) = 58
[pid 21362] writev(2, [{"/usr/local/mysql/bin/mysqld", 27}, {"(", 1}, {"_ZN3THD10disconnectEv", 21}, {"+0x", 3}, {"50", 2}, {")", 1}, {"[0x", 3}, {"69af80", 6}, {"]\n", 2}], 9) = 66
[pid 21362] writev(2, [{"/usr/local/mysql/bin/mysqld", 27}, {"(", 1}, {"_Z16close_connectionP3THDj", 26}, {"+0x", 3}, {"21", 2}, {")", 1}, {"[0x", 3}, {"579ef1", 6}, {"]\n", 2}], 9) = 71
[pid 21362] writev(2, [{"/usr/local/mysql/bin/mysqld", 27}, {"(", 1}, {"_Z24do_handle_one_connectionP3TH"..., 33}, {"+0x", 3}, {"132", 3}, {")", 1}, {"[0x", 3}, {"69fac2", 6}, {"]\n", 2}], 9) = 79
[pid 21362] writev(2, [{"/usr/local/mysql/bin/mysqld", 27}, {"(", 1}, {"handle_one_connection", 21}, {"+0x", 3}, {"42", 2}, {")", 1}, {"[0x", 3}, {"69fbd2", 6}, {"]\n", 2}], 9) = 66
[pid 21362] writev(2, [{"/usr/local/mysql/bin/mysqld", 27}, {"(", 1}, {"pfs_spawn_thread", 16}, {"+0x", 3}, {"127", 3}, {")", 1}, {"[0x", 3}, {"912e27", 6}, {"]\n", 2}], 9) = 62
[pid 21362] writev(2, [{"/lib64/libpthread.so.0", 22}, {"[0x", 3}, {"3a1d207851", 10}, {"]\n", 2}], 4) = 37
[pid 21362] writev(2, [{"/lib64/libc.so.6", 16}, {"(", 1}, {"clone", 5}, {"+0x", 3}, {"6d", 2}, {")", 1}, {"[0x", 3}, {"3a1cee894d", 10}, {"]\n", 2}], 9) = 43
[pid 21362] write(2, "\nTrying to get some variables.\nS"..., 89) = 89
[pid 21362] write(2, "Query (0): ", 11) = 11
[pid 21362] gettid() = 21362
[pid 21362] open("/proc/self/task/21362/mem", O_RDONLY) = -1 EACCES (Permission denied)
[pid 21362] write(2, "is an invalid pointer\n", 22) = 22
[pid 21362] write(2, "Connection ID (thread ID): 1\n", 29) = 29
[pid 21362] write(2, "Status: KILL_CONNECTION\n\n", 25) = 25
[pid 21362] write(2, "The manual page at http://dev.my"..., 145) = 145
[pid 21362] exit_group(1) = ?
Process 21362 detached
I wish it can help you. Best Regards, Gregory
Similar Messages
-
I'm running firefox 11 on Win 7 Ultimate. For the last 2 weeks it is pegging out the cpu at 100% and this is with 3 tabs open. I close it and check the task manager it stays open. I have to end the process. I then reopen and all is good. It will work for a while but flash constantly crashes in youtube (not saying that is a firefox problem) but I don't get this cpu usage. Using 600 MB RAM and 100% cpu with 3 tab...come on now. So, any ideas what is going on?
Hi laytoncy,
Have you looked at our [https://support.mozilla.org/en-US/kb/firefox-slow-or-takes-too-long-start performance troubleshooting section]? There is a lot of good information in there that should help.
Hopefully this helps! -
My ipod touch is stuck up at Apple Logo, I have tried to update and restore through ITunes but no use, It stuck up again at Apple Logo with no Error, after restoring ITunes showes your ipod is restore but still apple logo won't go, Due to new Laptop, I do not have any backup, therefore i have tried to select new Ipod touch and goes through step by step procedure but no use, Please help what to do?
i tried reseting my ipod today and had a similar problem... it wont be recognized by itunes, the only thing i havent tried is putting it into DFU mode, or the state that it is in when u recieve it telling u to connect it to itunes.i recommend putting it into DFU mode. http://www.youtube.com/watch?v=34v8HMC9B98 this should better explain it. if i find another way, ill keep u updated
-
Current platform : Linux
Current firefox version : Firefox 4 beta 12
Issue : does not update to RC 1 using the check for update feature.
Background : previously downloaded beta 8 and then it automatically updated to beta 12 using update features but for RC1, it does not.
I know users under Windows platform had same problem but was resolved and they can now update via check for update feature.
Please implement for Linux users too.
Thanks !!If you can't update then you can download and install the full Firefox 4 RC version.
* http://www.mozilla.com/firefox/all-beta.html -
How can we say if Join better than using Sub Queries ??
Hi all,
I am trying to understand the rationale behind "Is _Inner Join_ better than using _Sub Query_ ?" for this scenario ...
I have these tables --
Table1 { *t1_Col_1* (PrimaryKey), t1_Col_2, t1_Col_3, t1_Col_4 }
-- Number of rows = ~4Million , t1_Col_3 has say 60% entries non-zero -----> (Condition 4)
Table2 { *t2_Col_1* (PK), t2_Col_2, t2_Col_3 }
-- Number of rows = ~150Million, t2_Col_2 maps to t1_Col_1 -----> (Condition 1). This means for every distinct value of t1_Col_1 (its PK) we'll have multiple rows in Table2.
Table3 { *t3_Col_1* (PK), t3_Col_2, t3_Col_3 }
-- Number of rows = ~50K, t3_Col_1 maps to t1_Col_2 -----> (Condition 2)
Table4 { *t4_Col_1* (PK), t4_Col_2, t4_Col_3 }
-- Number of rows = ~1K, t4_Col_2 maps to t3_Col_2 -----> (Condition 3)
Now here are the 2 queries: -
Query using direct join --
SELECT t1_Col_1, t2_Col_1, t3_Col_1, t4_Col_2
FROM Table1, Table2, Table3, Table4
WHERE t1_Col_1=t2_Col_2 -- Condition 1
AND t1_Col_2=t3_Col_1 -- Condition 2
AND t3_Col_2=t4_Col_1 -- Condition 3
AND t1_Col_3 != 0
Query using SubQuery --
SELECT t1_Col_1, t2_Col_1, t3_Col_1, t4_Col_2
FROM Table2,
(SELECT t1_Col_1, t3_Col_1, t4_Col_2
FROM Table1,Table3, Table4
WHERE
AND t1_Col_2=t3_Col_1 -- Condition 2
AND t3_Col_2=t4_Col_1 -- Condition 3
AND t1_Col_3!= 0
WHERE t1_Col_1=t2_Col_2 -- Condition 1
Now the golden question is - How can I document with evidence that Type-1 is better than Type-2 or the other way ? I think the 3 things in comparison are: -
- Number of rows accessed (Type-1 better ?)
- Memory/Bytes used (Again Type-1 better ?)
- Cost ( ?? )
(PS - testing on both MySQL, Oracle10g)
Thanks,
ASo, is it right to conclude that Optimizer uses the optimal path and then processes the query resulting in nearly the same query execution time ?If the optimizer transforms two queries so that they end up the same, then they will run in the same time. Of course, sometimes it cannot do so because of the the way the data is defined (nulls are often a factor; constraints can help it) or the way the query is written, and sometimes it misses a possible optimization due to inaccurate statistics or other information not available to it, or limitations of the optimizer itself.
Is this the right place to ask for MySQL optimization ?Probably not. -
I need to upgrade from 10.5.8 to 6.0 or better to use a new HP wireless printer. How do I find the right item to download?
There is no download; you need to buy a Mac OS X 10.6 DVD.
(83218) -
I Mini with an i7 processor. I would like to use Boot Camp to install windows based CAD software on my MAC. Would it be better to use a plugin external hard drive to load my software on and if so what hard drive would you recommend?
Thank you for your quick response. I can then use a ZIP drive for data storage. I want to keep as much of my hard drive free of data as possible.
-
I have a Mac pro(1 free bay) and a mac mini I need to back up both of them (time machine) Is it better to use an external NAS HD or an internal hard drive on my mac pro (mid 2010)
What option has the faster GB/s?Disk drive using native SATA bus interface will allow the drive to copy and always present and ready.
But once you have backup any hourly changes should be smaller and as long as the NAS and your switch should allow enough.
You should always have off line backups and don't rely on just one backup set or just TimeMachine.
WD RED models are designed for RAID and NAS and 7.2k instead of your more standard slower green 5400 rpm green models while still costing less than WD Blacks.
http://www.amazon.com/gp/product/B008JJLW4M/
How to clone your system:
http://macperformanceguide.com/Mac-HowToClone-backup.html
http://macperformanceguide.com/Mac-HowToClone.html
http://www.macupdate.com/app/mac/7032/carbon-copy-cloner
Using Cloning as a Backup Strategy
http://www.macupdate.com/app/mac/7032/carbon-copy-cloner
http://www.bombich.com/software/updates/ccc-3.5.html
Clone to internal, TimeMachine to NAS is one way to go at it. -
Which one better to use - jsp:useBean or import statement
Hi,
I just want to know that which one is better to use jsp:useBean or import statement .
I can instantiate and call method of myclass -
1) by importing the class through import tag in jsp as <%@page import="myclass"%. or
2). by using <jsp:useBean tag....
i have these two option to do the same thing. i know that basically useBean is used to call setter and getter method of bean class and but it can be used to call a normal java file that have some logic .
so what should i used , which one is better and why?
useBean provides scope and object instance so no need to create object by new operator. and with import you have to create an instance .
but which tag should i use in my jsp?
i am confused???ok, means i can use jsp:useBean tag for all my
classes that are not actually bean. so it will be
instantiated at run time and provide efficiency .No. Jsp:useBean is used for java bean components.
>
but when should i use import statement in my jsp and
it happen at translation time so will it create any
type of burden for my code if i import multiple
classes.For non-java beans, you need to import the classes, period.
It's not a burden, it's a necessity. -
Which is better to use in a corprate enviornment for back up Windows 2008 Vs. Mozy
Which is better to use in a corprate enviornment for back up Windows 2008 Vs. Mozy
Hi,
Microsoft provide the built-in backup utility Windows Server Backup to backup Windows server 2008. For more detailed information, please refer to the articles below:
Windows Server Backup Step-by-Step Guide for Windows Server 2008
http://technet.microsoft.com/en-us/library/cc770266(v=ws.10).aspx
Save big bucks without risk: Get the most from Windows Server 2008 Backup Utility
http://www.techrepublic.com/blog/data-center/save-big-bucks-without-risk-get-the-most-from-windows-server-2008-backup-utility/
Please Note: Since the website is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
For Microsoft does not provide any third party software, you need to check with the third party software yourself.
Regards,
We
are trying to better understand customer views on social support experience, so your participation in this
interview project would be greatly appreciated if you have time.
Thanks for helping make community forums a great place. -
Why assertion instead of if statement ? Which is better to use ?
Why assertion instead of if statement ? Which is better to use ?
Never assertion instead of if statement. The two have fundamentally different intents. Using assert to control program flow is a bad idea
-
What is better to use: digital out or 5 channel speaker level out
Hi
Is it better to use digital out on sound card or 5 channel speaker level output?If you could explain it to me...(i'm new so that's why i am asking this)
Thank youFirst you need to determine what options you have, if you have an amp/decoder
use digital out because that then frees up the line-outs which you can use for other devices. Quality wise not much difference. -
What is better ti use entourage or my .mac account to vidoe chat?
What is better to use entourage or my .mac account to video chat?
How do I add a buddy into my entourage buddy list?
Message was edited by: fotomikeEntourage is a Microsoft application and is probably Linked to MSN for Mac.
I have Office:Mac 2000 and this version of MSN does not Video.
9:24 PM Tuesday; December 18, 2007 -
Which browser is better to use as an option to Safari and how do you download it?
Which browser is better to use as an option to Safari and how do you safely download it? Thanks
I use Firefox when a site doesn't work well with Safari. Some people like Google's Chrome, but I find it too instrusive and do not trust Google's security. You can download Firefox from firefox.com.
Regards. -
Is it better to use just one project or to jump back and forth?
Greetings,
I am using Captivate 4. And I am wondering if it is better to use just one project or to jump back and forth?
I have one main project and rather than make one big project, I wondered about jumping off to small projects and returning to the main one.
I was trying to figure out the suggestion of jumping back to slide 10 and jump off to another project and then back to slide 20.
Do the projects have to be published to see this work?
I am just learning about Captivate so I am unsure of the best practices.
Thanks.It's not that easy in Captivate projects to jump to a particular slide midway through another project. Captivate is set up by default to just launch each project from the first slide.
There have been workarounds published on this forum that allowed jumping into the middle of another project, but they can require some complex coding in either JavaScript or ActionScript.
Maybe you are looking for
-
SharePoint 2013 Excel Services Blue Spinning Icon After Re-Open
Troubleshooting an issue (or determine if it's a normal function) where Excel Services will open a external data connected excel file the first time and give a datasource error when attempting to update. After clearing the error message window manual
-
We have a WRT55AG wireless router. Connected with a static IP address. Set up to give out DHCP to wireless users and to one desktop machine that is connected to port 1. We have another machine, which we want tio run on a static IP address. Is this po
-
Peer to peer between PXIe-5451 and PXIe-7966R
Hello, I would like to connect two devices - PXIe-5451(waveform generator) and PXIe-7966R(NI FlexRIO) with P2P streaming. I want to transmit data from FPGA to generator and i took example from NI-FGEN. When i'm starting host-vi, there is an error occ
-
Problem: The screen blanks out if it is opened too far (regular use position). I was told when the apple store repaired this problem that the wire to the LCD was being pinched and had to be taped. The problem is now back and I am afraid of how much
-
Information: Migration of NewGL with Success
Hello This post it is just to thanks every body who help us to do the migration of NewGl. We did it and It is a success. Thanks for your support Of course, if you have any question about to do it, don't hesitate to contact me, I will try to answer it