Re: [Tutor] glibc error while Python script runs - Solved

2006-01-20 Thread Bernard Lebel
Hi Danny, So have written a little test script. The fact is that I want to be able to manage the same queue from separate threads. Below is an example of what my real program is doing: from threading import Thread from Queue import Queue import time class SQLServer: def __init

Re: [Tutor] glibc error while Python script runs - Solved

2006-01-20 Thread Kent Johnson
Bernard Lebel wrote: > On 1/19/06, Kent Johnson <[EMAIL PROTECTED]> wrote: > >>Hi Bernard, >> >>I'm glad you got it working but kind of surprised at what you had to do. >>You shouldn't have to have a single thread to access the database. In >>your original desing were you sharing a connection betw

Re: [Tutor] glibc error while Python script runs - Solved

2006-01-19 Thread Bernard Lebel
Thanks a lot Danny, That certainly does make sense. I'll look into implementing the Queue approach in my program tomorrow. I remember you recommending me this module as well not long ago, although in a different discussion (where I suspected problem with file access from multiple thread, but I gue

Re: [Tutor] glibc error while Python script runs - Solved

2006-01-19 Thread Danny Yoo
On Thu, 19 Jan 2006, Kent Johnson wrote: > In your original desing were you sharing a connection between threads? > That could cause trouble. But if each connection has its own thread and > you are using transactions and isolation levels appropriately, they > shouldn't stomp on each other. Hi

Re: [Tutor] glibc error while Python script runs - Solved

2006-01-19 Thread Bernard Lebel
On 1/19/06, Kent Johnson <[EMAIL PROTECTED]> wrote: > Hi Bernard, > > I'm glad you got it working but kind of surprised at what you had to do. > You shouldn't have to have a single thread to access the database. In > your original desing were you sharing a connection between threads? That > could c

Re: [Tutor] glibc error while Python script runs - Solved

2006-01-19 Thread Kent Johnson
Hi Bernard, I'm glad you got it working but kind of surprised at what you had to do. You shouldn't have to have a single thread to access the database. In your original desing were you sharing a connection between threads? That could cause trouble. But if each connection has its own thread and

Re: [Tutor] glibc error while Python script runs - Solved

2006-01-19 Thread Bernard Lebel
Hello, For the record, in case anyone would like to know what happened with this issue... It seems that the problem was related to the way I managed MySQL connections. There was the main thread that would query every 5 seconds the database to see if a someone wanted to abort the job running on t

Re: [Tutor] glibc error while Python script runs

2006-01-04 Thread Bernard Lebel
Rest assured, Kent, that I fully understand your point. My experience is quite a lot more limited than yours, and yes I experience this frustrating mess that you talk about and I'm aware that I'm not doing myself any favor with such a design. Sorting this is high on my TODO list. but not on top

Re: [Tutor] glibc error while Python script runs

2006-01-04 Thread Kent Johnson
Bernard Lebel wrote: > Here is the script (1550 lines, I know - just wants to get to > functional code before improving the design), if it can help. Hmm, a common attitude but a bad plan and false economy IMO. In my experience if I keep the code and the design clean as I go, development moves fa

Re: [Tutor] glibc error while Python script runs

2006-01-04 Thread Bernard Lebel
Hi Danny, See [Bernard] below... On 1/4/06, Danny Yoo <[EMAIL PROTECTED]> wrote: > > > rn200.bbfxa.com Wed Jan 4 16:23:36 2006 [jobid: 9]: Get status of all > > local jobs for this job... > > > > *** glibc detected *** double free or corruption: 0x09484d58 *** > > Aborted > > > Hi Bernard, > > Ug

Re: [Tutor] glibc error while Python script runs

2006-01-04 Thread Danny Yoo
> rn200.bbfxa.com Wed Jan 4 16:23:36 2006 [jobid: 9]: Get status of all > local jobs for this job... > > *** glibc detected *** double free or corruption: 0x09484d58 *** > Aborted Hi Bernard, Ugh. I hate memory allocation bugs. Is it reproducable? Can you run this through a debugger like GDB

[Tutor] glibc error while Python script runs

2006-01-04 Thread Bernard Lebel
Hello, I'm not sure if it's the appropriate place for this question, but since it happens because of a Python script So I have this Python script that runs on render farm nodes. All seem to work well, but at one point I get this crash: rn200.bbfxa.com Wed Jan 4 16:23:36 2006 [jobid: 9]: