Re: Counting Python threads vs C/C++ threads

2019-07-21 Thread Peter J. Holzer
x27; to see things broken down > by CPU core (there are 32 of them, probably counting hyperthreads as > different cores), but the CPU use is in the teens or so. If you had many CPU-bound Python threads, then with 32 cores each core might show as 3 % busy (the sum of the threads can't u

Re: Counting Python threads vs C/C++ threads

2019-07-17 Thread Thomas Jollans
On 17/07/2019 09.58, Barry Scott wrote: > >> On 16 Jul 2019, at 20:48, Dan Stromberg wrote: >> >> >> >> A question arises though: Does threading.active_count() only show Python >> threads created with the threading module? What about threads created wit

Re: Counting Python threads vs C/C++ threads

2019-07-17 Thread Barry Scott
lowness yet. The CPU isn't getting hit > > hard, and I/O on the system appears to be low - but throughput is poor. > > I'm wondering if it could be CPU-bound Python threads causing the problem > > (because of the threading+GIL thing). > > Does top show the pro

Re: Counting Python threads vs C/C++ threads

2019-07-16 Thread Dan Stromberg
rge CPython 2.x/3.x codebase > > with quite a few dependencies. > > > > I'm not sure what's causing the slowness yet. The CPU isn't getting hit > > hard, and I/O on the system appears to be low - but throughput is poor. > > I'm wondering if it could be

Re: Counting Python threads vs C/C++ threads

2019-07-16 Thread Barry Scott
x27;t getting hit > hard, and I/O on the system appears to be low - but throughput is poor. > I'm wondering if it could be CPU-bound Python threads causing the problem > (because of the threading+GIL thing). Does top show the process using 100% CPU? > > The non-depend

Counting Python threads vs C/C++ threads

2019-07-16 Thread Dan Stromberg
stackoverflow.com/questions/56958009/how-can-i-tell-how-many-python-threads-a-process-has-from-the-outside for more information. Or perhaps https://python-forum.io/Thread-How-to-get-a-count-of-Python-threads-from-the-outside-or-via-code-instrumentation Thanks! -- https://mail.python.org/mailman/listinfo/python-list

Re: Load averages and Python threads on different Linux cloud provider setup

2011-05-31 Thread Mohan
On May 31, 10:22 pm, Chris Angelico wrote: > On Tue, May 31, 2011 at 9:25 PM, Mohanaraj Gopala Krishnan > > wrote: > > Any suggestion on why the load would be a lot higher or how I could > > debug this further is greatly appreciated. > > First off, an easy question: Is system load low and compara

Re: Load averages and Python threads on different Linux cloud provider setup

2011-05-31 Thread Chris Angelico
On Tue, May 31, 2011 at 9:25 PM, Mohanaraj Gopala Krishnan wrote: > Any suggestion on why the load would be a lot higher or how I could > debug this further is greatly appreciated. > First off, an easy question: Is system load low and comparable on both systems when this script is _not_ running?

Load averages and Python threads on different Linux cloud provider setup

2011-05-31 Thread Mohanaraj Gopala Krishnan
sure, but I think they use Xen Voxel - Not sure, but the image that we are using looks to us like a stock standard Ubuntu 10.04 server Any suggestion on why the load would be a lot higher or how I could debug this further is greatly appreciated. -- Mohan #Simple script to test load when runn

Re: ulimit stack size and python threads

2009-01-09 Thread Martin v. Löwis
> I see. I should be blaming the default behavior of pthreads. You shouldn't blame anybody. Instead, you should sit down and study the problem in detail, until you fully understand it. Then you should start contributing fixes. Never ever should you spread blame. Regards, Martin -- http://mail.py

Re: ulimit stack size and python threads

2009-01-09 Thread Martin v. Löwis
> Always crashing because I asked the OS to please not allow a process > to grow too big is what I call overloading the meaning of ulimit -s. Please trust that there is no explicit code in the Python interpreter that tests whether the stack size is 4GB, and then produces an explicit crash. > It's

Re: ulimit stack size and python threads

2009-01-08 Thread Greg Lindahl
I see. I should be blaming the default behavior of pthreads. I did work on a OpenMP library once, and we worked around this problem, plus we gave good error messages. Given the number of HPC sites which use Python, I'd think that Python would have grown similar features. (HPC sites are more likely

Re: ulimit stack size and python threads

2009-01-08 Thread Andrew MacIntyre
Greg Lindahl wrote: I figure this is a FAQ, but I can't find it in any FAQs. I want to limit the stacksize on my server. If I set it to 8 megs, or unlimited, python is happy. If I set it to 4 gigabytes, things like yum (which is a python program) crash creating a thread. This is on an x86_64 l

Re: ulimit stack size and python threads

2009-01-08 Thread Greg Lindahl
> Why do you think Python is overloading the meaning of that? I ensure > you it isn't - it doesn't actively care what the limits are. Always crashing because I asked the OS to please not allow a process to grow too big is what I call overloading the meaning of ulimit -s. It's quite surprising. Not

Re: ulimit stack size and python threads

2009-01-08 Thread Martin v. Löwis
> But even if that worked, I'd be worried that python is doing something > bad with the ulimit -s value under the covers. Again: it definitely isn't. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: ulimit stack size and python threads

2009-01-08 Thread Greg Lindahl
> How much higher? You could try just under 4GB (unsigned 32-bit) and just > under 2GB (signed 32-bit). I'd like to set it to be about 1/2 the memory size of my server, which happens to end up being 4 gbytes. And no, slightly less than 4 gb doesn't work. But even if that worked, I'd be worried th

Re: ulimit stack size and python threads

2009-01-08 Thread Martin v. Löwis
> Why is Python overloading the meaning of the ulimit -s like this? Why do you think Python is overloading the meaning of that? I ensure you it isn't - it doesn't actively care what the limits are. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: ulimit stack size and python threads

2009-01-08 Thread MRAB
Greg Lindahl wrote: I'm only guessing, but could it be a 32-bit limit somewhere? Have you tried, say, 1GB, which would be within a 32-bit limit? Indeed, ulimit -s 100 (a bit smaller than 1 GB) does work, but it doesn't solve my problem, since I want to set the limit higher than 1 GB. How m

Re: ulimit stack size and python threads

2009-01-08 Thread Greg Lindahl
> I'm only guessing, but could it be a 32-bit limit somewhere? Have you > tried, say, 1GB, which would be within a 32-bit limit? Indeed, ulimit -s 100 (a bit smaller than 1 GB) does work, but it doesn't solve my problem, since I want to set the limit higher than 1 GB. -- greg -- http://mail.p

Re: ulimit stack size and python threads

2009-01-08 Thread MRAB
Greg Lindahl wrote: I figure this is a FAQ, but I can't find it in any FAQs. I want to limit the stacksize on my server. If I set it to 8 megs, or unlimited, python is happy. If I set it to 4 gigabytes, things like yum (which is a python program) crash creating a thread. This is on an x86_64 l

ulimit stack size and python threads

2009-01-08 Thread Greg Lindahl
I figure this is a FAQ, but I can't find it in any FAQs. I want to limit the stacksize on my server. If I set it to 8 megs, or unlimited, python is happy. If I set it to 4 gigabytes, things like yum (which is a python program) crash creating a thread. This is on an x86_64 linux kernel, RHEL5, et

Re: How do i : Python Threads + KeyboardInterrupt exception

2008-06-20 Thread Rhamphoryncus
On Jun 19, 11:09 pm, Brendon Costa <[EMAIL PROTECTED]> wrote: > > If only the main thread can receive KeyboardInterrupt, is there any > > reason why you couldn't move the functionality of the Read thread into > > the main thread? It looks like it's not doing any work, just waiting > > for the Proc

Re: How do i : Python Threads + KeyboardInterrupt exception

2008-06-19 Thread Brendon Costa
> If only the main thread can receive KeyboardInterrupt, is there any > reason why you couldn't move the functionality of the Read thread into > the main thread? It looks like it's not doing any work, just waiting > for the Proc thread to finish. > > You could start the Proc thread, do the current

Re: How do i : Python Threads + KeyboardInterrupt exception

2008-06-19 Thread MRAB
On Jun 19, 7:54 am, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Wed, 18 Jun 2008 21:33:42 -0700 (PDT), Brendon Costa > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > > > Unfortunately that is the problem. It is blocking in a IO system call > > and i want to force it to exi

Re: How do i : Python Threads + KeyboardInterrupt exception

2008-06-19 Thread Brendon Costa
I tested this a bit more. My windows example was incorrect. It should have used CTRL_C_EVENT. But even then, the problem is that the process will also close the console window from which it was called because of the 0. Also this requires that the process actually have a console and is not a GUI app

Re: How do i : Python Threads + KeyboardInterrupt exception

2008-06-18 Thread Brendon Costa
I tested this a bit more. My windows example was incorrect. It should have used CTRL_C_EVENT. But even then, the problem is that the process will also close the console window from which it was called because of the 0. Also this requires that the process actually have a console and is not a GUI app

Re: How do i : Python Threads + KeyboardInterrupt exception

2008-06-18 Thread Brendon Costa
> I don't know the "standard" way, but perhaps you can get some ideas from > this recent > thread:http://groups.google.com/group/comp.lang.python/browse_thread/thread/... > I had a quick read through that thread. I think i will need some more time to think about what they are saying in there thou

Re: How do i : Python Threads + KeyboardInterrupt exception

2008-06-18 Thread Gabriel Genellina
En Wed, 18 Jun 2008 21:39:41 -0300, Brendon Costa <[EMAIL PROTECTED]> escribió: I have a small python project i am working on. Basically i always have two threads. A "Read" thread that sits in a loop reading a line at a time from some input (Usually stdin) and then generating events to be proc

How do i : Python Threads + KeyboardInterrupt exception

2008-06-18 Thread Brendon Costa
Hi all, I have a small python project i am working on. Basically i always have two threads. A "Read" thread that sits in a loop reading a line at a time from some input (Usually stdin) and then generating events to be processed and a "Proc" thread that processes incoming events from a queue. There

Re: Python threads and memory usage

2008-05-30 Thread Mike
On May 30, 9:42 am, Mike <[EMAIL PROTECTED]> wrote: > On May 30, 9:16 am, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > > > > > On Thu, 29 May 2008 12:01:30 -0700 (PDT), Mike <[EMAIL PROTECTED]> > > declaimed the following in comp.lang.python: > > > > I observed, that every thread reserved some me

Re: Python threads and memory usage

2008-05-30 Thread Mike
On May 30, 9:16 am, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Thu, 29 May 2008 12:01:30 -0700 (PDT), Mike <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > > > I observed, that every thread reserved some memory, and after exit > > thread doesn't freed it. When i leaved my

Python threads and memory usage

2008-05-29 Thread Mike
Hi, I'm writing client-server application in Python. It's monitoring system, where server listen and waits for TCP connections, and every connection takes own thread. Every thread puts data from clients to Queue and exits. Then there is one DB loader thread, which loads all data from Queue to MySQ

Re: Python Threads - stopped vs. gone vs. Alive

2008-05-28 Thread Francesco Bochicchio
On Wed, 28 May 2008 11:38:53 -0700, RossGK wrote: > > I've answered my own question about the "None" state - an event was > setting the thread to None where I didn't expect it. > > However, my question slightly repositioned is if a Thread is "Stopped" > it still seems to exist. Is there someway

Re: Python Threads - stopped vs. gone vs. Alive

2008-05-28 Thread RossGK
I've answered my own question about the "None" state - an event was setting the thread to None where I didn't expect it. However, my question slightly repositioned is if a Thread is "Stopped" it still seems to exist. Is there someway to make it go away, send it to garbage collection etc? Other p

Re: Python Threads - stopped vs. gone vs. Alive

2008-05-28 Thread RossGK
On May 28, 12:01 pm, RossGK <[EMAIL PROTECTED]> wrote: > I'm a newbie to python threads, and playing with some simple client > server stuff and lots of print statements. > > My server thread launched with > self.worker = WorkerThread(self) > completes an inter

Python Threads - stopped vs. gone vs. Alive

2008-05-28 Thread RossGK
I'm a newbie to python threads, and playing with some simple client server stuff and lots of print statements. My server thread launched with self.worker = WorkerThread(self) completes an interaction and then if I check on it's status with print "Status:", self

Re: advanced usage of python threads

2008-02-24 Thread Steve Holden
hyperboreean wrote: > Chris, I have already made my choice, I am asking just for a little help > with some documentation. > I know about twisted.enterprise.adbapi, but the company is working with > sqlalchemy at the time. > So please, I know you have good intentions but you're kind of not > help

Re: advanced usage of python threads

2008-02-24 Thread hyperboreean
Chris, I have already made my choice, I am asking just for a little help with some documentation. I know about twisted.enterprise.adbapi, but the company is working with sqlalchemy at the time. So please, I know you have good intentions but you're kind of not helping me :) Well, probably instead

Re: advanced usage of python threads

2008-02-22 Thread Chris Mellon
On Fri, Feb 22, 2008 at 12:32 PM, hyperboreean <[EMAIL PROTECTED]> wrote: > Well, I will be writing the application server of a three-tier > architecture system. I will be using Twisted for the communication with > the client but from there I have to make several calls to a database and > this a

Re: advanced usage of python threads

2008-02-22 Thread hyperboreean
Well, I will be writing the application server of a three-tier architecture system. I will be using Twisted for the communication with the client but from there I have to make several calls to a database and this asks threading. The tables will be filled by another system that gathers some data

Re: advanced usage of python threads

2008-02-22 Thread Christian Heimes
hyperboreean wrote: > Hi, > Is there a document where I can find some advanced information about > python threads? I know the basic things about them and did some > practice, but when I try to advance I don't know where to go or how to go. What's your application doin

advanced usage of python threads

2008-02-22 Thread hyperboreean
Hi, Is there a document where I can find some advanced information about python threads? I know the basic things about them and did some practice, but when I try to advance I don't know where to go or how to go. Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Can python threads take advantage of use dual core ?

2007-08-17 Thread Alex Martelli
Stefan Behnel <[EMAIL PROTECTED]> wrote: ... > Which virtually all computation-intensive extensions do. Also, note the gmpy doesn't (release the GIL), even though it IS computationally intensive -- I tried, but it slows things down horribly even on an Intel Core Duo. I suspect that may partly

Re: Can python threads take advantage of use dual core ?

2007-08-17 Thread sturlamolden
prevents the Python interpreter to be active in more than one thread at a time. If you have a single CPU with a single core, the GIL has no consequence what so ever. If you have multiple CPUs and/or multiple cores, the GIL has the consequence that you can forget about SMP scalability using Pytho

Re: Can python threads take advantage of use dual core ?

2007-08-17 Thread sturlamolden
prevents the Python interpreter to be active in more than one thread at a time. If you have a single CPU with a single core, the GIL has no consequence what so ever. If you have multiple CPUs and/or multiple cores, the GIL has the consequence that you can forget about SMP scalability using Pytho

Re: Can python threads take advantage of use dual core ?

2007-08-17 Thread Bjoern Schliessmann
nikhilketkar wrote: > What are the implications of the Global Interpreter Lock in Python > ? Please have a look at the archives. This topic is brought up anew every few weeks. > Does this mean that Python threads cannot exploit a dual core > processor and the only advantage of u

Re: Can python threads take advantage of use dual core ?

2007-08-17 Thread Diez B. Roggisch
nikhilketkar schrieb: > What are the implications of the Global Interpreter Lock in Python ? > Does this mean that Python threads cannot exploit a dual core > processor and the only advantage of using threads is in that > computation and IO-bound operations can continue in parallel ?

Re: Can python threads take advantage of use dual core ?

2007-08-17 Thread Stefan Behnel
Diez B. Roggisch wrote: > nikhilketkar schrieb: >> What are the implications of the Global Interpreter Lock in Python ? >> Does this mean that Python threads cannot exploit a dual core >> processor and the only advantage of using threads is in that >> computation

Can python threads take advantage of use dual core ?

2007-08-17 Thread nikhilketkar
What are the implications of the Global Interpreter Lock in Python ? Does this mean that Python threads cannot exploit a dual core processor and the only advantage of using threads is in that computation and IO-bound operations can continue in parallel ? Thanks, Nikhil -- http://mail.python.org

Re: M2Crypto-0.17 blocks python threads?

2007-06-03 Thread John Nagle
Heikki Toivonen wrote: > [EMAIL PROTECTED] wrote: > >>I am having a problem with python threads and M2Crypto. It appears >>the M2Crypto used in multi-thread application blocks other threads >>from running: > > > This turned into https://bugzilla.osafo

Re: M2Crypto-0.17 blocks python threads?

2007-06-01 Thread Heikki Toivonen
[EMAIL PROTECTED] wrote: > I am having a problem with python threads and M2Crypto. It appears > the M2Crypto used in multi-thread application blocks other threads > from running: This turned into https://bugzilla.osafoundation.org/show_bug.cgi?id=9401 Thanks for the report! --

M2Crypto-0.17 blocks python threads?

2007-05-31 Thread reizes
I am having a problem with python threads and M2Crypto. It appears the M2Crypto used in multi-thread application blocks other threads from running: Environment: Linux 2.6 (centos 5.0), OpenSSL 0.9.8b, M2Crypto-0.17 I am using echod-thread.py and echo.py as test vehicles. Start up echod

Re: Python Threads -

2007-04-19 Thread Daniel Nogradi
> Can you please suggest a technique in Python where we can spawn few number > of worker threads and later map them to a function/s to execute individual > Jobs. Have a look at the threading module: http://docs.python.org/lib/module-threading.html HTH, Daniel -- http://mail.python.org/mailman/li

Re: Python Threads -

2007-04-18 Thread Alex Martelli
S.Mohideen <[EMAIL PROTECTED]> wrote: > Hi All, > > Can you please suggest a technique in Python where we can spawn few number > of worker threads and later map them to a function/s to execute individual > Jobs. > > Any references would be helpful.. I believe I give some examples in the Nutshel

Re: Python Threads -

2007-04-18 Thread Aahz
In article <[EMAIL PROTECTED]>, S.Mohideen <[EMAIL PROTECTED]> wrote: > >Can you please suggest a technique in Python where we can spawn few number >of worker threads and later map them to a function/s to execute individual >Jobs. You can see an example for a web spider on my Python website. --

Python Threads -

2007-04-18 Thread S.Mohideen
Hi All, Can you please suggest a technique in Python where we can spawn few number of worker threads and later map them to a function/s to execute individual Jobs. Any references would be helpful.. Thanks Moin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Threads

2007-02-22 Thread Sick Monkey
I think that I found a solution to my thread issues, however I know it is not the most efficient method possible. Just to give you a little information on what this project is all about I have 3 lists of email addresses. (1) "host email address" = contains a list of all of my emails a

Re: Python Threads

2007-02-19 Thread Sick Monkey
Great, thanks for the tip Gabriel! On 2/18/07, Gabriel Genellina <[EMAIL PROTECTED]> wrote: En Sun, 18 Feb 2007 23:37:02 -0300, Sick Monkey <[EMAIL PROTECTED]> escribió: > Well if this cannot be done, can a thread call a function in the main > method? > I have been trying and have not been suc

Re: Python Threads

2007-02-18 Thread Gabriel Genellina
En Sun, 18 Feb 2007 23:37:02 -0300, Sick Monkey <[EMAIL PROTECTED]> escribió: > Well if this cannot be done, can a thread call a function in the main > method? > I have been trying and have not been successive. Perhaps I am using > thread > incorrectly. The safe way to pass information betwe

Re: Python Threads

2007-02-18 Thread Sick Monkey
Well if this cannot be done, can a thread call a function in the main method? I have been trying and have not been successive. Perhaps I am using thread incorrectly. On 2/18/07, Sick Monkey <[EMAIL PROTECTED]> wrote: Is there anyway to get 2 python threads to talk to one another? I

Python Threads

2007-02-18 Thread Sick Monkey
Is there anyway to get 2 python threads to talk to one another? I have a GUI which is spawning a thread to make a large calculation (that way the GUI does not appear to be non responsive). I am trying to attach a progress bar to the threaded action. As the thread is calculating data, I would

Re: The reliability of python threads

2007-02-01 Thread Steve Holden
Carl J. Van Arsdall wrote: > Steve Holden wrote: >> [snip] >> >> Are you using memory with built-in error detection and correction? >> >> > You mean in the hardware? I'm not really sure, I'd assume so but is > there any way I can check on this? If the hardware isn't doing that, is > there an

Re: The reliability of python threads

2007-01-30 Thread Carl J. Van Arsdall
ill signal if it appears to be stalled, although I am absolutely sure there is more to it than that. I don't think this could be done at all with python threads though, but as a fan of python threads and their ease of use, it would be a nice and powerful feature to have. -carl -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Re: The reliability of python threads

2007-01-30 Thread Carl J. Van Arsdall
Steve Holden wrote: > [snip] > > Are you using memory with built-in error detection and correction? > > You mean in the hardware? I'm not really sure, I'd assume so but is there any way I can check on this? If the hardware isn't doing that, is there anything I can do with my software to offe

Re: The reliability of python threads

2007-01-30 Thread John Nagle
Aahz wrote: > In article <[EMAIL PROTECTED]>, > Carl J. Van Arsdall <[EMAIL PROTECTED]> wrote: > My point is that an app that dies only once every few months under load > is actually pretty damn stable! That is not the kind of problem that > you are likely to stimulate. This has all been so

Re: The reliability of python threads

2007-01-29 Thread Steve Holden
Carl J. Van Arsdall wrote: > Aahz wrote: >> [snip] >> >> My response is that you're asking the wrong questions here. Our database >> server locked up hard Sunday morning, and we still have no idea why (the >> machine itself, not just the database app). I think it's more important >> to focus on w

Re: The reliability of python threads

2007-01-29 Thread Aahz
In article <[EMAIL PROTECTED]>, Carl J. Van Arsdall <[EMAIL PROTECTED]> wrote: >Aahz wrote: >> >> My response is that you're asking the wrong questions here. Our database >> server locked up hard Sunday morning, and we still have no idea why (the >> machine itself, not just the database app). I t

Re: The reliability of python threads

2007-01-29 Thread Carl J. Van Arsdall
Hendrik van Rooyen wrote: > [snip] >> could definitely do more of them. The thing will be >> > > When I read this - I thought - probably your stuff is working > perfectly - on your test cases - you could try to send it some > random data and to see what happens - seeing as you have a test

Re: The reliability of python threads

2007-01-27 Thread Hendrik van Rooyen
"Carl J. Van Arsdall" <[EMAIL PROTECTED]> wrote: > Hendrik van Rooyen wrote: > > "Carl J. Van Arsdall" <[EMAIL PROTECTED]> wrote: 8< --- > > > Yea, I do some of that too. I use that with conditional print > statements to stderr when i'm doing

Re: The reliability of python threads

2007-01-26 Thread Carl J. Van Arsdall
Hendrik van Rooyen wrote: > "Carl J. Van Arsdall" <[EMAIL PROTECTED]> wrote: > > >> [snip] >> > > Are you 100% rock bottom gold plated guaranteed sure that there is > not something else that is also critical that you just haven't realised is? > 100%? No, definitely not. I know myself,

Re: The reliability of python threads

2007-01-26 Thread Paddy
On 26 Jan, 09:05, [EMAIL PROTECTED] (Nick Maclaren) wrote: > In article <[EMAIL PROTECTED]>,[EMAIL PROTECTED] writes:|> > |> What makes you think Paddy indicated he wouldn't try to solve the problem? > |> Here's what he wrote: > |> > |> What I'm proposing is that if, for example, a process st

Re: The reliability of python threads

2007-01-26 Thread Nick Maclaren
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] writes: |> |> What makes you think Paddy indicated he wouldn't try to solve the problem? |> Here's what he wrote: |> |> What I'm proposing is that if, for example, a process stops running |> three times in a year at roughly three to four

