Bug 1024922 - [brandbot] getting full crash report after completing the cert update on the guest
[brandbot] getting full crash report after completing the cert update on the ...
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: initscripts (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: initscripts Maintenance Team
Depends On:
Blocks: rhsm-rhel70 909224
  Show dependency treegraph
Reported: 2013-10-30 11:12 EDT by Rehana
Modified: 2016-11-25 08:01 EST (History)
5 users (show)

See Also:
Fixed In Version: initscripts-9.49.7-1.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-06-13 09:22:10 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Rehana 2013-10-30 11:12:57 EDT
Description of problem:
Observed that updating the content to branded_name after cert update is generating full crash report on the system

Version-Release number of selected component (if applicable):
subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.8.29-1
subscription-manager: 1.10.4-1.git.8.5875bae.el7
python-rhsm: 1.10.3-1.git.5.70c0cee.el7

How reproducible:

Steps to Reproduce:
1.Register a guest machine to candlepin server, with a product installed
2.Attach a subscription having "Brand Type" attribute
3.Verify the content on  /var/lib/rhsm/branded_name file
4.Now empty the content of /var/lib/rhsm/branded_name file
5.Do any cert update (ex: installing another cert)

Actual results:
Observed that as soon i do any cert update i was getting the full crash report as a email, however observed that the content on branded_name file was updated

[root@localhost entitlement]# cat /var/lib/rhsm/branded_name 
[root@localhost entitlement]# subscription-manager attach --pool 8ac6a36241e90df90141e90e6eff074a
Successfully attached a subscription for: RAM Limiting Package (2GB stackable)
You have new mail in /var/spool/mail/root
[root@localhost entitlement]# cat /var/lib/rhsm/branded_name 
Awesome OS Instance Server Bits

crash report content :http://pastebin.test.redhat.com/173282

Expected results:
There shouldnt be any crash report

Additional info:
Also when i tried the same scenario  on the physical machine i was unable to reproduce it, i could reproduce the same only on the  guest machine
Comment 2 Václav Pavlín 2013-10-31 02:16:58 EDT

I don't think this is initscripts' issue. As you can see from the crash report, /usr/sbin/brandbot exited with segmentation fault, so I would rather looked for the bug there. Do you have any leads that it was caused by initscripts?
Comment 3 Rehana 2013-10-31 02:36:49 EDT
Discussed with Vaclav about the discussion we had with Bill Nottingham.

Missed to mention about the discussion in the bug report

<email thread>

John Sefler (jsefler@redhat.com) said: 
> Need to share this with Bill Nottingham who I believe is developing brandbot. 

File a bug against initscripts, please. (You can CC me.) Probably just crap
code on my end.


moving back to initscripts component
Comment 4 Lukáš Nykrýn 2013-11-01 08:07:04 EDT
diff --git a/src/brandbot.c b/src/brandbot.c
index c9b21ec..7418a33 100644
--- a/src/brandbot.c
+++ b/src/brandbot.c
@@ -27,7 +27,7 @@ int main(int argc, char **argv) {
     if (!osrelease)
         return 0;
     oldname = svGetValue(osrelease, "PRETTY_NAME");
-    if (!strcmp(oldname, newname))
+    if (oldname && !strcmp(oldname, newname))
         return 0;
     svSetValue(osrelease, "PRETTY_NAME", newname);
     rc += svWriteFile(osrelease, 0644);
Comment 6 Rehana 2013-11-08 03:19:08 EST
Retested on, 

rpm -qa | grep initscripts-9.49

[root@dhcp71-109 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.8.31-1
subscription-manager: 1.10.6-1.el7
python-rhsm: 1.10.6-1.el7

Observed that now there is NO crash report on the system during  branded_name file update

Hence moving this bug to verified
Comment 7 Ludek Smid 2014-06-13 09:22:10 EDT
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.

Note You need to log in before you can comment on or make changes to this bug.