FS#55720 - [texlive-bin] [poppler] heap corruption with -3
Attached to Project:
Arch Linux
Opened by Jon Gjengset (Jonhoo) - Saturday, 23 September 2017, 19:28 GMT
Last edited by Rémy Oudompheng (remyoudompheng) - Wednesday, 27 September 2017, 06:11 GMT
Opened by Jon Gjengset (Jonhoo) - Saturday, 23 September 2017, 19:28 GMT
Last edited by Rémy Oudompheng (remyoudompheng) - Wednesday, 27 September 2017, 06:11 GMT
|
Details
Description:
Since upgrading to 2017.44590-3, I've been experiencing pdflatex hangs and crashes across several machines. The error all seem to be related to heap corruption. Examples include: - *** Error in `pdflatex': corrupted size vs. prev_size: 0x000055ac5cd8a82f *** - “pdflatex paper.tex” terminated by signal SIGSEGV (Address boundary error) - pdflatex _pthread_mutex_lock assertion 'INTERNAL_SYSCALL_ERRNO (e, __err) != ESRCH || !robust' failed Downgrading to -2 (and downgrading poppler to 0.57) fixes the problem. The TeX files I'm operating on unfortunately aren't publicly available, but I thought I'd flag it anyway. |
This task depends upon
Closed by Rémy Oudompheng (remyoudompheng)
Wednesday, 27 September 2017, 06:11 GMT
Reason for closing: Fixed
Additional comments about closing: in texlive-bin 2017.44590-5
Wednesday, 27 September 2017, 06:11 GMT
Reason for closing: Fixed
Additional comments about closing: in texlive-bin 2017.44590-5
\includegraphics[page=1,trim={2.5cm 0.7cm 2.5cm 1.4cm},clip,width=0.85\textwidth]{../pics/tmp.pdf}
[6 <../pics/tmp.pdf, page is rotated 90 degrees Internal Error (0): Call to Object where the object was type 5, not the expected type 8
Aborted (core dumped)
I can confirm that a rollback to poppler 0.57 and texlive-bin 2017.44590-2 fixes the issue.
I daresay \includepdf is neither "The main functionality" nor "System crash or severe boot failure that is likely to affect more than just you".
Thanks.
testimg.pdf (6.6 KiB)
https://bugs.archlinux.org/task/55721
Specifically, in PDFs that included text, those where the text was in the form of embedded fonts triggered the crash whereas those in which the fonts had been converted to paths did not.
FS#55721happened to be very well written FWIW :)@remy, it came with a reproducer as well as a poppler bugreport https://bugs.freedesktop.org/show_bug.cgi?id=102952
This bug is also reported here:
https://bugs.freedesktop.org/show_bug.cgi?id=102952
"Internal Error (0): Call to Object where the object was type 5, not the expected type 8".
Downgrading to "texlive-bin-2017.44590-2-x86_64.pkg.tar.xz" (and the according libpoppler packages) fixed it for now.
Thanks.
This particular combination gives me `*** Error in `pdflatex': corrupted size vs. prev_size: 0x0000564d0a1454cf ***`
figures_design-backfill-query... (88.7 KiB)
figures_design-ancestor-query... (22.7 KiB)
PS: don't flag as duplicates bugs that are not the same issue.
FS#55721.Please only comment here about the original poster's issue, which is the heap corruption.
Edit: Well, it seems that I cannot remove them (only edit). If you can delete them, please do it :) Sorry about this.
- are you using architecture x86-64?
- do you reproduce the issue with the files paper.tex and figures_design-backfill-query.pdf, figures_design-ancestor-query-legend.pdf?
- which command do you launch to reproduce the issue?
- on the machines were you reproduce the issue, does it happen deterministically or randomly once every N runs?
- when you say it happens on two of your machines, does it mean there are machines where you never observed it?
- does package texlive-bin 2017.44590-4 change anything to the above questions?
- are the three errors (corrupted size, SIGSEGV, assertion failed) mentioned in the bug description distinct errors that appeared in 3 different runs ?
Do you run a "publicly" available compilation server receiving arbitrary input from the outside ?
- Yes, I see the issue with exactly the files uploaded.
- `pdflatex paper.tex`
- It happens deterministically. However, if I change even small things in the file, it can make the issue go away. Or the error changes. For example, removing either figure, setting an empty title or author, or removing [twocolumn] all make the document compile fine.
- I have not had a chance to try this on a third machine, so no.
- `texlive-bin 2017.44590-4` does not fix the issue.
- The three different errors occur with slightly different versions of paper.tex. corrupted size seems to be by far the most common one.
A fourth error case is that compilation simply hangs. This happened in my last run (again, with modifications to paper.tex), and gdb reports:
(gdb) i threads
Id Target Id Frame
* 1 Thread 0x7f1fed9fb780 (LWP 24772) "pdflatex" 0x00007f1fea58642a in __pthread_mutex_lock_full () from /usr/lib/libpthread.so.0
(gdb) bt
#0 0x00007f1fea58642a in __pthread_mutex_lock_full () from /usr/lib/libpthread.so.0
#1 0x00007f1fed000714 in Dict::decRef() () from /usr/lib/libpoppler.so.70
#2 0x00007f1fed068baa in Object::free() () from /usr/lib/libpoppler.so.70
#3 0x00007f1fed06bbd1 in PageAttrs::~PageAttrs() () from /usr/lib/libpoppler.so.70
#4 0x00007f1fed06ce4b in Page::~Page() () from /usr/lib/libpoppler.so.70
#5 0x00007f1fecff3e5a in Catalog::~Catalog() () from /usr/lib/libpoppler.so.70
#6 0x00007f1fed072c8e in PDFDoc::~PDFDoc() () from /usr/lib/libpoppler.so.70
#7 0x000055d418aadc4c in delete_document(PdfDocument*) ()
#8 0x000055d418a9c85a in deleteimage ()
#9 0x000055d418a7db65 in zpdfshipout ()
#10 0x000055d418a8d68b in maincontrol ()
#11 0x000055d418a3caba in mainbody ()
#12 0x000055d418a27a2f in main ()
According to valgrind, it reduces the number of double-free errors during "pdflatex paper.tex" to 6 from 90 in previous package versions. I am not able to reduce the error count to zero easily. The errors arose from an incorrect migration to the new poppler API (introduced in poppler 0.58).
If it solves your issue I will integrate that patch version in the package.
https://pkgbuild.com/~remy/texlive-experimental/
Both for the test case, and for the larger document in which I originally encountered the issue.
Thank you for sticking this one out!