Re: The reliability of python threads

2007-01-25 Thread Hendrik van Rooyen
"Carl J. Van Arsdall" <[EMAIL PROTECTED]> wrote: > Right, I wasn't coming here to get someone to debug my app, I'm just > looking for ideas. I constantly am trying to find new ways to improve > my software and new ways to reduce bugs, and when i get really stuck, > new ways to track bugs down

Re: The reliability of python threads

2007-01-25 Thread Paul Rubin
[EMAIL PROTECTED] writes: > What makes you think Paddy indicated he wouldn't try to solve the problem? > Here's what he wrote: > > What I'm proposing is that if, for example, a process stops running > three times in a year at roughly three to four months intervals , and it > should hav

Re: The reliability of python threads

2007-01-25 Thread skip
Paul> I dunno about Nick, I'm saying it's best to assume that it's Paul> Poisson and do whatever is necessary to diagnose and fix the bug, Paul> and that the voodoo measure you're proposing is not all that Paul> likely to help and it will take years to find out whether it helps

Re: The reliability of python threads

2007-01-25 Thread Nick Maclaren
In article <[EMAIL PROTECTED]>, "Paddy" <[EMAIL PROTECTED]> writes: |> |> No, you should think of the service that needs to be up. You seem to be |> talking about how it can't be fixed rather than looking for ways to |> keep things going. A little learning is fine but "it can't |> theoretically b

