Opened 14 years ago

Closed 13 years ago

#7235 closed bug (fixed)

JamVM thread continue to wait for signal when sent

Reported by: korli Owned by: nobody
Priority: normal Milestone: R1
Component: System/POSIX Version: R1/Development
Keywords: Cc:
Blocked By: #5679 Blocking:
Platform: All

Description

When compiling Classpath, JamVM running Eclipse java compiler uses multiple threads, which are suspended and resumed by signals.

I tried to recreate the problem with src/tests/system/libroot/posix/pthread_signal_test.cpp, I hope I got it right. The test name is pthread_signal_test.

Attachments (1)

pthread.diff (1.6 KB ) - added by korli 14 years ago.
init thread id so that it can be used by pthread_kill()

Download all attachments as: .zip

Change History (8)

comment:1 by bonefish, 14 years ago

Blocked By: 5679 added
Resolution: duplicate
Status: newclosed

Looks like a duplicate of #5679.

comment:2 by korli, 14 years ago

Resolution: duplicate
Status: closedreopened

#5679 is indeed a problem but not the only one met with JamVM. pthread_kill send signals to a thread which doesn't receive it, it's not killed either. send_signal() is actually called with a thread id 0.

To init the main thread id when calling pthread_self(), we have to init sMainThread correctly.

Last edited 14 years ago by korli (previous) (diff)

by korli, 14 years ago

Attachment: pthread.diff added

init thread id so that it can be used by pthread_kill()

comment:3 by korli, 14 years ago

patch: 01

comment:4 by bonefish, 14 years ago

Looks OK. Apparently freeing the pthread_thread structure on error is missing in spawn_thread().

comment:5 by korli, 14 years ago

I applied with the structure freeing in hrev40665. I'll see if it's enough to close this report.

comment:6 by bonefish, 14 years ago

If it wasn't fixed before, please retry with hrev42116.

comment:7 by bonefish, 13 years ago

Resolution: fixed
Status: reopenedclosed

Assuming fixed. Please reopen, if not.

Note: See TracTickets for help on using tickets.