[Python-Dev] test_fork1 on SMP? (was Re: [Python Dev] test_fork1 failing --with-threads (for some people)...)

Tim Peters tim_one@email.msn.com
Thu, 27 Jul 2000 18:51:27 -0400


[Trent Mick, rallies to the cry for a summary of symptoms, which I'll
 summarize as
   On
    Linux version 2.2.12-20smp (root@porky.devel.redhat.com) (gcc
    version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)) #1 SMP
   test_fork1 has one of three outcomes, varying across runs:
   1. no problem
   2. segfault
   3. hang
]

Thank you!  In no case did the test fail on the particular thing it's
*trying* to test:  that after a fork, spawned threads don't show up in the
child.  So it's failing in unanticipated ways (when it does fail), and, to
my eyes, ways that are very unlikely to be Python's fault.  Everyone
pursuing the other "fork bug" please note that test_fork1 doesn't import
threading or use any mutexes -- it just spawns threads, forks once, and
.sleeps() a lot.

As with the other bug, would be interesting to recode test_fork1 in C and
see whether it still segfaults and/or hangs.  Should be easier to do for
this test than the other one, since the *only* thread gimmick test_fork1
uses is thread.start_new().  We'll either discover that it still fails, in
which case it's clearly not something Python caused and we'll have something
pretty simple to pass on to the platform folks; or that it doesn't, in which
case it's *really* interesting <wink>.

Does anyone have test_fork1 failures on other flavors of SMP?