Re: The reliability of python threads

2007-01-25 Thread Paul Rubin
"Paddy" <[EMAIL PROTECTED]> writes: > > But you're proposing cargo cult programming. > i don't know that term. http://en.wikipedia.org/wiki/Cargo_cult_programming > What I'm proposing is that if, for example, a process stops running > three times in a year at roughly three to four months interval

Re: The reliability of python threads

2007-01-25 Thread Paddy
On Jan 25, 8:00 pm, Paul Rubin wrote: > "Paddy" <[EMAIL PROTECTED]> writes: > > No, you should think of the service that needs to be up. You seem to be > > talking about how it can't be fixed rather than looking for ways to > > keep things going. > But you're proposing

Re: The reliability of python threads

2007-01-25 Thread Paul Rubin
"Paddy" <[EMAIL PROTECTED]> writes: > No, you should think of the service that needs to be up. You seem to be > talking about how it can't be fixed rather than looking for ways to > keep things going. But you're proposing cargo cult programming. There is no reason whatsoever to expect that restar

Re: The reliability of python threads

2007-01-25 Thread Paddy
On Jan 25, 7:36 pm, [EMAIL PROTECTED] (Nick Maclaren) wrote: > In article <[EMAIL PROTECTED]>,"Paddy" <[EMAIL PROTECTED]> writes:|> > |> > |> Three to four months before `strange errors`? I'd spend some time > |> > |> correlating logs; not just for your program, but for everything > running > |>

