segmentation fault when calling same function multiple times in sucession before the previous call has finished

27 views
Skip to first unread message

Andy

unread,
Jul 28, 2010, 5:39:25 AM7/28/10
to AmFast
My setup
Cherrypy WSGI server + Flex front end.

On the front end we have a RPC call linked to a Combobox change event.
When I quickly scroll through the list in the combo box it fires off
multiple RPC calls (to the same function). This eventually causes a
segmentation error in the amfast extension (most likely) (although it
could be cherrypy)

Calling getTestplans
Finished getTestplans -- 1.86105s
Calling getTestplanData
Finished getTestplanData -- 0.147809s
Calling getTestplans
Finished getTestplans -- 0.197921s
Calling getTestplans
Finished getTestplans -- 0.136882s
Calling getTestplans
Calling getTestplans
Finished getTestplans -- 0.140393s
Calling getTestplans
Calling getTestplans
Calling getTestplanData
Calling getTestplans
Finished getTestplans -- 1.035s
Calling getTestplans
Finished getTestplans -- 0.138484s
Finished getTestplans -- 0.870616s
Calling getTestplans
Calling getTestplans
Calling getTestplans
Finished getTestplanData -- 0.886823s
Calling getTestplanData
Finished getTestplans -- 0.963309s
Calling getTestplans
Finished getTestplans -- 0.962005s
Segmentation fault

Can you give me any pointers to catch any potential dumps that may be
of help in diagnosing this issue

Note: I have seen this issue before on my project and it is always
related to calling functions multipletimes before they have had a
chance to finish. On these occasions I just modified the GUI to not
allow this. But we do need a resolution on this or at least guidence
on how to best avoid this.

limscoder

unread,
Jul 28, 2010, 12:27:54 PM7/28/10
to AmFast
I opened ticket # 67 to address this issue: http://code.google.com/p/amfast/issues/detail?id=67.

Which connection and subscription managers are you using?

Cooper, Andrew

unread,
Jul 29, 2010, 4:26:11 AM7/29/10
to amf...@googlegroups.com
You can close the ticket as I have identified the issue.
It was mysqldb that was seg faulting.

I was using a DB connection over the multiple calls(and thus threads) which cased the seg fault.
I solved it by allocating a new DB connection per thread

Thankyou for your quick reply and your work on this product.

Andy Cooper

--
You received this message because you are subscribed to the Google Groups "AmFast" group.
To post to this group, send email to amf...@googlegroups.com.
To unsubscribe from this group, send email to amfast+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/amfast?hl=en.

limscoder

unread,
Jul 29, 2010, 12:47:02 PM7/29/10
to AmFast
Thanks for posting the reply and saving me 30 mins of debugging.
Reply all
Reply to author
Forward
0 new messages