Bug 45585 - Certificate check has locking problems
Summary: Certificate check has locking problems
Status: RESOLVED DUPLICATE of bug 46231
Alias: None
Product: UCS
Classification: Unclassified
Component: UMC - System diagnostic
Version: UCS 4.2
Hardware: Other other
: P5 normal
Target Milestone: UCS 4.3
Assignee: UMC maintainers
QA Contact: UMC maintainers
URL:
Keywords:
: 46074 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-10-24 12:22 CEST by Michael Grandjean
Modified: 2018-03-22 09:50 CET (History)
6 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 1: Cosmetic issue or missing function but workaround exists
Who will be affected by this bug?: 4: Will affect most installed domains
How will those affected feel about the bug?: 1: Nuisance – not a big deal but noticeable
User Pain: 0.023
Enterprise Customer affected?:
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Customer ID: 20677
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Grandjean univentionstaff 2017-10-24 12:22:37 CEST
Sometimes the certificate check of the system diagnostic module runs into locking problems and produces this traceback as "Problem":

> Problem: Überprüfe Gültigkeit der SSL Zertifikate
>
> Traceback (most recent call last):
>   File "/usr/lib/pymodules/python2.7/univention/management/console/modules/diagnostic/__init__.py", line 263, in execute
>     result = execute(umc_module, **kwargs)
>   File "/usr/lib/pymodules/python2.7/univention/management/console/modules/diagnostic/plugins/02_certificate_check.py", line 290, in run
>     all_certificates))
>   File "/usr/lib/pymodules/python2.7/univention/management/console/modules/diagnostic/plugins/02_certificate_check.py", line 271, in verify_from_master
>     for error in verifier.verify_root():
>   File "/usr/lib/pymodules/python2.7/univention/management/console/modules/diagnostic/plugins/02_certificate_check.py", line 202, in verify_root
>     for error in self.verify(self.root_cert_path):
>   File "/usr/lib/pymodules/python2.7/univention/management/console/modules/diagnostic/plugins/02_certificate_check.py", line 206, in verify
>     for error in self._verify_timestamps(cert_path):
>   File "/usr/lib/pymodules/python2.7/univention/management/console/modules/diagnostic/plugins/02_certificate_check.py", line 171, in _verify_timestamps
>     valid_from = self.parse_generalized_time(cert.get_notBefore())
>   File "/usr/lib/pymodules/python2.7/univention/management/console/modules/diagnostic/plugins/02_certificate_check.py", line 141, in parse_generalized_time
>     date = datetime.datetime.strptime(sans_mircoseconds, date_format)
> ImportError: Failed to import _strptime because the import lockis held by another thread.
> Univention Support Database - Erneuern der TLS/SSL-Zertifikate

Running the check again usually helps.
Comment 2 Ingo Steuwer univentionstaff 2018-01-11 16:51:42 CET
Frequently seen in internal test environments. I increase "Who will be affected..."
Comment 3 Jürn Brodersen univentionstaff 2018-02-07 10:36:56 CET
*** Bug 46074 has been marked as a duplicate of this bug. ***
Comment 4 Jürn Brodersen univentionstaff 2018-02-07 11:58:53 CET
Problem:
strptime is used/imported in a thread which prevents the thread for the diagnostic module to use it as well.

Upstream bug report:
https://bugs.python.org/issue7980

How to reproduce:
1) Login
2) Logout
3) Login
4) Open diagnostic module

Workaround:
Add "import _strptime" before using threads.
management/univention-management-console/src/univention/management/console/modules/__init__.py seems to work.
Comment 5 b.reese 2018-03-22 08:22:55 CET
I also had this bug in version 4.2, but not in version 4.3 anymore.
Comment 6 Jürn Brodersen univentionstaff 2018-03-22 09:50:23 CET
(In reply to b.reese from comment #5)
> I also had this bug in version 4.2, but not in version 4.3 anymore.

Thanks

This was fixed in 4.3 in bug 46231.

*** This bug has been marked as a duplicate of bug 46231 ***