Re: The reliability of python threads

2007-01-25 Thread Nick Maclaren
In article <[EMAIL PROTECTED]>, "Paddy" <[EMAIL PROTECTED]> writes: |> |> > |> Three to four months before `strange errors`? I'd spend some time |> > |> correlating logs; not just for your program, but for everything running |> > |> on the server. Then I'd expect to cut my losses and arrange to s

Re: The reliability of python threads

2007-01-25 Thread Carl J. Van Arsdall
Aahz wrote: > [snip] > > My response is that you're asking the wrong questions here. Our database > server locked up hard Sunday morning, and we still have no idea why (the > machine itself, not just the database app). I think it's more important > to focus on whether you have done all that is re

Re: The reliability of python threads

2007-01-25 Thread Paddy
On Jan 25, 9:26 am, [EMAIL PROTECTED] (Nick Maclaren) wrote: > In article <[EMAIL PROTECTED]>,"Paddy" <[EMAIL PROTECTED]> writes:|> > |> Three to four months before `strange errors`? I'd spend some time > |> correlating logs; not just for your program, but for everything running > |> on the serve

Re: The reliability of python threads

2007-01-25 Thread Nick Maclaren
In article <[EMAIL PROTECTED]>, "Paddy" <[EMAIL PROTECTED]> writes: |> |> Three to four months before `strange errors`? I'd spend some time |> correlating logs; not just for your program, but for everything running |> on the server. Then I'd expect to cut my losses and arrange to safely |> re-sta

