Comments (6)
It happens because the applet is woken up before the connect. And here it happens because of the GC. Otherwise, we wait for the connect to wake the applet up. I'm on a fix.
from haproxy.
thanks for the repro, I'm able to reproduce:
Somehow alloc_dst_address()
is called with srv
being NULL here, so de-referencing it later in the function causes the above segfault
This is probably due to the recent patch serie to fix core.tcp()
behavior when yield occurs in between socket creation and connecting: 751b59c (+ commits mentioned in the message)
However, this is strange because from the Lua snippet, connect() is not called, so this is strange that connect_server()
is called for the socket. At this stage the stream target was not assigned (it is only assigned upon connect() from lua), so it is expected that:
srv = objt_server(s->target);
resolves to NULL in connect_server()
in this case.
We need to find out why connect_server()
is called too early while the stream is not yet ready.
from haproxy.
CCing @capflam since he knows this part best :)
from haproxy.
Oh nice! Good catch
from haproxy.
It should be fixed now. It will be backported as usual, as far as 2.6. @vvucetic, in the mean time, to avoid the crash, you should take care to not create a lua socket without calling Socket.connect()
. Out of curiosity, what is your use case to do such thing ? I'm asking because I want to be sure to fully understand the root cause of the issue.
from haproxy.
It should be fixed now. It will be backported as usual, as far as 2.6. @vvucetic, in the mean time, to avoid the crash, you should take care to not create a lua socket without calling
Socket.connect()
. Out of curiosity, what is your use case to do such thing ? I'm asking because I want to be sure to fully understand the root cause of the issue.
I already reordered code because it didn’t make sense, indeed. Script initialized tcp then did some other checks and returned (in very special case). That caused crashes. I managed to isolate (reproduce) it so figured I’d report.
Thanks for the quick fix, as always.
from haproxy.
Related Issues (20)
- ssl-default-bind-ciphersuites influencing TLS1.2. HOT 3
- DHE-Ciphers failing silently since 2.6 HOT 1
- Assert failure in ssl_sock_free_ocsp during old process exit HOT 1
- GPL 2.0 License does not align with the the GPL 2.1 License stated in src/event_hdl.c HOT 5
- Long URIs Truncate Logged HTTP Version HOT 9
- When I use filter the HAproxy process is terminated HOT 12
- issue with openssl initialisation order prevent use of security framework configuration for DH-related part HOT 5
- Ability to inherit server properties when using dynamic servers
- 2.9.4: Peers? crash during/after reload HOT 4
- Native asynchronous request mirroring HOT 2
- OCSP Stapling fails when server resolves to IPv6 but only IPv4 connectivity available HOT 2
- QUIC/H3 vs H2 performance difference for large payloads HOT 23
- Logging multiple combined FIX messages HOT 8
- High CPU (possibly stick-tables related) on 2.9.6 HOT 33
- Freezing frontend in state LIM after high load test HOT 4
- Unable to set a carriage return through a variable with http-request return HOT 4
- SPOE requests hanging until processing time is met when doing a reload HOT 2
- Allow preserving abstract namespace sockets address length HOT 5
- QUIC Interop "resumption" testcase failure when run with LibreSSL HOT 7
- src/http_ext.c: uninitialized variable suspected by gcc-14 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from haproxy.