Firewall hangs or crashes Jamlus
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- cpp, macos
- Área
- desktop, networking
Línea de trabajo
Comienza con la ruta del fallo en src/socket.cpp, especialmente con CSocket::Send; después inspecciona el flujo de conexión y las ubicaciones de timeout propuestas en src/clientdlg.cpp y CClientDlg. Reproduce el caso de Ethernet más firewall si es posible; se considera terminado cuando los intentos de conexión ya no provocan fallos ni se quedan bloqueados y un servidor inaccesible produce el comportamiento descrito de advertencia y desconexión.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
Clicking Connect while Ethernet is active and the macOS Application Firewall is enabled causes either an immediate crash (SIGPIPE, exit code 141) or a permanent hang. WiFi is not affected.
To Reproduce
- Plug in Ethernet (both Ethernet and WiFi active, default route via
en0) - Enable the macOS Application Firewall via gui: or probably
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate on - Launch Jamulus and click Connect
- The app either crashes immediately or hangs with no response from the server
Workaround: Unplug Ethernet, disable the firewall, or add Jamulus to the firewall allow list.
Expected behavior
Connect works regardless of which network interface is used and whether the firewall is enabled. If the server is unreachable, show an error instead of crashing or hanging.
Crash report (before fix)
frame #0: __sendto (libsystem_kernel.dylib)
frame #1: Jamulus CSocket::Send (socket.cpp)
frame #2: Jamulus (ConnLessProtocol / Protocol layer)
frame #3: Jamulus (Protocol layer)
frame #4: QtCore QSocketNotifier (via Qt event loop)
frame #5-8: Jamulus (various)
frame #9: QObject::event
frame #10: QWidget::event
frame #11-12: QtWidgets QApplication
frame #13: QtCore QCoreApplication::sendEvent
frame #14: QtCore QCoreApplicationPrivate::sendPostedEvents
Root cause (likely; AI assisted)
The macOS Application Firewall silently drops Jamulus's outgoing UDP packets when traffic originates from the Ethernet interface. WiFi works because it was already trusted (?). Before the fix, the dropped packets caused a SIGPIPE (no receiver). After the SO_NOSIGPIPE fix (handling macOS like iOS), it became a hang since the connection attempt never completes and IsConnected() stays false.
Operating system
macOS 26.5.2, Apple Silicon (arm64), Xcode 26.6
AI proposed Fix
Two changes were needed of which the first one I am not sure about:
1. SO_NOSIGPIPE (src/socket.cpp):
// Before:
#ifdef Q_OS_IOS
int valueone = 1;
setsockopt ( UdpSocket, SOL_SOCKET, SO_NOSIGPIPE, &valueone, sizeof ( valueone ) );
#endif
// After:
#if defined( Q_OS_IOS ) || defined( Q_OS_MACOS )
int valueone = 1;
setsockopt ( UdpSocket, SOL_SOCKET, SO_NOSIGPIPE, &valueone, sizeof ( valueone ) );
#endif
This prevents a SIGPIPE crash but doesn't fix the hang.
2. Connection timeout (src/clientdlg.cpp):
Added a 5-second TimerConnectTimeout in CClientDlg. If IsConnected() is still false when it fires, the app shows a warning about the firewall and disconnects. The timer is stopped on successful connection (OnConClientListMesReceived) or on manual disconnect.
To be discussed.
Additional context
/
- Lenguaje dominante
- C
- Estrellas
- 1.1k
- Forks
- 248
- Merge medio
- 1 d 23 h
- PR fusionados (30 d)
- 7
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de jamulussoftware/jamulus
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
jamulussoftware/jamulus#3953 · 2 comentarios ·
-
AI bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
jamulussoftware/jamulus#3901 · 4 comentarios · 1 reacción ·
-
AI
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
jamulussoftware/jamulus#3846 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 76/100
jamulussoftware/jamulus#3958 ·
-
refactoring
jamulussoftware/jamulus#3955 · 1 comentario · 1 asignado ·
Todos los issues de jamulussoftware/jamulus
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
corazawaf/coraza-nginx#140 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
BasedHardware/omi#15662 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
level/task module/gcp type/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100