Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_signal hangs -- signal broken on OpenBSD? #36504

Closed
noah mannequin opened this issue Apr 26, 2002 · 7 comments
Closed

test_signal hangs -- signal broken on OpenBSD? #36504

noah mannequin opened this issue Apr 26, 2002 · 7 comments

Comments

@noah
Copy link
Mannequin

noah mannequin commented Apr 26, 2002

BPO 549081
Nosy @mwhudson, @facundobatista
Files
  • config_stuff.tar: My config.log and config.cache after running './configure'
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2005-05-30.18:03:29.000>
    created_at = <Date 2002-04-26.13:54:44.000>
    labels = ['expert-installation']
    title = 'test_signal hangs -- signal broken on OpenBSD?'
    updated_at = <Date 2005-05-30.18:03:29.000>
    user = 'https://bugs.python.org/noah'

    bugs.python.org fields:

    activity = <Date 2005-05-30.18:03:29.000>
    actor = 'facundobatista'
    assignee = 'none'
    closed = True
    closed_date = None
    closer = None
    components = ['Installation']
    creation = <Date 2002-04-26.13:54:44.000>
    creator = 'noah'
    dependencies = []
    files = ['444']
    hgrepos = []
    issue_num = 549081
    keywords = []
    message_count = 7.0
    messages = ['10545', '10546', '10547', '10548', '10549', '10550', '10551']
    nosy_count = 4.0
    nosy_names = ['mwh', 'facundobatista', 'noah', 'frallan']
    pr_nums = []
    priority = 'normal'
    resolution = 'wont fix'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue549081'
    versions = ['Python 2.2']

    @noah
    Copy link
    Mannequin Author

    noah mannequin commented Apr 26, 2002

    This appears to be similar to bug as PR#288,
    [ 210635 ] test_signal hangs when running
    as part of testall (PR#288)

    except that I have this problem on a fresh install of
    OpenBSD 3.0 while trying to build Python-2.2.1.
    I did a generic build running as root:
    ./configure
    ./make
    ./make test

    Yours,
    Noah

    @noah noah mannequin closed this as completed Apr 26, 2002
    @noah noah mannequin added the topic-installation label Apr 26, 2002
    @noah noah mannequin closed this as completed Apr 26, 2002
    @noah noah mannequin added the topic-installation label Apr 26, 2002
    @noah
    Copy link
    Mannequin Author

    noah mannequin commented Apr 27, 2002

    Logged In: YES
    user_id=59261

    Below is the output of test_signal.py. I ran it manually. I
    modified it slightly to print out the pid; the return
    values from the signal calls; and to print a count of the
    loop iteration (starting at 1). You can see that after
    Count 4 it just sits there. After about a minute I hit Ctrl-
    Z. I have uploaded the modified version of test_signal.py.
    ...
    bash-2.05# python test_signal.py
    pid: 8606
    signal.alarm(20): 0
    signal.signal(5, handlerA): 0
    signal.signal(2, handlerB): <built-in function
    default_int_handler>
    signal.signal(3, signal.SIG_IGN): 0
    signal.signal(signal.SIGALRM, signal.default_int_handler): 0
    starting pause() loop...
    + sleep 2
    count: 1
    call pause()...
    + kill -5 8606
    pause() returned
    + sleep 2
    count: 2
    call pause()...
    + kill -2 8606
    pause() returned
    + sleep 2
    count: 3
    call pause()...
    + kill -3 8606
    pause() returned
    count: 4
    call pause()...
    ^Z
    [1]+ Stopped python test_signal.py
    bash-2.05# ps -p 8606
    PID TT STAT TIME COMMAND
    8606 p0 T 0:00.09 python test_signal.py
    bash-2.05# uname -a
    OpenBSD nobot 3.0 GENERIC#94 i386
    bash-2.05# python
    Python 2.2.1 (#4, Apr 26 2002, 23:06:40)
    [GCC 2.95.3 2001012 (prerelease)] on openbsd3

    @frallan
    Copy link
    Mannequin

    frallan mannequin commented Oct 31, 2002

    Logged In: YES
    user_id=639616

    I get the exact same behavior on OpenBSD 3.1 with Python-
    2.2.2. Also this simple test program from the "Python
    Standard Library" book - fails. The program terminates but
    the "got signal" message is never printed.

    import signal
    import time
    
    def handler (signo, frame):
        print 'got signal', signo
    
    signal.signal(signal.SIGALRM, handler)
    # wake me up in two seconds
    signal.alarm(2)
    now = time.time()
    time.sleep(200)
    print 'slept for', time.time() - now, "seconds"

    @mwhudson
    Copy link

    Logged In: YES
    user_id=6656

    As far as I am aware (not very) Python signals have always
    been broken on OpenBSD. None of the Python core developers
    use OpenBSD, though, so it's always remained a mystery.

    frallan, does the C equivalent of your Python test work? Do
    you have any idea what Python (or OpenBSD, maybe) is doing
    wrong?

    signals are pain.

    @frallan
    Copy link
    Mannequin

    frallan mannequin commented Dec 11, 2003

    Logged In: YES
    user_id=639616

    My test program now works. It both terminates and prints
    the 'got signal' message.

    Current Platform is:
    OpenBSD somewhere 3.3 GENERIC#44 i386
    Python 2.3.2 (#1, Dec 1 2003, 11:20:01)
    [GCC 2.95.3 2001012 (prerelease, propolice)] on openbsd3

    I should receive my OpenBSD 3.4 CDs soon. Then I'll test
    that too.

    @facundobatista
    Copy link
    Member

    Logged In: YES
    user_id=752496

    Please, could you verify if this problem persists in Python 2.3.4
    or 2.4?

    If yes, in which version? Can you provide a test case?

    If the problem is solved, from which version?

    Note that if you fail to answer in one month, I'll close this bug
    as "Won't fix".

    Thank you!

    . Facundo

    @facundobatista
    Copy link
    Member

    Logged In: YES
    user_id=752496

    Deprecated. Reopen only if still happens in 2.3 or newer.

    . Facundo

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants