Re: Lost connections on Freebsd
Hi! Chris == Chris Knipe [EMAIL PROTECTED] writes: Chris Lo Victoria Chris FreeBSD 4.6-STABLE (Master), MySQL 3.23.51 Chris Windows 2000 Professional (Slave):, MySQL 3.23.49-nt Chris I've recompiled the master about three times now, and it still crashed. Chris Eventually, it came to such a extend that the moment I open port 3306 MySQL Chris would crash. I can just use telnet ip 3306, or open a netcat on port Chris 3306, and MySQL would die. Can you try to configure MYSQL with CFLAGS=-g and run the server under gdb. If we could get a full back trace where it fails, it could help us find out what's wrong. Chris So far, the only way I found to keep the FreeBSD Port up, was to recompile Chris it with debug support. I so far have 90 minutes uptime on the Master with Chris debug support compiled in, but it's needless to say not really the desired Chris result. How did you configure MySQL in this case ? Regards, Monty -- For technical support contracts, goto https://order.mysql.com/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Michael Widenius [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, CTO /_/ /_/\_, /___/\___\_\___/ Helsinki, Finland ___/ 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: Lost connections on Freebsd
Lo Michael, I digged a bit more, and while running under debug mode, MySQL doesnt crash, it does complain about a bad file descriptor on /etc/hosts.allow. If this is the cause of the failure, there might be a possibly bug in the code, because I really think it's arb that the entire MySQL needs to bail because it can't open a file... Here's the relavent messages from syslog, Aug 18 16:03:29 netsonic mysqld[15158]: warning: /etc/hosts.allow, line 23: can't get client address: Bad file descriptor Aug 18 16:03:30 netsonic mysqld[15158]: warning: /etc/hosts.allow, line 23: can't get client address: Bad file descriptor When I run without debug, I think this is what *may* be causing the crash, whilst when running under debug mode, MySQL obviously has some sort of protection so that it sends out only a warning instead of crashing Chris I've recompiled the master about three times now, and it still crashed. Chris Eventually, it came to such a extend that the moment I open port 3306 MySQL Chris would crash. I can just use telnet ip 3306, or open a netcat on port Chris 3306, and MySQL would die. Can you try to configure MYSQL with CFLAGS=-g and run the server under gdb. If we could get a full back trace where it fails, it could help us find out what's wrong. I tried. Now, when I recompiled it again without debug support, it doesn't crash for some reason. At least not for now The below log is issued to syslog at every connection however. Aug 18 17:03:53 netsonic mysqld[47947]: warning: can't get client address: Bad file descriptor I'll keep my eyes on it like a hawk. First crash I get, it's back to gdb we go... It looks to me as if it may be tcpwrappers that's busted however... :-( Chris So far, the only way I found to keep the FreeBSD Port up, was to recompile Chris it with debug support. I so far have 90 minutes uptime on the Master with Chris debug support compiled in, but it's needless to say not really the desired Chris result. How did you configure MySQL in this case ? Altered the Makefile in the ports, compiled / installed, and did a cvsup to sync the ports again... MySQL compiles per default with CFLAGS=-g from the ports, I just need had to recompile it again now, so that I could remove the debug support and let MySQL actually crash again :P -- me - 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: Lost connections on Freebsd
Hi, - Original Message - From: Chris Knipe [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; Victoria Reznichenko [EMAIL PROTECTED] Sent: Sunday, August 18, 2002 6:08 PM Subject: Re: Lost connections on Freebsd Lo Michael, I digged a bit more, and while running under debug mode, MySQL doesnt crash, it does complain about a bad file descriptor on /etc/hosts.allow. If this is the cause of the failure, there might be a possibly bug in the code, because I really think it's arb that the entire MySQL needs to bail because it can't open a file... ...or you have too many open files in the system.You reach the max. number of files which can be opened by the OS.Try to increase file-max from /proc/sys/fs. Regards, Gelu Aug 18 16:03:29 netsonic mysqld[15158]: warning: /etc/hosts.allow, line 23: can't get client address: Bad file descriptor Aug 18 16:03:30 netsonic mysqld[15158]: warning: /etc/hosts.allow, line 23: can't get client address: Bad file descriptor When I run without debug, I think this is what *may* be causing the crash, whilst when running under debug mode, MySQL obviously has some sort of protection so that it sends out only a warning instead of crashing Chris I've recompiled the master about three times now, and it still crashed. Chris Eventually, it came to such a extend that the moment I open port 3306 MySQL Chris would crash. I can just use telnet ip 3306, or open a netcat on port Chris 3306, and MySQL would die. Can you try to configure MYSQL with CFLAGS=-g and run the server under gdb. If we could get a full back trace where it fails, it could help us find out what's wrong. I tried. Now, when I recompiled it again without debug support, it doesn't crash for some reason. At least not for now The below log is issued to syslog at every connection however. Aug 18 17:03:53 netsonic mysqld[47947]: warning: can't get client address: Bad file descriptor I'll keep my eyes on it like a hawk. First crash I get, it's back to gdb we go... It looks to me as if it may be tcpwrappers that's busted however... :-( Chris So far, the only way I found to keep the FreeBSD Port up, was to recompile Chris it with debug support. I so far have 90 minutes uptime on the Master with Chris debug support compiled in, but it's needless to say not really the desired Chris result. How did you configure MySQL in this case ? Altered the Makefile in the ports, compiled / installed, and did a cvsup to sync the ports again... MySQL compiles per default with CFLAGS=-g from the ports, I just need had to recompile it again now, so that I could remove the debug support and let MySQL actually crash again :P -- me - 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: Lost connections on Freebsd
...or you have too many open files in the system.You reach the max. number of files which can be opened by the OS.Try to increase file-max from /proc/sys/fs. Highly doubtful. It's a brand new server installation, exactly the same as all my others, and it's not doing half as much as the others are The box runs mysql, apache, and exim... With less than 50 processes running at any given time... It's FreeBSD as well btw, /proc/fs/ doesn't exist :P -SNIP- DESCRIPTION The fstat utility identifies open files. A file is considered open by a process if it was explicitly opened, is the working directory, root directory, active executable text, or kernel trace file for that process. If no options are specified, fstat reports on all open files in the sys- tem. -SNIP- 749 open files reported... Far less than the maximum. -- me - 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: Lost connections on Freebsd
For sure Bad file descriptor error occur because your kernel it's not able to create handler for the new open file(don't forget...socket it's also a file ) which must be open. _ G.NET SOFTWARE COMPANY Permanent e-mail address : [EMAIL PROTECTED] [EMAIL PROTECTED] - Original Message - From: Chris Knipe [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, August 18, 2002 8:14 PM Subject: Re: Lost connections on Freebsd ...or you have too many open files in the system.You reach the max. number of files which can be opened by the OS.Try to increase file-max from /proc/sys/fs. Highly doubtful. It's a brand new server installation, exactly the same as all my others, and it's not doing half as much as the others are The box runs mysql, apache, and exim... With less than 50 processes running at any given time... It's FreeBSD as well btw, /proc/fs/ doesn't exist :P -SNIP- DESCRIPTION The fstat utility identifies open files. A file is considered open by a process if it was explicitly opened, is the working directory, root directory, active executable text, or kernel trace file for that process. If no options are specified, fstat reports on all open files in the sys- tem. -SNIP- 749 open files reported... Far less than the maximum. -- me - 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: Lost connections on Freebsd
Fair enough, But then why is MySQL the *only* thing I am having problems with? MySQL's not the only application running on the box, it's not the only application opening / closing tcp sockets, its not the only thing opening / closing file sockets *shrugs*... Maybe I should just rm -rf / and reinstall. - Original Message - From: Gelu Gogancea [EMAIL PROTECTED] To: Chris Knipe [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Sunday, August 18, 2002 8:01 PM Subject: Re: Lost connections on Freebsd For sure Bad file descriptor error occur because your kernel it's not able to create handler for the new open file(don't forget...socket it's also a file ) which must be open. _ G.NET SOFTWARE COMPANY Permanent e-mail address : [EMAIL PROTECTED] [EMAIL PROTECTED] - Original Message - From: Chris Knipe [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, August 18, 2002 8:14 PM Subject: Re: Lost connections on Freebsd ...or you have too many open files in the system.You reach the max. number of files which can be opened by the OS.Try to increase file-max from /proc/sys/fs. Highly doubtful. It's a brand new server installation, exactly the same as all my others, and it's not doing half as much as the others are The box runs mysql, apache, and exim... With less than 50 processes running at any given time... It's FreeBSD as well btw, /proc/fs/ doesn't exist :P -SNIP- DESCRIPTION The fstat utility identifies open files. A file is considered open by a process if it was explicitly opened, is the working directory, root directory, active executable text, or kernel trace file for that process. If no options are specified, fstat reports on all open files in the sys- tem. -SNIP- 749 open files reported... Far less than the maximum. -- me - 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: Lost connections on Freebsd
Hello, Some basic points about these problems: 1) have you another application/mysqld listening on the same tcp port? 2) have you tried different versions (switching between 3.23 and 4.x series, for example) 3) try compiling from the source with a bit different configuration parameters 4) do your connections drop if you're connecting from the localhost? How about from other hosts? How about connecting with other clients? Just don't give up. I've never seen a MySQL-related problem that nobody has been able to solve. I don't believe this isn't about anything big. And probably there are lots of more people active on this list next week, somebody of them might be able to solve your problem. :-) Regards, Iikka ** * Iikka Meriläinen * * E-mail: [EMAIL PROTECTED] * * Vaala, Finland * ** On Sun, 18 Aug 2002, Gelu Gogancea wrote: My dear friend, If you put the problem in this way .maybe it's a good ideea to go to the church and make some rosary for solving your problem. Bye - Original Message - From: Chris Knipe [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, August 18, 2002 9:06 PM Subject: Re: Lost connections on Freebsd Fair enough, But then why is MySQL the *only* thing I am having problems with? MySQL's not the only application running on the box, it's not the only application opening / closing tcp sockets, its not the only thing opening / closing file sockets *shrugs*... Maybe I should just rm -rf / and reinstall. - Original Message - From: Gelu Gogancea [EMAIL PROTECTED] To: Chris Knipe [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Sunday, August 18, 2002 8:01 PM Subject: Re: Lost connections on Freebsd For sure Bad file descriptor error occur because your kernel it's not able to create handler for the new open file(don't forget...socket it's also a file ) which must be open. _ G.NET SOFTWARE COMPANY Permanent e-mail address : [EMAIL PROTECTED] [EMAIL PROTECTED] - Original Message - From: Chris Knipe [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, August 18, 2002 8:14 PM Subject: Re: Lost connections on Freebsd ...or you have too many open files in the system.You reach the max. number of files which can be opened by the OS.Try to increase file-max from /proc/sys/fs. Highly doubtful. It's a brand new server installation, exactly the same as all my others, and it's not doing half as much as the others are The box runs mysql, apache, and exim... With less than 50 processes running at any given time... It's FreeBSD as well btw, /proc/fs/ doesn't exist :P -SNIP- DESCRIPTION The fstat utility identifies open files. A file is considered open by a process if it was explicitly opened, is the working directory, root directory, active executable text, or kernel trace file for that process. If no options are specified, fstat reports on all open files in the sys- tem. -SNIP- 749 open files reported... Far less than the maximum. -- me - 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 - 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: Lost connections on Freebsd
Seems to be getting more critical now as well. Aug 19 01:54:27 netsonic mysqld[48323]: warning: can't get client address: Bad file descriptor Aug 19 01:54:59 netsonic last message repeated 13 times Aug 19 01:54:59 netsonic last message repeated 2 times From what I can see, it's spitting out the errors now on every single query. Running under gdb also doesn't return anything (or I'm debugging it wrong?) MySQL's error log is empty - nothing logged -- me - Original Message - From: Chris Knipe [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; Victoria Reznichenko [EMAIL PROTECTED] Sent: Sunday, August 18, 2002 5:08 PM Subject: Re: Lost connections on Freebsd Lo Michael, I digged a bit more, and while running under debug mode, MySQL doesnt crash, it does complain about a bad file descriptor on /etc/hosts.allow. If this is the cause of the failure, there might be a possibly bug in the code, because I really think it's arb that the entire MySQL needs to bail because it can't open a file... Here's the relavent messages from syslog, Aug 18 16:03:29 netsonic mysqld[15158]: warning: /etc/hosts.allow, line 23: can't get client address: Bad file descriptor Aug 18 16:03:30 netsonic mysqld[15158]: warning: /etc/hosts.allow, line 23: can't get client address: Bad file descriptor When I run without debug, I think this is what *may* be causing the crash, whilst when running under debug mode, MySQL obviously has some sort of protection so that it sends out only a warning instead of crashing Chris I've recompiled the master about three times now, and it still crashed. Chris Eventually, it came to such a extend that the moment I open port 3306 MySQL Chris would crash. I can just use telnet ip 3306, or open a netcat on port Chris 3306, and MySQL would die. Can you try to configure MYSQL with CFLAGS=-g and run the server under gdb. If we could get a full back trace where it fails, it could help us find out what's wrong. I tried. Now, when I recompiled it again without debug support, it doesn't crash for some reason. At least not for now The below log is issued to syslog at every connection however. Aug 18 17:03:53 netsonic mysqld[47947]: warning: can't get client address: Bad file descriptor I'll keep my eyes on it like a hawk. First crash I get, it's back to gdb we go... It looks to me as if it may be tcpwrappers that's busted however... :-( Chris So far, the only way I found to keep the FreeBSD Port up, was to recompile Chris it with debug support. I so far have 90 minutes uptime on the Master with Chris debug support compiled in, but it's needless to say not really the desired Chris result. How did you configure MySQL in this case ? Altered the Makefile in the ports, compiled / installed, and did a cvsup to sync the ports again... MySQL compiles per default with CFLAGS=-g from the ports, I just need had to recompile it again now, so that I could remove the debug support and let MySQL actually crash again :P -- me - 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