[Python-Dev] cygwin errors

Jason Tishler jason@tishler.net
Mon, 21 Jul 2003 14:02:49 -0400


On Mon, Jul 21, 2003 at 08:11:19AM -0400, Jason Tishler wrote:
> I have started to play the binary search game to determine when the
> problem began.

Ding, ding, ding!  We have a winner:

    http://sf.net/tracker/?group_id=5470&atid=305470&func=detail&aid=742741

The above patch enables HAVE_PTHREAD_SIGMASK under Cygwin which was not
enabled before.

I just tried the following with 2.3c1:

    $ configure ...
    $ # edit pyconfig.h to #undef HAVE_PTHREAD_SIGMASK
    $ make
    $ ./python.exe -E -tt ../Lib/test/regrtest.py -l
    test_grammar
    [snip]
    test_zlib
    221 tests OK.
    2 tests failed:
        test_netrc test_time
    32 tests skipped:
        test_aepack test_al test_bsddb185 test_bsddb3 test_cd test_cl
        test_curses test_dbm test_email_codecs test_gl test_imgfile
        test_ioctl test_largefile test_linuxaudiodev test_locale
        test_macfs test_macostools test_mpz test_nis test_normalization
        test_ossaudiodev test_pep277 test_plistlib test_scriptpackages
        test_socket_ssl test_socketserver test_sunaudiodev test_timeout
        test_unicode_file test_urllibnet test_winreg test_winsound
    1 skip unexpected on cygwin:
        test_ioctl

Scanning the Cygwin code, I found the following:

    extern "C" int
    pthread_sigmask (int operation, const sigset_t *set, sigset_t *old_set)
    {
      pthread *thread = pthread::self ();

      // lock this myself, for the use of thread2signal
***>  // two differt kills might clash: FIXME
      [snip]
    }

Hence, it seems that my hypothesis that a Python change was tickling a
Cygwin bug (i.e., the above FIXME or another issue) is correct.

So, the question is how should we deal with this issue?

    1. Leave the Python code base alone and assume that Cygwin's
       pthread_sigmask() will get fixed.  Additionally, assume I will
       patch around this problem until that happens.
    2. Patch the Python code base so that HAVE_PTHREAD_SIGMASK is
       undefined under Cygwin.

I recommend option #1.  Do others agree?  Did I miss any other options?

BTW, does anyone know if Python is triggering the FIXME in Cygwin's
pthread_sigmask()?  Or, should I look elsewhere?

Thanks,
Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6