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

Bound subprocess output capture to prevent ByteArrayOutputStream OOM

Abierto
#1,723 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
java
Área
backend

Línea de trabajo

Start in PerlOnJavaProcess.copyOutput (around line 165 of PerlOnJavaProcess.java), where the stderr reader writes into a ByteArrayOutputStream without a size limit. Decide between a bounded buffer and streaming to a file, then check that a reader failure reaches the parent process. Done means a run that emits sustained output no longer hits OutOfMemoryError and a reader failure is reported instead of stalling silently.

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

Descripción

area:performance area:runtime bug

Summary

PerlOnJavaProcess.copyOutput accumulates subprocess output in a ByteArrayOutputStream without a bounded capture size. A CPAN test that emits sustained warnings can grow the buffer to the JVM array-size limit and throw OutOfMemoryError in the output-copy thread.

Evidence

During CPAN release acceptance run 20261009-194921-60036, Mojolicious 9.49 emitted repeated warnings while running its tests. The captured target log reached 2,147,500,150 bytes. The stderr-copy thread then failed with:

java.lang.OutOfMemoryError: Required array length 2147483639 + 3846 is too large
    at java.io.ByteArrayOutputStream.ensureCapacity
    at java.io.ByteArrayOutputStream.write
    at org.perlonjava.runtime.perlmodule.PerlOnJavaProcess.copyOutput(PerlOnJavaProcess.java:165)

After this, the target produced no output and was reported as a timeout after 2,400 seconds (1,606 seconds without output). The affected output contained repeated Use of uninitialized value in hash element warnings from Mojolicious DOM code, alongside File::stat experimental @_ warnings. The warning causes have their own tracking; this report concerns the process-output capture exhausting memory and losing its stderr reader.

Expected behavior

Large subprocess output should not grow a single in-memory buffer until it reaches the JVM array limit. Output capture should remain bounded or stream to a file, and an output-reader failure should be surfaced to the parent process instead of leaving the test apparently stalled.

Lenguaje dominante
Perl
Estrellas
64
Forks
7
Merge medio
5 h 11 min
PR fusionados (30 d)
186

Preparar el entorno

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 fglock/PerlOnJava

Todos los issues de fglock/PerlOnJava

Issues similares

Más issues de Perl

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.