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_socketserver: Fatal error: Invalid thread state #38550

Closed
nnorwitz mannequin opened this issue May 26, 2003 · 7 comments
Closed

test_socketserver: Fatal error: Invalid thread state #38550

nnorwitz mannequin opened this issue May 26, 2003 · 7 comments
Assignees
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs)

Comments

@nnorwitz
Copy link
Mannequin

nnorwitz mannequin commented May 26, 2003

BPO 743692
Nosy @mhammond, @warsaw, @jcea

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 = 'https://github.com/mhammond'
closed_at = <Date 2005-10-02.00:27:22.000>
created_at = <Date 2003-05-26.14:30:51.000>
labels = ['interpreter-core']
title = 'test_socketserver: Fatal error: Invalid thread state'
updated_at = <Date 2005-10-02.00:27:22.000>
user = 'https://bugs.python.org/nnorwitz'

bugs.python.org fields:

activity = <Date 2005-10-02.00:27:22.000>
actor = 'nnorwitz'
assignee = 'mhammond'
closed = True
closed_date = None
closer = None
components = ['Interpreter Core']
creation = <Date 2003-05-26.14:30:51.000>
creator = 'nnorwitz'
dependencies = []
files = []
hgrepos = []
issue_num = 743692
keywords = []
message_count = 7.0
messages = ['16165', '16166', '16167', '16168', '16169', '16170', '16171']
nosy_count = 4.0
nosy_names = ['mhammond', 'barry', 'nnorwitz', 'jcea']
pr_nums = []
priority = 'high'
resolution = 'wont fix'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue743692'
versions = ['Python 2.3']

@nnorwitz
Copy link
Mannequin Author

nnorwitz mannequin commented May 26, 2003

Mark, I believe this started happening on Solaris 8
(only AFAIK) after some of your thread changes. Do you
have access to a Solaris 8 box? I can try to debug if
you give me some ideas. This is happening on the snake
farm. Actually, we have a Sol8 box here. I can try to
fire it up and see if the problem exists on that box.
If so, I can give you access.

When running test_socketserver, some way through the
test there's the fatal error.

Fatal Python error: Invalid thread state for this thread

Let me know what more info I can provide. Sorry, short
on ideas/time, just wanted to get this documented.

@nnorwitz nnorwitz mannequin closed this as completed May 26, 2003
@nnorwitz nnorwitz mannequin assigned mhammond May 26, 2003
@nnorwitz nnorwitz mannequin added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label May 26, 2003
@nnorwitz nnorwitz mannequin closed this as completed May 26, 2003
@nnorwitz nnorwitz mannequin assigned mhammond May 26, 2003
@nnorwitz nnorwitz mannequin added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label May 26, 2003
@mhammond
Copy link
Contributor

mhammond commented Jul 8, 2003

Logged In: YES
user_id=14198

I don't have access to a sol8 box, nor would I really know
what to do when I got there :) Any chance of a stack-trace?

@nnorwitz
Copy link
Mannequin Author

nnorwitz mannequin commented Jul 10, 2003

Logged In: YES
user_id=33168

Doesn't seem real helpful. I'll see if I can do more on this.

#0 PyThreadState_Swap (new=0x2b1160) at Python/pystate.c:274
#1 PyEval_RestoreThread (tstate=0x2b1160) at Python/ceval.c:391
#2 floatsleep (secs=0) at Modules/timemodule.c:831
#3 time_sleep (self=0x0, args=0x2b3968) at
Modules/timemodule.c:208
#4 PyCFunction_Call (func=0x2bd938, arg=0x2b3968, kw=0x0)
at Objects/methodobject.c:73
#5 call_function (pp_stack=0xdf142f04, oparg=1) at
Python/ceval.c:3439
#6 eval_frame (f=0x2890c8) at Python/ceval.c:2116

@nnorwitz
Copy link
Mannequin Author

nnorwitz mannequin commented Jul 10, 2003

Logged In: YES
user_id=33168

I changed the DELAY in the test to be zero. The test fails,
but it's interesting that it also hangs in
lock_PyThread_acquire_lock (line 63):

Lib/threading.py (195): wait
Lib/threading.py (468): join
Lib/threading.py (564): __exitfunc
Lib/atexit.py (11): _run_exitfuncs

In looking at threadmodule.c I notice that most of the time
Py_BEGIN_ALLOW_THREADS/Py_END_ALLOW_THREADS is not used
around PyThread_acquire_lock, but it is in
lock_PyThread_acquire_lock. I'm not sure all of these are safe.

Here's some more detail on the Sun:

test_socketserver
ADDR = ('localhost', 17231)
CLASS = SocketServer.ForkingTCPServer
server created
thread: creating server
server running
thread: serving three times
test client 0
Fatal Python error: Invalid thread state for this thread

@warsaw
Copy link
Member

warsaw commented Jul 29, 2003

Logged In: YES
user_id=12800

What can we do about this for 2.3 final? Probably nothing
given the deadline. Lowering the priority.

@jcea
Copy link
Member

jcea commented Sep 26, 2003

Logged In: YES
user_id=97460

With Python 2.3.1 out, is this bug still alive?

@nnorwitz
Copy link
Mannequin Author

nnorwitz mannequin commented Oct 2, 2005

Logged In: YES
user_id=33168

Seeing how this problem was never reproduced, I'm closing it.

@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
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs)
Projects
None yet
Development

No branches or pull requests

3 participants