Bug 1181596

Summary: ISE: abrt generated error on satellite after upload architecture
Product: Red Hat Satellite 5 Reporter: Pavel Studeník <pstudeni>
Component: ServerAssignee: Jan Dobes <jdobes>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: high Docs Contact:
Priority: high    
Version: 570CC: dyordano, ifloodmu, pstudeni, shughes, tlestach, xdmoon
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-10-13 14:35:17 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: 1127217    

Description Pavel Studeník 2015-01-13 12:48:52 UTC
Description of problem:
During abrt client reported crash file, it got internal server error. Problem exists when abrt tries to reporte architecutere.

# spacewalk-abrt --sync                 
An error has occurred:
Error communicating with server. The message was:
Internal Server Error

2015/01/13 07:19:54 -04:00 16763 10.16.44.133: xmlrpc/abrt.upload_crash_file(1000010074, 'oops-2015-01-13-07:18:29-23548-0', 'architecture')
2015/01/13 07:19:54 -04:00 16763 10.16.44.133: xmlrpc/abrt.upload_crash_file(1000010074, 'Creating crash file: /var/satellite/systems/1/1000010074/crashes/oops-2015-01-13-07:18:29-23548-0/architecture')
2015/01/13 07:19:54 -04:00 16763 10.16.44.133: server/apacheRequest.call_function('ERROR', 'Unhandled exception', IntegrityError('new row for relation "rhnservercrash" violates check constraint "vn_rhnservercrash_architecture"\nDETAIL:  Failing row contains (15, 1000010074, oops-2015-01-13-07:18:29-23548-0, /var/tmp/abrt/oops-2015-01-13-07:18:29-23548-0, 1, null, null, , null, null, null, null, null, null, null, null, null, systems/1/1000010074/crashes/oops-2015-01-13-07:18:29-23548-0, 2015-01-13 07:19:47.212145-05, 2015-01-13 07:19:54.867707-05).\n',))


Exception Handler Information
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/spacewalk/server/apacheRequest.py", line 122, in call_function
    response = func(*params)
  File "/usr/share/rhn/server/handlers/xmlrpc/abrt.py", line 339, in upload_crash_file
    h.execute(filecontent = filecontent, crash_id = crash_id)
  File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/sql_base.py", line 147, in execute
    return self._execute_wrapper(self._execute, *p, **kw)
  File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/driver_postgresql.py", line 286, in _execute_wrapper
    retval = function(*p, **kw)
  File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/sql_base.py", line 201, in _execute
    return self._execute_(args, kwargs)
  File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/driver_postgresql.py", line 305, in _execute_
    self._real_cursor.execute(self.sql, params)
IntegrityError: new row for relation "rhnservercrash" violates check constraint "vn_rhnservercrash_architecture"
DETAIL:  Failing row contains (15, 1000010074, oops-2015-01-13-07:18:29-23548-0, /var/tmp/abrt/oops-2015-01-13-07:18:29-23548-0, 1, null, null, , null, null, null, null, null, null, null, null, null, systems/1/1000010074/crashes/oops-2015-01-13-07:18:29-23548-0, 2015-01-13 07:19:47.212145-05, 2015-01-13 07:19:54.867707-05).


Version-Release number of selected component (if applicable):
spacewalk-backend-xmlrpc-2.3.3-23.el6sat.noarch
spacewalk-abrt-2.3.0-2.el7sat.noarch
redhat-release-server-7.0-1.el7.x86_64

How reproducible:
only on RHEL

Steps to Reproduce:
### client ###
1. rlRun "sleep 100 &"
   pid=$(ps -ef | egrep ":[0-9][0-9][ ]*sleep 100" | awk '{print $2}')
   rlRun "kill -s SEGV ${pid}"
2. spacewalk-abrt --sync &> abrt_sync.log
### server ###
3. check log on server /var/log/rhn/rhn_server_xmlrpc.log

Actual results:
with traceback on satellite

Expected results:
without traceback

Additional info:
Exception report in attachment

Comment 4 Tomas Lestach 2016-04-07 16:22:29 UTC
Actually, I cannot reproduce the bug on my machine. Following the reproducer steps and the report gets successfully uploaded.
Pavel, what is the content of the architecture file that cannot be uploaded?

cat /var/satellite/systems/1/1000010074/crashes/oops-2015-01-13-07:18:29-23548-0/architecture