Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 693274 - app-crypt/certbot-0.37 - certbot -v renew: segmentation fault in ? at ?
Summary: app-crypt/certbot-0.37 - certbot -v renew: segmentation fault in ? at ?
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Matthew Thode ( prometheanfire )
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-01 10:03 UTC by Mark Nowiasz
Modified: 2021-08-15 23:24 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Nowiasz 2019-09-01 10:03:28 UTC
I've got a warning today from let's encrypt that one of my certificates was about to expire in 20 days, and indeed, the certbot.unit failed due to segmentation faults. Manually running 

certbot -v renew

-------------------------8<------------------------_
Picked account: <Account(RegistrationResource(body=Registration(key=JWKRSA(key=<ComparableRSAKey(<cryptography.hazmat.backends.openssl.rsa._RSAPublicKey object at 0x7f4aa900deb8>)>), contact=('*************',), agreement='https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf', status='valid', terms_of_service_agreed=None, only_return_existing=None, external_account_binding=None), uri='https://acme-v02.api.letsencrypt.org/acme/acct/31281933', new_authzr_uri=None, terms_of_service='https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf'), 22ee6059f3fd794a489051ef1cf76180, Meta(creation_dt=datetime.datetime(2018, 3, 16, 19, 38, 37, tzinfo=<UTC>), creation_host='saturn.midworld.de'))>
Sending GET request to https://acme-v02.api.letsencrypt.org/directory.
Starting new HTTPS connection (1): acme-v02.api.letsencrypt.org:443
Segmentation fault (core dumped)
----------------------->8------------------------------
With both python 3.7 and 3.6, downgrading certbot from 0.37 do 0.36 didn't do the trick, either. Only after eselecting python 2.7 certbot renew worked without any problem
Comment 1 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2019-09-01 18:51:54 UTC
I haven't had any issues. running on python3.6 now.

I assume acme is at 0.37.0 as well?

can you run this to make sure your system is in a consistent state?

emerge -uDNav --complete-graph=y @world && emerge -a --depclean && emerge -av --usepkg=n --getbinpkg=n --selective=n @preserved-rebuild
Comment 2 Mark Nowiasz 2019-09-01 19:02:30 UTC
(In reply to Matthew Thode ( prometheanfire ) from comment #1)
> I haven't had any issues. running on python3.6 now.
> 
> I assume acme is at 0.37.0 as well?
> 
> can you run this to make sure your system is in a consistent state?
> 
> emerge -uDNav --complete-graph=y @world && emerge -a --depclean && emerge
> -av --usepkg=n --getbinpkg=n --selective=n @preserved-rebuild

You assume right - I regularly do a emerge -UDN @world @system plus depclean afterwards.

Here's the output of your command:


jupiter ~ # emerge -uDNav --complete-graph=y @world && emerge -a --depclean && emerge -av --usepkg=n --getbinpkg=n --selective=n @preserved-rebuild

These are the packages that would be merged, in order:

Calculating dependencies... done!

Total: 0 packages, Size of downloads: 0 KiB

Nothing to merge; quitting.


 * Always study the list of packages to be cleaned for any obvious
 * mistakes. Packages that are part of the world set will always
 * be kept.  They can be manually added to this set with
 * `emerge --noreplace <atom>`.  Packages that are listed in
 * package.provided (see portage(5)) will be removed by
 * depclean, even if they are part of the world set.
 *
 * As a safety measure, depclean will not remove any packages
 * unless *all* required dependencies have been resolved.  As a
 * consequence of this, it often becomes necessary to run
 * `emerge --update --newuse --deep @world` prior to depclean.

Calculating dependencies... done!
>>> No packages selected for removal by depclean
>>> To see reverse dependencies, use --verbose
Packages installed:   560
Packages in world:    46
Packages in system:   43
Required packages:    560
Number removed:       0

These are the packages that would be merged, in order:

Calculating dependencies... done!

Total: 0 packages, Size of downloads: 0 KiB

Nothing to merge; quitting.

jupiter ~ #
Comment 3 Mark Nowiasz 2019-09-01 19:12:36 UTC
Oh, I've found a hint - another Gentoo user with a similar problem with the same workaround (using python 2.7): 

https://github.com/pyca/cryptography/issues/4795

(See the last comment)
Comment 4 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2019-09-01 20:30:50 UTC
ok, using cryptography 2.6.1 then?
Comment 5 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2019-09-01 20:48:15 UTC
I just added cryptography 2.7 to the tree as well, if you want to test with that
Comment 6 Mark Nowiasz 2019-09-02 07:45:25 UTC
(In reply to Matthew Thode ( prometheanfire ) from comment #5)
> I just added cryptography 2.7 to the tree as well, if you want to test with
> that

Updated. Well, obtaining a new certificate didn't result in any segfault, neither did a --force-renewal of an existing one. Unfortunately this isn't conclusive yet - since the segfault only occured at a standard renewal operation. The next certificated which will be renewed is still valid 42 days, so I would suggest wait and see if the problem has been resolved by upgrading cryptography
Comment 7 cyberbat 2019-09-17 23:02:23 UTC
Upgrading to cryptography 2.7 resolved the issue for me
Comment 8 Scott Alfter 2019-11-23 20:31:44 UTC
(In reply to cyberbat from comment #7)
> Upgrading to cryptography 2.7 resolved the issue for me

Already had that...certbot still fails:

Root logging level set at -30
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Requested authenticator manual and installer None
Single candidate plugin: * manual
Description: Manual configuration or run your own shell scripts
Interfaces: IAuthenticator, IPlugin
Entry point: manual = certbot.plugins.manual:Authenticator
Initialized: <certbot.plugins.manual.Authenticator object at 0x7fa5f97550>
Prep: True
Selected authenticator <certbot.plugins.manual.Authenticator object at 0x7fa5f97550> and installer None
Plugins selected: Authenticator manual, Installer None
Picked account: <Account(RegistrationResource(body=Registration(status=None, terms_of_service_agreed=None, agreement=None, only_return_existing=None, contact=(), key=None, external_account_binding=None), uri=u'https://acme-v02.api.letsencrypt.org/acme/acct/53179548', new_authzr_uri=None, terms_of_service=None), 4b4a6ceccea370fc3358107b442c9e18, Meta(creation_host=u'printer', creation_dt=datetime.datetime(2019, 3, 12, 20, 43, 7, tzinfo=<UTC>)))>
Sending GET request to https://acme-v02.api.letsencrypt.org/directory.
Starting new HTTPS connection (1): acme-v02.api.letsencrypt.org:443
Segmentation fault

I've also had problems getting OctoPrint to run on the same system since a recent emerge -uNDV @world; it segfaults as well when it tries to listen on a network port.  I found that certbot was also FUBAR when I started getting expired-certificate warnings and tried to renew.  The host in question is a Raspberry Pi 3 B+, for which I normally cross-compile binary packages on a faster host.  I've tried recompiling Python 2.7 and dev-python/cryptography-2.7 on the RPi; that made no difference.
Comment 9 Louis Sautier (sbraz) gentoo-dev 2021-08-15 23:24:08 UTC
Old version, gone from the tree.