Re: The reliability of python threads

2007-01-24 Thread Klaas
On Jan 24, 5:18 pm, Paul Rubin wrote: > "Klaas" <[EMAIL PROTECTED]> writes: > > CPython is more that "a particular implementation" of python, > It's precisely a particular implementation of Python. Other > implementations include Jython, PyPy, and IronPython. I did not

Re: The reliability of python threads

2007-01-24 Thread Damjan
>> and the GIL is more than an "artifact". It is a central tenet of >> threaded python programming. > > If it's a central tenet of threaded python programming, why is it not > mentioned at all in the language or library manual? The threading > module documentation describes the right way to han

Re: The reliability of python threads

2007-01-24 Thread Paul Rubin
"Klaas" <[EMAIL PROTECTED]> writes: > CPython is more that "a particular implementation" of python, It's precisely a particular implementation of Python. Other implementations include Jython, PyPy, and IronPython. > and the GIL is more than an "artifact". It is a central tenet of > threaded py

Re: The reliability of python threads

2007-01-24 Thread Klaas
On Jan 24, 4:11 pm, Paul Rubin wrote: > "Klaas" <[EMAIL PROTECTED]> writes: > > POSIX issues aside, Python's threading model should be less susceptible > > to memory-barrier problems that are possible in other languages (this > > is due to the GIL). > But the GIL is not

