On Thu, 12 Oct 2000, Coulson, Geoffrey wrote:

> 1. On Linux systems with gcc (2.8.1) programs crash when they call certain
> glibc routines -- select() and poll() are examples.

I added pth support to Python 2.0, and the one big problem at this point
is that it crashes on the poll() test. As of Python-2.0c1, with pth-1.3.7,
the poll() test dies with:

**Pth** SCHEDULER INTERNAL ERROR: no more thread(s) available to
schedule!?!?

#0  0x400a7d41 in __kill () from /lib/libc.so.6
#1  0x400a79b6 in raise (sig=6) at ../sysdeps/posix/raise.c:27
#2  0x400a90d8 in abort () at ../sysdeps/generic/abort.c:88
#3  0x400585a5 in __pth_scheduler () from /usr/lib/libpth.so.13
#4  0x40059eee in pth_spawn_trampoline () from /usr/lib/libpth.so.13
#5  0x40058058 in pth_mctx_set_bootstrap () from /usr/lib/libpth.so.13
#6  0x40057fd6 in pth_mctx_set_trampoline () from /usr/lib/libpth.so.13
#7  0x400a7c68 in __restore ()
    at ../sysdeps/unix/sysv/linux/i386/sigaction.c:127
#8  0x8115170 in ?? ()

No difference between --enable-syscall-soft and --enable-syscall-hard.

If you want to try to replicate this, get Python-2.0c1 from
http://www.pythonlabs.com/products/python2.0/download_python2.0c1.html,
build with ./configure --with-pth, and make test.

This *could* be a bug in Python 2.0's selectmodule (where poll() lives),
but I tend to think it's a pth bug.

Also, I've mentioned this before, and I think it's a bug, not a feature:
Various blocking calls (if you are using either hard or soft syscalls)
such as sleep() and select(), do not wake up when interrupts arrive. This
is counter to how those functions normally work. The solution I came up
with was to patch pth_high.c (i.e. pth_sleep() and pth_select()) so that
those an interrupt event ring was included.

-- 
andy dustman  |  programmer  |  comstar.net is part of the Globix network
telephone: 770.485.6025 / 706.549.7689 | icq: 32922760 | pgp: 0xc72f3f1d
"Therefore, sweet knights, if you may doubt your strength or courage, 
come no further, for death awaits you all, with nasty, big, pointy teeth!"



______________________________________________________________________
GNU Portable Threads (Pth)            http://www.gnu.org/software/pth/
User Support Mailing List                            [EMAIL PROTECTED]
Automated List Manager (Majordomo)           [EMAIL PROTECTED]

Reply via email to