Bug 912116

Summary: [abrt] python-2.7.3-7.2.fc17: rl_do_undo: Process /usr/bin/python2.7 was killed by signal 6 (SIGABRT)
Product: [Fedora] Fedora Reporter: Andrew <uru.nova>
Component: pythonAssignee: Dave Malcolm <dmalcolm>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: bkabrda, dmalcolm, ivazqueznet, jonathansteffan, tomspur
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:8fc46f8abc96cad7997e2c150dd93fe927c0631e
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-17 21:17:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: core_backtrace
none
File: environ
none
File: limits
none
File: backtrace
none
File: cgroup
none
File: smolt_data
none
File: executable
none
File: maps
none
File: dso_list
none
File: proc_pid_status
none
File: var_log_messages
none
File: open_fds
none
File: build_ids none

Description Andrew 2013-02-17 18:39:45 UTC
Description of problem:
Step 1: download the text from http://rest.kegg.jp/get/cpd:C00132
Step 2: perform a re.match('^\w+', line) with line equal to "DBLINKS     CAS: 67-56-1\n" (that's line 23, by my count)
Step 3: wat

Running the following python code will cause an error:

import urllib2
import time
import re

def get_test(db,iD):
	t1 = float(time.clock())
	a = urllib2.urlopen('http://rest.kegg.jp/get/' + db + ':' + iD)
	#a = urllib2.urlopen('http://rest.kegg.jp/list/cpd')
	
	rawString = a.read().decode('utf-8')
	t2 = float(time.clock())
	r = float(t2-t1)
	print r

	return rawString
	
def parse_response(response):
	
	currentField = None
	data = {}
	
	for line in response.split('\n'):
		newField = re.match('^\w+', line)
		print line
		print newField
		if newField:
			currentField = newField.group(0)
			lineData = re.findall('\s\S+', line)[1:]
			lineData.append('\n')
			lineData = "".join(map(str, lineData))
			data[currentField] = lineData
			print "here"
		else:
			#print currentField
			lineData = str(line)
			data[currentField] = data[currentField].join(lineData)
			
	return data	

The data from the restful interface is:
	ENTRY       C00132                      Compound
NAME        Methanol;
            Methyl alcohol
FORMULA     CH4O
EXACT_MASS  32.0262
MOL_WEIGHT  32.0419
REMARK      Same as: D02309
REACTION    R00602 R00605 R00608 R00614 R01142 R01143 R01144 R01145 
            R01146 R02362 R02624 R03551 R04280 R04384 R04409 R04608 
            R05825 R06250 R06685 R06729 R08149 R08150 R08974 R08975 
            R09098 R09273 R09274 R09337 R09518 R09553 R09725 R09846
PATHWAY     ko00680  Methane metabolism
            ko00901  Indole alkaloid biosynthesis
            ko00910  Nitrogen metabolism
            ko01100  Metabolic pathways
            ko01120  Microbial metabolism in diverse environments
            ko01220  Degradation of aromatic compounds
ENZYME      1.1.1.244       1.1.2.7         1.1.3.13        1.1.99.37       
            1.2.99.4        1.11.1.6        1.11.1.7        1.11.1.21       
            1.13.11.8       1.13.11.-       1.14.13.25      1.14.18.3       
            2.1.1.90        2.1.1.246       2.3.1.152       3.1.1.11        
            3.1.1.44        3.1.1.59        3.1.1.61        3.1.1.78        
            3.1.1.82        3.1.1.85        3.1.1.-         3.1.6.16
DBLINKS     CAS: 67-56-1
            PubChem: 3432
            ChEBI: 17790
            PDB-CCD: MOH
            3DMET: B01170
            NIKKAJI: J2.364G
ATOM        2
            1   C1a C    22.1200  -14.6300
            2   O1a O    23.5200  -14.6300
BOND        1
            1     1   2 1
///


Version-Release number of selected component:
python-2.7.3-7.2.fc17

Additional info:
libreport version: 2.0.18
abrt_version:   2.0.18
backtrace_rating: 4
cmdline:        /usr/bin/python /usr/bin/ipython
crash_function: rl_do_undo
kernel:         3.6.11-5.fc17.x86_64

truncated backtrace:
:Thread no. 1 (10 frames)
: #5 rl_do_undo at ../undo.c:227
: #6 rl_revert_line at ../undo.c:302
: #7 readline_internal_teardown at ../readline.c:475
: #8 rl_callback_read_char at ../callback.c:212
: #9 readline_until_enter_or_signal at /usr/src/debug/Python-2.7.3/Modules/readline.c:967
: #10 call_readline at /usr/src/debug/Python-2.7.3/Modules/readline.c:1055
: #11 PyOS_Readline at /usr/src/debug/Python-2.7.3/Parser/myreadline.c:211
: #12 builtin_raw_input at /usr/src/debug/Python-2.7.3/Python/bltinmodule.c:2046
: #13 call_function at /usr/src/debug/Python-2.7.3/Python/ceval.c:4098
: #14 PyEval_EvalFrameEx at /usr/src/debug/Python-2.7.3/Python/ceval.c:2740

Comment 1 Andrew 2013-02-17 18:39:49 UTC
Created attachment 698576 [details]
File: core_backtrace

Comment 2 Andrew 2013-02-17 18:39:53 UTC
Created attachment 698577 [details]
File: environ

Comment 3 Andrew 2013-02-17 18:39:55 UTC
Created attachment 698578 [details]
File: limits

Comment 4 Andrew 2013-02-17 18:40:06 UTC
Created attachment 698579 [details]
File: backtrace

Comment 5 Andrew 2013-02-17 18:40:08 UTC
Created attachment 698580 [details]
File: cgroup

Comment 6 Andrew 2013-02-17 18:40:09 UTC
Created attachment 698581 [details]
File: smolt_data

Comment 7 Andrew 2013-02-17 18:40:21 UTC
Created attachment 698582 [details]
File: executable

Comment 8 Andrew 2013-02-17 18:40:32 UTC
Created attachment 698583 [details]
File: maps

Comment 9 Andrew 2013-02-17 18:40:45 UTC
Created attachment 698584 [details]
File: dso_list

Comment 10 Andrew 2013-02-17 18:41:03 UTC
Created attachment 698585 [details]
File: proc_pid_status

Comment 11 Andrew 2013-02-17 18:41:05 UTC
Created attachment 698586 [details]
File: var_log_messages

Comment 12 Andrew 2013-02-17 18:41:06 UTC
Created attachment 698587 [details]
File: open_fds

Comment 13 Andrew 2013-02-17 18:41:15 UTC
Created attachment 698588 [details]
File: build_ids

Comment 14 Andrew 2013-02-17 21:18:33 UTC
Bug caused by shitty code.  used join instead of +.  Move along folks..