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

Delayed signals in the REPL on OpenBSD (possibly libpthread related) #52960

Closed
skrah mannequin opened this issue May 14, 2010 · 6 comments
Closed

Delayed signals in the REPL on OpenBSD (possibly libpthread related) #52960

skrah mannequin opened this issue May 14, 2010 · 6 comments
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error

Comments

@skrah
Copy link
Mannequin

skrah mannequin commented May 14, 2010

BPO 8714
Nosy @vstinner, @skrah

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 2013-01-17.12:13:33.250>
created_at = <Date 2010-05-14.16:26:02.762>
labels = ['interpreter-core', 'type-bug']
title = 'Delayed signals in the REPL on OpenBSD (possibly libpthread related)'
updated_at = <Date 2013-01-17.12:13:33.249>
user = 'https://github.com/skrah'

bugs.python.org fields:

activity = <Date 2013-01-17.12:13:33.249>
actor = 'skrah'
assignee = 'none'
closed = True
closed_date = <Date 2013-01-17.12:13:33.250>
closer = 'skrah'
components = ['Interpreter Core']
creation = <Date 2010-05-14.16:26:02.762>
creator = 'skrah'
dependencies = []
files = []
hgrepos = []
issue_num = 8714
keywords = []
message_count = 6.0
messages = ['105720', '106124', '140972', '141007', '141012', '180124']
nosy_count = 5.0
nosy_names = ['vstinner', 'djmdjm', 'henry.precheur', 'skrah', 'neologix']
pr_nums = []
priority = 'normal'
resolution = 'out of date'
stage = None
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue8714'
versions = ['Python 3.1', 'Python 2.7']

@skrah
Copy link
Mannequin Author

skrah mannequin commented May 14, 2010

On OpenBSD, SIGINT handling in the REPL is delayed until further input:

Python 2.7b2+ (trunk:81162, May 14 2010, 14:47:52) 
[GCC 3.3.5 (propolice)] on openbsd4
Type "help", "copyright", "credits" or "license" for more information.
>>>  <= here Ctrl-C is pressed but nothing appears
Only after hitting <Return> a traceback appears:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
KeyboardInterrupt

This behavior was introduced (exposed by?) r68460.

When Python is compiled without threads, the behavior is normal.

@skrah skrah mannequin added interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error labels May 14, 2010
@henryprecheur
Copy link
Mannequin

henryprecheur mannequin commented May 20, 2010

The bug is also present with Python 3.1 on OpenBSD 4.7-current.

@neologix
Copy link
Mannequin

neologix mannequin commented Jul 23, 2011

This behavior was introduced (exposed by?) r68460.

After a quick look, I don't see anything wrong with r68460, but it might very well have exposed this problem which was lurking before.

When Python is compiled without threads, the behavior is normal.

We've already had some problems - especially on *BSD - when mixing signals and threads (and it might be even worse on OpenBSD, since pthreads are implemented in user-space). However, IIUC, in this case you only have a single thread, right?

Could you post the output of an strace (well, ktrace on OpenBSD)?
Is Python compiled with readline support?

@skrah
Copy link
Mannequin Author

skrah mannequin commented Jul 23, 2011

I know, the OpenBSD libpthread has problems. I listed some possible
candidates in bpo-8712.

For instance:

http://www.openbsd.org/cgi-bin/cvsweb/~checkout~/ports/lang/python/2.6/patches/Attic/patch-Lib_test_test_signal_py?rev=1.3;content-type=text%2Fplain

The comment says: "siginterrupt not reliable (does not mix well with threading"

To answer your questions:

  1. Yes, there is only a single thread.

  2. I only have an old OpenBSD 4.5, so it's not so useful to test
    there; I know Philip Guenther fixed some libpthread problems
    in the meantime.

@skrah
Copy link
Mannequin Author

skrah mannequin commented Jul 23, 2011

I forgot: readline support is enabled, and there are known problems:

http://marc.info/?t=128327329300003&r=1&w=2

@skrah
Copy link
Mannequin Author

skrah mannequin commented Jan 17, 2013

Fixed in OpenBSD 5.2.

@skrah skrah mannequin closed this as completed Jan 17, 2013
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

0 participants