Sub::Quote deferred subs lose identity across threads
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 52/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- perl
- Área
- backend, testing-qa
Línea de trabajo
Comienza con t/sub-quote-threads.t y reprodúcelo con los dos comandos mostrados para los backends de JVM e intérprete. Lee Sub/Defer.pm alrededor de la línea 75 y su implementación de CLONE; después, sigue las referencias a deferred-sub y %DEFERRED durante la creación de hilos. El trabajo estará terminado cuando los subs quoted y deferred conserven su identidad y la prueba de regresión específica pase en ambos backends.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
Sub::Quote 2.006009 fails when quoted/deferred subs are retrieved or invoked from PerlOnJava threads. The failure reproduces on both the JVM and interpreter backends.
Reproduction
The CPAN random tester record is:
2026-09-18 07:06:07 FAIL Sub::Quote Sub::Defer ... 5430 5435 5/5435 subtests failed; 1/15 test programs failed
The failing test is:
t/sub-quote-threads.t
Using the built distribution with its library and test-library paths:
timeout 120 ./jperl -I<build>/blib/lib -I<build>/t/lib <build>/t/sub-quote-threads.t
timeout 120 ./jperl --interpreter -I<build>/blib/lib -I<build>/t/lib <build>/t/sub-quote-threads.t
Both backends fail identically: 5 of 6 assertions fail. The only passing assertion is the unquoted One case. Quoted/deferred sub retrieval and execution return undef, including the two-thread cases.
The complete CPAN run has 14 of 15 test programs passing; only t/sub-quote-threads.t fails. PerlOnJava also emits:
Use of uninitialized value in hash element at .../Sub/Defer.pm line 75
Expected behavior
System Perl passes the complete oracle run: 7036/7036 tests, including t/sub-quote-threads.t.
Technical analysis
Sub::Defer::undefer_sub looks up deferred-sub metadata in %DEFERRED using the deferred sub reference. Sub::Defer provides a CLONE implementation specifically to repair stringified subreference keys after threading.
On PerlOnJava, the lookup at Sub/Defer.pm line 75 receives an undefined or otherwise non-matching key after the thread boundary. This indicates that thread cloning is not preserving or remapping the identity/metadata of deferred quoted subs as required by Sub::Defer::CLONE.
The issue is present in both execution backends, so it appears to be shared runtime/thread-cloning behavior rather than a JVM-backend-only problem or a module-specific compilation issue.
Impact
Non-threaded Sub::Quote functionality passes, but applications using quoted/deferred subs from Perl threads can silently receive undef or fail to invoke the intended subroutine. This is a compatibility bug affecting modules that use Sub::Quote together with threads.
Suggested investigation
- Trace cloning of the deferred sub reference and the
%DEFERREDmetadata across thread creation. - Compare PerlOnJava's handling of
CLONEand stringified subreference keys with system Perl. - Add a focused project-owned regression test covering
quote_sub,quoted_from_sub,unquote_sub, and deferred-sub invocation from a child thread on both backends.
- Lenguaje dominante
- Perl
- Estrellas
- 64
- Forks
- 7
- Merge medio
- 4 h 27 min
- PR fusionados (30 d)
- 178
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
-
area:backend area:cpan-port area:parser bug
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
fglock/PerlOnJava#1659 ·
Los mantenedores suelen responder en 1 día
-
Alien::Build archive extraction fails for Ninja and MesonPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
fglock/PerlOnJava#1657 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de fglock/PerlOnJava
Issues similares
-
Add IO::Pipe classAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
yuki-kimoto/SPVM-IO#30 ·
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
convos-chat/convos#977 ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
inverse-inc/packetfence#9387 ·
Los mantenedores suelen responder en 1 día
-
`-static-libstdc++` breaks buildAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
linux-test-project/lcov#552 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
szTheory/exifcleaner#383 ·
Los mantenedores suelen responder en 1 día