Project

General

Profile

Actions

Bug #7474

closed

I am getting undefined symbol: rb_enable_interrupt when running event machine

Added by sam.saffron (Sam Saffron) over 11 years ago. Updated about 11 years ago.

Status:
Rejected
Target version:
ruby -v:
2.0
Backport:
[ruby-core:50352]

Description

I would like to cross report

https://github.com/eventmachine/eventmachine/issues/389

Clearly this breakage could be "on purpose" not sure who should be fixing it.

Updated by nobu (Nobuyoshi Nakada) over 11 years ago

  • Category set to core
  • Status changed from Open to Assigned
  • Assignee set to kosaki (Motohiro KOSAKI)

It's been static since r32510.
I'm not sure if it is a part of public API.

Updated by kosaki (Motohiro KOSAKI) over 11 years ago

  • Status changed from Assigned to Feedback

It's been static since r32510.
I'm not sure if it is a part of public API.

vm_core.h is definitely internal api place.
Moreover rb_disable_interrupt() is wrong api and we may be removed later.
There are two problems:

rb_disable_interrupt()
..
rb_enable_interrupt()

is expand to

sigfillset(&mask);
pthread_sigmask(SIG_SETMASK, &mask, NULL);

...

sigemptyset(&mask);
pthread_sigmask(SIG_SETMASK, &mask, NULL);

See? rb_enable_interrupt() ignore old sigmask and set signal mask to empty.

  1. thread unsafe

pthread_sigmask() only change current thread sigmask. then other thread still be able to
be interrupted by signal. then, this api only work single thread context. MRI only use this
api when process creation time.

So, I have a question. Why do event machine need rb_disable_interrupt()? If I understand correctly,
event machine don't have single thread guarantee.

Updated by kosaki (Motohiro KOSAKI) about 11 years ago

  • Status changed from Feedback to Rejected

No response. I'll close this then.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0