FS#26560 - [gnutls] cups segfaults (libgnutls.so related)

Attached to Project: Arch Linux
Opened by JM (fijam) - Saturday, 22 October 2011, 12:34 GMT
Last edited by Andreas Radke (AndyRTR) - Friday, 28 October 2011, 13:49 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:
Attempting to start the cups daemon results in a segfault

cupsd[6494]: segfault at 105f0 ip b767c484 sp bfc2f250 error 4 in libgnutls.so.28.2.0[b75f4000+e7000]


Additional info:
cups 1.5.0-1
gnutls 3.0.4-2


Steps to reproduce:
$ /etc/rc.d/cupsd start
:: Starting cupsd daemon [BUSY]
cupsd: Child exited on signal 11
[FAIL]
This task depends upon

Closed by  Andreas Radke (AndyRTR)
Friday, 28 October 2011, 13:49 GMT
Reason for closing:  Fixed
Comment by Andreas Radke (AndyRTR) - Sunday, 23 October 2011, 08:10 GMT
Works for me here. Make sure you merge new config options. Try the new clean /etc/cups/cupsd.conf.default.
Comment by JM (fijam) - Sunday, 23 October 2011, 09:27 GMT
$ cp cupsd.conf.default cupsd.conf

$ /etc/rc.d/cupsd start
:: Starting cupsd daemon [BUSY]
cupsd: Child exited on signal 11
[FAIL]
[231049.119182] cupsd[22984]: segfault at 105f0 ip b770c484 sp bf960760 error 4 in libgnutls.so.28.2.0[b7684000+e7000]

Comment by JM (fijam) - Sunday, 23 October 2011, 09:33 GMT
Attaching strace
   straced (16.7 KiB)
Comment by JM (fijam) - Sunday, 23 October 2011, 09:46 GMT
I have tried building the cups package locally with abs but the problem persists.
Comment by JM (fijam) - Sunday, 23 October 2011, 10:06 GMT
OK, the problem definitely lies with gnutls.

$ gnutls-cli --benchmark-ciphers
Segmentation fault

Do you want me to open a separate bug report?

I am using a rather uncommon architecture (VIA C7) which has hardware acceleration in gnutls so perhaps some obscure bug sneaked in...
Comment by Andreas Radke (AndyRTR) - Sunday, 23 October 2011, 10:31 GMT
Please check/report this upstream to gnutls. I'm changing the topic here as this seem to be not a cups bug.
Comment by JM (fijam) - Sunday, 23 October 2011, 11:05 GMT
OK, I will pester the upstream. Just leaving a note here for other C7 users affected by this issue: recompiling gnutls with --disable-hardware-acceleration fixes the problem.
Comment by Gemini (Gemini) - Sunday, 23 October 2011, 19:29 GMT
Downgrading to GnuTLS-3.0.3 also does the trick for those who don't know how to recompile. I will look forward to your bug report, as I have the same problem as you. It really seems related to the VIA C7 processor as I also have one. I can't start either Claws-mail nor GnuCash, which both depends on GnuTLS.
Comment by JM (fijam) - Sunday, 23 October 2011, 19:53 GMT
The bug is triaged upstream here: https://savannah.gnu.org/support/?107850
I provided the developers with ssh access to the affected machine, first fixes already in git (http://git.savannah.gnu.org/cgit/gnutls.git) but this will take some time to get fully resolved.
Comment by JM (fijam) - Sunday, 23 October 2011, 22:30 GMT
This bug is now confirmed as fixed upstream in git. The relevant patches are: "is_padlock_nano is behaving properly and saving registers", "initialize only a fully available hash" & "No need to check for padlock nano in 32-bit systems, so simplify things." The performance improvement is also quite nice: http://pastebin.com/UzbiuDxy . Kudos to Nikos Mavrogiannopoulos for addressing it quickly.

Loading...