civetweb hangs when there are no free filedescriptors

Describe the bug
Civetweb on zephyr can easilly hang when there are no free filedscriptors. I have noticed it on a page that downloads some styles, javascript etc. Not on a simple text page.
To Reproduce
I have prepared a test case, it works in qemu_x86
https://github.com/xhpohanka/cv_test
It can be reproduced simply by accessing a page (http://<IP_ADDRESS>) with a browser and doing several fast refreshes (ctrl+F5).
When civetweb threads have the same priority the web server will hang because it ends in a loop in master thread where accept() still returns an error. If we add a sleep there (see https://github.com/xhpohanka/cv_test/blob/master/civetweb_dbg.patch) it will continue to run, but it leads to leaks like it can be seen in following logs (check net mem and net allocs outputs)
I do not know yet if the problem is in Zephyr or Civetweb where I have already reported it (civetweb/civetweb#962)
Log with normal operation
SeaBIOS (version rel-1.12.1-0-ga5cab58-dirty-20200625_115407-9426dddc0a1f-zephyr
)
Booting from ROM..*** Booting Zephyr OS build zephyr-v2.4.0-3346-gfd630d70c106  ***
*** 0.010000000            0 1322016 mg_start:18621: [listening_ports] -> [80,443s]
*** 0.010000000            0 1322016 mg_start:18621: [num_threads] -> [1]
*** 0.010000000            0 1322016 mg_start:18621: [max_request_size] -> [4096]
*** 0.020000000     10000000 1322016 mg_start:18621: [enable_keep_alive] -> [yes]
*** 0.020000000            0 1322016 mg_start:18621: [keep_alive_timeout_ms] -> [1000]

uart:~$ *** 0.030000000     10000000 1300184 consume_socket:17825: going idle
[00:00:00.010,000] <inf> net_config: Initializing network
[00:00:00.010,000] <inf> net_config: IPv4 address: <IP_ADDRESS>
[00:00:00.010,000] <inf> net_config: Running dhcpv4 client...
[00:00:00.010,000] <dbg> cv_test.main: Starting civetweb
[00:00:00.020,000] <dbg> net_sock.zsock_socket_internal: (main): socket: ctx=0x13e074, fd=3
[00:00:00.020,000] <dbg> net_sock.z_impl_zsock_getsockname: (main): getsockname: ctx=0x13e074, fd=3
[00:00:00.020,000] <dbg> net_sock.zsock_socket_internal: (main): socket: ctx=0x13e108, fd=4
[00:00:00.020,000] <dbg> net_sock.z_impl_zsock_getsockname: (main): getsockname: ctx=0x13e108, fd=4
[00:00:00.030,000] <dbg> cv_test.init_thread_cb: Master thread started, setting priotity 1
[00:00:00.030,000] <dbg> cv_test.init_thread_cb: Connection thread started, setting priotity 1
uart:~$
uart:~$
uart:~$ net mem
Fragment length 128 bytes
Network buffer pools:
Address     Total   Avail   Name
0x1c3d70    256 254 RX
0x1c3db8    256 254 TX
0x1c3f5c    96  96  RX DATA (rx_bufs)
0x1c3f98    192 192 TX DATA (tx_bufs)
uart:~$
uart:~$ *** 12.370000000<PHONE_NUMBER>0 1299936 accept_new_connection:18112: Accepted socket 5
*** 12.380000000     10000000 1299936 produce_socket:17875: queued socket 5
*** 12.380000000            0 1300184 consume_socket:17838: grabbed socket 5, going busy
*** 12.380000000            0 1300184 worker_thread_run:17985: Start processing connection from <IP_ADDRESS>
*** 12.380000000            0 1300184 process_new_connection:17578: Start processing connection from <IP_ADDRESS>
*** 12.380000000            0 1300184 process_new_connection:17585: calling get_request (1 times for this connection)
*** 12.380000000            0 1300184 alloc_get_host:13189: HTTP Host: <IP_ADDRESS>
*** 12.380000000            0 1300184 process_new_connection:17650: http: 1.1, error: none
*** 12.380000000            0 1300184 handle_request:13797: URL: /
*** 12.420000000     40000000 1300184 process_new_connection:17672: handle_request done
<IP_ADDRESS> - "GET / HTTP/1.1" 200
*** 12.420000000            0 1300184 process_new_connection:17585: calling get_request (2 times for this connection)
*** 12.520000000    100000000 1300184 alloc_get_host:13189: HTTP Host: <IP_ADDRESS>
*** 12.530000000     10000000 1300184 process_new_connection:17650: http: 1.1, error: none
*** 12.530000000            0 1300184 handle_request:13797: URL: /style.css
*** 12.570000000     40000000 1299936 accept_new_connection:18112: Accepted socket 6
*** 12.580000000     10000000 1299936 produce_socket:17875: queued socket 6
*** 12.590000000     10000000 1299936 accept_new_connection:18112: Accepted socket 7
*** 12.590000000            0 1299936 produce_socket:17875: queued socket 7
*** 12.600000000     10000000 1299936 accept_new_connection:18112: Accepted socket 8
*** 12.600000000            0 1299936 produce_socket:17875: queued socket 8
*** 12.610000000     10000000 1300184 process_new_connection:17672: handle_request done
<IP_ADDRESS> - "GET /style.css HTTP/1.1" 200
*** 12.610000000            0 1300184 process_new_connection:17585: calling get_request (3 times for this connection)
--- 1 messages dropped ---
[00:00:12.370,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): ctx=0x13e19c, pkt=0x175760, st=0, user_data=(nil)
[00:00:12.370,000] <dbg> net_sock.zsock_accept_ctx: (): accept: ctx=0x13e19c, fd=5
[00:00:12.370,000] <dbg> net_sock.z_impl_zsock_getsockname: (): getsockname: ctx=0x13e19c, fd=5
[00:00:12.520,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): ctx=0x13e19c, pkt=0x175760, st=0, user_data=(nil)
[00:00:12.570,000] <dbg> net_sock.zsock_accepted_cb: (rx_q[0]): parent=0x13e074, ctx=0x13e230, st=0
[00:00:12.570,000] <dbg> net_sock.zsock_accept_ctx: (): accept: ctx=0x13e230, fd=6
[00:00:12.580,000] <dbg> net_sock.z_impl_zsock_getsockname: (): getsockname: ctx=0x13e230, fd=6
[00:00:12.590,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): ctx=0x13e230, pkt=0x1755b0, st=0, user_data=(nil)
[00:00:12.590,000] <dbg> net_sock.zsock_accepted_cb: (rx_q[0]): parent=0x13e074, ctx=0x13e2c4, st=0
[00:00:12.590,000] <dbg> net_sock.zsock_accept_ctx: (): accept: ctx=0x13e2c4, fd=7
[00:00:12.590,000] <dbg> net_sock.z_impl_zsock_getsockname: (): getsockname: ctx=0x13e2c4, fd=7
[00:00:12.600,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): ctx=0x13e2c4, pkt=0x175688, st=0, user_data=(nil)
[00:00:12.600,000] <dbg> net_sock.zsock_accepted_cb: (rx_q[0]): parent=0x13e074, ctx=0x13e358, st=0
[00:00:12.600,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): ctx=0x13e358, pkt=0x1755f8, st=0, user_data=(nil)
[00:00:12.600,000] <dbg> net_sock.zsock_accept_ctx: (): accept: ctx=0x13e358, fd=8
[00:00:12.600,000] <dbg> net_sock.z_impl_zsock_getsockname: (): getsockname: ctx=0x13e358, fd=8
uart:~$ *** 13.620000000<PHONE_NUMBER> 1300184 process_new_connection:17650: http: none, error: No data received
*** 13.620000000            0 1300184 process_new_connection:17738: Done processing connection from <IP_ADDRESS> (0.000000 sec)
*** 13.620000000            0 1300184 worker_thread_run:18033: Connection closed
*** 13.630000000     10000000 1300184 consume_socket:17825: going idle
*** 13.630000000            0 1300184 consume_socket:17838: grabbed socket 6, going busy
*** 13.630000000            0 1300184 worker_thread_run:17985: Start processing connection from <IP_ADDRESS>
*** 13.630000000            0 1300184 process_new_connection:17578: Start processing connection from <IP_ADDRESS>
*** 13.630000000            0 1300184 process_new_connection:17585: calling get_request (1 times for this connection)
*** 13.630000000            0 1300184 alloc_get_host:13189: HTTP Host: <IP_ADDRESS>
*** 13.630000000            0 1300184 process_new_connection:17650: http: 1.1, error: none
*** 13.630000000            0 1300184 handle_request:13797: URL: /jquery-3.5.1.min.js
*** 14.470000000    840000000 1300184 process_new_connection:17672: handle_request done
<IP_ADDRESS> - "GET /jquery-3.5.1.min.js HTTP/1.1" 200
*** 14.470000000            0 1300184 process_new_connection:17585: calling get_request (2 times for this connection)
[00:00:13.620,000] <dbg> net_sock.zsock_close_ctx: (): close ctx: ctx=0x13e19c
uart:~$ *** 15.480000000<PHONE_NUMBER> 1300184 process_new_connection:17650: http: none, error: No data received
*** 15.480000000            0 1300184 process_new_connection:17738: Done processing connection from <IP_ADDRESS> (0.000000 sec)
*** 15.480000000            0 1300184 worker_thread_run:18033: Connection closed
*** 15.480000000            0 1300184 consume_socket:17825: going idle
*** 15.480000000            0 1300184 consume_socket:17838: grabbed socket 7, going busy
*** 15.480000000            0 1300184 worker_thread_run:17985: Start processing connection from <IP_ADDRESS>
*** 15.480000000            0 1300184 process_new_connection:17578: Start processing connection from <IP_ADDRESS>
*** 15.480000000            0 1300184 process_new_connection:17585: calling get_request (1 times for this connection)
*** 15.490000000     10000000 1300184 alloc_get_host:13189: HTTP Host: <IP_ADDRESS>
*** 15.490000000            0 1300184 process_new_connection:17650: http: 1.1, error: none
*** 15.490000000            0 1300184 handle_request:13797: URL: /js.cookie-2.2.1.min.js
*** 15.520000000     30000000 1300184 process_new_connection:17672: handle_request done
<IP_ADDRESS> - "GET /js.cookie-2.2.1.min.js HTTP/1.1" 200
*** 15.520000000            0 1300184 process_new_connection:17585: calling get_request (2 times for this connection)
*** 15.520000000            0 1300184 alloc_get_host:13189: HTTP Host: <IP_ADDRESS>
*** 15.520000000            0 1300184 process_new_connection:17650: http: 1.1, error: none
*** 15.520000000            0 1300184 handle_request:13797: URL: /login.js
*** 15.540000000     20000000 1300184 process_new_connection:17672: handle_request done
<IP_ADDRESS> - "GET /login.js HTTP/1.1" 200
*** 15.540000000            0 1300184 process_new_connection:17585: calling get_request (3 times for this connection)
*** 15.540000000            0 1300184 alloc_get_host:13189: HTTP Host: <IP_ADDRESS>
*** 15.540000000            0 1300184 process_new_connection:17650: http: 1.1, error: none
*** 15.540000000            0 1300184 handle_request:13797: URL: /logo.png
*** 16.260000000    720000000 1300184 process_new_connection:17672: handle_request done
<IP_ADDRESS> - "GET /logo.png HTTP/1.1" 200
*** 16.260000000            0 1300184 process_new_connection:17585: calling get_request (4 times for this connection)
[00:00:15.480,000] <dbg> net_sock.zsock_close_ctx: (): close ctx: ctx=0x13e230
[00:00:15.510,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): ctx=0x13e2c4, pkt=0x1757a8, st=0, user_data=(nil)
[00:00:15.530,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): ctx=0x13e2c4, pkt=0x1757a8, st=0, user_data=(nil)
uart:~$ *** 17.270000000<PHONE_NUMBER> 1300184 process_new_connection:17650: http: none, error: No data received
*** 17.270000000            0 1300184 process_new_connection:17738: Done processing connection from <IP_ADDRESS> (0.000000 sec)
*** 17.270000000            0 1300184 worker_thread_run:18033: Connection closed
*** 17.270000000            0 1300184 consume_socket:17825: going idle
*** 17.270000000            0 1300184 consume_socket:17838: grabbed socket 8, going busy
*** 17.270000000            0 1300184 worker_thread_run:17985: Start processing connection from <IP_ADDRESS>
*** 17.270000000            0 1300184 process_new_connection:17578: Start processing connection from <IP_ADDRESS>
*** 17.270000000            0 1300184 process_new_connection:17585: calling get_request (1 times for this connection)
*** 17.270000000            0 1300184 alloc_get_host:13189: HTTP Host: <IP_ADDRESS>
*** 17.270000000            0 1300184 process_new_connection:17650: http: 1.1, error: none
*** 17.270000000            0 1300184 handle_request:13797: URL: /sha1.min.js
*** 17.340000000     70000000 1300184 process_new_connection:17672: handle_request done
<IP_ADDRESS> - "GET /sha1.min.js HTTP/1.1" 200
*** 17.340000000            0 1300184 process_new_connection:17585: calling get_request (2 times for this connection)
*** 17.450000000    110000000 1300184 alloc_get_host:13189: HTTP Host: <IP_ADDRESS>
*** 17.450000000            0 1300184 process_new_connection:17650: http: 1.1, error: none
*** 17.450000000            0 1300184 handle_request:13797: URL: /favicon.ico
*** 17.450000000            0 1300184 process_new_connection:17672: handle_request done
<IP_ADDRESS> - "GET /favicon.ico HTTP/1.1" 404
*** 17.460000000     10000000 1300184 process_new_connection:17585: calling get_request (3 times for this connection)
[00:00:17.270,000] <dbg> net_sock.zsock_close_ctx: (): close ctx: ctx=0x13e2c4
[00:00:17.450,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): ctx=0x13e358, pkt=0x175760, st=0, user_data=(nil)
[00:00:17.450,000] <err> cv_test: cannot open /favicon.ico
[00:00:18.270,000] <err> log: argument 0 in source cv_test log message "cannot open %s" missinglog_strdup().
uart:~$ *** 18.470000000<PHONE_NUMBER> 1300184 process_new_connection:17650: http: none, error: No data received
*** 18.470000000            0 1300184 process_new_connection:17738: Done processing connection from <IP_ADDRESS> (0.000000 sec)
*** 18.470000000            0 1300184 worker_thread_run:18033: Connection closed
*** 18.470000000            0 1300184 consume_socket:17825: going idle
[00:00:18.470,000] <dbg> net_sock.zsock_close_ctx: (): close ctx: ctx=0x13e358
uart:~$
uart:~$ net mem
Fragment length 128 bytes
Network buffer pools:
Address     Total   Avail   Name
0x1c3d70    256 254 RX
0x1c3db8    256 254 TX
0x1c3f5c    96  96  RX DATA (rx_bufs)
0x1c3f98    192 192 TX DATA (tx_bufs)

Log with leaks
uart:~$ *** 32.250000000<PHONE_NUMBER>0 1299936 accept_new_connection:18112: Accepted socket 5
*** 32.250000000            0 1299936 produce_socket:17875: queued socket 5
*** 32.250000000            0 1300184 consume_socket:17838: grabbed socket 5, going busy
*** 32.250000000            0 1300184 worker_thread_run:17985: Start processing connection from <IP_ADDRESS>
*** 32.250000000            0 1300184 process_new_connection:17578: Start processing connection from <IP_ADDRESS>
*** 32.250000000            0 1300184 process_new_connection:17585: calling get_request (1 times for this connection)
*** 32.250000000            0 1300184 alloc_get_host:13189: HTTP Host: <IP_ADDRESS>
*** 32.250000000            0 1300184 process_new_connection:17650: http: 1.1, error: none
*** 32.260000000     10000000 1300184 handle_request:13797: URL: /
*** 32.280000000     20000000 1300184 process_new_connection:17672: handle_request done
<IP_ADDRESS> - "GET / HTTP/1.1" 200
*** 32.280000000            0 1300184 process_new_connection:17585: calling get_request (2 times for this connection)
*** 32.310000000     30000000 1300184 alloc_get_host:13189: HTTP Host: <IP_ADDRESS>
*** 32.310000000            0 1300184 process_new_connection:17650: http: 1.1, error: none
*** 32.310000000            0 1300184 handle_request:13797: URL: /style.css
*** 32.360000000     50000000 1299936 accept_new_connection:18112: Accepted socket 6
*** 32.360000000            0 1299936 produce_socket:17875: queued socket 6
*** 32.360000000            0 1299936 accept_new_connection:18112: Accepted socket 7
*** 32.370000000     10000000 1299936 produce_socket:17875: queued socket 7
*** 32.370000000            0 1299936 accept_new_connection:18112: Accepted socket 8
*** 32.380000000     10000000 1299936 produce_socket:17875: queued socket 8
--- 1 messages dropped ---
[00:00:32.240,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): ctx=0x13e19c, pkt=0x1756d0, st=0, user_data=(nil)
[00:00:32.250,000] <dbg> net_sock.zsock_accept_ctx: (): accept: ctx=0x13e19c, fd=5
[00:00:32.250,000] <dbg> net_sock.z_impl_zsock_getsockname: (): getsockname: ctx=0x13e19c, fd=5
[00:00:32.300,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): ctx=0x13e19c, pkt=0x1756d0, st=0, user_data=(nil)
[00:00:32.350,000] <dbg> net_sock.zsock_accepted_cb: (rx_q[0]): parent=0x13e074, ctx=0x13e230, st=0
[00:00:32.350,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): ctx=0x13e230, pkt=0x175760, st=0, user_data=(nil)
[00:00:32.360,000] <dbg> net_sock.zsock_accepted_cb: (rx_q[0]): parent=0x13e074, ctx=0x13e2c4, st=0
[00:00:32.360,000] <dbg> net_sock.zsock_accept_ctx: (): accept: ctx=0x13e230, fd=6
[00:00:32.360,000] <dbg> net_sock.z_impl_zsock_getsockname: (): getsockname: ctx=0x13e230, fd=6
[00:00:32.360,000] <dbg> net_sock.zsock_accept_ctx: (): accept: ctx=0x13e2c4, fd=7
[00:00:32.370,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): ctx=0x13e2c4, pkt=0x1755b0, st=0, user_data=(nil)
[00:00:32.370,000] <dbg> net_sock.zsock_accepted_cb: (rx_q[0]): parent=0x13e074, ctx=0x13e358, st=0
[00:00:32.370,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): ctx=0x13e358, pkt=0x175718, st=0, user_data=(nil)
[00:00:32.370,000] <dbg> net_sock.z_impl_zsock_getsockname: (): getsockname: ctx=0x13e2c4, fd=7
[00:00:32.370,000] <dbg> net_sock.zsock_accept_ctx: (): accept: ctx=0x13e358, fd=8
[00:00:32.380,000] <dbg> net_sock.z_impl_zsock_getsockname: (): getsockname: ctx=0x13e358, fd=8
uart:~$ *** 32.420000000     40000000 1300184 process_new_connection:17672: handle_request done
<IP_ADDRESS> - "GET /style.css HTTP/1.1" 200
*** 32.420000000            0 1300184 process_new_connection:17585: calling get_request (3 times for this connection)
*** 32.520000000    100000000 1300184 alloc_get_host:13189: HTTP Host: <IP_ADDRESS>
*** 32.520000000            0 1300184 process_new_connection:17650: http: 1.1, error: none
*** 32.520000000            0 1300184 handle_request:13797: URL: /
*** 32.550000000     30000000 1300184 process_new_connection:17672: handle_request done
<IP_ADDRESS> - "GET / HTTP/1.1" 200
*** 32.550000000            0 1300184 process_new_connection:17585: calling get_request (4 times for this connection)
*** 32.560000000     10000000 1300184 alloc_get_host:13189: HTTP Host: <IP_ADDRESS>
*** 32.570000000     10000000 1300184 process_new_connection:17650: http: 1.1, error: none
*** 32.570000000            0 1300184 handle_request:13797: URL: /style.css
*** 32.590000000     20000000 1299936 accept_new_connection:18112: Accepted socket 9
*** 32.590000000            0 1299936 produce_socket:17875: queued socket 9
[00:00:32.520,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): ctx=0x13*** 32.620000000     30000000 1299936 accept_new_connection:18112: Accepted socket 10
*** 32.620000000            0 1299936 produce_socket:17875: queued socket 10
*** 32.620000000            0 1299936 accept_new_connection:18112: Accepted socket 11
*** 32.620000000            0 1299936 produce_socket:17875: queued socket 11
e19c, pkt=0x1755f8, st=0, user_data=(nil)
[00:00:32.540,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): ctx=0x13e358, pkt=(nil), st=-54, user_data=(nil)
[00:00:32.540,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): Set EOF flag on pkt 0x175718
[00:00:32.540,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): ctx=0x13e2c4, pkt=(nil), st=-54, user_data=(nil)
[00:00:32.540,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): Set EOF flag on pkt 0x1755b0
[00:00:32.540,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): ctx=0x13e230, pkt=(nil), st=-54, user_data=(nil)
[00:00:32.540,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): Set EOF flag on pkt 0x175760
[00:00:32.560,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): ctx=0x13e19c, pkt=0x1756d0, st=0, user_data=(nil)
[00:00:32.580,000] <dbg> net_sock.zsock_accepted_cb: (rx_q[0]): parent=0x13e074, ctx=0x13e3ec, st=0
[00:00:32.590,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): ctx=0x13e3ec, pkt=0x1757a8, st=0, user_data=(nil)
[00:00:32.590,000] <dbg> net_sock.zsock_accept_ctx: (): accept: ctx=0x13e3ec, fd=9
--- 3 messages dropped ---
[00:00:32.610,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): ctx=0x13e480, pkt=0x175688, st=0, user_data=(nil)
[00:00:32.610,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): ctx=0x13e514, pkt=0x1755f8, st=0, user_data=(nil)
[00:00:32.620,000] <dbg> net_sock.zsock_accept_ctx: (): accept: ctx=0x13e480, fd=10
[00:00:32.620,000] <dbg> net_sock.z_impl_zsock_getsockname: (): getsockname: ctx=0x13e480, fd=10
[00:00:32.620,000] <dbg> net_sock.zsock_accept_ctx: (): accept: ctx=0x13e514, fd=11
[00:00:32.620,000] <dbg> net_sock.z_impl_zsock_getsockname: (): getsockname: ctx=0x13e514, fd=11
uart:~$ *** 32.660000000     40000000 1300184 process_new_connection:17672: handle_request done
<IP_ADDRESS> - "GET /style.css HTTP/1.1" 200
*** 32.660000000            0 1300184 process_new_connection:17585: calling get_request (5 times for this connection)
*** 32.750000000     90000000 1300184 alloc_get_host:13189: HTTP Host: <IP_ADDRESS>
*** 32.750000000            0 1300184 process_new_connection:17650: http: 1.1, error: none
*** 32.750000000            0 1300184 handle_request:13797: URL: /
*** 32.770000000     20000000 1300184 process_new_connection:17672: handle_request done
<IP_ADDRESS> - "GET / HTTP/1.1" 200
*** 32.770000000            0 1300184 process_new_connection:17585: calling get_request (6 times for this connection)
*** 32.790000000     20000000 1300184 alloc_get_host:13189: HTTP Host: <IP_ADDRESS>
*** 32.790000000            0 1300184 process_new_connection:17650: http: 1.1, error: none
*** 32.800000000     10000000 1300184 handle_request:13797: URL: /style.css
*** 32.860000000     60000000 1299936 accept_new_connection:18112: Accepted socket 12
*** 32.860000000            0 1299936 produce_socket:17875: queued socket 12
*** 32.870000000     10000000 1299936 accept_new_connection:18112: Accepted socket 13
*** 32.870000000            0 1299936 produce_socket:17875: queued socket 13
*** 32.870000000            0 1299936 accept_new_connection:18112: Accepted socket 14
*** 32.870000000            0 1299936 produce_socket:17875: queued socket 14
--- 3 messages dropped ---
[00:00:32.770,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): ctx=0x13e3ec, pkt=(nil), st=-54, user_data=(nil)
[00:00:32.770,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): Set EOF flag on pkt 0x1757a8
[00:00:32.770,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): ctx=0x13e514, pkt=(nil), st=-54, user_data=(nil)
[00:00:32.770,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): Set EOF flag on pkt 0x1755f8
[00:00:32.790,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): ctx=0x13e19c, pkt=0x175568, st=0, user_data=(nil)
uart:~$ *** 32.880000000     10000000 1300184 process_new_connection:17672: handle_request done
<IP_ADDRESS> - "GET /style.css HTTP/1.1" 200
*** 32.880000000            0 1300184 process_new_connection:17585: calling get_request (7 times for this connection)
[00:00:32.850,000] <dbg> net_sock.zsock_accepted_cb: (rx_q[0]): parent=0x13e074, ctx=0x13e5a8, st=0
[00:00:32.850,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): ctx=0x13e5a8, pkt=0x175448, st=0, user_data=(nil)
[00:00:32.850,000] <dbg> net_sock.zsock_accepted_cb: (rx_q[0]): parent=0x13e074, ctx=0x13e63c, st=0
[00:00:32.860,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): ctx=0x13e63c, pkt=0x175490, st=0, user_data=(nil)
[00:00:32.860,000] <dbg> net_sock.zsock_accepted_cb: (rx_q[0]): parent=0x13e074, ctx=0x13e6d0, st=0
[00:00:32.860,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): ctx=0x13e6d0, pkt=0x1754d8, st=0, user_data=(nil)
[00:00:32.860,000] <dbg> net_sock.zsock_accept_ctx: (): accept: ctx=0x13e5a8, fd=12
[00:00:32.860,000] <dbg> net_sock.z_impl_zsock_getsockname: (): getsockname: ctx=0x13e5a8, fd=12
[00:00:32.870,000] <dbg> net_sock.zsock_accept_ctx: (): accept: ctx=0x13e63c, fd=13
[00:00:32.870,000] <dbg> net_sock.z_impl_zsock_getsockname: (): getsockname: ctx=0x13e63c, fd=13
[00:00:32.870,000] <dbg> net_sock.zsock_accept_ctx: (): accept: ctx=0x13e6d0, fd=14
[00:00:32.870,000] <dbg> net_sock.z_impl_zsock_getsockname: (): getsockname: ctx=0x13e6d0, fd=14
uart:~$ *** 32.970000000     90000000 1300184 alloc_get_host:13189: HTTP Host: <IP_ADDRESS>
*** 32.970000000            0 1300184 process_new_connection:17650: http: 1.1, error: none
*** 32.970000000            0 1300184 handle_request:13797: URL: /
*** 32.990000000     20000000 1300184 process_new_connection:17672: handle_request done
<IP_ADDRESS> - "GET / HTTP/1.1" 200
*** 32.990000000            0 1300184 process_new_connection:17585: calling get_request (8 times for this connection)
*** 33.030000000     40000000 1300184 alloc_get_host:13189: HTTP Host: <IP_ADDRESS>
*** 33.030000000            0 1300184 process_new_connection:17650: http: 1.1, error: none
*** 33.030000000            0 1300184 handle_request:13797: URL: /style.css
*** 33.090000000     60000000 1299936 accept_new_connection:18112: Accepted socket 15
*** 33.090000000            0 1299936 produce_socket:17875: queued socket 15
[00:00:32.970,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): ctx=0x13e19c, pkt=0x175400, st=0, user_data=(nil)
[00:00:32.990,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): ctx=0x13e63c, pkt=(nil), st=-54, user_data=(nil)
[00:00:32.990,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): Set EOF flag on pkt 0x175490
[00:00:32.990,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): ctx=0x13e5a8, pkt=(nil), st=-54, user_data=(nil)
[00:00:32.990,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): Set EOF flag on pkt 0x175448
[00:00:32.990,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): ctx=0x13e6d0, pkt=(nil), st=-54, user_data=(nil)
[00:00:32.990,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): Set EOF flag on pkt 0x1754d8
[00:00:33.030,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): ctx=0x13e19c, pkt=0x1756d0, st=0, user_data=(nil)
[00:00:33.070,000] <dbg> net_sock.zsock_accepted_cb: (rx_q[0]): parent=0x13e074, ctx=0x13e764, st=0
[00:00:33.070,000] <dbg> net_sock.zsock_accepted_cb: (rx_q[0]): parent=0x13e074, ctx=0x13e7f8, st=0
[00:00:33.070,000] <dbg> net_sock.zsock_accepted_cb: (rx_q[0]): parent=0x13e074, ctx=0x13e88c, st=0
[00:00:33.080,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): ctx=0x13e764, pkt=0x175400, st=0, user_data=(nil)
[00:00:33.080,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): ctx=0x13e7f8, pkt=0x1753b8, st=0, user_data=(nil)
[00:00:33.080,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): ctx=0x13e88c, pkt=0x175370, st=0, user_data=(nil)
[00:00:33.090,000] <dbg> net_sock.zsock_accept_ctx: (): accept: ctx=0x13e764, fd=15
[00:00:33.090,000] <dbg> net_sock.z_impl_zsock_getsockname: (): getsockname: ctx=0x13e764, fd=15
uart:~$ *** 33.130000000     40000000 1300184 process_new_connection:17672: handle_request done
<IP_ADDRESS> - "GET /style.css HTTP/1.1" 200
*** 33.130000000            0 1300184 process_new_connection:17585: calling get_request (9 times for this connection)
*** 33.180000000     50000000 1300184 alloc_get_host:13189: HTTP Host: <IP_ADDRESS>
*** 33.180000000            0 1300184 process_new_connection:17650: http: 1.1, error: none
*** 33.180000000            0 1300184 handle_request:13797: URL: /
*** 33.210000000     30000000 1300184 process_new_connection:17672: handle_request done
<IP_ADDRESS> - "GET / HTTP/1.1" 200
*** 33.210000000            0 1300184 process_new_connection:17585: calling get_request (10 times for this connection)
*** 33.230000000     20000000 1300184 alloc_get_host:13189: HTTP Host: <IP_ADDRESS>
*** 33.230000000            0 1300184 process_new_connection:17650: http: 1.1, error: none
*** 33.230000000            0 1300184 handle_request:13797: URL: /style.css
[00:00:33.180,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): ctx=0x13e19c, pkt=0x175328, st=0, user_data=(nil)
[00:00:33.210,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): ctx=0x13e88c, pkt=(nil), st=-54, user_data=(nil)
[00:00:33.210,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): Set EOF flag on pkt 0x175370
[00:00:33.210,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): ctx=0x13e764, pkt=(nil), st=-54, user_data=(nil)
[00:00:33.210,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): Set EOF flag on pkt 0x175400
[00:00:33.210,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): ctx=0x13e7f8, pkt=(nil), st=-54, user_data=(nil)
[00:00:33.210,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): Set EOF flag on pkt 0x1753b8
[00:00:33.230,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): ctx=0x13e19c, pkt=0x175568, st=0, user_data=(nil)
[00:00:33.280,000] <err> net_tcp: net_context_get(): -2
[00:00:33.280,000] <err> net_tcp: Cannot allocate a new TCP connection
[00:00:33.280,000] <dbg> net_sock.zsock_accepted_cb: (rx_q[0]): parent=0x13e074, ctx=0x13e7f8, st=0
[00:00:33.280,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): ctx=0x13e7f8, pkt=0x175298, st=0, user_data=(nil)
[00:00:33.280,000] <dbg> net_sock.zsock_accepted_cb: (rx_q[0]): parent=0x13e074, ctx=0x13e88c, st=0
[00:00:33.280,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): ctx=0x13e88c, pkt=0x1752e0, st=0, user_data=(nil)
[00:00:33.300,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): ctx=0x13e19c, pkt=0x175520, st=0, user_data=(nil)
uart:~$ *** 33.320000000     90000000 1300184 process_new_connection:17672: handle_request done
<IP_ADDRESS> - "GET /style.css HTTP/1.1" 200
*** 33.320000000            0 1300184 process_new_connection:17585: calling get_request (11 times for this connection)
*** 33.320000000            0 1300184 alloc_get_host:13189: HTTP Host: <IP_ADDRESS>
*** 33.320000000            0 1300184 process_new_connection:17650: http: 1.1, error: none
*** 33.320000000            0 1300184 handle_request:13797: URL: /sha1.min.js
*** 33.390000000     70000000 1300184 process_new_connection:17672: handle_request done
<IP_ADDRESS> - "GET /sha1.min.js HTTP/1.1" 200
*** 33.390000000            0 1300184 process_new_connection:17585: calling get_request (12 times for this connection)
*** 34.400000000<PHONE_NUMBER> 1300184 process_new_connection:17650: http: none, error: No data received
*** 34.400000000            0 1300184 process_new_connection:17738: Done processing connection from <IP_ADDRESS> (0.000000 sec)
*** 34.410000000     10000000 1300184 worker_thread_run:18033: Connection closed
*** 34.410000000            0 1300184 consume_socket:17825: going idle
*** 34.410000000            0 1300184 consume_socket:17838: grabbed socket 6, going busy
*** 34.410000000            0 1300184 worker_thread_run:17985: Start processing connection from <IP_ADDRESS>
*** 34.410000000            0 1300184 process_new_connection:17578: Start processing connection from <IP_ADDRESS>
*** 34.410000000            0 1300184 process_new_connection:17585: calling get_request (1 times for this connection)
*** 34.410000000            0 1300184 alloc_get_host:13189: HTTP Host: <IP_ADDRESS>
*** 34.410000000            0 1300184 process_new_connection:17650: http: 1.1, error: none
*** 34.410000000            0 1300184 handle_request:13797: URL: /jquery-3.5.1.min.js
*** 34.420000000     10000000 1299936 accept_new_connection:18112: Accepted socket 5
*** 34.420000000            0 1299936 produce_socket:17875: queued socket 5
[00:00:34.260,000] <err> net_tcp: net_context_get(): -2
[00:00:34.260,000] <err> net_tcp: Cannot allocate a new TCP connection
[00:00:34.400,000] <dbg> net_sock.zsock_close_ctx: (): close ctx: ctx=0x13e19c
[00:00:34.420,000] <dbg> net_sock.zsock_accept_ctx: (): accept: ctx=0x13e7f8, fd=5
[00:00:34.420,000] <dbg> net_sock.z_impl_zsock_getsockname: (): getsockname: ctx=0x13e7f8, fd=5
[00:00:34.440,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:34.460,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:34.480,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:34.500,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:34.520,000] <dbg> cv_test.send_file: ferr -1 57
]art:~$ *** 34.540000000    120000000 1300184 mg_send_http_error_impl:4650: Error 500 - [chyba
*** 34.540000000            0 1300184 process_new_connection:17672: handle_request done
<IP_ADDRESS> - "GET /jquery-3.5.1.min.js HTTP/1.1" 500
*** 34.540000000            0 1300184 process_new_connection:17738: Done processing connection from <IP_ADDRESS> (0.000000 sec)
*** 34.540000000            0 1300184 worker_thread_run:18033: Connection closed
*** 34.550000000     10000000 1300184 consume_socket:17825: going idle
*** 34.550000000            0 1300184 consume_socket:17838: grabbed socket 7, going busy
*** 34.550000000            0 1300184 worker_thread_run:17985: Start processing connection from <IP_ADDRESS>
*** 34.550000000            0 1300184 process_new_connection:17578: Start processing connection from <IP_ADDRESS>
*** 34.550000000            0 1300184 process_new_connection:17585: calling get_request (1 times for this connection)
*** 34.550000000            0 1300184 alloc_get_host:13189: HTTP Host: <IP_ADDRESS>
*** 34.550000000            0 1300184 process_new_connection:17650: http: 1.1, error: none
*** 34.550000000            0 1300184 handle_request:13797: URL: /js.cookie-2.2.1.min.js
*** 34.560000000     10000000 1299936 accept_new_connection:18112: Accepted socket 6
*** 34.560000000            0 1299936 produce_socket:17875: queued socket 6
[00:00:34.540,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:34.540,000] <err> cv_test: file sending error
[00:00:34.540,000] <dbg> net_sock.zsock_close_ctx: (): close ctx: ctx=0x13e230
[00:00:34.560,000] <dbg> net_sock.zsock_accept_ctx: (): accept: ctx=0x13e88c, fd=6
[00:00:34.560,000] <dbg> net_sock.z_impl_zsock_getsockname: (): getsockname: ctx=0x13e88c, fd=6
[00:00:34.580,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:34.600,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:34.620,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:34.640,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:34.660,000] <dbg> cv_test.send_file: ferr -1 57
]art:~$ *** 34.680000000    120000000 1300184 mg_send_http_error_impl:4650: Error 500 - [chyba
*** 34.680000000            0 1300184 process_new_connection:17672: handle_request done
<IP_ADDRESS> - "GET /js.cookie-2.2.1.min.js HTTP/1.1" 500
*** 34.680000000            0 1300184 process_new_connection:17738: Done processing connection from <IP_ADDRESS> (0.000000 sec)
*** 34.680000000            0 1300184 worker_thread_run:18033: Connection closed
*** 34.680000000            0 1300184 consume_socket:17825: going idle
*** 34.680000000            0 1300184 consume_socket:17838: grabbed socket 8, going busy
*** 34.680000000            0 1300184 worker_thread_run:17985: Start processing connection from <IP_ADDRESS>
*** 34.680000000            0 1300184 process_new_connection:17578: Start processing connection from <IP_ADDRESS>
*** 34.680000000            0 1300184 process_new_connection:17585: calling get_request (1 times for this connection)
*** 34.680000000            0 1300184 alloc_get_host:13189: HTTP Host: <IP_ADDRESS>
*** 34.680000000            0 1300184 process_new_connection:17650: http: 1.1, error: none
*** 34.680000000            0 1300184 handle_request:13797: URL: /sha1.min.js
]** 34.810000000    130000000 1300184 mg_send_http_error_impl:4650: Error 500 - [chyba
*** 34.810000000            0 1300184 process_new_connection:17672: handle_request done
<IP_ADDRESS> - "GET /sha1.min.js HTTP/1.1" 500
*** 34.810000000            0 1300184 process_new_connection:17738: Done processing connection from <IP_ADDRESS> (0.000000 sec)
*** 34.810000000            0 1300184 worker_thread_run:18033: Connection closed
*** 34.810000000            0 1300184 consume_socket:17825: going idle
*** 34.820000000     10000000 1300184 consume_socket:17838: grabbed socket 9, going busy
*** 34.820000000            0 1300184 worker_thread_run:17985: Start processing connection from <IP_ADDRESS>
*** 34.820000000            0 1300184 process_new_connection:17578: Start processing connection from <IP_ADDRESS>
*** 34.820000000            0 1300184 process_new_connection:17585: calling get_request (1 times for this connection)
*** 34.820000000            0 1300184 alloc_get_host:13189: HTTP Host: <IP_ADDRESS>
*** 34.820000000            0 1300184 process_new_connection:17650: http: 1.1, error: none
*** 34.820000000            0 1300184 handle_request:13797: URL: /jquery-3.5.1.min.js
[00:00:34.680,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:34.680,000] <err> cv_test: file sending error
[00:00:34.680,000] <dbg> net_sock.zsock_close_ctx: (): close ctx: ctx=0x13e2c4
[00:00:34.710,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:34.730,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:34.750,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:34.770,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:34.790,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:34.810,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:34.810,000] <err> cv_test: file sending error
[00:00:34.810,000] <dbg> net_sock.zsock_close_ctx: (): close ctx: ctx=0x13e358
]art:~$ *** 34.950000000    130000000 1300184 mg_send_http_error_impl:4650: Error 500 - [chyba
*** 34.950000000            0 1300184 process_new_connection:17672: handle_request done
<IP_ADDRESS> - "GET /jquery-3.5.1.min.js HTTP/1.1" 500
*** 34.950000000            0 1300184 process_new_connection:17738: Done processing connection from <IP_ADDRESS> (0.000000 sec)
*** 34.950000000            0 1300184 worker_thread_run:18033: Connection closed
*** 34.950000000            0 1300184 consume_socket:17825: going idle
*** 34.950000000            0 1300184 consume_socket:17838: grabbed socket 10, going busy
*** 34.950000000            0 1300184 worker_thread_run:17985: Start processing connection from <IP_ADDRESS>
*** 34.950000000            0 1300184 process_new_connection:17578: Start processing connection from <IP_ADDRESS>
*** 34.960000000     10000000 1300184 process_new_connection:17585: calling get_request (1 times for this connection)
*** 34.960000000            0 1300184 alloc_get_host:13189: HTTP Host: <IP_ADDRESS>
*** 34.960000000            0 1300184 process_new_connection:17650: http: 1.1, error: none
*** 34.960000000            0 1300184 handle_request:13797: URL: /js.cookie-2.2.1.min.js
[00:00:34.850,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:34.870,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:34.890,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:34.910,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:34.930,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:34.950,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:34.950,000] <err> cv_test: file sending error
[00:00:34.950,000] <dbg> net_sock.zsock_close_ctx: (): close ctx: ctx=0x13e3ec
[00:00:34.980,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:35.000,000] <dbg> cv_test.send_file: ferr -1 57
]art:~$ *** 35.080000000    120000000 1300184 mg_send_http_error_impl:4650: Error 500 - [chyba
*** 35.080000000            0 1300184 process_new_connection:17672: handle_request done
<IP_ADDRESS> - "GET /js.cookie-2.2.1.min.js HTTP/1.1" 500
*** 35.080000000            0 1300184 process_new_connection:17738: Done processing connection from <IP_ADDRESS> (0.000000 sec)
*** 35.080000000            0 1300184 worker_thread_run:18033: Connection closed
*** 35.080000000            0 1300184 consume_socket:17825: going idle
*** 35.080000000            0 1300184 consume_socket:17838: grabbed socket 11, going busy
*** 35.080000000            0 1300184 worker_thread_run:17985: Start processing connection from <IP_ADDRESS>
*** 35.080000000            0 1300184 process_new_connection:17578: Start processing connection from <IP_ADDRESS>
*** 35.080000000            0 1300184 process_new_connection:17585: calling get_request (1 times for this connection)
*** 35.080000000            0 1300184 alloc_get_host:13189: HTTP Host: <IP_ADDRESS>
*** 35.080000000            0 1300184 process_new_connection:17650: http: 1.1, error: none
*** 35.080000000            0 1300184 handle_request:13797: URL: /sha1.min.js
[00:00:35.020,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:35.040,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:35.060,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:35.080,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:35.080,000] <err> cv_test: file sending error
[00:00:35.080,000] <dbg> net_sock.zsock_close_ctx: (): close ctx: ctx=0x13e480
[00:00:35.100,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:35.120,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:35.140,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:35.160,000] <dbg> cv_test.send_file: ferr -1 57
]art:~$ *** 35.200000000    120000000 1300184 mg_send_http_error_impl:4650: Error 500 - [chyba
*** 35.200000000            0 1300184 process_new_connection:17672: handle_request done
<IP_ADDRESS> - "GET /sha1.min.js HTTP/1.1" 500
*** 35.200000000            0 1300184 process_new_connection:17738: Done processing connection from <IP_ADDRESS> (0.000000 sec)
*** 35.200000000            0 1300184 worker_thread_run:18033: Connection closed
*** 35.200000000            0 1300184 consume_socket:17825: going idle
*** 35.200000000            0 1300184 consume_socket:17838: grabbed socket 12, going busy
*** 35.200000000            0 1300184 worker_thread_run:17985: Start processing connection from <IP_ADDRESS>
*** 35.210000000     10000000 1300184 process_new_connection:17578: Start processing connection from <IP_ADDRESS>
*** 35.210000000            0 1300184 process_new_connection:17585: calling get_request (1 times for this connection)
*** 35.210000000            0 1300184 alloc_get_host:13189: HTTP Host: <IP_ADDRESS>
*** 35.210000000            0 1300184 process_new_connection:17650: http: 1.1, error: none
*** 35.210000000            0 1300184 handle_request:13797: URL: /jquery-3.5.1.min.js
]** 35.330000000    120000000 1300184 mg_send_http_error_impl:4650: Error 500 - [chyba
*** 35.330000000            0 1300184 process_new_connection:17672: handle_request done
<IP_ADDRESS> - "GET /jquery-3.5.1.min.js HTTP/1.1" 500
*** 35.330000000            0 1300184 process_new_connection:17738: Done processing connection from <IP_ADDRESS> (0.000000 sec)
*** 35.330000000            0 1300184 worker_thread_run:18033: Connection closed
*** 35.330000000            0 1300184 consume_socket:17825: going idle
*** 35.330000000            0 1300184 consume_socket:17838: grabbed socket 13, going busy
*** 35.330000000            0 1300184 worker_thread_run:17985: Start processing connection from <IP_ADDRESS>
*** 35.340000000     10000000 1300184 process_new_connection:17578: Start processing connection from <IP_ADDRESS>
*** 35.340000000            0 1300184 process_new_connection:17585: calling get_request (1 times for this connection)
*** 35.340000000            0 1300184 alloc_get_host:13189: HTTP Host: <IP_ADDRESS>
*** 35.340000000            0 1300184 process_new_connection:17650: http: 1.1, error: none
*** 35.340000000            0 1300184 handle_request:13797: URL: /js.cookie-2.2.1.min.js
[00:00:35.180,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:35.200,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:35.200,000] <err> cv_test: file sending error
[00:00:35.200,000] <dbg> net_sock.zsock_close_ctx: (): close ctx: ctx=0x13e514
[00:00:35.230,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:35.250,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:35.270,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:35.290,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:35.310,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:35.330,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:35.330,000] <err> cv_test: file sending error
[00:00:35.330,000] <dbg> net_sock.zsock_close_ctx: (): close ctx: ctx=0x13e5a8
[00:00:35.360,000] <dbg> cv_test.send_file: ferr -1 57
]art:~$ *** 35.460000000    120000000 1300184 mg_send_http_error_impl:4650: Error 500 - [chyba
*** 35.460000000            0 1300184 process_new_connection:17672: handle_request done
<IP_ADDRESS> - "GET /js.cookie-2.2.1.min.js HTTP/1.1" 500
*** 35.460000000            0 1300184 process_new_connection:17738: Done processing connection from <IP_ADDRESS> (0.000000 sec)
*** 35.460000000            0 1300184 worker_thread_run:18033: Connection closed
*** 35.460000000            0 1300184 consume_socket:17825: going idle
*** 35.460000000            0 1300184 consume_socket:17838: grabbed socket 14, going busy
*** 35.470000000     10000000 1300184 worker_thread_run:17985: Start processing connection from <IP_ADDRESS>
*** 35.470000000            0 1300184 process_new_connection:17578: Start processing connection from <IP_ADDRESS>
*** 35.470000000            0 1300184 process_new_connection:17585: calling get_request (1 times for this connection)
*** 35.470000000            0 1300184 alloc_get_host:13189: HTTP Host: <IP_ADDRESS>
*** 35.470000000            0 1300184 process_new_connection:17650: http: 1.1, error: none
*** 35.470000000            0 1300184 handle_request:13797: URL: /sha1.min.js
[00:00:35.380,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:35.400,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:35.420,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:35.440,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:35.460,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:35.460,000] <err> cv_test: file sending error
[00:00:35.460,000] <dbg> net_sock.zsock_close_ctx: (): close ctx: ctx=0x13e63c
[00:00:35.490,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:35.510,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:35.530,000] <dbg> cv_test.send_file: ferr -1 57
]art:~$ *** 35.590000000    120000000 1300184 mg_send_http_error_impl:4650: Error 500 - [chyba
*** 35.590000000            0 1300184 process_new_connection:17672: handle_request done
<IP_ADDRESS> - "GET /sha1.min.js HTTP/1.1" 500
*** 35.590000000            0 1300184 process_new_connection:17738: Done processing connection from <IP_ADDRESS> (0.000000 sec)
*** 35.590000000            0 1300184 worker_thread_run:18033: Connection closed
*** 35.590000000            0 1300184 consume_socket:17825: going idle
*** 35.590000000            0 1300184 consume_socket:17838: grabbed socket 15, going busy
*** 35.590000000            0 1300184 worker_thread_run:17985: Start processing connection from <IP_ADDRESS>
*** 35.590000000            0 1300184 process_new_connection:17578: Start processing connection from <IP_ADDRESS>
*** 35.590000000            0 1300184 process_new_connection:17585: calling get_request (1 times for this connection)
*** 35.590000000            0 1300184 alloc_get_host:13189: HTTP Host: <IP_ADDRESS>
*** 35.590000000            0 1300184 process_new_connection:17650: http: 1.1, error: none
*** 35.590000000            0 1300184 handle_request:13797: URL: /jquery-3.5.1.min.js
[00:00:35.550,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:35.570,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:35.590,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:35.590,000] <err> cv_test: file sending error
[00:00:35.590,000] <dbg> net_sock.zsock_close_ctx: (): close ctx: ctx=0x13e6d0
[00:00:35.610,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:35.630,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:35.650,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:35.670,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:35.690,000] <dbg> cv_test.send_file: ferr -1 57
]art:~$ *** 35.710000000    120000000 1300184 mg_send_http_error_impl:4650: Error 500 - [chyba
*** 35.710000000            0 1300184 process_new_connection:17672: handle_request done
<IP_ADDRESS> - "GET /jquery-3.5.1.min.js HTTP/1.1" 500
*** 35.710000000            0 1300184 process_new_connection:17738: Done processing connection from <IP_ADDRESS> (0.000000 sec)
*** 35.710000000            0 1300184 worker_thread_run:18033: Connection closed
*** 35.710000000            0 1300184 consume_socket:17825: going idle
*** 35.710000000            0 1300184 consume_socket:17838: grabbed socket 5, going busy
*** 35.710000000            0 1300184 worker_thread_run:17985: Start processing connection from <IP_ADDRESS>
*** 35.710000000            0 1300184 process_new_connection:17578: Start processing connection from <IP_ADDRESS>
*** 35.710000000            0 1300184 process_new_connection:17585: calling get_request (1 times for this connection)
*** 35.720000000     10000000 1300184 alloc_get_host:13189: HTTP Host: <IP_ADDRESS>
*** 35.720000000            0 1300184 process_new_connection:17650: http: 1.1, error: none
*** 35.720000000            0 1300184 handle_request:13797: URL: /jquery-3.5.1.min.js
*** 36.310000000    590000000 1299936 accept_new_connection:18112: Accepted socket 7
*** 36.310000000            0 1299936 produce_socket:17875: queued socket 7
*** 36.580000000    270000000 1300184 process_new_connection:17672: handle_request done
<IP_ADDRESS> - "GET /jquery-3.5.1.min.js HTTP/1.1" 200
*** 36.580000000            0 1300184 process_new_connection:17585: calling get_request (2 times for this connection)
*** 36.580000000            0 1300184 alloc_get_host:13189: HTTP Host: <IP_ADDRESS>
*** 36.580000000            0 1300184 process_new_connection:17650: http: 1.1, error: none
*** 36.580000000            0 1300184 handle_request:13797: URL: /login.js
*** 36.640000000     60000000 1300184 process_new_connection:17672: handle_request done
<IP_ADDRESS> - "GET /login.js HTTP/1.1" 200
*** 36.640000000            0 1300184 process_new_connection:17585: calling get_request (3 times for this connection)
*** 36.650000000     10000000 1300184 alloc_get_host:13189: HTTP Host: <IP_ADDRESS>
*** 36.650000000            0 1300184 process_new_connection:17650: http: 1.1, error: none
*** 36.650000000            0 1300184 handle_request:13797: URL: /logo.png
[00:00:35.710,000] <dbg> cv_test.send_file: ferr -1 57
[00:00:35.710,000] <err> cv_test: file sending error
[00:00:35.710,000] <dbg> net_sock.zsock_close_ctx: (): close ctx: ctx=0x13e764
[00:00:36.300,000] <dbg> net_sock.zsock_accepted_cb: (rx_q[0]): parent=0x13e074, ctx=0x13e19c, st=0
[00:00:36.310,000] <dbg> net_sock.zsock_accept_ctx: (): accept: ctx=0x13e19c, fd=7
[00:00:36.310,000] <dbg> net_sock.z_impl_zsock_getsockname: (): getsockname: ctx=0x13e19c, fd=7
[00:00:36.580,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): ctx=0x13e7f8, pkt=0x175400, st=0, user_data=0x13e88c
[00:00:36.650,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): ctx=0x13e7f8, pkt=0x175400, st=0, user_data=0x13e88c
uart:~$ *** 37.280000000    630000000 1300184 process_new_connection:17672: handle_request done
<IP_ADDRESS> - "GET /logo.png HTTP/1.1" 200
*** 37.280000000            0 1300184 process_new_connection:17585: calling get_request (4 times for this connection)
*** 38.290000000<PHONE_NUMBER> 1300184 process_new_connection:17650: http: none, error: No data received
*** 38.290000000            0 1300184 process_new_connection:17738: Done processing connection from <IP_ADDRESS> (0.000000 sec)
*** 38.290000000            0 1300184 worker_thread_run:18033: Connection closed
*** 38.290000000            0 1300184 consume_socket:17825: going idle
*** 38.290000000            0 1300184 consume_socket:17838: grabbed socket 6, going busy
*** 38.290000000            0 1300184 worker_thread_run:17985: Start processing connection from <IP_ADDRESS>
*** 38.290000000            0 1300184 process_new_connection:17578: Start processing connection from <IP_ADDRESS>
*** 38.300000000     10000000 1300184 process_new_connection:17585: calling get_request (1 times for this connection)
*** 38.300000000            0 1300184 alloc_get_host:13189: HTTP Host: <IP_ADDRESS>
*** 38.300000000            0 1300184 process_new_connection:17650: http: 1.1, error: none
*** 38.300000000            0 1300184 handle_request:13797: URL: /js.cookie-2.2.1.min.js
*** 38.340000000     40000000 1300184 process_new_connection:17672: handle_request done
<IP_ADDRESS> - "GET /js.cookie-2.2.1.min.js HTTP/1.1" 200
*** 38.340000000            0 1300184 process_new_connection:17585: calling get_request (2 times for this connection)
*** 38.440000000    100000000 1300184 alloc_get_host:13189: HTTP Host: <IP_ADDRESS>
*** 38.440000000            0 1300184 process_new_connection:17650: http: 1.1, error: none
*** 38.440000000            0 1300184 handle_request:13797: URL: /favicon.ico
*** 38.440000000            0 1300184 process_new_connection:17672: handle_request done
<IP_ADDRESS> - "GET /favicon.ico HTTP/1.1" 404
*** 38.440000000            0 1300184 process_new_connection:17585: calling get_request (3 times for this connection)
[00:00:38.290,000] <dbg> net_sock.zsock_close_ctx: (): close ctx: ctx=0x13e7f8
[00:00:38.440,000] <dbg> net_sock.zsock_received_cb: (rx_q[0]): ctx=0x13e88c, pkt=0x175400, st=0, user_data=(nil)
[00:00:38.440,000] <err> cv_test: cannot open /favicon.ico
[00:00:39.290,000] <err> log: argument 0 in source cv_test log message "cannot open %s" missinglog_strdup().
uart:~$ *** 39.450000000<PHONE_NUMBER> 1300184 process_new_connection:17650: http: none, error: No data received
*** 39.450000000            0 1300184 process_new_connection:17738: Done processing connection from <IP_ADDRESS> (0.000000 sec)
*** 39.450000000            0 1300184 worker_thread_run:18033: Connection closed
*** 39.460000000     10000000 1300184 consume_socket:17825: going idle
*** 39.460000000            0 1300184 consume_socket:17838: grabbed socket 7, going busy
*** 39.460000000            0 1300184 worker_thread_run:17985: Start processing connection from <IP_ADDRESS>
*** 39.460000000            0 1300184 process_new_connection:17578: Start processing connection from <IP_ADDRESS>
*** 39.460000000            0 1300184 process_new_connection:17585: calling get_request (1 times for this connection)
[00:00:39.450,000] <dbg> net_sock.zsock_close_ctx: (): close ctx: ctx=0x13e88c
uart:~$
uart:~$
uart:~$ net mem
Fragment length 128 bytes
Network buffer pools:
Address     Total   Avail   Name
0x1c3d70    256 253 RX
0x1c3db8    256 251 TX
0x1c3f5c    96  96  RX DATA (rx_bufs)
0x1c3f98    192 184 TX DATA (tx_bufs)
uart:~$ net allocs
Network memory allocations

memory      Status  Pool    Function alloc -> freed
0x17a038/1   used      RX   tcp_conn_alloc():1109
0x175838/1   used      TX   tcp_conn_alloc():1112
0x179ff0/1   used      RX   tcp_conn_alloc():1109
0x1757f0/1   used      TX   tcp_conn_alloc():1112
0x179ed0/1   used      RX   tcp_conn_alloc():1109
0x175298/1   used      TX   tcp_conn_alloc():1112
0x1753b8/1   used      TX   net_pkt_clone():1770
0x175370/1   used      TX   net_pkt_clone():1770
0x16e248     free   RDATA   slip_input_byte():291 -> processing_data():139
0x16e278     free   RDATA   slip_input_byte():263 -> processing_data():139
0x16e248     free   RDATA   slip_input_byte():291 -> processing_data():139
0x179e88     free      RX   slip_input_byte():256 -> processing_data():139
0x16e2c0     free   RDATA   slip_input_byte():263 -> processing_data():139
0x16e230     free   RDATA   slip_input_byte():291 -> processing_data():139
0x16e2c0     free   RDATA   slip_input_byte():291 -> processing_data():139
0x16e248     free   RDATA   slip_input_byte():291 -> processing_data():139
0x16e278     free   RDATA   slip_input_byte():291 -> processing_data():139
0x175400     free      TX   tcp_out_ext():776 -> ethernet_send():685
0x175400     free      TX   net_pkt_clone():1770 -> zsock_recv_stream():1105
0x175298     free      TX   net_pkt_clone():1770 -> zsock_recv_stream():1105
0x1757a8     free      TX   net_pkt_clone():1770 -> zsock_recv_stream():1105
0x175448     free      TX   net_pkt_clone():1770 -> zsock_recv_stream():1105
0x1755b0     free      TX   net_pkt_clone():1770 -> zsock_recv_stream():1105
0x16e278     free   RDATA   slip_input_byte():263 -> processing_data():139
0x179e88     free      RX   tcp_conn_alloc():1109 -> tcp_conn_unref():392
0x175568     free      TX   tcp_conn_alloc():1112 -> tcp_conn_unref():389
0x16a5d0     free   TDATA   ethernet_fill_header():486 -> ethernet_remove_l2_header():566
0x16a600     free   TDATA   ethernet_fill_header():486 -> ethernet_remove_l2_header():566
0x175250     free      TX   tcp_out_ext():776 -> tcp_send():325
0x16a750     free   TDATA   ethernet_fill_header():486 -> ethernet_remove_l2_header():566
0x16e278     free   RDATA   slip_input_byte():291 -> processing_data():139
0x16e2a8     free   RDATA   slip_input_byte():263 -> processing_data():139
0x16e320     free   RDATA   slip_input_byte():291 -> processing_data():139
0x16e260     free   RDATA   slip_input_byte():291 -> processing_data():139
0x16e2d8     free   RDATA   slip_input_byte():291 -> processing_data():139
0x179df8     free      RX   slip_input_byte():256 -> processing_data():139
0x16e290     free   RDATA   slip_input_byte():263 -> processing_data():139
0x16e230     free   RDATA   slip_input_byte():291 -> processing_data():139
0x16e2c0     free   RDATA   slip_input_byte():291 -> processing_data():139
0x16e248     free   RDATA   slip_input_byte():291 -> processing_data():139
uart:~$ *** 69.610000000<PHONE_NUMBER>0 1300184 process_new_connection:17650: http: none, error: No data received
*** 69.610000000            0 1300184 process_new_connection:17738: Done processing connection from <IP_ADDRESS> (0.000000 sec)
*** 69.620000000     10000000 1300184 worker_thread_run:18033: Connection closed
*** 69.630000000     10000000 1300184 consume_socket:17825: going idle
[00:01:09.620,000] <dbg> net_sock.zsock_close_ctx: (): close ctx: ctx=0x13e19c
uart:~$

I have also noticed that when I enable ASSERTS there is a strange fail, but it is probably not related with original issue
~/dev/zephyrproject/cv_test_x86$ west build -t run
-- west build: running target run
[0/1] To exit from QEMU enter: 'CTRL+a, x'[QEMU] CPU: qemu32,+nx,+pae
SeaBIOS (version rel-1.12.1-0-ga5cab58-dirty-20200625_115407-9426dddc0a1f-zephyr
)
Booting from ROM..*** Booting Zephyr OS build zephyr-v2.4.0-3346-gfd630d70c106  ***
*** 0.040000000 1359040 mg_start2:19779: [listening_ports] -> [80,443s]
*** 0.040000000 1359040 mg_start2:19779: [num_threads] -> [1]
*** 0.040000000 1359040 mg_start2:19779: [max_request_size] -> [4096]
*** 0.040000000 1359040 mg_start2:19779: [enable_keep_alive] -> [yes]
*** 0.040000000 1359040 mg_start2:19779: [keep_alive_timeout_ms] -> [1000]
[IMPLEMENTATION MISSING : sscanf]
ASSERTION FAIL [!arch_is_in_isr()] @ WEST_TOPDIR/zephyr/kernel/mutex.c:125
	mutexes cannot be used inside ISRs
FAILED: zephyr/CMakeFiles/run
cd /home/honza/dev/zephyrproject/cv_test_x86/build && /opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/qemu-system-i386 -m 9 -cpu qemu32,+nx,+pae -device isa-debug-exit,iobase=0xf4,iosize=0x04 -nographic -net none -pidfile qemu.pid -chardev stdio,id=con,mux=on -serial chardev:con -mon chardev=con,mode=readline -serial unix:/tmp/slip.sock -kernel /home/honza/dev/zephyrproject/cv_test_x86/build/zephyr/zephyr.elf
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /usr/bin/cmake --build /home/honza/dev/zephyrproject/cv_test_x86/build --target run

I have also noticed that when I enable ASSERTS there is a strange fail, but it is probably not related with original issue
~/dev/zephyrproject/cv_test_x86$ west build -t run
-- west build: running target run
[0/1] To exit from QEMU enter: 'CTRL+a, x'[QEMU] CPU: qemu32,+nx,+pae
SeaBIOS (version rel-1.12.1-0-ga5cab58-dirty-20200625_115407-9426dddc0a1f-zephyr
)
Booting from ROM..*** Booting Zephyr OS build zephyr-v2.4.0-3346-gfd630d70c106  ***
*** 0.040000000 1359040 mg_start2:19779: [listening_ports] -> [80,443s]
*** 0.040000000 1359040 mg_start2:19779: [num_threads] -> [1]
*** 0.040000000 1359040 mg_start2:19779: [max_request_size] -> [4096]
*** 0.040000000 1359040 mg_start2:19779: [enable_keep_alive] -> [yes]
*** 0.040000000 1359040 mg_start2:19779: [keep_alive_timeout_ms] -> [1000]
[IMPLEMENTATION MISSING : sscanf]
ASSERTION FAIL [!arch_is_in_isr()] @ WEST_TOPDIR/zephyr/kernel/mutex.c:125
	mutexes cannot be used inside ISRs
FAILED: zephyr/CMakeFiles/run
cd /home/honza/dev/zephyrproject/cv_test_x86/build && /opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/qemu-system-i386 -m 9 -cpu qemu32,+nx,+pae -device isa-debug-exit,iobase=0xf4,iosize=0x04 -nographic -net none -pidfile qemu.pid -chardev stdio,id=con,mux=on -serial chardev:con -mon chardev=con,mode=readline -serial unix:/tmp/slip.sock -kernel /home/honza/dev/zephyrproject/cv_test_x86/build/zephyr/zephyr.elf
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /usr/bin/cmake --build /home/honza/dev/zephyrproject/cv_test_x86/build --target run

Thank you @xhpohanka for your bug report. Please try first to drastically increase all memory buffers in proj.conf using QEMU, since it is known, that CivetWeb can use big amount of memory.
I'll try to get deeper look at the weekend.

Thank you @xhpohanka for your bug report. Please try first to drastically increase all memory buffers in proj.conf using QEMU, since it is known, that CivetWeb can use big amount of memory.
I'll try to get deeper look at the weekend.

Hi @Nukersson,
the code I provided is extracted and simplified from my project on STM32H7, it is much easier to break things on the embedded platform then with qemu_x86 but it is still possible so  I expect that there are general issues, but sometimes I have a feeling that there can be also other issues related just to stm32h7 (I have already tried recent patches #30403 but it does not help here).
To break it I usally use a combination of a stress testing with wrk (eg wrk -d 5 -t 16 -c 1000 http://<IP_ADDRESS>) and simple hitting ctrl+f5 in chromium with hight frequency. The later one is usually (surprisingly) more effective to produce malfuncitons.
I'm noticing these issues

network buffers leaks (number of available tx_bufs decreases during the testing and never recovers)
sometimes I get a strange state (a loop) when a poll call on listening sockets in civetweb's master thread still returns so accept_new_connection() is called even if there are no new requests from a client
getsockname() call inside accept_new_connection() sometimes return an error

I have played with these civetweb settings

"enable_keep_alive" - I had it enabled at first, but this is wrong because civetweb does not implement SO_KEEPALIVE, a warning is hidden in source code
"max_request_size" - no impact on described issues, I keep it as low as possible
"request_timeout_ms" - it is 30s by default, in such case there are long timeouts on failed connections, it is better to lower it to debug
"num_threads" - I use 1 to debug, increasing has no impact
ALTERNATIVE_QUEUE - civetweb has two queue implementations for connections, I do not quite understand the wrapping head and tail pointers in standard implementation, but switching to alternative one (disabled by default for zephyr in cmakelists)  does not help with described issues (they seems to be even more frequent)

Hi @Nukersson,
the code I provided is extracted and simplified from my project on STM32H7, it is much easier to break things on the embedded platform then with qemu_x86 but it is still possible so  I expect that there are general issues, but sometimes I have a feeling that there can be also other issues related just to stm32h7 (I have already tried recent patches #30403 but it does not help here).
To break it I usally use a combination of a stress testing with wrk (eg wrk -d 5 -t 16 -c 1000 http://<IP_ADDRESS>) and simple hitting ctrl+f5 in chromium with hight frequency. The later one is usually (surprisingly) more effective to produce malfuncitons.
I'm noticing these issues

network buffers leaks (number of available tx_bufs decreases during the testing and never recovers)
sometimes I get a strange state (a loop) when a poll call on listening sockets in civetweb's master thread still returns so accept_new_connection() is called even if there are no new requests from a client
getsockname() call inside accept_new_connection() sometimes return an error

I have played with these civetweb settings

"enable_keep_alive" - I had it enabled at first, but this is wrong because civetweb does not implement SO_KEEPALIVE, a warning is hidden in source code
"max_request_size" - no impact on described issues, I keep it as low as possible
"request_timeout_ms" - it is 30s by default, in such case there are long timeouts on failed connections, it is better to lower it to debug
"num_threads" - I use 1 to debug, increasing has no impact
ALTERNATIVE_QUEUE - civetweb has two queue implementations for connections, I do not quite understand the wrapping head and tail pointers in standard implementation, but switching to alternative one (disabled by default for zephyr in cmakelists)  does not help with described issues (they seems to be even more frequent)

@xhpohanka are u comping with CONFIG_DEBUG or something else like -O3?

@xhpohanka are u comping with CONFIG_DEBUG or something else like -O3?

are u comping with CONFIG_DEBUG or something else like -O3?

In my case CONFIG_DEBUG has no impact on desribed issues. I use -Os same as on stm32...

are u comping with CONFIG_DEBUG or something else like -O3?

In my case CONFIG_DEBUG has no impact on desribed issues. I use -Os same as on stm32...

I'm noticing these issues
* network buffers leaks (number of available `tx_bufs` decreases during the testing and never recovers)

* sometimes I get a strange state (a loop) when a `poll` call on listening sockets in civetweb's master thread still returns so `accept_new_connection()` is called even if there are no new requests from a client

* `getsockname()` call inside `accept_new_connection()` sometimes return an error (in that case zephyr's internal net_context does not have a conn_handler registered)

These might be related to other issues in the net stack if we run out of resources, so not just civetweb problems. I suspect that there is resource leak somewhere in the stack if for example a net_buf allocation fails, we might bail out without releasing all the resources properly.

I'm noticing these issues
* network buffers leaks (number of available `tx_bufs` decreases during the testing and never recovers)

* sometimes I get a strange state (a loop) when a `poll` call on listening sockets in civetweb's master thread still returns so `accept_new_connection()` is called even if there are no new requests from a client

* `getsockname()` call inside `accept_new_connection()` sometimes return an error (in that case zephyr's internal net_context does not have a conn_handler registered)

These might be related to other issues in the net stack if we run out of resources, so not just civetweb problems. I suspect that there is resource leak somewhere in the stack if for example a net_buf allocation fails, we might bail out without releasing all the resources properly.

I just sent a fix that prevented various crashes seen when I tested with dumb_http_server_mt sample and wrk tool. @xhpohanka could you try your scenario with #31777 and report if it helps.

I just sent a fix that prevented various crashes seen when I tested with dumb_http_server_mt sample and wrk tool. @xhpohanka could you try your scenario with #31777 and report if it helps.

Hi @jukkar
Thank you for reaching this. I have done a very quick test with your patch. Now I'm not able to reproduce the issue with buffer leaks using wrk, so this is definitely a progress.
I'm still able to get a loop described in my second point (poll is still returning 1). I think that it is related to exhausted file descriptors.  Chrome and ctrl+f5 seems to be worse stress than wrk...
UPDATE:
I was able to reproduce the buffer leak, but it is much harder now.
It was done again with chrome and ctrl+f5 monkey test and increased fd max number from 16 to 64.
uart:~$ net mem
Fragment length 128 bytes
Network buffer pools:
Address		Total	Avail	Name
0x1c1880	256	254	RX
0x1c18c8	256	250	TX
0x1c1a6c	96	96	RX DATA (rx_bufs)
0x1c1aa8	192	173	TX DATA (tx_bufs)
uart:~$ net allocs
Network memory allocations

memory		Status	Pool	Function alloc -> freed
0x177c38/1	 used	   RX	tcp_conn_alloc():1117
0x173438/1	 used	   TX	tcp_conn_alloc():1127
0x177bf0/1	 used	   RX	tcp_conn_alloc():1117
0x1733f0/1	 used	   TX	tcp_conn_alloc():1127
0x173090/1	 used	   TX	net_pkt_clone():1770
0x172ee0/1	 used	   TX	net_pkt_clone():1770
0x1733a8/1	 used	   TX	net_pkt_clone():1770
0x172ca0/1	 used	   TX	net_pkt_clone():1770
0x177140	 free	   RX	slip_input_byte():256 -> processing_data():139
0x16d278	 free	RDATA	slip_input_byte():263 -> processing_data():139

Hi @jukkar
Thank you for reaching this. I have done a very quick test with your patch. Now I'm not able to reproduce the issue with buffer leaks using wrk, so this is definitely a progress.
I'm still able to get a loop described in my second point (poll is still returning 1). I think that it is related to exhausted file descriptors.  Chrome and ctrl+f5 seems to be worse stress than wrk...
UPDATE:
I was able to reproduce the buffer leak, but it is much harder now.
It was done again with chrome and ctrl+f5 monkey test and increased fd max number from 16 to 64.
uart:~$ net mem
Fragment length 128 bytes
Network buffer pools:
Address		Total	Avail	Name
0x1c1880	256	254	RX
0x1c18c8	256	250	TX
0x1c1a6c	96	96	RX DATA (rx_bufs)
0x1c1aa8	192	173	TX DATA (tx_bufs)
uart:~$ net allocs
Network memory allocations

memory		Status	Pool	Function alloc -> freed
0x177c38/1	 used	   RX	tcp_conn_alloc():1117
0x173438/1	 used	   TX	tcp_conn_alloc():1127
0x177bf0/1	 used	   RX	tcp_conn_alloc():1117
0x1733f0/1	 used	   TX	tcp_conn_alloc():1127
0x173090/1	 used	   TX	net_pkt_clone():1770
0x172ee0/1	 used	   TX	net_pkt_clone():1770
0x1733a8/1	 used	   TX	net_pkt_clone():1770
0x172ca0/1	 used	   TX	net_pkt_clone():1770
0x177140	 free	   RX	slip_input_byte():256 -> processing_data():139
0x16d278	 free	RDATA	slip_input_byte():263 -> processing_data():139

I was able to reproduce the buffer leak, but it is much harder now.

Yep, I was able to see it too. Seems to be related to timings, I am investigating this.

I was able to reproduce the buffer leak, but it is much harder now.

Yep, I was able to see it too. Seems to be related to timings, I am investigating this.

Managed to find one nasty leak. If the application closed the socket while we were waiting data, the data that was pushed to application was lost. Fixed that in #31777, @xhpohanka please try the lastest version if you can.

Managed to find one nasty leak. If the application closed the socket while we were waiting data, the data that was pushed to application was lost. Fixed that in #31777, @xhpohanka please try the lastest version if you can.

Managed to find one nasty leak. If the application closed the socket while we were waiting data, the data that was pushed to application was lost. Fixed that in #31777, @xhpohanka please try the lastest version if you can.

Do we have some ethernet stack test suite? Can you add a test for this case?

Managed to find one nasty leak. If the application closed the socket while we were waiting data, the data that was pushed to application was lost. Fixed that in #31777, @xhpohanka please try the lastest version if you can.

Do we have some ethernet stack test suite? Can you add a test for this case?

Do we have some ethernet stack test suite? Can you add a test for this case?

We have unit tests, not sure how feasible it would be to add test cases for this.
I was only able to see the issue with heavy traffic and when system run out-of network buffers, this complicates the testing.

Managed to find one nasty leak. If the application closed the socket while we were waiting data, the data that was pushed to application was lost. Fixed that in #31777, @xhpohanka please try the lastest version if you can.

I'm still able to reproduce the leaks unfortunately. Still not with wrk, but with Chrome reloading with no problem.
Can I somehow provide more information which could help?

but with Chrome reloading with no problem

I just noticed, that firefox behaves in the same way. It is enough to hit ctrl+f5 about 20 times in high frequency to see the buffer leak with the test code that I have provided. It does not seem to me as extra high traffic.
I'm sure on 100% but it seems net allocs is always referring lost buffers in net_pkt_clone()
0x1743b8/1	 used	   TX	net_pkt_clone():1765

firefox behaves in the same way

Thanks for the info. I did not try the browser route as the wrk seemed to work fine, but will try using browser.

it seems net allocs is always referring lost buffers in net_pkt_clone()

This was basically the same leak I fixed in latest version of #31777, there is probably some extra code path I missed. I will investigate.

will try using browser.

I was not able to replicate any leaks with the browser. Actually with the browser, I was not seeing any out-of-buffer scenarios and zephyr was able to reply in time and no errors were seen in the console (this with qemu_x86 and e1000 controller). I was also using the dumb_http_server_mt sample app for this.

I was also using the dumb_http_server_mt sample app for this

I'm afraid that dumb_http_server_mt is not enough to reproduce. That is the reason why I have provided my code with civetweb (check the first post). If you are not able to run it please tell me what other information can I provide.
I'm aware that the issue can be in my application code (hopefully not, it is really simple) or in civetweb itself but as civetweb is the only web server provided with zephyr we should find it.
I noticed the issues only on a page that downloads some css or js, that could be the reason why wrk does not trigger it because it does not parse the server response.

@xhpohanka When you have the leak issue, what does net conn tell, what are the states of the sockets.
If you see something like
TCP        Context   Src port Dst port   Send-Seq   Send-Ack  MSS    State
0x14e688 0x126fe0    8080        0<PHONE_NUMBER>          0  1440   LISTEN
0x14e4f4 0x127090    8080    38032<PHONE_NUMBER>          0  1460   LISTEN
0x14d6c0 0x1271f0   55257    34238<PHONE_NUMBER><PHONE_NUMBER>  1460   SYN_RECEIVED

and the SYN_RECEIVED state is stuck. Then you also need to apply #31806 which should timeout the orphaned connection properly.

I noticed the issues only on a page that downloads some css or js

That might be related here. I try to use you application next.

I do not see SYN_RECEIVED stuck state...
uart:~$ net mem
Fragment length 128 bytes
Network buffer pools:
Address		Total	Avail	Name
0x1c7c50	256	254	RX
0x1c7c98	256	252	TX
0x1c7e3c	96	96	RX DATA (rx_bufs)
0x1c7e78	192	183	TX DATA (tx_bufs)

uart:~$ net conn
     Context   	Iface         Flags Local           	Remote
[ 1] 0x140fe0	0x1c7eb4    4DU   <IP_ADDRESS>:5353	       <IP_ADDRESS>:0
[ 2] 0x141074	0x1c7eb4    4ST         <IP_ADDRESS>:80	 <IP_ADDRESS>:33008
[ 3] 0x141108	0x1c7eb4    4ST        <IP_ADDRESS>:443	       <IP_ADDRESS>:0

TCP        Context   Src port Dst port   Send-Seq   Send-Ack  MSS    State
0x18382c 0x141074      80    33008<PHONE_NUMBER>          0  1460   LISTEN
0x183698 0x141108     443        0  706889854          0  1460   LISTEN
No active connections.

uart:~$ net allocs
Network memory allocations

memory		Status	Pool	Function alloc -> freed
0x17e038/1	 used	   RX	tcp_conn_alloc():1104
0x179838/1	 used	   TX	tcp_conn_alloc():1112
0x17dff0/1	 used	   RX	tcp_conn_alloc():1104
0x1797f0/1	 used	   TX	tcp_conn_alloc():1112
0x179400/1	 used	   TX	net_pkt_clone():1765
0x1795b0/1	 used	   TX	net_pkt_clone():1765
0x17dfa8	 free	   RX	slip_input_byte():256 -> processing_data():139
...

I am probably doing something wrong as I get
cv_test/src/libc_extensions.c:279:5: error: redefinition of 'putc'
  279 | int putc(int c, FILE *stream)
      |     ^~~~
In file included from cv_test/src/libc_extensions.c:9:
cv_test/zephyr/lib/libc/minimal/include/stdio.h:59:19: note: previous definition of 'putc' was here
   59 | static inline int putc(int c, FILE *stream)
      |                   ^~~~
cv_test/src/libc_extensions.c:284:5: error: redefinition of 'putchar'
  284 | int putchar(int c)
      |     ^~~~~~~
In file included from cv_test/src/libc_extensions.c:9:
cv_test/zephyr/lib/libc/minimal/include/stdio.h:63:19: note: previous definition of 'putchar' was here
   63 | static inline int putchar(int c)
      |                   ^~~~~~~
make[3]: *** [CMakeFiles/app.dir/build.make:76: CMakeFiles/app.dir/src/libc_extensions.c.obj] Error 1

How do you compile this?
I tried with this:
cmake -B build -DBOARD=qemu_x86 . -DOVERLAY_CONFIG=zephyr/samples/net/sockets/echo_server/overlay-e1000.conf  -DCONFIG_NET_DEBUG_NET_PKT_ALLOC=y -DCONFIG_LOG_BUFFER_SIZE=65536
make -C build -j 9  run

I see - I'm using slightly older zephyr base (with your patches cherry-picked). There was a commit 98747abf9c3671e9b836dba4c8c8ae48c47f0c23 which added putc and putchar into minimal libc library. Please just comment out my putc and putchar definitions in libc_extensions.c

The mkmfs.sh needed xxd and after installing it, I still get this error
In file included from cv_test/src/mfs.c:2:
cv_test/build/zephyr/include/generated/mfs_data.h:3582:1: error: expected expression before ',' token
 3582 | ,
      | ^
make[3]: *** [CMakeFiles/app.dir/build.make:102: CMakeFiles/app.dir/src/mfs.c.obj] Error 1

It seems that the script requires minify from https://www.minifier.org/
I wonder why you have extra generator script, wouldn't the generate_inc_file cmake macros work?

Excuse me. It seems, that I have not simplified my example enough...
The reason of the last error is probably missing minify (at least I get the same error in such case). Minify is definitely not necessary to run this example. I have pushed a new version to my git, I hope it will work now.

I wonder why you have extra generator script, wouldn't the generate_inc_file cmake macros work?

It probably would, but it was written by my colleague who is not familiar with zephyr build system.

I managed to see the issue (used firefox, and just kept ctrl-f5 pressed for several seconds).
What looks suspicious is that net-shell shows this loop of debug messages
....

I do not see anyone reading the data away, thus the net_pkt are just pending in the receive queue even if the connections have died long time ago. Did not investigate civetweb that deeply, but after the accept, it really needs to call recv or similar, otherwise the packets are just hanging there.
The net-shell shows that TX packets are running out, don't know what is going on there. It might be that we are using wrong net_pkt pool (TX instead of RX). Anyway, looks like there is something fishy with the civetweb or the application and recv is not called.

Hi @jukkar,
the suspicious state from previous comment appears when the app is running out of free file descriptors. Civetweb is probably hanging this wrong. I cannot reproduce it when I increase the CONFIG_POSIX_MAX_FDS to some higher number (48).
I noticed that your fixes were merged to master so I rechecked my app again against actual master. It is much better, however I was still able to see a leak. It takes really big effort with ctrl+f5, but it is sometimes there. Next to the number of fds I have also increased a number of ciwetweb worker threads to 4.

I was still able to see a leak

Yep, I saw that too but it does not look it comes from tcp as I wrote in mail earlier comment. After the TCP has received the data, it is put the socket receive queue. If no one is reading that queue, we basically have a "leak". And it looked like that from my limited testing.

I saw that too but it does not look it comes from tcp

Can you give me a hint what is a best way to trace it, please? I'd really like to have this reliable...

Can you give me a hint what is a best way to trace it, please? I'd really like to have this reliable...

Usually I just place debug prints in relevant places in the code. For the accept loop log above, I needed to disable civetweb debugging prints because there was just too much data printed. If you are using native_posix board, then debugging with gdb is of course quite convenient.
I did not verify this, but because there was just lot of prints about accept (in a loop), but no prints about data being read, it looked like the receive queue in subsys/net/lib/sockets/sockets.c was not being read. As the receive queue is shared with accept queue, it is also possible that there is some bug in sockets.c related to accept/read functionality that is seen if we have these net_buf/pkt allocation issues. But after a quick review, I did not spot immediately where such issue would be in sockets.c.

Hello @Nukersson,
fixes by @jukkar definitely helped. I still have a feeling that it is not 100% but  so far I fixed it just by providing bigger number of fds and praying that our project is not failing in production....

Bump!
Still happening on stm32h7xx. Just had a rough few weeks with the same exact problem. Dummy hold F5 key test with Firefox over HTTPS(not HTTP) manages to break things in couple of seconds. There seems to be a race condition in the tcp stack regarding the net_pkt leaks between the connection and listen thread when the stack is running out of free net_pkts. It happens with the civetweb and with custom https server aswell. What fixed the issue for me was setting the these threads with Cooperative priority, which isnt nice but at least there are no net_pkt leaks.

Finally i have found a soultion to the leak. Please have a look at my pull request #42328 . I hope the pull request explains it all. All in all it was a simple fix, however damn hard to find :)
I am new to the github contribution system, so excuse me if i am doing something wrong. @jukkar i have seen you under the network related issues, thats why i am mentioning you.
Thank you for cooperation

Hi @neja20,
thanks for reaching this out. I will try your patch later this week, from the description it looks reasonable to me, but I'm not so familiar with the stack to comment it deeper.
Regarding the PR, you definitely need to keep zephyr coding style (tab indenting width 8 etc.). You can check if your commit is ok with checkpath.pl script. It will help you to find contributing issues before pushing it to github. I usually use it like this scripts/checkpatch.pl -g HEAD, it checks your latest commit.


Settings filter is reset automatically

VSCode Version: 1.51.0 (user setup)
OS Version: Windows 10

Steps to Reproduce:

Type something in the input box
Click on an item in the sidebar
See settings filtered
Wait for a while (don't need to do anything), and see the filter results being reset

Does this issue occur when all extensions are disabled?: Yes/No

Fixed in https://github.com/microsoft/vscode/issues/109860


Support in Ceylon for getting the JavaScript typeof of a value

JavaScript has the typeof keyword, ~the use of which is also supported in function-style syntax~ (edit: the parentheses in typeof(value) are just grouping parentheses around the value, and do not form a function call operation).
Take the JavaScript code:
var someVal = ...;
var typeOfVal = typeof someVal;

But in Ceylon:
dynamic {
    dynamic someVal = ...;
    dynamic typeOfVal = ... // what_should_go_here?
}

Is there a way in Ceylon code, in a dynamic block or otherwise, to get at the JavaScript typeof of a value?

String typeof(dynamic val) {
    dynamic {
        return eval("(function(v){return typeof v})")(val);
    }
}

Thanks @lucaswerkmeister, that works. Seems there's no solution that compiles down to the more efficient direct use of the keyword.
For now, I think functions like this for typeof, delete, and others where it makes sense, might be good to have in some sort of Ceylon JavaScript interop module.


featre(paginate-table): add pagination to table, fix users page, show…

What Does This PR Do?
This PR adds fix for paginating table, viewing other users documents, and prompting confirmation on delete or promotion
Description of Task to be Completed
Users can search for other users, click on them and view their documents.
When admin tries to promote a user, a confirmation box prompts up
When admin tries to delete a user, a confirmation box prompts up
How Can This be Manually Tested?
Navigate to folder cd iamdocuman
Checkout branch git checkout bug/144919429/paginate-table
Install dependencies npm install
Run tests(optional) npm test
Run frontend component test(optional) npm run test:frontend
Run e2e test ./node_modules/.bin/nightwatch --config nightwatch.js
Start server npm start
Open browser and login
Play around with it
Any Background Context You want to provide?
N/A
Screenshot(s)
N/A
What are the relevant pivotaltracker stories?
#144919429 - Admin should see a paginated table on the manage page

Changes Unknown when pulling eee195e4c26f1f580370d78d825770024b104d59 on bug/144919429/paginate-table into ** on feedback**.


Difficult to create folder in left panel file view if the open folder only contains folder

Open a folder that a lot of folders (enough to fill the height of the screen) and no files, it seems impossible to create a folder or file in the root folder without closing all files in the text view.

Not as simple as it should be, but you can select a file in the root folder and then use the new folder action from the toolbar.

This is specifically about a root folder that containing only folders, I imagine it's a pretty common use case to open a folder containing many git repositories but no files.

(closed by accident, sorry)
Thanks for the additional info:

about a root folder that containing only folders

Same applies for a root level file, correct? I had to first select a file in the root directory and then select the New File icon. Otherwise it will use the last selected directory as the context for the new file location.

Note that the same issue also applies to Drag and Drop when you try to move a file/folder top level - currently impossible.
I'll copy & paste my solution suggestions from the other issue:
allow dragging files to the project name, which is an always visible UI element
add a slight padding to the bottom of the files list in the Files Explorer, so there is always room to drag files out to the top-level after scrolling down

It would be nice if there was some way to also drop between folders - currently impossible.

I think the icons could remain when the root folder is collapsed, instead of hiding them. When root is collapsed, the icons pertain to the root.

Fixed by always showing the root folder in the explorer when you collapse:

We decided against this. You will still be able to show the root folder when you are in multi-root context. More on that later.

If the bottom folder (or the bottom file, if there are files after the folder) could always have that extra bit of margin on the bottom that could be clicked in, that would help. It would still not be entirely intuitive IMO, but may be a simple workaround and would be consistent. I'm guessing that all the background below the root folder is clickable to allow a file to be inserted, but that background can be completely covered by folders. The padding or margin (depending on what its one) would prevent it from being completely covered and inaccessible.
Anyway, I'm a vscode newbie (so I'm not expert in how it works) trying this editor out, and hit this problem almost immediately, so I doubt it's the infrequent edge-case that the description hints it may be.

Any ETA on any of the many solutions proposed in here? As @judgej mentions this is definitely not an infrequent edge case, its a problem that takes away time from the user considering most would give up and just create the folder with some other file manager.

I think the problem lies in the fact that it's using the root dir as a "heading" of sorts in the explorer view. I.e. it's a peer of "OPEN EDITORS", with its name in all caps, and distinct from the actual file tree.
If you use File -> Add folder to workspace, the way the tree acts afterwards is perfect. The 2 root dirs are part of the tree. They can be selected to serve as the anchor for the add buttons, and also have a context menu with "New File" and "New Folder". Even if you remove the second one, this behavior persists, having e.g. "UNTITLED (WORKSPACE)" as the explorer heading and the whole tree including the root underneath. Could it just work this way from the start?

3 years down the road this issue is still a major annoyance.
Having to click the vertical scrollbar is not really a solution as I think less than 1% of users would think about such an action. Especially considering that this scrollbar is normally not visible (hidden).
Maybe add 2 context menu items to the name of the root folder? I.e. when you right click the text left of the current buttons for new file and new folder?
Being able to drag and drop in between folders would also be a very welcome addition as this action is normally available in other applications with some sort of an explorer panel.

UP!

This can be remedied with plugins though. I've found this one (ext install create-file-folder) to do the kob well with the default key combo Ctrl + Alt + Shift + N to create a new folder.

 I've been using the "right-click on scrollbar" method to create a root level folder for months now, but with my recent update to 1.28.2 this technique doesn't work anymore because the context menu doesn't come up!

Hilarious how it is still not working. There's no root folder present in my solution.
Imagine this being an issue in 2018 q:^)

I feel like this is workable:

@rhys-vdw Cool, never noticed that! :) Yep, that works for me.

@rhys-vdw Hm... spoke too soon. I saw the icons on the top level and I assumed they would create new folders or files on that level. However, they don't - they create folders and files on the level of whatever folder is currently selected in the hierarchy - the same thing I can achieve by using the context menu. So I take back what I said - I still don't see any way of creating a new folder or file on the top level, if the tree list is so full that I can't right-click in empty space anywhere.

Why is it so difficult to not display the opened project as a part of explorer? Just make the root folder appear like a normal folder, so that we are able to click on it and use the context menu. 2018 is coming to an end, and things are still the way they used to be.

My natural inclination is to click on the titlebar, since after all it's titled with the top-level folder name. B But that does not work as expected.
This has been confusing for both us developers and customers. See for instance:
#10343
Microsoft/vscode-azurestorage#252
Plus, if the files/folders list takes up all the vertical space, I'm not sure it's possible to get a context menu on the top-level folder at all:

How is this issue from 2015 still not fixed?

Opened a related issue here: https://github.com/microsoft/vscode/issues/75571

Now there are 3 alternatives how to create file/folder top level in a full explorer view:

It is possible to scroll beyond the last element, so you can right click in the empty space
You can press Escape to clear both focus and selection and use the top level actions to achieve this
You can right click on the scroll bar

This is not a definitie solution. We have pushed it to insiders to gather feedback from users and team members. So let us know what you think

Looks like it's in stable 1.37?
Might have found it via #2, might not have (it requires two presses of ESC), but that is an improvement thanks.  Definitely would never find it via the scrollbar.
Personally, I'm not sure it makes sense to have the top-level actions be context-sensitive at all, though.  Why not have them add folders/files at the top level all of the time?  You can use context menus to create subfolders/subfiles.

@StephenWeatherford changes mentioned in my previous comment are not in stable 1.37. They will be in the next one. But you can try them out in the latest insiders.
As for changing the top level actions thanks for the idea, however changing that would be breaking behavior to what most of our users are used to over the years. So I would definitely be against that.

 Even though all of the mentioned fixes are pretty unintuitive and out of place for a friendly tool like VS Code.

Personally, I'm not sure it makes sense to have the top-level actions be context-sensitive at all, though. Why not have them add folders/files at the top level all of the time?

I agree with @StephenWeatherford, and I think this is the general expectation by default. Hopefully we get this in an update soon. I don't think the change in behaviour will be as big a deal as you might think.


Godot 4.2 APK BUGS

Tested versions
Godot 4.2.1 APK on smartphone with 2312 x 1080 screen res.
System information
Android Godot 4.2 MOBILE
Issue description
Using Android smartphone with screen res 2312 x 1080
Hi Devs
It has been a few weeks sinking in my teeth into Godot on Android and I am really impressed by the clean logic, useable editor, the GPL love, and the general experience for such a small footprint.
Just made my first contrib while editing on a smartphone, so you guys have now got a FULL ANALOG FPS based off two other projects on GAL. The project implements dual virtual joysticks. Needing some help how to post this project to GAL. Message me. Original thread -> https://forum.godotengine.org/t/gamepad-and-joystick-input-intensity-for-fps-with-soft-ranges/41045
I have run both Godot 3.5 and 4.2 for Android, and below is why I can't use 4.2 yet.
Godot 4.2 APK Issues

When using bluetooth mouse, the keyboard is permanently hidden. Can't type at all. I gotta turn off Bluetooth, then the keyboard appears, them type, then turn on Bluetooth again. Godot 3.5 does not do this. It has a different quirk when using a mouse. See thread.

Some dialogue boxes spill beyond the window boundary. Can't click apply or cancel. Possible work around is to make  all dialogues scrollable or moveable (Linux style ALT + left mouse).

Launching the editor takes considerably longer than compared to Godot 3.5 APK.

Launching a project, whether from the project manager or the editor also takes considerably longer than Godot 3.5 APK.

Touch handles (editor joysticks) respond too slowly. Would be useful to have a quick slider for each (move and look) nearby that has x1, x2, x3, x4 to make moving and looking around a small or large scene more efficient. Would be very useful to set move speed separately from look speed.

Generally the editor is very functional, but if it had a magnifying glass widget for smaller screens, it could be very useable for little projects. I generally use a Bluetooth mouse, so in that scenario a magnifying widget would be very useful.

The graphics renderers have changed since Godot 3.5. In 3.5 there was GLES2 and GLES3. Can someone give me a breakdown of Godot 4.x MOBILE versus COMPATIBILITY. Would like to keep my little games highly optimised with broadest market access, so would like to use GLES2 as a benchmark. (Not concerned about FORWARD+ right now, since target platform is mobile(GLES2).

RUN launches the game is a seperate window. Launch is slow. Would be useful to RUN IN EDITOR as an option.

Can't resize any panels via touch, eg: Scene, Editor or Inspector. You can do this in Godot 3.5.

Hoping to port FULL ANALOG FPS from Godot 3.5 to 4.x when your current release becomes usable on Android.
Steps to reproduce
As above.
Minimal reproduction project (MRP)
Any.

I believe each issue will have to be its own separate issue here on Github for things to be properly tracked and managed by Godot contributors. More work for you, unfortunately, but that's how I believe things are handled here.

Indeed, these needs to be separate issue reports, please make sure to search for existing issues before opening individual reports

Thanks for the feedback.

Can someone give me a breakdown of Godot 4.x MOBILE versus COMPATIBILITY.

Mobile rendering method uses Vulkan, and has a feature set similar to 3.x GLES3.
Compatibility rendering method uses OpenGL ES 3.0, and has a feature set similar to 3.x GLES2. This is probably the one you want to use right now when targeting mobile platforms, given a lot of Android devices have broken Vulkan drivers.


Camera Zoom issue

Camera preview seems to be zoom. is there a way to make it look 1X zoom on initialization. and then change zoom in /out programatically?

Yes, I'm aware of this. Haven't been able to spend time on it lately.

Thanks for your quick response. 1 more thing how can i upload recorded video?

I'm using this plugin
https://github.com/spoonconsulting/cordova-plugin-background-upload
Along with its Awesome Cordova plugin wrapper.
https://danielsogl.gitbook.io/awesome-cordova-plugins/background-upload
(You'll also need to install awesome cordova plugins core package)
This plugin uses POST request and multipart form data to upload.
If you need to upload to S3 via PUT, then check out the forks of that cordova plugin.

Thank you, will look into this..

@Saqib92 I've changed the default preview frame aspect ratio to 3:4 on Android.
It should look a bit less zoomed in now. However, I have not been able to fully eliminate that issue.
Please do try out version 5.1.0 or 6.1.0.


Expose ports in Dockerfile's

Exposes the ports in the REST API and frontend Dockerfile's so another tool such as nginx-proxy can read it (and also other containers can directly connect to them in the same network).
Btw, this is a great tool!

Thanks!


Fix duplicate name issues with secgroup handling

security groups can have duplicate names, so when specifying a name
that is ambigous deployment or cleanup fails, which leaves trash behind.
Better use ids, those are unique identifiers.
Why is this PR needed?
Does it fix an issue? addresses a business case?
add a description and link to the issue if one exists.
Fixes #
Reminder: Add the "fixes bsc#XXXX" to the title of the commit so that it will
appear in the changelog.
What does this PR do?
please include a brief "management" technical overview (details are in the code)
Anything else a reviewer needs to know?
Special test cases, manual steps, links to resources or anything else that could be helpful to the reviewer.
Info for QA
This is info for QA so that they can validate this. This is mandatory if this PR fixes a bug.
If this is a new feature, a good description in "What does this PR do" may be enough.
Related info
Info that can be relevant for QA:

link to other PRs that should be merged together
link to packages that should be released together
upstream issues

Status BEFORE applying the patch
How can we reproduce the issue? How can we see this issue? Please provide the steps and the prove
this issue is not fixed.
Status AFTER applying the patch
How can we validate this issue is fixed? Please provide the steps and the prove this issue is fixed.
Docs
If docs need to be updated, please add a link to a PR to https://github.com/SUSE/doc-caasp.
At the time of creating the issue, this PR can be work in progress (set its title to [WIP]),
but the documentation needs to be finalized before the PR can be merged.
Merge restrictions
(Please do not edit this)
We are in v4-maintenance phase, so we will restrict what can be merged to prevent unexpected surprises:
What can be merged (merge criteria):
    2 approvals:
        1 developer: code is fine
        1 QA: QA is fine
    there is a PR for updating documentation (or a statement that this is not needed)

Testing it right now.

@evrardjp I am not sure there is a need to refresh the terraform files, this is the openstack branch which isn't supposed to be used by customers anyway..

Doesn't mean we can't make it right...

afaik this can only be merged by the z squad, so I guess I have to create an avant-garde issue for somebody to press the merge button.


Final touches before declaring 0.4

I think that these small fixes and finishing the remote-logging branch is enough to declare version 0.4 and put development on rest.
Closes #60 for the time being, until we have a better image.

LGTM