adamdebreceni commented on a change in pull request #818:
URL: https://github.com/apache/nifi-minifi-cpp/pull/818#discussion_r441411809
##########
File path: extensions/http-curl/tests/AbsoluteTimeoutTest.cpp
##########
@@ -47,4 +47,6 @@ int main() {
plan->runNextProcessor();
assert(LogTestController::getInstance().contains("HTTP operation timed out,
with absolute timeout 3000ms"));
+
+ delete server;
Review comment:
it was just a temporary check, in no way did I intend it to be the
solution
Edit: the segfault was (probably) caused by the `CivetServer` creating a
load of threads and we just exited `main` like there is no tomorrow
##########
File path: extensions/http-curl/tests/AbsoluteTimeoutTest.cpp
##########
@@ -47,4 +47,6 @@ int main() {
plan->runNextProcessor();
assert(LogTestController::getInstance().contains("HTTP operation timed out,
with absolute timeout 3000ms"));
+
+ delete server;
Review comment:
the relevant part in `civetweb.c:16178`:
```
/* Call consume_socket() even when ctx->stop_flag > 0, to let it
* signal sq_empty condvar to wake up the master waiting in
* produce_socket() */
while (consume_socket(ctx, &conn->client, conn->thread_index)) {
conn->conn_birth_time = time(NULL);
```
##########
File path: extensions/http-curl/tests/AbsoluteTimeoutTest.cpp
##########
@@ -47,4 +47,6 @@ int main() {
plan->runNextProcessor();
assert(LogTestController::getInstance().contains("HTTP operation timed out,
with absolute timeout 3000ms"));
+
+ delete server;
Review comment:
```
static int
consume_socket(struct mg_context *ctx, struct socket *sp, int thread_index)
{
DEBUG_TRACE("%s", "going idle");
ctx->client_socks[thread_index].in_use = 0;
event_wait(ctx->client_wait_events[thread_index]);
*sp = ctx->client_socks[thread_index];
DEBUG_TRACE("grabbed socket %d, going busy", sp ? sp->sock : -1);
return !ctx->stop_flag;
}
```
##########
File path: extensions/http-curl/tests/AbsoluteTimeoutTest.cpp
##########
@@ -47,4 +47,6 @@ int main() {
plan->runNextProcessor();
assert(LogTestController::getInstance().contains("HTTP operation timed out,
with absolute timeout 3000ms"));
+
+ delete server;
Review comment:
it was just a temporary check, in no way did I intend it to be the
solution
the segfault was (probably) caused by the `CivetServer` creating a load of
threads and we just exited `main` like there is no tomorrow
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]