Open pontscho opened 2 years ago
I'm sorry, I've only seen this issue today. This is indeed really odd, thanks for reporting! I'll see if I can reproduce this.
I'm not able to reproduce this here on Linux. Are you running the server on macOS?
Hi,
no problem, I also haven't enough time for this problem.
Today I tested it with latest master, it's still available. I used Ubuntu, usually I use this distribution to getting closer to the release time.
Last log:
...
2754467 lwan-tq.c:100 timeout_queue_expire() close error, fd: 266
2754467 lwan-tq.c:100 timeout_queue_expire() close error, fd: 266
2754467 lwan-tq.c:100 timeout_queue_expire() close error, fd: 266
2754467 lwan-tq.c:100 timeout_queue_expire() close error, fd: 266
2754467 lwan-tq.c:100 timeout_queue_expire() close error, fd: 266
2754467 lwan-tq.c:100 timeout_queue_expire() close error, fd: 266
2754467 lwan-tq.c:100 timeout_queue_expire() close error, fd: 266
2754467 lwan-tq.c:100 timeout_queue_expire() close error, fd: 266
2754467 lwan-tq.c:100 timeout_queue_expire() close error, fd: 266
^C
~/lwan/build/src/samples/hello$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.3 LTS
Release: 20.04
Codename: focal
~/lwan/build/src/samples/hello$ date
Fri Dec 2 11:22:20 CET 2022
~/lwan/build/src/samples/hello$ lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
Address sizes: 40 bits physical, 48 bits virtual
CPU(s): 16
On-line CPU(s) list: 0-15
Thread(s) per core: 2
Core(s) per socket: 1
Socket(s): 8
NUMA node(s): 1
Vendor ID: AuthenticAMD
CPU family: 23
Model: 1
Model name: AMD EPYC Processor (with IBPB)
Stepping: 2
CPU MHz: 2999.998
BogoMIPS: 5999.99
L1d cache: 256 KiB
L1i cache: 512 KiB
L2 cache: 4 MiB
L3 cache: 16 MiB
NUMA node0 CPU(s): 0-15
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm rep_good nopl cpuid extd_apicid tsc_known_freq pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext ibpb vmmcall fsgsbase bmi1 avx2 smep bmi2 rdseed adx smap clflushopt sha_ni xsaveopt xsavec xgetbv1 arat npt nrip_save
Hi,
I found an other weird behaviour in Lwan when I started to use our server for serving video streams for masses. After a point, when the client drop the connection, for example it had a network issue, it's connection stuck in the queue and start closing its socket after that connection was dropped.
Steps for reproducing:
1) Please apply this patch:
2) Compile Lwan and please start
hello
sample app. 3) Please compile and run this small test application:Server output will be something like this:
This means connections were closed by test application abort well. Until this everything went fine.
After keep-alive timeout reached Lwan starts sending these messages:
Unfortunately this means sometimes that close() in the timeout_queue_expire() function hit another valid connection was created by another http request.
After I reverted back this commit (https://github.com/lpereira/lwan/commit/7a8a0eb7023122ad9605627c45af03b78fca44c4) everything get back to normal.
Thanks, pontscho