Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#44106 - [ghostscript] gs in pdf2ps segfaults

Attached to Project: Arch Linux
Opened by Fazlul Shahriar (fhs) - Monday, 09 March 2015, 00:55 GMT
Last edited by Evangelos Foutras (foutrelis) - Saturday, 04 April 2015, 07:20 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Andreas Radke (AndyRTR)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

$ pdf2ps arch.pdf arch.ps
Segmentation fault
$

arch.pdf is attached. It was produced by using the "print to pdf" function of chromium from https://www.archlinux.org/about/.

(I originally discovered gs was segfaulting when trying to print from chromium/cups. Hopefully that issue will be fixed once pdf2ps is fixed.)

Additional info:
* package version(s)
ghostscript 9.15-2
chromium 41.0.2272.76-1

   arch.pdf (89.7 KiB)
This task depends upon

Closed by  Evangelos Foutras (foutrelis)
Saturday, 04 April 2015, 07:20 GMT
Reason for closing:  Fixed
Additional comments about closing:  ghostscript 9.16-1
Comment by Fazlul Shahriar (fhs) - Monday, 09 March 2015, 01:43 GMT
Stack trace attached.
   trace.log (58.6 KiB)
Comment by Andreas Radke (AndyRTR) - Monday, 09 March 2015, 05:48 GMT
If it's not a bug in chromium (you can try with cups-pdf virtual printer) you should check and file it there: http://bugs.ghostscript.com/
Comment by Evangelos Foutras (foutrelis) - Monday, 09 March 2015, 08:30 GMT
Crashing in __lll_unlock_elision() seems suspicious; make sure you're correctly updating the CPU microcode during early boot:

https://wiki.archlinux.org/index.php/Microcode
Comment by Fazlul Shahriar (fhs) - Tuesday, 10 March 2015, 04:18 GMT
Thanks for the pointer about microcode! Microcode update seems to fix the issue. Printing from chromium/cups also works.

For reference, my CPU is Intel(R) Core(TM) i5-4330M CPU @ 2.80GHz on a Thinkpad T440p. dmesg after the microcode update:

[ 0.000000] CPU0 microcode updated early to revision 0x1c, date = 2014-07-03
[ 0.117647] CPU2 microcode updated early to revision 0x1c, date = 2014-07-03
[ 0.382373] microcode: CPU0 sig=0x306c3, pf=0x10, revision=0x1c
[ 0.382377] microcode: CPU1 sig=0x306c3, pf=0x10, revision=0x1c
[ 0.382382] microcode: CPU2 sig=0x306c3, pf=0x10, revision=0x1c
[ 0.382388] microcode: CPU3 sig=0x306c3, pf=0x10, revision=0x1c
[ 0.382428] microcode: Microcode Update Driver: v2.00 <tigran@aivazian.fsnet.co.uk>, Peter Oruba
Comment by Fazlul Shahriar (fhs) - Tuesday, 10 March 2015, 04:21 GMT
And dmesg before the microcode update:

[ 0.377066] microcode: CPU0 sig=0x306c3, pf=0x10, revision=0x16
[ 0.377071] microcode: CPU1 sig=0x306c3, pf=0x10, revision=0x16
[ 0.377076] microcode: CPU2 sig=0x306c3, pf=0x10, revision=0x16
[ 0.377082] microcode: CPU3 sig=0x306c3, pf=0x10, revision=0x16
[ 0.377120] microcode: Microcode Update Driver: v2.00 <tigran@aivazian.fsnet.co.uk>, Peter Oruba
Comment by Pauli (pl) - Wednesday, 01 April 2015, 10:08 GMT
  • Field changed: Percent Complete (100% → 0%)
I get the same crash on a Broadwell i7 5600U when trying to print anything through CUPS. No microcode updates are available for the processor. I tried to ask around about this, and it seems the microcode update for user fhs's processor simply disables tsx instructions, thus hiding the real issue.

Quick backtrace based on which I think it's the same issue:

Core was generated by `gs -q -dNOPAUSE -dBATCH -dSAFER -sDEVICE=ps2write -sOUTPUTFILE=%stdout -dLangua'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007f985d939150 in __lll_unlock_elision () from /usr/lib/libpthread.so.0
(gdb) bt
#0 0x00007f985d939150 in __lll_unlock_elision () from /usr/lib/libpthread.so.0
#1 0x00007f985ebaaa99 in gp_monitor_leave ()
#2 0x00007f985eb31754 in gsicc_get_link_profile ()
#3 0x00007f985eb31d64 in gsicc_get_link ()
#4 0x00007f985eb2bd4e in ?? ()
#5 0x00007f985ed0af78 in gx_remap_color ()
#6 0x00007f985ece97e8 in gs_stroke ()
#7 0x00007f985ea87e2d in ?? ()
#8 0x00007f985ea88b59 in gs_interpret ()
#9 0x00007f985ea7cc95 in gs_main_run_string_end ()
#10 0x00007f985ea7e4a9 in ?? ()
#11 0x00007f985ea7e634 in ?? ()
#12 0x00007f985ea801eb in gs_main_init_with_args ()
#13 0x00007f985ea10a54 in main ()
Comment by Evangelos Foutras (foutrelis) - Wednesday, 01 April 2015, 10:16 GMT
According to the upstream bug, this should be fixed in Ghostscript 9.16. [1]

I see ghostscript 9.16-1 is currently in [testing]; you could grab it from there to test or wait until it moves to [extra].

[1] http://bugs.ghostscript.com/show_bug.cgi?id=695862

Loading...