Re: The reliability of python threads

2007-01-24 Thread Paul Rubin
"Klaas" <[EMAIL PROTECTED]> writes: > POSIX issues aside, Python's threading model should be less susceptible > to memory-barrier problems that are possible in other languages (this > is due to the GIL). But the GIL is not part of Python's threading model; it's just a particular implementation ar

Re: The reliability of python threads

2007-01-24 Thread Klaas
On Jan 24, 10:43 am, "Carl J. Van Arsdall" <[EMAIL PROTECTED]> wrote: > Yea, typically I would think that. The problem I am seeing is > incredibly intermittent. Like a simple pyro server that gives me a > problem maybe every three or four months. Just something funky will > happen to the state

Re: The reliability of python threads

2007-01-24 Thread Klaas
On Jan 24, 10:43 am, "Carl J. Van Arsdall" <[EMAIL PROTECTED]> wrote: > Chris Mellon wrote: > > On 24 Jan 2007 18:21:38 GMT, Nick Maclaren <[EMAIL PROTECTED]> wrote: > > >> [snip] > > > I'm aware of the issues with the POSIX threading model. I still stand > > by my statement - bringing up the pro

Re: The reliability of python threads

2007-01-24 Thread Klaas
On Jan 24, 10:43 am, "Carl J. Van Arsdall" <[EMAIL PROTECTED]> wrote: > Chris Mellon wrote: > > On 24 Jan 2007 18:21:38 GMT, Nick Maclaren <[EMAIL PROTECTED]> wrote: > > >> [snip] > > > I'm aware of the issues with the POSIX threading model. I still stand > > by my statement - bringing up the pro

