MySQLd crash within a UDF on Linux
Description: I'm experiencing a Linux-related only problem with a simple UDF which call mysql_real_connect() How-To-Repeat: A very simple function: #include stdio.h #include stdlib.h #include string.h #include my_global.h #include my_sys.h #include mysql.h #include m_ctype.h #include m_string.h longlong myfunc(UDF_INIT *initid, UDF_ARGS *args, char *is_null,char *error ) { MYSQL mysql; mysql_init(mysql); if (!(mysql_real_connect(mysql,localhost,root,,test, 0 , NULL , 0 ))) { *error=1; return (longlong)(-1); } mysql_close(mysql); return (longlong)1; } compiled with gcc -I /usr/include/mysql -shared -o libmyfunc.so myfunc.c -lmysqlclient_r The thread crashes with: thd=0x847bc78 Attempting backtrace. You can use the following information to find out where mysqld died. If you see no messages after this, something went terribly wrong... Cannot determine thread, fp=0x43be4d0c, backtrace may not be correct. Stack range sanity check OK, backtrace follows: 0x810cdbc 0xe420 0x1 0x43bf47c1 0x80d0042 0x80d0082 0x80c5061 0x8100ce7 0x813c64b 0x813b5d0 0x811b08b 0x811f60e 0x811a066 0x8119a57 0x8119025 0x401b39b4 0x847c89c New value of fp=0x43be6bb0 failed sanity check, terminating stack trace! Please read http://www.mysql.com/doc/en/Using_stack_trace.html and follow instructions on how to resolve the stack trace. Resolved stack trace is much more helpful in diagnosing the problem, so please do resolve it Trying to get some variables. Some pointers may be invalid and cause the dump to abort... thd-query at 0x84761b0 = select myfunc(prova) thd-thread_id=1 I'm available to provide more details, anyway it seems crashing within a syscall. If I run the program with --one-thread it does not crash but returns NULL. I could provide more details on request. Fix: None known. Submitter-Id: frankie Originator:Francesco Paolo Lovergine Organization: Debian MySQL support: none Synopsis: udf problem on linux Severity: serious Priority: medium Category: mysql Class: sw-bug Release: mysql-4.0.18 (Source distribution) C compiler:gcc (GCC) 3.3.3 (Debian 20040401) C++ compiler: g++ (GCC) 3.3.3 (Debian 20040401) Environment: Debian GNU/Linux, arch i386, libc and gcc below. System: Linux klecker 2.6.5-1-686 #1 Sat Apr 24 08:47:10 EST 2004 i686 GNU/Linux Architecture: i686 Some paths: /usr/bin/perl /usr/bin/make /usr/bin/gcc /usr/bin/cc GCC: Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.3/specs Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc i486-linux Thread model: posix gcc version 3.3.3 (Debian 20040401) Compilation info: CC='gcc' CFLAGS='' CXX='g++' CXXFLAGS='' LDFLAGS='' ASFLAGS='' LIBC: lrwxrwxrwx1 root root 13 2004-04-24 22:22 /lib/libc.so.6 - libc-2.3.2.so -rw-r--r--1 root root 1243792 2004-04-21 20:58 /lib/libc-2.3.2.so -rw-r--r--1 root root 2640378 2004-04-21 20:59 /usr/lib/libc.a -rw-r--r--1 root root 204 2004-04-21 20:34 /usr/lib/libc.so lrwxrwxrwx1 root root 28 2004-03-24 10:01 /usr/lib/libc-client.so.2002edebian - libc-client.so.2002edebian.1 -rw-r--r--1 root root 767184 2004-03-22 23:31 /usr/lib/libc-client.so.2002edebian.1 Configure command: ./configure '--prefix=/usr' '--exec-prefix=/usr' '--libexecdir=/usr/sbin' '--datadir=/usr/share' '--sysconfdir=/etc/mysql' '--localstatedir=/var/lib/mysql' '--includedir=/usr/include' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--enable-shared' '--enable-static' '--enable-thread-safe-client' '--enable-assembler' '--enable-local-infile' '--with-raid' '--with-unix-socket-path=/var/run/mysqld/mysqld.sock' '--with-mysqld-user=mysql' '--with-libwrap' '--with-client-ldflags=-lstdc++' '--with-embedded-server' '--with-vio' '--with-openssl' '--without-docs' '--without-bench' '--without-readline' '--with-extra-charsets=all' '--with-berkeley-db' '--with-innodb' '--with-debug' -- MySQL General Mailing List For list archives: http
Re: Mysqld runs with high cpu load on freebsd 4.4
Hi Joe, I'm actually going through this same issue on 4.5 box right now running Mysql max.. i've submitted ticket into support @ mysql since i bought it.. I guess this seems to be common thing in Bsd Hope we can all figure whats wrong with it.. -Frankie - Original Message - From: Joe Maimon [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, May 07, 2002 9:28 AM Subject: Mysqld runs with high cpu load on freebsd 4.4 Hey All, We recently picked up a box running a web site with mysql on freebsd. The cpu load gets pegged high realy quickly under its normal load. This wasnt always the case.My designers do not believe it to be the queries shown in the slow query log, which return quickly on development platforms (winnt) and appear to be highly optimized. I have tried the port version, a compiled from source version, and the binary off the web site. The system is a PIII 800 with 1G RAM. While soaking the cpu, the mysqladmin processlist return minimal activity happening. The mysqld spends most of its time in the poll stage. Disk I/O seems minimal. The web site response slows down considerably. Restarting the mysqld daemon puts the load back down, but within minutes its bouncing back up there and after about an hour it stabilizes at ~70 percent or higher. This is the contents of the my.cnf I have been playing with. I havent seen much performance difference no matter what values I put in here. [mysqld] #port= 3306 #socket = /tmp/mysql.sock skip-locking set-variable= max_connections=100 set-variable= key_buffer=512M set-variable= max_allowed_packet=2M set-variable= table_cache=1000 set-variable= sort_buffer=32M set-variable= record_buffer=4M set-variable= myisam_sort_buffer_size=92M set-variable= thread_cache=32 set-variable= tmp_table_size=128M #set_variable = log-slow-queries # Try number of CPU's*2 for thread_concurrency set-variable= thread_concurrency=6 log-bin server-id = 1 Has anyone come across a freeBSD 4.4 issue - possibly with the thread library? Short of putting in a test box, is there a conclusive way to determine that its the queries/configuration causing this not the box? Joe - 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 - 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: MySQL Performance on Dual Processor machine
Do keep in Mind that FreeBsd isn't 100 % with Smp .. you might have to compile linux threads in order to try and use the dual cpu's .. FreeBSD 5.0 should have the next Generation of SMP that should work great with mysql.. - Original Message - From: Ken Menzel [EMAIL PROTECTED] To: Jay Blanchard [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, April 30, 2002 5:09 PM Subject: Re: MySQL Performance on Dual Processor machine Just becareful not to use too much memory unless you raise the DMAX and such values (see /usr/src/sys/i386/conf/LINT ) if mysql runs out of memory things can get ugly! Also just run show variables to see the differences in the default configs. Also you did not say if both machines were the same version of FreeBSD and if both machine used the same type of SCSI harddisk and controller. CPU speed does not mean much during inserts, there is alot of disk writing. Ken - Original Message - From: Jay Blanchard [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, April 30, 2002 3:34 PM Subject: RE: MySQL Performance on Dual Processor machine [snip] I would suspect other things first such as the my.cnf configuration (show variables) or has the kernel been optimised on the old box. Did you check kernel configurations and disk subsystems? Also the default process size on FreeBSD is 256Meg, so more memory won't help much unless you use it in my.cnf and the kernel configuration allows it! [/snip] Amazingly enough (I did not do the install of MySQL) there is no my.cnf on either machine (there are the default my-whatever.cnf files.). I belive that I should use the my-large.cnf as a starting point. Does anyone have any suggestions other than the default configuration for this file? Thanks! Jay Blanchard Applications Development nii communications, inc. 210-403-9100 x285 - 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 - 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 - 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
Load Blancing Mysql Max Db Server Between 2 Servers
Hello Fellow Mysql Users Is Mysql Max Data Base Server even possible to do loadblancing to spread its load between 2 or more machines. I'm having tough time getting my mysql to work under heavy site load on Dual Cpu FreeBSD 4.5 machine running Mysql max. Any insight would help me at this point. thanks -Fgravato - 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: Load Blancing Mysql Max Db Server Between 2 Servers
Yes this is good subject problem is the site this is being used on had data being written to the db so read only system really isn't going to help me. wonder if mysql developers can shed some light on this subject. - Original Message - From: Jason Yates [EMAIL PROTECTED] To: Russell E Glaue [EMAIL PROTECTED] Cc: Frankie Gravato [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, April 12, 2002 11:55 AM Subject: Re: Load Blancing Mysql Max Db Server Between 2 Servers On Fri, 2002-04-12 at 11:47, Russell E Glaue wrote: If your database is read-only, you can use Linux Virtual Server to load balance traffic to MySQL servers. -RG LVS as you said it is only good for read-only. Are there any solutions for non read-only load balancing, using replication maybe or nfs? Anyone have a solution? I'm really interested in this subject. -Jason - 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
My ODBC Error
Hello All I can currently connect to a Mysql database on my local machine, a windows o/s. However, when I try and do this on unix - get the error: Vbscript Runtime error 'ASP 0185 : -2147467259' Data source name not found or no default driver specified include/dbconnectcrop.asp,line 11 Line 11 is the where I am opening the connection. I feel that I have not matched the driver name. Is the driver MyODBC called something different on Unix, other than MySQL. Below is my conenction string. % ' Connect to MySQL database for passwords section documents Dim dbconnect, anyRs, insComm set dbconnect=Server.CreateObject(ADODB.Connection) dbconnect.ConnectionString=Driver=MySQL;server=localhost;Database=cropwise; dbconnect.Open % Thanks for any help Frankie - 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
db and the web
Hello all I have created a database and now wish to make this available on the web, does anyone know what I need to upload and how I go about this processs. Is it a normal ftp process etc Please help thanks for any help given Frankie - 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