Bug 1480395
Summary: | After updating to latest subscription manager, abrt dumps seen for servers with "System Locale: LANG=ja_JP.UTF-8" | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Sandeep MJ <sjayapra> | |
Component: | subscription-manager | Assignee: | Kevin Howell <khowell> | |
Status: | CLOSED ERRATA | QA Contact: | Jan Stavel <jstavel> | |
Severity: | high | Docs Contact: | ||
Priority: | high | |||
Version: | 7.4 | CC: | contact.redhat, hasuzuki, hmatsumo, jsefler, jstavel, khowell, mfuruta, mshimura, myamazak, redakkan, rjerrido, skallesh, syamamot, toneata, yozone | |
Target Milestone: | rc | Keywords: | Triaged, ZStream | |
Target Release: | --- | |||
Hardware: | x86_64 | |||
OS: | Linux | |||
Whiteboard: | ||||
Fixed In Version: | subscription-manager-1.20.2-1 | Doc Type: | No Doc Update | |
Doc Text: |
Cause: rhsmd and rhsmcertd did not handle UTF-8 correctly.
Consequence: On systems with non-ASCII languages, rhsmcertd failed due to improper handling of encodings.
Fix: rhsmd and rhsmcertd were modified to force UTF-8 encodings.
Result: rhsmd and rhsmcertd run properly on systems with non-ASCII languages.
|
Story Points: | --- | |
Clone Of: | ||||
: | 1484265 (view as bug list) | Environment: | ||
Last Closed: | 2018-04-10 09:49:52 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 1484265 |
Description
Sandeep MJ
2017-08-11 00:11:43 UTC
Here is a simple reproducer showing the Traceback from stderr for all 10 supported locales (Note: only en_US and it_IT are PASSing)... [root@jsefler-rhel7 ~]# subscription-manager version server type: This system is currently not registered. subscription management server: 2.0.40-1 subscription management rules: 5.24.1 subscription-manager: 1.19.21-1.el7 python-rhsm: 1.19.9-1.el7 [root@jsefler-rhel7 ~]# [root@jsefler-rhel7 ~]# subscription-manager register --username=qa Registering to: subscription.rhsm.stage.redhat.com:443/subscription Password: The system has been registered with ID: 97b9c117-321b-4956-a0b0-e639565ec6bd [root@jsefler-rhel7 ~]# [root@jsefler-rhel7 ~]# for L in en_US de_DE es_ES fr_FR it_IT ja_JP ko_KR pt_BR ru_RU zh_CN zh_TW; do echo ""; echo "# LANG=$L.UTF-8 /usr/libexec/rhsmcertd-worker 1>/tmp/stdout"; LANG=$L.UTF-8 /usr/libexec/rhsmcertd-worker 1>/tmp/stdout; done; # LANG=en_US.UTF-8 /usr/libexec/rhsmcertd-worker 1>/tmp/stdout # LANG=de_DE.UTF-8 /usr/libexec/rhsmcertd-worker 1>/tmp/stdout Traceback (most recent call last): File "/usr/lib64/python2.7/logging/__init__.py", line 851, in emit msg = self.format(record) File "/usr/lib64/python2.7/logging/__init__.py", line 724, in format return fmt.format(record) File "/usr/lib64/python2.7/logging/__init__.py", line 467, in format s = self._fmt % record.__dict__ UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 117: ordinal not in range(128) Logged from file repolib.py, line 328 # LANG=es_ES.UTF-8 /usr/libexec/rhsmcertd-worker 1>/tmp/stdout Traceback (most recent call last): File "/usr/lib64/python2.7/logging/__init__.py", line 851, in emit msg = self.format(record) File "/usr/lib64/python2.7/logging/__init__.py", line 724, in format return fmt.format(record) File "/usr/lib64/python2.7/logging/__init__.py", line 467, in format s = self._fmt % record.__dict__ UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 115: ordinal not in range(128) Logged from file repolib.py, line 328 # LANG=fr_FR.UTF-8 /usr/libexec/rhsmcertd-worker 1>/tmp/stdout Traceback (most recent call last): File "/usr/libexec/rhsmcertd-worker", line 140, in <module> print _('Unable to update entitlement certificates and repositories') UnicodeEncodeError: 'ascii' codec can't encode character u'\xe0' in position 5: ordinal not in range(128) # LANG=it_IT.UTF-8 /usr/libexec/rhsmcertd-worker 1>/tmp/stdout # LANG=ja_JP.UTF-8 /usr/libexec/rhsmcertd-worker 1>/tmp/stdout Traceback (most recent call last): File "/usr/libexec/rhsmcertd-worker", line 140, in <module> print _('Unable to update entitlement certificates and repositories') UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-26: ordinal not in range(128) # LANG=ko_KR.UTF-8 /usr/libexec/rhsmcertd-worker 1>/tmp/stdout Traceback (most recent call last): File "/usr/libexec/rhsmcertd-worker", line 140, in <module> print _('Unable to update entitlement certificates and repositories') UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-5: ordinal not in range(128) # LANG=pt_BR.UTF-8 /usr/libexec/rhsmcertd-worker 1>/tmp/stdout Traceback (most recent call last): File "/usr/libexec/rhsmcertd-worker", line 140, in <module> print _('Unable to update entitlement certificates and repositories') UnicodeEncodeError: 'ascii' codec can't encode character u'\xe0' in position 46: ordinal not in range(128) # LANG=ru_RU.UTF-8 /usr/libexec/rhsmcertd-worker 1>/tmp/stdout Traceback (most recent call last): File "/usr/libexec/rhsmcertd-worker", line 140, in <module> print _('Unable to update entitlement certificates and repositories') UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-1: ordinal not in range(128) # LANG=zh_CN.UTF-8 /usr/libexec/rhsmcertd-worker 1>/tmp/stdout Traceback (most recent call last): File "/usr/libexec/rhsmcertd-worker", line 140, in <module> print _('Unable to update entitlement certificates and repositories') UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-11: ordinal not in range(128) # LANG=zh_TW.UTF-8 /usr/libexec/rhsmcertd-worker 1>/tmp/stdout Traceback (most recent call last): File "/usr/libexec/rhsmcertd-worker", line 140, in <module> print _('Unable to update entitlement certificates and repositories') UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-11: ordinal not in range(128) You have new mail in /var/spool/mail/root [root@jsefler-rhel7 ~]# I confimed DBus service rhsm.service works. [root@jstavel-rhel7-latest-server /]# subscription-manager version server type: Red Hat Subscription Management subscription management server: 2.0.40-1 subscription management rules: 5.24.1 subscription-manager: 1.20.1-1.git.2.088662e.el7 python-rhsm: 1.20.1-1.git.0.088662e.el7 Given an Environment is set to ja_JP.UTF-u in /usr/lib/systemd/system/rhsm.service and 'systemctl daemon-reload' was run When I run a command 'busctl call com.redhat.RHSM1 /com/redhat/RHSM1/Attach com.redhat.RHSM1.Attach AutoAttach 'sa{sv}' Standard 0' Then I see japaness letters in /var/log/rhsm/rhsm.log and the command returns a list of attached pools. I have got the the error in some other case. ERROR in (PoolAttach-test) (attach_tests.clj:121) Uncaught exception, not in assertion. expected: nil actual: java.lang.AssertionError: Verification failed: (= stderr "") stderr : Traceback (most recent call last): File "/usr/lib64/python2.7/site-packages/dbus/service.py", line 707, in _message_cb retval = candidate_method(self, *args, **keywords) File "<string>", line 2, in PoolAttach File "/usr/lib/python2.7/site-packages/rhsmlib/dbus/util.py", line 43, in dbus_handle_exceptions six.reraise(exceptions.RHSM1DBusException, "%s: %s" % (type(e).__name__, str(e)), trace) File "/usr/lib/python2.7/site-packages/rhsmlib/dbus/util.py", line 35, in dbus_handle_exceptions ret = func(*args, **kwargs) File "/usr/lib/python2.7/site-packages/rhsmlib/dbus/objects/attach.py", line 87, in PoolAttach raise dbus.DBusException(str(e)) RHSM1DBusException: com.redhat.RHSM1.Error: UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-3: ordinal not in range(128) So my previous comment is not true in every case. I am investigating more about that error. I took the info from comment 7 and created bug 1483746. Let's handle d-bus service encoding issues there since this BZ already has a merged fix. [root@localhost ~]# rpm -qa | egrep 'subscription|rhsm' python-rhsm-certificates-1.20.1-1.git.42.12d004d.el7.x86_64 subscription-manager-migration-data-2.0.37-1.git.0.d45a6c7.el7.noarch subscription-manager-1.20.1-1.git.49.12d004d.el7.x86_64 python-rhsm-1.20.1-1.git.42.12d004d.el7.x86_64 [root@localhost ~]# subscription-manager register Registering to: subscription.rhsm.stage.redhat.com:443/subscription Username: stage_jstavel_demo01 Password: The system has been registered with ID: e9f6ac12-1aec-49a3-a2ec-c811736efdf5 The registered system name is: localhost.localdomain [root@localhost ~]# for L in en_US de_DE es_ES fr_FR it_IT ja_JP ko_KR pt_BR ru_RU zh_CN zh_TW; do echo ""; echo "# LANG=$L.UTF-8 /usr/libexec/rhsmcertd-worker 1>/tmp/stdout"; LANG=$L.UTF-8 /usr/libexec/rhsmcertd-worker 1>/tmp/stdout; done; # LANG=en_US.UTF-8 /usr/libexec/rhsmcertd-worker 1>/tmp/stdout # LANG=de_DE.UTF-8 /usr/libexec/rhsmcertd-worker 1>/tmp/stdout # LANG=es_ES.UTF-8 /usr/libexec/rhsmcertd-worker 1>/tmp/stdout # LANG=fr_FR.UTF-8 /usr/libexec/rhsmcertd-worker 1>/tmp/stdout # LANG=it_IT.UTF-8 /usr/libexec/rhsmcertd-worker 1>/tmp/stdout # LANG=ja_JP.UTF-8 /usr/libexec/rhsmcertd-worker 1>/tmp/stdout # LANG=ko_KR.UTF-8 /usr/libexec/rhsmcertd-worker 1>/tmp/stdout # LANG=pt_BR.UTF-8 /usr/libexec/rhsmcertd-worker 1>/tmp/stdout # LANG=ru_RU.UTF-8 /usr/libexec/rhsmcertd-worker 1>/tmp/stdout # LANG=zh_CN.UTF-8 /usr/libexec/rhsmcertd-worker 1>/tmp/stdout # LANG=zh_TW.UTF-8 /usr/libexec/rhsmcertd-worker 1>/tmp/stdout [root@localhost ~]# Reproducing the failure on RHEL74 : on version : ========== subscription-manager: 1.19.21-1.el7 python-rhsm: 1.19.9-1.el7 [root@dhcp35-85 ~]# subscription-manager register --username=qa Registering to: subscription.rhsm.stage.redhat.com:443/subscription Password: The system has been registered with ID: 8b732daf-368f-44c5-951e-a23aa2684d49 [root@dhcp35-85 ~]# for L in en_US de_DE es_ES fr_FR it_IT ja_JP ko_KR pt_BR ru_RU zh_CN zh_TW; do echo ""; echo "# LANG=$L.UTF-8 /usr/libexec/rhsmcertd-worker 1>/tmp/stdout"; LANG=$L.UTF-8 /usr/libexec/rhsmcertd-worker 1>/tmp/stdout; done; # LANG=en_US.UTF-8 /usr/libexec/rhsmcertd-worker 1>/tmp/stdout # LANG=de_DE.UTF-8 /usr/libexec/rhsmcertd-worker 1>/tmp/stdout Traceback (most recent call last): File "/usr/lib64/python2.7/logging/__init__.py", line 851, in emit msg = self.format(record) File "/usr/lib64/python2.7/logging/__init__.py", line 724, in format return fmt.format(record) File "/usr/lib64/python2.7/logging/__init__.py", line 467, in format s = self._fmt % record.__dict__ UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 117: ordinal not in range(128) Logged from file repolib.py, line 328 # LANG=es_ES.UTF-8 /usr/libexec/rhsmcertd-worker 1>/tmp/stdout Traceback (most recent call last): File "/usr/lib64/python2.7/logging/__init__.py", line 851, in emit msg = self.format(record) File "/usr/lib64/python2.7/logging/__init__.py", line 724, in format return fmt.format(record) File "/usr/lib64/python2.7/logging/__init__.py", line 467, in format s = self._fmt % record.__dict__ UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 115: ordinal not in range(128) Logged from file repolib.py, line 328 # LANG=fr_FR.UTF-8 /usr/libexec/rhsmcertd-worker 1>/tmp/stdout Traceback (most recent call last): File "/usr/libexec/rhsmcertd-worker", line 140, in <module> print _('Unable to update entitlement certificates and repositories') UnicodeEncodeError: 'ascii' codec can't encode character u'\xe0' in position 5: ordinal not in range(128) # LANG=it_IT.UTF-8 /usr/libexec/rhsmcertd-worker 1>/tmp/stdout # LANG=ja_JP.UTF-8 /usr/libexec/rhsmcertd-worker 1>/tmp/stdout Traceback (most recent call last): File "/usr/libexec/rhsmcertd-worker", line 140, in <module> print _('Unable to update entitlement certificates and repositories') UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-26: ordinal not in range(128) # LANG=ko_KR.UTF-8 /usr/libexec/rhsmcertd-worker 1>/tmp/stdout Traceback (most recent call last): File "/usr/libexec/rhsmcertd-worker", line 140, in <module> print _('Unable to update entitlement certificates and repositories') UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-5: ordinal not in range(128) # LANG=pt_BR.UTF-8 /usr/libexec/rhsmcertd-worker 1>/tmp/stdout Traceback (most recent call last): File "/usr/libexec/rhsmcertd-worker", line 140, in <module> print _('Unable to update entitlement certificates and repositories') UnicodeEncodeError: 'ascii' codec can't encode character u'\xe0' in position 46: ordinal not in range(128) # LANG=ru_RU.UTF-8 /usr/libexec/rhsmcertd-worker 1>/tmp/stdout Traceback (most recent call last): File "/usr/libexec/rhsmcertd-worker", line 140, in <module> print _('Unable to update entitlement certificates and repositories') UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-1: ordinal not in range(128) # LANG=zh_CN.UTF-8 /usr/libexec/rhsmcertd-worker 1>/tmp/stdout Traceback (most recent call last): File "/usr/libexec/rhsmcertd-worker", line 140, in <module> print _('Unable to update entitlement certificates and repositories') UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-11: ordinal not in range(128) # LANG=zh_TW.UTF-8 /usr/libexec/rhsmcertd-worker 1>/tmp/stdout Traceback (most recent call last): File "/usr/libexec/rhsmcertd-worker", line 140, in <module> print _('Unable to update entitlement certificates and repositories') UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-11: ordinal not in range(128) Verifying on rhel75 ===================== on version : subscription-manager-rhsm-certificates-1.20.5-1.el7.x86_64 subscription-manager-gui-1.20.5-1.el7.x86_64 subscription-manager-rhsm-1.20.5-1.el7.x86_64 subscription-manager-1.20.5-1.el7.x86_64 subscription-manager-initial-setup-addon-1.20.5-1.el7.x86_64 subscription-manager-plugin-container-1.20.5-1.el7.x86_64 [root@dhcp35-157 ~]# for L in en_US de_DE es_ES fr_FR it_IT ja_JP ko_KR pt_BR ru_RU zh_CN zh_TW; do echo ""; echo "# LANG=$L.UTF-8 /usr/libexec/rhsmcertd-worker | head -1"; LANG=$L.UTF-8 /usr/libexec/rhsmcertd-worker | head -1; done; # LANG=en_US.UTF-8 /usr/libexec/rhsmcertd-worker | head -1 Updating entitlement certificates & repositories # LANG=de_DE.UTF-8 /usr/libexec/rhsmcertd-worker | head -1 Berechtigungszertifikate & Repositorys aktualisieren # LANG=es_ES.UTF-8 /usr/libexec/rhsmcertd-worker | head -1 Actualizando certificados de derechos y repositorios # LANG=fr_FR.UTF-8 /usr/libexec/rhsmcertd-worker | head -1 Mise à jour des certificats de droits d'accès et des référentiels # LANG=it_IT.UTF-8 /usr/libexec/rhsmcertd-worker | head -1 Aggiornamento certificati per l'entitlement & repositori in corso # LANG=ja_JP.UTF-8 /usr/libexec/rhsmcertd-worker | head -1 エンタイトルメント証明書とリポジトリーを更新中 # LANG=ko_KR.UTF-8 /usr/libexec/rhsmcertd-worker | head -1 인타이틀먼트 인증서 & 리포지터리 업데이트하기 # LANG=pt_BR.UTF-8 /usr/libexec/rhsmcertd-worker | head -1 Atualizando certificados & repositórios de direitos à serviços # LANG=ru_RU.UTF-8 /usr/libexec/rhsmcertd-worker | head -1 Обновление сертификатов и репозиториев... # LANG=zh_CN.UTF-8 /usr/libexec/rhsmcertd-worker | head -1 更新授权证书和存储库 # LANG=zh_TW.UTF-8 /usr/libexec/rhsmcertd-worker | head -1 更新權利憑證與軟體庫 [root@dhcp35-157 ~]# Observed that no trace back appears on latest subscription-manager build on RHEL75. Marking the bug as "Verified" *** Bug 1547058 has been marked as a duplicate of this bug. *** *** Bug 1547058 has been marked as a duplicate of this bug. *** Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2018:0681 |