Re: The reliability of python threads

2007-01-24 Thread John Nagle
thon from within Python via concurrency errors? Does the garbage collector run concurrently or does it freeze all threads? What's different depending upon whether you're using real OS threads or simulated Python threads? John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: The reliability of python threads

2007-01-24 Thread Paddy
On Jan 24, 6:43 pm, "Carl J. Van Arsdall" <[EMAIL PROTECTED]> wrote: > Chris Mellon wrote: > > On 24 Jan 2007 18:21:38 GMT, Nick Maclaren <[EMAIL PROTECTED]> wrote: > > >> [snip] > > > I'm aware of the issues with the POSIX threading model. I still stand > > by my statement - bringing up the prob

Re: The reliability of python threads

2007-01-24 Thread Nick Maclaren
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Aahz) writes: |> |> My response is that you're asking the wrong questions here. Our database |> server locked up hard Sunday morning, and we still have no idea why (the |> machine itself, not just the database app). I think it's more important

Re: The reliability of python threads

2007-01-24 Thread Aahz
In article <[EMAIL PROTECTED]>, Carl J. Van Arsdall <[EMAIL PROTECTED]> wrote: > >Hey everyone, I have a question about python threads. Before anyone >goes further, this is not a debate about threads vs. processes, just a >question. > >With that, are python thr

