免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3965 | 回复: 9
打印 上一主题 下一主题

[FastDFS] storage_do_download_file_ex 下载文件失败 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2012-02-10 17:11 |只看该作者 |倒序浏览
[2012-02-10 17:04:26] ERROR - file: ../tracker/tracker_proto.c, line: 125, tracker server: 192.168.10.210:23000, recv data fail, errno: 110, error info: Connection timed out


下载第n个文件时出错!storage只发送了部分数据就不发了,接收超时!
请版主看看!谢谢

论坛徽章:
0
2 [报告]
发表于 2012-02-10 17:12 |只看该作者
3.06版本

论坛徽章:
0
3 [报告]
发表于 2012-02-10 17:40 |只看该作者
pstack 了一下 storage


pstack 10811
Thread 9 (Thread 0x4089a940 (LWP 10814)):
#0  0x0000003ed34d3368 in epoll_wait () from /lib64/libc.so.6
#1  0x00002b2e9f2252c0 in ?? () from /usr/lib64/libevent-1.4.so.2
#2  0x00002b2e9f2184d1 in event_base_loop () from /usr/lib64/libevent-1.4.so.2
#3  0x000000000042789d in work_thread_entrance ()
#4  0x0000003ed4006367 in start_thread () from /lib64/libpthread.so.0
#5  0x0000003ed34d2f7d in clone () from /lib64/libc.so.6
Thread 8 (Thread 0x4091b940 (LWP 10815)):
#0  0x0000003ed34d3368 in epoll_wait () from /lib64/libc.so.6
#1  0x00002b2e9f2252c0 in ?? () from /usr/lib64/libevent-1.4.so.2
#2  0x00002b2e9f2184d1 in event_base_loop () from /usr/lib64/libevent-1.4.so.2
#3  0x000000000042789d in work_thread_entrance ()
#4  0x0000003ed4006367 in start_thread () from /lib64/libpthread.so.0
#5  0x0000003ed34d2f7d in clone () from /lib64/libc.so.6
Thread 7 (Thread 0x4099c940 (LWP 10816)):
#0  0x0000003ed34d3368 in epoll_wait () from /lib64/libc.so.6
#1  0x00002b2e9f2252c0 in ?? () from /usr/lib64/libevent-1.4.so.2
#2  0x00002b2e9f2184d1 in event_base_loop () from /usr/lib64/libevent-1.4.so.2
#3  0x000000000042789d in work_thread_entrance ()
#4  0x0000003ed4006367 in start_thread () from /lib64/libpthread.so.0
#5  0x0000003ed34d2f7d in clone () from /lib64/libc.so.6
Thread 6 (Thread 0x40a1d940 (LWP 10817)):
#0  0x0000003ed34d3368 in epoll_wait () from /lib64/libc.so.6
#1  0x00002b2e9f2252c0 in ?? () from /usr/lib64/libevent-1.4.so.2
#2  0x00002b2e9f2184d1 in event_base_loop () from /usr/lib64/libevent-1.4.so.2
#3  0x000000000042789d in work_thread_entrance ()
#4  0x0000003ed4006367 in start_thread () from /lib64/libpthread.so.0
#5  0x0000003ed34d2f7d in clone () from /lib64/libc.so.6
Thread 5 (Thread 0x40a9e940 (LWP 1081):
#0  0x0000003ed3499761 in nanosleep () from /lib64/libc.so.6
#1  0x0000003ed3499584 in sleep () from /lib64/libc.so.6
#2  0x000000000041b342 in tracker_report_thread_entrance ()
#3  0x0000003ed4006367 in start_thread () from /lib64/libpthread.so.0
#4  0x0000003ed34d2f7d in clone () from /lib64/libc.so.6
Thread 4 (Thread 0x40b1f940 (LWP 10819)):
#0  0x0000003ed3499761 in nanosleep () from /lib64/libc.so.6
#1  0x0000003ed3499584 in sleep () from /lib64/libc.so.6
#2  0x00000000004142e9 in sched_thread_entrance ()
#3  0x0000003ed4006367 in start_thread () from /lib64/libpthread.so.0
#4  0x0000003ed34d2f7d in clone () from /lib64/libc.so.6
Thread 3 (Thread 0x40ba0940 (LWP 10820)):
#0  0x0000003ed400a899 in pthread_cond_wait@@GLIBC_2.3.2 ()
#1  0x000000000042dbbc in dio_thread_entrance ()
#2  0x0000003ed4006367 in start_thread () from /lib64/libpthread.so.0
#3  0x0000003ed34d2f7d in clone () from /lib64/libc.so.6
Thread 2 (Thread 0x40c21940 (LWP 10821)):
#0  0x0000003ed400a899 in pthread_cond_wait@@GLIBC_2.3.2 ()
#1  0x000000000042dbbc in dio_thread_entrance ()
#2  0x0000003ed4006367 in start_thread () from /lib64/libpthread.so.0
#3  0x0000003ed34d2f7d in clone () from /lib64/libc.so.6
Thread 1 (Thread 0x2b2e9f42e7e0 (LWP 10811)):
#0  0x0000003ed400d4eb in accept () from /lib64/libpthread.so.0
#1  0x00000000004272ac in storage_accept_loop ()
#2  0x000000000040a63c in main ()

论坛徽章:
4
2015年辞旧岁徽章
日期:2015-03-03 16:54:152015年迎新春徽章
日期:2015-03-04 09:56:11IT运维版块每日发帖之星
日期:2016-08-11 06:20:00IT运维版块每日发帖之星
日期:2016-08-15 06:20:00
4 [报告]
发表于 2012-02-10 18:08 |只看该作者
回复 3# laoying11112

libevent版本是多少?请确认安装的是stable版本。

论坛徽章:
0
5 [报告]
发表于 2012-02-13 10:33 |只看该作者
现在用了libevent-2.0.16-stable.tar.gz,还是出错!
[2012-02-13 10:28:43] ERROR - file: ../tracker/tracker_proto.c, line: 125, tracker server: 192.168.10.210:23000, recv data fail, errno: 110, error info: Connection timed out

论坛徽章:
0
6 [报告]
发表于 2012-02-13 17:25 |只看该作者
多个线程读取反而没出错,单线程读取出错,大概有3万个文件,每次读到几千个文件就停止了

论坛徽章:
0
7 [报告]
发表于 2012-02-14 11:41 |只看该作者
看了下日志:

[2012-02-14 09:46:10] ERROR - file: storage_nio.c, line: 404, client ip: 192.168.10.211, recv failed, errno: 32, error info: Broken pipe

是这个错误!

论坛徽章:
0
8 [报告]
发表于 2012-02-14 11:49 |只看该作者
也许是我g_fdfs_network_timeout这个值设置小了,2M的文件,高并发传输超时导致的!

论坛徽章:
0
9 [报告]
发表于 2012-02-14 17:42 |只看该作者
设置network_timeout很大也没用,不知道为什么会所有的线程都停了,
我再启动读的时候,把线程给激活了,storage继续写对端已经关闭的socket,出现Broken pipe错误了

论坛徽章:
4
2015年辞旧岁徽章
日期:2015-03-03 16:54:152015年迎新春徽章
日期:2015-03-04 09:56:11IT运维版块每日发帖之星
日期:2016-08-11 06:20:00IT运维版块每日发帖之星
日期:2016-08-15 06:20:00
10 [报告]
发表于 2012-02-14 18:22 |只看该作者
回复 9# laoying11112

出现这种诡异的问题,先检查一下你的环境。
确认一下用的libevent确实是你所看到的stable版本。
实在不行,可以将libevent降级到v1.4.14b试试
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP