Bug 912116 - [abrt] python-2.7.3-7.2.fc17: rl_do_undo: Process /usr/bin/python2.7 was killed by signal 6 (SIGABRT)
Summary: [abrt] python-2.7.3-7.2.fc17: rl_do_undo: Process /usr/bin/python2.7 was kill...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: python
Version: 17
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Dave Malcolm
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:8fc46f8abc96cad7997e2c150dd...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-17 18:39 UTC by Andrew
Modified: 2013-02-17 21:18 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-02-17 21:17:53 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: core_backtrace (3.77 KB, text/plain)
2013-02-17 18:39 UTC, Andrew
no flags Details
File: environ (2.91 KB, text/plain)
2013-02-17 18:39 UTC, Andrew
no flags Details
File: limits (1.29 KB, text/plain)
2013-02-17 18:39 UTC, Andrew
no flags Details
File: backtrace (41.12 KB, text/plain)
2013-02-17 18:40 UTC, Andrew
no flags Details
File: cgroup (131 bytes, text/plain)
2013-02-17 18:40 UTC, Andrew
no flags Details
File: smolt_data (2.39 KB, text/plain)
2013-02-17 18:40 UTC, Andrew
no flags Details
File: executable (18 bytes, text/plain)
2013-02-17 18:40 UTC, Andrew
no flags Details
File: maps (26.84 KB, text/plain)
2013-02-17 18:40 UTC, Andrew
no flags Details
File: dso_list (5.92 KB, text/plain)
2013-02-17 18:40 UTC, Andrew
no flags Details
File: proc_pid_status (932 bytes, text/plain)
2013-02-17 18:41 UTC, Andrew
no flags Details
File: var_log_messages (150 bytes, text/plain)
2013-02-17 18:41 UTC, Andrew
no flags Details
File: open_fds (328 bytes, text/plain)
2013-02-17 18:41 UTC, Andrew
no flags Details
File: build_ids (2.36 KB, text/plain)
2013-02-17 18:41 UTC, Andrew
no flags Details

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..


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