Error 4 In Libmysqlclient.so
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Linux C: segfault error 4 in libmysqlclient.so.18.0.0 up vote 0 down vote favorite I'm trying to implement a multithreaded tcp server with the following code. int main(int argc , char *argv[]) { int socket_desc , client_sock , c , *new_sock; struct sockaddr_in server , client; //Create socket socket_desc = socket(AF_INET , SOCK_STREAM , 0); if (socket_desc == -1) { printf("Could not create socket"); } puts("Socket created"); //Prepare the sockaddr_in structure server.sin_family = AF_INET; server.sin_addr.s_addr = INADDR_ANY; server.sin_port = htons( 8888 ); //Bind if( bind(socket_desc,(struct sockaddr *)&server , sizeof(server)) < 0) { //print the error message perror("bind failed. Error"); return 1; } puts("bind done"); //Listen listen(socket_desc , 3); //Accept and incoming connection puts("Waiting for incoming connections..."); c = sizeof(struct sockaddr_in); while( (client_sock = accept(socket_desc, (struct sockaddr *)&client, (socklen_t*)&c)) ) { puts("Connection accepted"); pthread_t sniffer_thread; new_sock = malloc(1); *new_sock = client_sock; if( pthread_create( &sniffer_thread , NULL , connection_handler , (void*) new_sock) < 0) { perror("could not create thread"); return 1; } //Now join the thread , so that we dont terminate before the thread //pthread_join( sniffer_thread , NULL); puts("Handler assigned"); } if (client_sock < 0) { perror("accept failed"); return 1; } return 0; } /* * This will handle connection for each client * */ void *connection_handler(void *socket_desc) { //Get the socket descriptor int newsockfd = *(int*)socket_desc; int read_size; char *message , buffer[2000]; int n; struct auth details; char* reply; char cmd[100] = {0}; //Receive a message from client while( (read_size = recv(newsockfd , buffer , 2000 , 0)) > 0 ) { printf("Incoming data: %s", buffer); if(parseData(cmd, b
Sign in Pricing Blog Support Search GitHub This repository Watch 50 Star 184 Fork 133 firnsy/barnyard2 Code Issues 49 Pull requests 5 Projects 0 Wiki Pulse Graphs New issue Segmentation fault at broken connection #155 Open mindph opened this Issue Aug 4, 2015 · 6 comments Projects None yet Labels None yet Milestone No milestone Assignees No one assigned 4 participants mindph commented Aug 4, 2015 Hello My installation of Barnyard2 is supposed to connect over a VPN to a database. When this http://stackoverflow.com/questions/26140402/linux-c-segfault-error-4-in-libmysqlclient-so-18-0-0 VPN does not reconnect fast enough, Barnyard2 crashes with segmentation fault. database: mysql_error: Unknown MySQL server host 'some.ip" (110) database: Failed to logon to database 'snort' Segmentation fault I am running Version 2.1.14 (Build 336) of Barnyard2 mindph commented Aug 31, 2015 I again got a segfault. Can someone tell me what todo about this? A software shouldn't segfault on a broken https://github.com/firnsy/barnyard2/issues/155 connection, never ever. This is clearly a bug, even if the problem was caused by a connection problem, the software should be able to handle that and try to reconnect instead of messing up with the memory. Aug 31 09:44:07 sen-ofc barnyard2[9449]: database: mysql_error: Can't connect to MySQL server on 'some.ip' (113) Aug 31 09:44:07 sen-ofc barnyard2[9449]: database: Failed to logon to database 'snort' Aug 31 09:44:07 sen-ofc kernel: barnyard2[9449]: segfault at 350 ip 00007f8181b2e4c0 sp 00007ffec9390048 error 4 in libmysqlclient.so.18.0.0[7f8181afd000+2b7000] Collaborator binf commented Sep 16, 2015 A stacktrace would be helpfull. By2 is not "messing" the memory and it should reconnect without an issue. So posting a stacktrace or a coredump with your compiled binary would be the way to go. If you are sesitive about authentication information and such i would suggest that you post a coredump first. Also make sure you run against a by2 binary that has been build with debug symbols. Make sure to do a make clean before re-running configure. ./configure --enable-debug
* Password * Create new account Request new password You are hereHome › Forums › Docsis chat URGENT need help 4 posts / 0 new Post reply Last post http://docsis.org/node/1539 Fri, 01/25/2013 - 14:04 #1 larpi2 URGENT need help I'm beginner, an installed docsis server 3 and configure cmts used description from below linkhttps://github.com/bschirrmeister/docsis_server I started docsis server and i http://www.voip-info.org/boards/index.php?t=97278 get error when arrived the first dhcp request. Error message: "[ 1416.256090] docsis_server[9919]: segfault at bf010001 ip 0804ecd8 sp bf914f90 error 4 in docsis_server[8048000+19000]" What did I wrong I error 4 use Debian GNU/Linux 6.0. Please send me any suggestion, what can i do Sorry for my english. Best Regards, Arpad Top reply Sun, 01/27/2013 - 04:53 #2 schirrmeister coredump? Hi Arpad, could you please send me the output of the coredump so I can try to fix this. gdb /usr/local/sbin/docsis_server /home/docsis/core -- You might try to compile the software error 4 in the following way: export CFLAGS="-fno-stack-protector" make make install regards, Benedikt Top reply report Mon, 01/28/2013 - 01:08 (Reply to #2) #3 larpi2 Hi Benedikt, Hi Benedikt, Thanks for your help I try to reinstall the server using your recomandation, but the result is the same. I runned your command and the answer is below:
GNU gdb (GDB) 7.0.1-debian
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
...
Reading symbols from /usr/local/sbin/docsis_server...done. warning: Can't read pathname for load map: Input/output error. Reading symbols from /usr/lib/libmysqlclient.so.16...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libmysqlclient.so.16 Reading symbols from /lib/i686/cmov/libpthread.so.0...(no debugging symbols found)...done. Loaded symbols for /lib/i686/cmov/libpthread.so.0 Reading symbols from /lib/i686/cmov/libcrypt.so.1...(no debugging symbols found)...done. Loaded symbols for /lib/i686/cmov/libcrypt.so.1 Reading symbols from /lib/i686/cmov/li
IP PBX Asterisk Based PBX Hosted PBX Virtual PBX VOIP Billing PBX Phone System SBCs / Softswitch VOIP Hardware VOIP Fax Residential VOIP Residential Voip Providers Internet Phone SIP Sip Providers About Sip SIP Trunking Call Center Software Automatic Call Distributor IVR Predictive Dialer Wholesale VOIP Call Termination Call Origination Bulk SMS Forums List Forums Asterisk FreeSWITCH GrandStream Polycom Phones VOIP Questions and Help Hardware For Sale Minutes For Sale or Wanted Zycoo Tech Menu login| register Home Main Page Quick Links Main Page Asterisk VOIP PBX and Servers Open Source VOIP Software VOIP Service Providers VOIP Phones What is VOIP? VOIP Event Calendar PBX Internet Speed Test About Voip-info.org Business VOIP Business Voip Providers IP PBX Asterisk Based PBX Hosted PBX Virtual PBX VOIP Billing PBX Phone System SBCs / Softswitch VOIP Hardware VOIP Fax Residential VOIP Residential Voip Providers Internet Phone SIP Sip Providers About Sip SIP Trunking Call Center Software Automatic Call Distributor IVR Predictive Dialer Wholesale VOIP Call Termination Call Origination Bulk SMS Forums List Forums Asterisk FreeSWITCH GrandStream Polycom Phones VOIP Questions and Help Hardware For Sale Minutes For Sale or Wanted Zycoo Tech Message Boards » AsteriskSort: Newest firstOldest first Messages: 5102050100All error 4 in libmysqlclient_r.so.16.0.0pjhlukJoined: Fri 04 of Dec, 2015error 4 in libmysqlclient_r.so.16.0.0Posted:Fri 04 of Dec, 2015 (14:28 UTC)Good afternoon,I'm having real issues with this one.I keep getting the following message on my asterisk boxsegfault at 338 ip 00007f17acf5b887 sp 00007f176af9abc8 error 4 in libmysqlclient_r.so.16.0.0System Config:Cent OS 6.7Asterisk 1.8.32.3Thanks in advance for any help Featured - Business VoIP Residential VoIP Last modif pagesWaxyayKamailio ConsultantsVOIP Event CalendarSmall Business VoIPSIP Trunk Providers NetherlandsComNet TelecomBULK SMSAstChannelsLiveVOIP Service Providers BusinessVoIP SoftphonesShow More… VoIP Speed Test Get HelpAsk a questionhelp configure QOSby ke