httpserver seems to crash

169 views
Skip to first unread message

Wilhelm Eger

unread,
Nov 21, 2013, 4:02:19 AM11/21/13
to sea...@googlegroups.com
Hi,

I've got a seafile server running on a Gentoo ARM machine. Had to modify the ebuilds provided to use the tagged 2.0.3-server releases of ccnet, libsearpc, seafile and seahub. I can post them somwhere, if you are interested.

Now, everything is fine. I can login, I can create a library, I can browse and upload files - but I cannot download. The clients simply say the cannot download and the web interface says that there is no connection. However, there is httpserver running on port 8082 and the port is forwarded. When I go directly to MYURL:8082 I get a blank page without any error. When I get redirected from the Webpage to some MYURL:8082/files/whatsover link I get the error message.

controller.log contains a lot of 'httpserver needs restart' messages. Thus, I think that httpserver crashed on any download request and gets restarted later. This is confirmed with tail -f controller.log and trying to download - ca. 2s after the download try, the httpserver gets restarted.

How can I get more output from the httpserver? At best some debug output. I had some difficulties with python2.7 fs. python3.2, as Gentoo has both installed, even though python2.7 is the default.

Thanks!

Wilhelm Eger

unread,
Nov 21, 2013, 10:22:04 AM11/21/13
to sea...@googlegroups.com
After digging in httpserver.c and looking at the supported flags (why don't you put them into the helpline?), I have tried this:

killall httpserver &&  LC="C" SEAFILE_DEBUG="1" httpserver -f -G debug  -g debug -c /var/seafile/ccnet -d /var/seafile/seafile-data -l /var/seafile/logs/http.log -P /var/seafile/seafile-data/pids/httpserver.pid
** Message: Set debug flags 0

Speicherzugriffsfehler (segmentation fault)

So - is there no real debug possibility? Do I have to use gdb?

Wilhelm Eger

unread,
Nov 21, 2013, 2:17:39 PM11/21/13
to sea...@googlegroups.com
Here is some gdb output. Might be wrong, I have never used gdb before:

killall httpserver &&  gdb --ex=run --args /usr/bin/httpserver "-f -c /var/seafile/ccnet -d /var/seafile/seafile-data -l /var/seafile/logs/http.log -P /var/seafile/seafile-data/pids/httpserver.pid"
GNU gdb (Gentoo 7.6.1 p2) 7.6.1
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
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 "armv7a-hardfloat-linux-gnueabi".
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>...
Reading symbols from /usr/bin/httpserver...(no debugging symbols found)...done.
Starting program: /usr/bin/httpserver -f\ -c\ /var/seafile/ccnet\ -d\ /var/seafile/seafile-data\ -l\ /var/seafile/logs/http.log\ -P\ /var/seafile/seafile-data/pids/httpserver.pid
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".

Program received signal SIGILL, Illegal instruction.
0xb6eaf0e8 in _armv7_tick () from /usr/lib/libcrypto.so.1.0.0
(gdb)

I am wondering. This seems to be an issue in the code and nobody cares.

Wilhelm Eger

unread,
Nov 21, 2013, 2:35:31 PM11/21/13
to sea...@googlegroups.com
Recompiled with gcc 4.7.3 (before 4.8.2). Same behavior.

JiaQiang Xu

unread,
Nov 21, 2013, 8:15:49 PM11/21/13
to sea...@googlegroups.com
It's likely a CPU alignment problem for ARM. Try echo 2 > /proc/cpu/alignment


2013/11/21 Wilhelm Eger <wilhel...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "seafile" group.
To unsubscribe from this group and stop receiving emails from it, send an email to seafile+u...@googlegroups.com.
To post to this group, send email to sea...@googlegroups.com.
Visit this group at http://groups.google.com/group/seafile.
For more options, visit https://groups.google.com/groups/opt_out.

Wilhelm Eger

unread,
Nov 22, 2013, 1:45:30 AM11/22/13
to sea...@googlegroups.com
Thanks for the hint, but I am sorry to say that I experience the same behavior with this setting.

Wilhelm Eger

unread,
Nov 22, 2013, 2:59:12 AM11/22/13
to sea...@googlegroups.com
Btw., it cannot be related to alignment, as no alignment problem is reported:

cat /proc/cpu/alignment

User:           0
System:         0
Skipped:        0
Half:           0
Word:           0
DWord:          0
Multi:          0
User faults:    2 (fixup)

JiaQiang Xu

unread,
Nov 22, 2013, 4:59:34 AM11/22/13
to sea...@googlegroups.com
To help debug, you can build the binary with debug symbols and send us the core dump.
To enable debug symbols, configure seafile with CFLAGS="-g -O0".


2013/11/22 Wilhelm Eger <wilhel...@gmail.com>

Wilhelm Eger

unread,
Nov 22, 2013, 9:55:15 AM11/22/13
to sea...@googlegroups.com
Thanks. I'll do so and let you know.

Wilhelm Eger

unread,
Nov 22, 2013, 10:22:59 AM11/22/13
to sea...@googlegroups.com
Ok, here it is. Compressed ~150k, uncompressed ~82MB.
core.xz

JiaQiang Xu

unread,
Nov 24, 2013, 6:31:15 AM11/24/13
to sea...@googlegroups.com
Sorry I don't have a ARM machine at hand for debugging. Can you use gdb to print the back trace?
gdb httpserver core
then run 'bt' command.


2013/11/22 Wilhelm Eger <wilhel...@gmail.com>

Wilhelm Eger

unread,
Nov 25, 2013, 3:31:07 AM11/25/13
to sea...@googlegroups.com
This is what I get, hopefully it is useful for you:

killall -KILL httpserver && gdb httpserver core


GNU gdb (Gentoo 7.6.1 p2) 7.6.1
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
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 "armv7a-hardfloat-linux-gnueabi".
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>...
Reading symbols from /usr/bin/httpserver...(no debugging symbols found)...done.
[New LWP 22044]
[New LWP 22052]
[New LWP 22045]
[New LWP 22043]
[New LWP 22053]
[New LWP 22046]
[New LWP 22047]
[New LWP 22048]
[New LWP 22049]
[New LWP 22050]
[New LWP 22051]

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".
Core was generated by `httpserver -f -G debug -g debug -D debug -c /var/seafile/ccnet -d /var/seafile/'.
Program terminated with signal 11, Segmentation fault.
#0  0xfffffffe in ?? ()
(gdb) bt
#0  0xfffffffe in ?? ()
#1  0xb67d3414 in ?? () from /lib/libc.so.6
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb)

Wilhelm Eger

unread,
Nov 25, 2013, 6:33:43 AM11/25/13
to sea...@googlegroups.com
I figured out something new. I was thinking that I don't need libevhtp anymore for seafile. But on another machine, where I tried to install it, it asked for evhtp.h. So there is an old version of libevhtp installed on my system, which might cause the troubles I have.

What would be the correct version of libevhtp to go along with seafile-server 2.0.3?

Thanks!

JiaQiang Xu

unread,
Nov 25, 2013, 7:09:33 AM11/25/13
to sea...@googlegroups.com
We found libevhtp is not very stable, so we stick to an old version that works.


2013/11/25 Wilhelm Eger <wilhel...@gmail.com>

Wilhelm Eger

unread,
Nov 25, 2013, 7:27:02 AM11/25/13
to sea...@googlegroups.com
Ok. Thanks. I have already compiled the version tagged in your git server as 1.2.0 and it works. But I will will use the 1.1.6 version if you suggest it.

Btw, I had to include signal.h in test_proxy.c of the 1.2.0 version lievhtp to get it to compile on Gentoo.

Wilhelm Eger

unread,
Nov 25, 2013, 7:55:24 AM11/25/13
to sea...@googlegroups.com
Version 1.1.6 compiled fine, but it provided a header /usr/include/onigposix.h, which is owned by another package in Gentoo. This is a bad situation. Does it originally belong to libevhtp? Otherwise, I would tell the ebuild to remove it and to pull in the other package dev-libs/oniguruma.

JiaQiang Xu

unread,
Nov 25, 2013, 8:00:19 AM11/25/13
to sea...@googlegroups.com
libevhtp 1.1.6 seems to copy the oniguruma source code directly.


2013/11/25 Wilhelm Eger <wilhel...@gmail.com>
Reply all
Reply to author
Forward
0 new messages