FS#54205 - [openssl] colord-sane aborts at exit, sometimes
Attached to Project:
Arch Linux
Opened by Stefan (steinwanderer) - Saturday, 27 May 2017, 16:34 GMT
Last edited by Jan Alexander Steffens (heftig) - Thursday, 20 July 2017, 07:39 GMT
Opened by Stefan (steinwanderer) - Saturday, 27 May 2017, 16:34 GMT
Last edited by Jan Alexander Steffens (heftig) - Thursday, 20 July 2017, 07:39 GMT
|
Details
Description:
colord-sane dumps core a few seconds after start/stop of service and again, when a USB-Stick or HDD is connecting/mounting. Additional info: Downgrading sane to 1.0.25-2 resolve this. I'm not sure if this is a sane or colord problem. * package version(s) colord (1.3.5-1) sane (1.0.27-1) net-snmp (5.7.3-4) libieee1284 (0.2.11-5) * config and/or log files etc. #systemctl status colord.service ● colord.service - Manage, Install and Generate Color Profiles Loaded: loaded (/usr/lib/systemd/system/colord.service; static; vendor preset: disabled) Active: active (running) since Sat 2017-05-27 17:31:48 CEST; 2s ago Main PID: 3914 (colord) Tasks: 4 (limit: 4915) CGroup: /system.slice/colord.service └─3914 /usr/lib/colord/colord Mai 27 17:31:48 localhost.localdomain colord[3914]: /usr/lib/colord/colord-sane: error while loading shared libraries: libsane.so.1: cannot open shared object file: No such file or directory #sudo pacman -Syu sane #systemctl stop colord.service #systemctl start colord.service Mai 27 17:37:15 polkitd[668]: Registered Authentication Agent for unix-process:4043:1632816 (system bus name :1.595 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/P…ocale de_DE.UTF-8) Mai 27 17:37:15 polkitd[668]: Unregistered Authentication Agent for unix-process:4043:1632816 (system bus name :1.595, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale de_DE.U…onnected from bus) Mai 27 17:37:21 colord[4049]: GLib (gthread-posix.c): Unexpected error from C library during 'pthread_setspecific': Invalid argument. Aborting. Mai 27 17:37:21 systemd-coredump[4060]: Process 4053 (colord-sane) of user 124 dumped core. Stack trace of thread 4056:... #systemctl status colord.service ● colord.service - Manage, Install and Generate Color Profiles Loaded: loaded (/usr/lib/systemd/system/colord.service; static; vendor preset: disabled) Active: active (running) since Sat 2017-05-27 17:37:15 CEST; 45s ago Main PID: 4049 (colord) Tasks: 3 (limit: 4915) CGroup: /system.slice/colord.service └─4049 /usr/lib/colord/colord Mai 27 17:37:21 localhost.localdomain colord[4049]: GLib (gthread-posix.c): Unexpected error from C library during 'pthread_setspecific': Invalid argument. Aborting. Steps to reproduce: Install colord and sane and start the service. |
This task depends upon
Closed by Jan Alexander Steffens (heftig)
Thursday, 20 July 2017, 07:39 GMT
Reason for closing: Fixed
Thursday, 20 July 2017, 07:39 GMT
Reason for closing: Fixed
I wasn't seeing the missing libsane.so.1 error though as I have sane installed.
I still need to report this in sane bug tracker.
At program start, GSlice allocates pthread key 0 for the private_thread_memory GPrivate.
When enumerating devices, libsane's magicolor plugin initializes libnetsnmp, which initializes libcrypto, which registers OPENSSL_cleanup as an atexit function and gets itself pthread keys 7, 8 and 9.
When the main thread is finished, glibc calls OPENSSL_cleanup, which deletes pthread keys 7, 8, 9, and 0 (!!!).
In the mean time, there's still stuff happening on the GDBus worker threads, which includes calls to GSlice.
This races with the main thread, and if there's a call to GSlice after the main thread deleted key 0, GSlice explodes.
This is a bug in OpenSSL.
openssl Version: 1.1.0.f-2 x86_64
confirmed patch is working