After a failed `/exec` or `/eval` request the thread that handled it keeps a stale lsFusion stack: every later error on that thread is reported without the executing action and its position, in the response and in the server log
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 58/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- java
- Área
- api, backend, observability
Línea de trabajo
Start by tracing how request errors capture and clear the lsFusion execution stack for /eval and /exec, including failures during script compilation. Reproduce the stale stack by sending the provided failing script repeatedly, then check the HTTP response and logs/stderr.log. Done when each error reports only the stack and positions from its own request, including after earlier compile or runtime failures.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Description
When an action called through the HTTP API fails at run time, the error is reported with the lsFusion stack: the actions being executed, each with its module, line and column. Since #1881 the 500 response carries it too. This works only for the first failure a server thread handles. Every later failure handled by that thread is reported with one line left over from the earlier request instead of its own stack, so a few failed requests after a server start the stack is gone from all responses, and from logs/stderr.log as well, until the server is restarted.
The script below needs no application code and can be sent to /eval on any server:
fail() {
throwException('boom');
}
run() {
fail();
}
Sent 14 times in a row to a server that has just started (7.0-SNAPSHOT master, d4ac0948a8, development mode), it gets two different answers. Calls 1-5 (the Java stack trace that follows is left out):
Internal Server Error: lsfusion.server.logics.action.flow.LSFException boom
... - RMI execution(RemoteLogics.eval(..))
... - RMI execution(RemoteConnection.eval(..))
Execute action : at run [UNIQUE1NSNAME(7:5)]
Execute action : at fail [UNIQUE1NSNAME(4:5)]
Execute action : System.throwException[STRING] 'Throw exception' [System(135:17)]
Calls 6-14, and every call after them:
Internal Server Error: lsfusion.server.logics.action.flow.LSFException boom
... - RMI execution(RemoteLogics.eval(..))
The line that is left does not belong to the failed request: /exec?action=System.throwException&p=boom2 sent after them is answered with RMI execution(RemoteLogics.eval(..)) too, the entry point of an earlier /eval request. The same error in logs/stderr.log loses the Execute action lines in the same way.
A request that fails while its script is being compiled leaves the thread in the same state. After a server start, 14 scripts that refer to an unknown property (run() { EXPORT JSON FROM x = nosuchprop(); }) were sent first, and then the script above 8 times: none of the 8 answers had the Execute action lines.
Fix
Every error of a request is reported with the lsFusion stack of that request: the actions it was executing and their positions, however many requests failed before it on the same thread. Nothing of the stack of an earlier request appears in a later error.
Reason
The position of the failing statement is the only part of an internal error that tells an application developer, or an assistant calling /eval, where to look. #1881 put it into the response for exactly that purpose. An assistant usually sends a script with a compile error or two before the one that fails at run time, so on a development server the stack is missing in practice almost always, and several feedback reports about "a bare internal server error with no lsFusion element" describe exactly that. The same error with a stack on a restarted server and without one a few requests later reads as two different problems, and the server log, which used to be the fallback, loses the lines too.
- Lenguaje dominante
- Java
- Estrellas
- 214
- Forks
- 46
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Sin 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 lsfusion/platform
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
-
bug
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 30/100
-
Dificultad 3/5 1-2 días Aptitud para principiantes 62/100
Todos los issues de lsfusion/platform
Issues similares
-
Quick Installation step 2 installs from the plugin manager, but the plugin isn't published yetAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
jenkinsci/user-guide-ai-chatbot-plugin#132 ·
Los mantenedores suelen responder en 6 días
-
account assessment course feature lecture
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 1 día
-
[Bug] 连接达梦时报错,agent 进程启动即退Abiertobug db/dameng user-priority/P2
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
t8y2/dbx#15534 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
app:learninggoalhub enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 86/100
Los mantenedores suelen responder en 1 día