当前位置: 技术问答>linux和unix
一个libevent多线程的服务器引发的问题·····
来源: 互联网 发布时间:2016-09-27
本文导语: 服务端代码在我上一个帖子里边有··· 运行出来的结果什么都没有,客户端断开之后服务端出现的东西如下··· 我崩溃了! *** glibc detected *** ./11s: free(): invalid next size (normal): 0x09d710e0 *** ======= Backtrace: =====...
服务端代码在我上一个帖子里边有···
运行出来的结果什么都没有,客户端断开之后服务端出现的东西如下···
我崩溃了!
*** glibc detected *** ./11s: free(): invalid next size (normal): 0x09d710e0 ***
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6(+0x6b591)[0x9c1591]
/lib/tls/i686/cmov/libc.so.6(+0x6cde8)[0x9c2de8]
/lib/tls/i686/cmov/libc.so.6(cfree+0x6d)[0x9c5ecd]
/lib/tls/i686/cmov/libc.so.6(fclose+0x14a)[0x9b1aaa]
/lib/tls/i686/cmov/libnss_files.so.2(_nss_files_getservbyname_r+0x12b)[0x47b58b]
/lib/tls/i686/cmov/libc.so.6(getservbyname_r+0xdc)[0xa3c98c]
/lib/tls/i686/cmov/libc.so.6(getservbyname+0x86)[0xa3c7e6]
/usr/lib/libmysqlclient.so.16(mysql_server_init+0xc6)[0x59c996]
/usr/lib/libmysqlclient.so.16(mysql_init+0x39)[0x5cb639]
./11s[0x8048d18]
/usr/local/lib/libevent-1.4.so.2(event_base_loop+0x358)[0x115e08]
/usr/local/lib/libevent-1.4.so.2(event_loop+0x29)[0x115ff9]
/usr/local/lib/libevent-1.4.so.2(event_dispatch+0x1e)[0x11601e]
./11s[0x80496b5]
[0x2]
======= Memory map: ========
00110000-00126000 r-xp 00000000 08:06 3401221 /usr/local/lib/libevent-1.4.so.2.1.2
00126000-00127000 r--p 00015000 08:06 3401221 /usr/local/lib/libevent-1.4.so.2.1.2
00127000-00128000 rw-p 00016000 08:06 3401221 /usr/local/lib/libevent-1.4.so.2.1.2
00128000-0014c000 r-xp 00000000 08:01 7866712 /lib/tls/i686/cmov/libm-2.11.1.so
0014c000-0014d000 r--p 00023000 08:01 7866712 /lib/tls/i686/cmov/libm-2.11.1.so
0014d000-0014e000 rw-p 00024000 08:01 7866712 /lib/tls/i686/cmov/libm-2.11.1.so
0014e000-0016b000 r-xp 00000000 08:01 7866695 /lib/libgcc_s.so.1
0016b000-0016c000 r--p 0001c000 08:01 7866695 /lib/libgcc_s.so.1
0016c000-0016d000 rw-p 0001d000 08:01 7866695 /lib/libgcc_s.so.1
00333000-00334000 r-xp 00000000 00:00 0 [vdso]
003a5000-003ac000 r-xp 00000000 08:01 7866786 /lib/tls/i686/cmov/librt-2.11.1.so
003ac000-003ad000 r--p 00006000 08:01 7866786 /lib/tls/i686/cmov/librt-2.11.1.so
003ad000-003ae000 rw-p 00007000 08:01 7866786 /lib/tls/i686/cmov/librt-2.11.1.so
003e1000-003fc000 r-xp 00000000 08:01 7870664 /lib/ld-2.11.1.so
003fc000-003fd000 r--p 0001a000 08:01 7870664 /lib/ld-2.11.1.so
003fd000-003fe000 rw-p 0001b000 08:01 7870664 /lib/ld-2.11.1.so
00456000-00466000 r-xp 00000000 08:01 7866775 /lib/tls/i686/cmov/libresolv-2.11.1.so
00466000-00467000 r--p 00010000 08:01 7866775 /lib/tls/i686/cmov/libresolv-2.11.1.so
00467000-00468000 rw-p 00011000 08:01 7866775 /lib/tls/i686/cmov/libresolv-2.11.1.so
00468000-0046a000 rw-p 00000000 00:00 0
00477000-00481000 r-xp 00000000 08:01 7866729 /lib/tls/i686/cmov/libnss_files-2.11.1.so
00481000-00482000 r--p 00009000 08:01 7866729 /lib/tls/i686/cmov/libnss_files-2.11.1.so
00482000-00483000 rw-p 0000a000 08:01 7866729 /lib/tls/i686/cmov/libnss_files-2.11.1.so
0055c000-00706000 r-xp 00000000 08:01 8653738 /usr/lib/libmysqlclient.so.16.0.0
00706000-00707000 ---p 001aa000 08:01 8653738 /usr/lib/libmysqlclient.so.16.0.0
00707000-0070a000 r--p 001aa000 08:01 8653738 /usr/lib/libmysqlclient.so.16.0.0
0070a000-0074f000 rw-p 001ad000 08:01 8653738 /usr/lib/libmysqlclient.so.16.0.0
0074f000-00750000 rw-p 00000000 00:00 0
0085d000-00870000 r-xp 00000000 08:01 7866723 /lib/tls/i686/cmov/libnsl-2.11.1.so
00870000-00871000 r--p 00012000 08:01 7866723 /lib/tls/i686/cmov/libnsl-2.11.1.so
00871000-00872000 rw-p 00013000 08:01 7866723 /lib/tls/i686/cmov/libnsl-2.11.1.so
00872000-00874000 rw-p 00000000 00:00 0
008fc000-00911000 r-xp 00000000 08:01 7866773 /lib/tls/i686/cmov/libpthread-2.11.1.so
00911000-00912000 r--p 00014000 08:01 7866773 /lib/tls/i686/cmov/libpthread-2.11.1.so
00912000-00913000 rw-p 00015000 08:01 7866773 /lib/tls/i686/cmov/libpthread-2.11.1.so
00913000-00915000 rw-p 00000000 00:00 0
0091d000-00930000 r-xp 00000000 08:01 7866810 /lib/libz.so.1.2.3.3
00930000-00931000 r--p 00012000 08:01 7866810 /lib/libz.so.1.2.3.3
00931000-00932000 rw-p 00013000 08:01 7866810 /lib/libz.so.1.2.3.3
00956000-00aa9000 r-xp 00000000 08:01 7866665 /lib/tls/i686/cmov/libc-2.11.1.so
00aa9000-00aaa000 ---p 00153000 08:01 7866665 /lib/tls/i686/cmov/libc-2.11.1.so
00aaa000-00aac000 r--p 00153000 08:01 7866665 /lib/tls/i686/cmov/libc-2.11.1.so
00aac000-00aad000 rw-p 00155000 08:01 7866665 /lib/tls/i686/cmov/libc-2.11.1.so
00aad000-00ab0000 rw-p 00000000 00:00 0
00ca7000-00cb0000 r-xp 00000000 08:01 7866675 /lib/tls/i686/cmov/libcrypt-2.11.1.so
00cb0000-00cb1000 r--p 00008000 08:01 7866675 /lib/tls/i686/cmov/libcrypt-2.11.1.so
00cb1000-00cb2000 rw-p 00009000 08:01 7866675 /lib/tls/i686/cmov/libcrypt-2.11.1.so
00cb2000-00cd9000 rw-p 00000000 00:00 0
08048000-0804a000 r-xp 00000000 08:05 5644871 /home/sunxuming/11s
0804a000-0804b000 r--p 00001000 08:05 5644871 /home/sunxuming/11s
0804b000-0804c000 rw-p 00002000 08:05 5644871 /home/sunxuming/11s
09d6b000-09d8c000 rw-p 00000000 00:00 0 [heap]
b7600000-b7621000 rw-p 00000000 00:00 0
b7621000-b7700000 ---p 00000000 00:00 0
b77fc000-b7800000 rw-p 00000000 00:00 0
b7810000-b7813000 rw-p 00000000 00:00 0
bfc8d000-bfca2000 rw-p 00000000 00:00 0 [stack]
已放弃
运行出来的结果什么都没有,客户端断开之后服务端出现的东西如下···
我崩溃了!
*** glibc detected *** ./11s: free(): invalid next size (normal): 0x09d710e0 ***
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6(+0x6b591)[0x9c1591]
/lib/tls/i686/cmov/libc.so.6(+0x6cde8)[0x9c2de8]
/lib/tls/i686/cmov/libc.so.6(cfree+0x6d)[0x9c5ecd]
/lib/tls/i686/cmov/libc.so.6(fclose+0x14a)[0x9b1aaa]
/lib/tls/i686/cmov/libnss_files.so.2(_nss_files_getservbyname_r+0x12b)[0x47b58b]
/lib/tls/i686/cmov/libc.so.6(getservbyname_r+0xdc)[0xa3c98c]
/lib/tls/i686/cmov/libc.so.6(getservbyname+0x86)[0xa3c7e6]
/usr/lib/libmysqlclient.so.16(mysql_server_init+0xc6)[0x59c996]
/usr/lib/libmysqlclient.so.16(mysql_init+0x39)[0x5cb639]
./11s[0x8048d18]
/usr/local/lib/libevent-1.4.so.2(event_base_loop+0x358)[0x115e08]
/usr/local/lib/libevent-1.4.so.2(event_loop+0x29)[0x115ff9]
/usr/local/lib/libevent-1.4.so.2(event_dispatch+0x1e)[0x11601e]
./11s[0x80496b5]
[0x2]
======= Memory map: ========
00110000-00126000 r-xp 00000000 08:06 3401221 /usr/local/lib/libevent-1.4.so.2.1.2
00126000-00127000 r--p 00015000 08:06 3401221 /usr/local/lib/libevent-1.4.so.2.1.2
00127000-00128000 rw-p 00016000 08:06 3401221 /usr/local/lib/libevent-1.4.so.2.1.2
00128000-0014c000 r-xp 00000000 08:01 7866712 /lib/tls/i686/cmov/libm-2.11.1.so
0014c000-0014d000 r--p 00023000 08:01 7866712 /lib/tls/i686/cmov/libm-2.11.1.so
0014d000-0014e000 rw-p 00024000 08:01 7866712 /lib/tls/i686/cmov/libm-2.11.1.so
0014e000-0016b000 r-xp 00000000 08:01 7866695 /lib/libgcc_s.so.1
0016b000-0016c000 r--p 0001c000 08:01 7866695 /lib/libgcc_s.so.1
0016c000-0016d000 rw-p 0001d000 08:01 7866695 /lib/libgcc_s.so.1
00333000-00334000 r-xp 00000000 00:00 0 [vdso]
003a5000-003ac000 r-xp 00000000 08:01 7866786 /lib/tls/i686/cmov/librt-2.11.1.so
003ac000-003ad000 r--p 00006000 08:01 7866786 /lib/tls/i686/cmov/librt-2.11.1.so
003ad000-003ae000 rw-p 00007000 08:01 7866786 /lib/tls/i686/cmov/librt-2.11.1.so
003e1000-003fc000 r-xp 00000000 08:01 7870664 /lib/ld-2.11.1.so
003fc000-003fd000 r--p 0001a000 08:01 7870664 /lib/ld-2.11.1.so
003fd000-003fe000 rw-p 0001b000 08:01 7870664 /lib/ld-2.11.1.so
00456000-00466000 r-xp 00000000 08:01 7866775 /lib/tls/i686/cmov/libresolv-2.11.1.so
00466000-00467000 r--p 00010000 08:01 7866775 /lib/tls/i686/cmov/libresolv-2.11.1.so
00467000-00468000 rw-p 00011000 08:01 7866775 /lib/tls/i686/cmov/libresolv-2.11.1.so
00468000-0046a000 rw-p 00000000 00:00 0
00477000-00481000 r-xp 00000000 08:01 7866729 /lib/tls/i686/cmov/libnss_files-2.11.1.so
00481000-00482000 r--p 00009000 08:01 7866729 /lib/tls/i686/cmov/libnss_files-2.11.1.so
00482000-00483000 rw-p 0000a000 08:01 7866729 /lib/tls/i686/cmov/libnss_files-2.11.1.so
0055c000-00706000 r-xp 00000000 08:01 8653738 /usr/lib/libmysqlclient.so.16.0.0
00706000-00707000 ---p 001aa000 08:01 8653738 /usr/lib/libmysqlclient.so.16.0.0
00707000-0070a000 r--p 001aa000 08:01 8653738 /usr/lib/libmysqlclient.so.16.0.0
0070a000-0074f000 rw-p 001ad000 08:01 8653738 /usr/lib/libmysqlclient.so.16.0.0
0074f000-00750000 rw-p 00000000 00:00 0
0085d000-00870000 r-xp 00000000 08:01 7866723 /lib/tls/i686/cmov/libnsl-2.11.1.so
00870000-00871000 r--p 00012000 08:01 7866723 /lib/tls/i686/cmov/libnsl-2.11.1.so
00871000-00872000 rw-p 00013000 08:01 7866723 /lib/tls/i686/cmov/libnsl-2.11.1.so
00872000-00874000 rw-p 00000000 00:00 0
008fc000-00911000 r-xp 00000000 08:01 7866773 /lib/tls/i686/cmov/libpthread-2.11.1.so
00911000-00912000 r--p 00014000 08:01 7866773 /lib/tls/i686/cmov/libpthread-2.11.1.so
00912000-00913000 rw-p 00015000 08:01 7866773 /lib/tls/i686/cmov/libpthread-2.11.1.so
00913000-00915000 rw-p 00000000 00:00 0
0091d000-00930000 r-xp 00000000 08:01 7866810 /lib/libz.so.1.2.3.3
00930000-00931000 r--p 00012000 08:01 7866810 /lib/libz.so.1.2.3.3
00931000-00932000 rw-p 00013000 08:01 7866810 /lib/libz.so.1.2.3.3
00956000-00aa9000 r-xp 00000000 08:01 7866665 /lib/tls/i686/cmov/libc-2.11.1.so
00aa9000-00aaa000 ---p 00153000 08:01 7866665 /lib/tls/i686/cmov/libc-2.11.1.so
00aaa000-00aac000 r--p 00153000 08:01 7866665 /lib/tls/i686/cmov/libc-2.11.1.so
00aac000-00aad000 rw-p 00155000 08:01 7866665 /lib/tls/i686/cmov/libc-2.11.1.so
00aad000-00ab0000 rw-p 00000000 00:00 0
00ca7000-00cb0000 r-xp 00000000 08:01 7866675 /lib/tls/i686/cmov/libcrypt-2.11.1.so
00cb0000-00cb1000 r--p 00008000 08:01 7866675 /lib/tls/i686/cmov/libcrypt-2.11.1.so
00cb1000-00cb2000 rw-p 00009000 08:01 7866675 /lib/tls/i686/cmov/libcrypt-2.11.1.so
00cb2000-00cd9000 rw-p 00000000 00:00 0
08048000-0804a000 r-xp 00000000 08:05 5644871 /home/sunxuming/11s
0804a000-0804b000 r--p 00001000 08:05 5644871 /home/sunxuming/11s
0804b000-0804c000 rw-p 00002000 08:05 5644871 /home/sunxuming/11s
09d6b000-09d8c000 rw-p 00000000 00:00 0 [heap]
b7600000-b7621000 rw-p 00000000 00:00 0
b7621000-b7700000 ---p 00000000 00:00 0
b77fc000-b7800000 rw-p 00000000 00:00 0
b7810000-b7813000 rw-p 00000000 00:00 0
bfc8d000-bfca2000 rw-p 00000000 00:00 0 [stack]
已放弃
|
一个馒头引发的血案..
把数据库操作去掉,只实现最简单的字符串通信..
精简代码,自己慢慢定位了..
把数据库操作去掉,只实现最简单的字符串通信..
精简代码,自己慢慢定位了..
您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。