[BUG] 5.1.2移植FreeBSD,测试上载超多文件失败

Hi,
尝试按照FreeBSD PORTS某前辈的patch,对ccnet\seafile 5.1.2社区版编译成功,套用官网发布版server-5.1.2-x64包里的seahub,可以正常运行(FreeBSD-10.3-x64,pkg安装所有依赖包,mysql56-server数据库)。测试发现问题:网页一批上载大于360个文件时,系统响应异常,报告上传中断,网页查看出错的库无反应。日志如下

seafile.log

[05/15/2016 17:02:41] ../common/fs-mgr.c(1704): Failed to load seafdir json object: maximum parsing depth reached near '33188'.
[05/15/2016 17:02:41] size-sched.c(268): [scheduler] Failed to compute size of repo 6ebc1dfb.
[05/15/2016 17:02:42] ../common/fs-mgr.c(1704): Failed to load seafdir json object: maximum parsing depth reached near '33188'.
[05/15/2016 17:02:42] size-sched.c(268): [scheduler] Failed to compute size of repo 6ebc1dfb.
[05/15/2016 17:09:35] ../common/fs-mgr.c(1704): Failed to load seafdir json object: maximum parsing depth reached near '33188'.
[05/15/2016 17:18:58] ../common/fs-mgr.c(1704): Failed to load seafdir json object: maximum parsing depth reached near '33188'.
[05/15/2016 17:19:11] ../common/fs-mgr.c(1704): Failed to load seafdir json object: maximum parsing depth reached near '33188'.
[05/15/2016 17:19:12] ../common/fs-mgr.c(1704): Failed to load seafdir json object: maximum parsing depth reached near '33188'.
[05/15/2016 17:19:14] ../common/fs-mgr.c(1704): Failed to load seafdir json object: maximum parsing depth reached near '33188'.
[05/15/2016 19:19:20] ../common/fs-mgr.c(1704): Failed to load seafdir json object: maximum parsing depth reached near '33188'.


seahub_django_request.log

2016-05-15 19:19:20,507 [ERROR] django.request:256 handle_uncaught_exception Internal Server Error: /ajax/lib/6ebc1dfb-cf43-43af-9821-a5797942c5b5/dir/
Traceback (most recent call last):
File “/haiwen/seafile-server-5.1.2/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/core/handlers/base.py”, line 132, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File “/haiwen/seafile-server-5.1.2/seahub/seahub/auth/decorators.py”, line 69, in _wrapped_view
return view_func(request, *args, **kwargs)
File “/haiwen/seafile-server-5.1.2/seahub/seahub/views/ajax.py”, line 296, in list_lib_dir
username, -1, -1)
File “/haiwen/seafile-server-5.1.2/seafile/lib64/python2.6/site-packages/pysearpc/client.py”, line 112, in newfunc
return fret(ret_str)
File “/haiwen/seafile-server-5.1.2/seafile/lib64/python2.6/site-packages/pysearpc/client.py”, line 79, in _fret_objlist
raise SearpcError(dicts[‘err_msg’])
SearpcError: Bad dir id

seahub.log

2016-05-15 15:17:18,032 [ERROR] seahub.api2.views:1457 get_dir_entrys_by_id Bad dir id
2016-05-15 15:17:26,542 [ERROR] seahub.api2.views:1457 get_dir_entrys_by_id Bad dir id
2016-05-15 15:25:05,516 [ERROR] seahub.api2.views:1457 get_dir_entrys_by_id Bad dir id


请大家指教!


Tian Yang
21056894@qq.com

我验证此问题只出现在patched FreeBSD port,ubuntu 14.04安装seafile-server就正常。

奇怪了,libjansson.so 问题? 本人必须基于FreeNAS搭建seafile,只能使用FreeBSD。请给一些提示?

@daniel.pan
@lins05

自问自答:
原来是 libjansson.so 有MACRO开关,FreeBSD设定了默认值,seafile-server Linux附带的应是自定义过的:

The limit is configurable via the JSON_PARSER_MAX_DEPTH setting
within jansson_config.h and is set by default to 2048.

但是 seafile-server 始终存在极限,请问发行版是如何设定JSON_PARSER_MAX_DEPTH?

没有特别设置,就就是默认的包管理器 (yum/apt) 里安装的