Bound subprocess output capture to prevent ByteArrayOutputStream OOM
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
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
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
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Leer la 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 fglock/PerlOnJava
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
fglock/PerlOnJava#1651 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
fglock/PerlOnJava#1579 ·
Los mantenedores suelen responder en 1 día
-
area:cpan-port area:unicode bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
fglock/PerlOnJava#1341 ·
Los mantenedores suelen responder en 1 día
-
DateTime::subtract fails when nanosecond result crosses midnightPosiblemente ocupada @fglock la tomó hoy. Abiertoarea:runtime bug high-impact
Dificultad 3/5 1-2 días Aptitud para principiantes 25/100
fglock/PerlOnJava#1720 ·
Los mantenedores suelen responder en 1 día
-
area:backend area:cpan-port bug
Dificultad 4/5 3-5 días Aptitud para principiantes 22/100
fglock/PerlOnJava#1713 ·
Los mantenedores suelen responder en 1 día
Todos los issues de fglock/PerlOnJava
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
bug help wanted
Dificultad 2/5 Menos de una hora Aptitud para principiantes 70/100
bioepic-data/bervo#145 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Type: Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
inverse-inc/packetfence#9413 ·
Los mantenedores suelen responder en 1 día
-
Ubuntu .deb packages ship all files owned by uid/gid 1001 (CI user runner) instead of root:rootAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
Help-Wanted Needs-Triage Package-Update
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
microsoft/winget-pkgs#448814 · 1 comentario ·
Los mantenedores suelen responder en 1 día