-
Notifications
You must be signed in to change notification settings - Fork 890
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segmentation fault on ARM while acessing the server using wget #285
Comments
Could you attach the full backtrace from GDB, @depikaraj, when compiling for debug with Thanks! |
@netromdk Here is the backtrace for ref. |
From what I can see is that: void end()
{
if (!completed_)
{
completed_ = true;
if (complete_request_handler_)
{
complete_request_handler_(); // <-- This gets called in frame 4 in crow/http_response.h:108.
}
}
} Which invokes crow/http_connection.h:338: void complete_request()
{
CROW_LOG_INFO << "Response: " << this << ' ' << req_.raw_url << ' ' << res.code << ' ' << close_connection_;
... But It also goes through routing.h:1048: if (rule_index == RULE_SPECIAL_REDIRECT_SLASH)
{
CROW_LOG_INFO << "Redirecting to a url with trailing slash: " << req.url;
res = response(301);
... Could you try doing |
@netromdk |
Try using |
@netromdk
This hid the logs while running but still the program segfaulted.
|
I meant adding that line right after: crow::SimpleApp app; But the effect is the same because What needs to be done is finding out why the captured |
@netromdk Thanks for the response. I successfully cross compiled crow server for ARM and currently trying to run the server on it. This is how my cpp looks
I did try to suppress the logs previously by commenting the #define CROW_ENABLE_LOGGING. |
It would be useful to see some extra logging with |
@netromdk Here's the extra logging.
|
I used the header crow_all.h from crow-0.1 and compiled hello world example cpp successfully. And the crow server runs on 0.0.0.0:8080. But I get a segmentation fault while trying to access the server using wget.
Machine details:
Linux witherspoon 4.10.17 armv6l GNU/Linux
root@witherspoon:/tmp# ./crow
(2018-02-19 05:12:49) [INFO ] Crow/0.1 server is running at 0.0.0.0:8080 using 1 threads
(2018-02-19 05:12:49) [INFO ] Call
app.loglevel(crow::LogLevel::Warning)
to hide Info level logs.(2018-02-19 05:12:57) [INFO ] Request: 127.0.0.1:37350 0x12349f0 HTTP/1.1 GET /
Segmentation fault (core dumped)
root@witherspoon:~# wget 0.0.0.0:8080
Connecting to 0.0.0.0:8080 (0.0.0.0:8080)
wget: error getting response
On running the core file with gdb, the following was reported.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00036748 in crow::Connection<crow::SocketAdaptor, crow::Crow<>>::complete_request() (this=0x0)
at ../sysroots/armv6-openbmc-linux-gnueabi/usr/include/crow_all.h:8973
8973 if (need_to_call_after_handlers_)
Any leads on how to fix this issue? Thanks in advance.
The text was updated successfully, but these errors were encountered: