Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Forked executor discards the output it grabbed when an execution times out

Abierto
#58 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 3 días

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
Activo
Stack tecnológico
java
Área
build-system

Línea de trabajo

Start in maven-executor/src/main/java/org/apache/maven/executor/support/ProcessBuilderExecutorSupport.java around lines 93-96 and trace how timeout handling discards the two ByteArrayOutputStreams before throwing ExecutorException. Review the ExecutorException API and existing callers; done means a timed-out execution still exposes the captured stdout and stderr, while callers supplying their own streams retain the partial output.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug
Affected version

1.0.0

Bug description

With grabOutputAsString(true) and an executionTimeout, ProcessBuilderExecutorSupport pumps stdout and stderr into two ByteArrayOutputStreams. When the timeout expires it destroys the process and throws ExecutorException("Process timeout: " + execution) (ProcessBuilderExecutorSupport.java#L93-L96), and both buffers are dropped. The caller learns that the build stalled, but not where. Without a timeout the call blocks for as long as the build does, so a caller that wants a bounded run cannot also keep the log of a run that hangs.

A hang is the case where an integration-test harness most needs the log. Found while moving eclipse-tycho/tycho's integration tests from maven-verifier to maven-executor (eclipse-tycho/tycho#6383): one test stalled on a macOS runner until GitHub's 6-hour job limit, and nothing shows where. maven-verifier 1.8.0 wrote the forked build's output to its log file as it arrived, so a stalled run still left a partial log.

Proposal: on timeout, throw an exception that carries what was grabbed so far, for example an ExecutorException subclass with stdOutString() and stdErrString(), or include the tail of the output in the message. Callers that pass their own stdOut() and stdErr() streams instead of grabbing already get the partial output, since it is written as it arrives.

Lenguaje dominante
Java
Estrellas
5
Forks
2
Merge medio
2 d 5 h
PR fusionados (30 d)
2

Preparar el entorno

Aún no hemos revisado los archivos de configuración de este proyecto. Empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de apache/maven-executor

Todos los issues de apache/maven-executor

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.