LayoutProcessor and multi-threading environment
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
Direzione di ricerca
Start by reading openpdf/src/main/java/com/lowagie/text/pdf/LayoutProcessor.java and the linked BIRT pull request for context on the shared flags and race condition. Trace how PDF content creation uses LayoutProcessor and where its flags are changed. Done means the per-document or per-thread processing no longer shares mutable global flags; verify with a concurrent PDF generation scenario that switches between Arabic and Latin text.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
For different TrueType fonts, it seems that one needs to change static (read: global) flags of the LayoutProcessor class.
This will sooner or later lead to hard-to-find bugs in a multi-threaded environment due to race conditions, when OpenPDF is used by more than one thread to create PDFs.
To Reproduce
Due to its nature, this can only reproduced in a multi-threading environment when OpenPDF is used by several threads to create PDF docs, and each thread toggles some of the flags during execution, for example to render arabic text inbetween latin text. And then you still need luck to spot the bug.
So, in practice, this bug will inevitably occur in production, and probably only there.
See my comment on https://github.com/eclipse-birt/birt/pull/2144 for more details
Your real name
Henning von Bargen
Additional context
I think the LayoutProcessor class should be made a normal class (not only static attributes) and an instance of this class should be part of one the basic classes needed to add content to a PDF.
- Lingua principale
- Java
- Stelle
- 4.4k
- Fork
- 714
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di LibrePDF/OpenPDF
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
-
IndexOutOfBoundsException in PdfReaderForse già presa @andreasrosdalw l’ha presa 93 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
`PdfSmartCopy` can take effectively unbounded time on nested shared Form XObjectsForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertabug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 38/100
Tutte le issue di LibrePDF/OpenPDF
Issue simili
-
bug web-server
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
jooby-project/jooby#4035 ·
I maintainer di solito rispondono entro 1 giorno
-
L: javascript
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
dependabot/dependabot-core#16744 ·
I maintainer di solito rispondono entro 1 giorno
-
intake mcp-intake needs-human-review priority:high type:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
Ikalus1988/MisakaNet#3987 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
quarkiverse/quarkus-google-cloud-services#1187 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
locationtech/jts#1250 ·