Re: The reliability of python threads

2007-01-24 Thread Nick Maclaren
In article <[EMAIL PROTECTED]>, "Carl J. Van Arsdall" <[EMAIL PROTECTED]> writes: |> Chris Mellon wrote: |> > |> > Logic and programming errors in user code are far more likely to be |> > the cause of random errors in a threaded program than theoretical |> > (I've never come across a case in pract

Re: The reliability of python threads

2007-01-24 Thread Carl J. Van Arsdall
Chris Mellon wrote: > On 24 Jan 2007 18:21:38 GMT, Nick Maclaren <[EMAIL PROTECTED]> wrote: > >> [snip] >> >> > > I'm aware of the issues with the POSIX threading model. I still stand > by my statement - bringing up the problems with the provability of > correctness in the POSIX model amoun

Re: The reliability of python threads

2007-01-24 Thread Chris Mellon
On 24 Jan 2007 18:21:38 GMT, Nick Maclaren <[EMAIL PROTECTED]> wrote: > > In article <[EMAIL PROTECTED]>, > "Chris Mellon" <[EMAIL PROTECTED]> writes: > |> > |> > |> > |> Does anyone have any conclusive evidence that python threads/lo

Re: The reliability of python threads

2007-01-24 Thread Nick Maclaren
In article <[EMAIL PROTECTED]>, "Chris Mellon" <[EMAIL PROTECTED]> writes: |> > |> |> > |> Does anyone have any conclusive evidence that python threads/locks are |> > |> safe or unsafe? |> > |> > Unsafe. They are built on top of unsaf

  1   2   >