threads on Solaris

David Arnold arnold at dstc.edu.au
Wed Sep 1 02:12:30 EDT 1999


-->"Ted" == Ted Horst <Ted.Horst at wdr.com> writes:

  Ted> Does anyone know why I get 4 threads when I start the
  Ted> interpreter under Solaris (as reported by /bin/ps -aL) ?

  Ted> This is python 1.5.2 built with a SUNPro compiler (sorry, I
  Ted> don't have the config options).

i see the same behaviour, also SUNPro, but i *know* mine is configured
with the thread module enabled, which i imagine has something to do
with it?

  Ted> SunOS ch1d2964syb 5.6 Generic_105181-12 sun4u sparc

SunOS fig.dstc.edu.au 5.6 Generic_105181-11 sun4u sparc


using dbx, i see that there are 3 threads and 4 LWPs active:

  (dbx) threads
   >    t at 1  a l at 1  ?()   running                 in _libc_read()
        t at 2  b l at 2  ?()   running                 in __signotifywait()
        t at 3         ?()   sleep on (unknown)      in _swtch()
  (dbx) lwps
   >l at 1 running          in _libc_read()
    l at 2 running          in __signotifywait()
    l at 3 running          in ___lwp_cond_wait()
    l at 4 running          in _door_return()
  (dbx) 

thread t at 1 (lwp l at 1) is the interpreter's interactive prompt waiting
for me to type something.  idly speculating, t at 2 could handle signal
delivery?  l at 3 (in the cond_wait, actually a cond_timedwait) is called
by a function _age ... no real clues on what that might be doing.

what t at 3 and l at 4 are doing i've no idea (no useful call stack from
dbx).

but at least your observed behaviour isn't unique ;-)




d




More information about the Python-list mailing list