Project

General

Profile

Backport #5014

Solarisはシグナルハンドラでabortを呼べない

Added by kosaki (Motohiro KOSAKI) about 8 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
[ruby-dev:44082]

Description

後から気づいたのですが、さらにいうと、exit()はasync signal safe じゃないので元々論外でした。
exit()は内部でロック取るのでデッドロックリスクあり。

これを書いていて気づいたのでうsが、困った事にSolarisはabortが async signal safe じゃないので
(もちろんPOSIX違反)、たぶんSolarisのときは _exit()とか使わないとデッドロックするリスクがあります。
環境もってないので、1.9.x に回します。

Associated revisions

Revision 7355c6d9
Added by kosaki (Motohiro KOSAKI) over 6 years ago

  • signal.c (sigsegv): avoid to use async signal unsafe functions when nested sigsegv is happen. [Bug #5014] [ruby-dev:44082]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 39354
Added by kosaki (Motohiro KOSAKI) over 6 years ago

  • signal.c (sigsegv): avoid to use async signal unsafe functions when nested sigsegv is happen. [Bug #5014] [ruby-dev:44082]

Revision 39354
Added by kosaki (Motohiro KOSAKI) over 6 years ago

  • signal.c (sigsegv): avoid to use async signal unsafe functions when nested sigsegv is happen. [Bug #5014] [ruby-dev:44082]

Revision 39354
Added by kosaki (Motohiro KOSAKI) over 6 years ago

  • signal.c (sigsegv): avoid to use async signal unsafe functions when nested sigsegv is happen. [Bug #5014] [ruby-dev:44082]

Revision 39354
Added by kosaki (Motohiro KOSAKI) over 6 years ago

  • signal.c (sigsegv): avoid to use async signal unsafe functions when nested sigsegv is happen. [Bug #5014] [ruby-dev:44082]

Revision 39354
Added by kosaki (Motohiro KOSAKI) over 6 years ago

  • signal.c (sigsegv): avoid to use async signal unsafe functions when nested sigsegv is happen. [Bug #5014] [ruby-dev:44082]

Revision 39354
Added by kosaki (Motohiro KOSAKI) over 6 years ago

  • signal.c (sigsegv): avoid to use async signal unsafe functions when nested sigsegv is happen. [Bug #5014] [ruby-dev:44082]

Revision 087e888a
Added by nobu (Nobuyoshi Nakada) over 6 years ago

signal.c: extract check_stack_overflow

  • signal.c (check_stack_overflow): extract duplicated code and get rid of declaration-after-statement. [Bug #5014]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 39356
Added by nobu (Nobuyoshi Nakada) over 6 years ago

signal.c: extract check_stack_overflow

  • signal.c (check_stack_overflow): extract duplicated code and get rid of declaration-after-statement. [Bug #5014]

Revision 39356
Added by nobu (Nobuyoshi Nakada) over 6 years ago

signal.c: extract check_stack_overflow

  • signal.c (check_stack_overflow): extract duplicated code and get rid of declaration-after-statement. [Bug #5014]

Revision 39356
Added by nobu (Nobuyoshi Nakada) over 6 years ago

signal.c: extract check_stack_overflow

  • signal.c (check_stack_overflow): extract duplicated code and get rid of declaration-after-statement. [Bug #5014]

Revision 39356
Added by nobu (Nobuyoshi Nakada) over 6 years ago

signal.c: extract check_stack_overflow

  • signal.c (check_stack_overflow): extract duplicated code and get rid of declaration-after-statement. [Bug #5014]

Revision 39356
Added by nobu (Nobuyoshi Nakada) over 6 years ago

signal.c: extract check_stack_overflow

  • signal.c (check_stack_overflow): extract duplicated code and get rid of declaration-after-statement. [Bug #5014]

Revision 39356
Added by nobu (Nobuyoshi Nakada) over 6 years ago

signal.c: extract check_stack_overflow

  • signal.c (check_stack_overflow): extract duplicated code and get rid of declaration-after-statement. [Bug #5014]

Revision c84a9acb
Added by ngoto (Naohisa Goto) over 6 years ago

  • signal.c (ruby_abort): fix typo in r39354 [Bug #5014]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 39382
Added by ngoto (Naohisa Goto) over 6 years ago

  • signal.c (ruby_abort): fix typo in r39354 [Bug #5014]

Revision 39382
Added by ngoto (Naohisa Goto) over 6 years ago

  • signal.c (ruby_abort): fix typo in r39354 [Bug #5014]

Revision 39382
Added by ngoto (Naohisa Goto) over 6 years ago

  • signal.c (ruby_abort): fix typo in r39354 [Bug #5014]

Revision 39382
Added by ngoto (Naohisa Goto) over 6 years ago

  • signal.c (ruby_abort): fix typo in r39354 [Bug #5014]

Revision 39382
Added by ngoto (Naohisa Goto) over 6 years ago

  • signal.c (ruby_abort): fix typo in r39354 [Bug #5014]

Revision 39382
Added by ngoto (Naohisa Goto) over 6 years ago

  • signal.c (ruby_abort): fix typo in r39354 [Bug #5014]

Revision 9913bbba
Added by nagachika (Tomoyuki Chikanaga) over 6 years ago

merge revision(s) 39354,39356,39382: [Backport #5014]

    * signal.c (sigsegv): avoid to use async signal unsafe functions
      when nested sigsegv is happen.
      [Bug #5014] [ruby-dev:44082]

    * signal.c (check_stack_overflow): extract duplicated code and get rid
      of declaration-after-statement.  [Bug #5014]

    * signal.c (ruby_abort): fix typo in r39354 [Bug #5014]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@39654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 3108dc4b
Added by usa (Usaku NAKAMURA) over 6 years ago

merge revision(s) 39354,39356,39382: [Backport #5014]

    * signal.c (sigsegv): avoid to use async signal unsafe functions
      when nested sigsegv is happen.
      [Bug #5014] [ruby-dev:44082]

    * signal.c (check_stack_overflow): extract duplicated code and get rid
      of declaration-after-statement.  [Bug #5014]

    * signal.c (ruby_abort): fix typo in r39354 [Bug #5014]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@40050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 40050
Added by usa (Usaku NAKAMURA) over 6 years ago

merge revision(s) 39354,39356,39382: [Backport #5014]

* signal.c (sigsegv): avoid to use async signal unsafe functions
  when nested sigsegv is happen.
  [Bug #5014] [ruby-dev:44082]

* signal.c (check_stack_overflow): extract duplicated code and get rid
  of declaration-after-statement.  [Bug #5014]

* signal.c (ruby_abort): fix typo in r39354 [Bug #5014]

History

Updated by kosaki (Motohiro KOSAKI) about 8 years ago

  • Priority changed from Normal to 3

Updated by naruse (Yui NARUSE) almost 8 years ago

  • Status changed from Open to Assigned
  • Assignee set to ngoto (Naohisa Goto)

Updated by ko1 (Koichi Sasada) over 6 years ago

  • Target version changed from 2.0.0 to 2.1.0

ごとうさん、こちらいかがでしょうか。

Updated by kosaki (Motohiro KOSAKI) over 6 years ago

  • Assignee changed from ngoto (Naohisa Goto) to kosaki (Motohiro KOSAKI)

これなんだっけ?
たぶん僕がパッチをつくってごとうさんにレビューしてもらうのが確実そう。
というわけで、アサインを変更します。変更方針へのアドバイスは歓迎します。

#6

Updated by kosaki (Motohiro KOSAKI) over 6 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r39354.
Motohiro, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • signal.c (sigsegv): avoid to use async signal unsafe functions when nested sigsegv is happen. [Bug #5014] [ruby-dev:44082]

Updated by ngoto (Naohisa Goto) over 6 years ago

r39382 にてtypoの修正をしました。Solarisでのコンパイルは通っています。
動作チェックはどうやればいいんでしょう?

Updated by kosaki (Motohiro KOSAKI) over 6 years ago

あああ、すいませんでした。
動作チェックはsegvハンドラに自分でバグを入れるしかないと思います。

#9

Updated by nagachika (Tomoyuki Chikanaga) over 6 years ago

  • Tracker changed from Bug to Backport
  • Project changed from Ruby master to Backport200
  • Category deleted (core)
  • Status changed from Closed to Assigned
  • Assignee changed from kosaki (Motohiro KOSAKI) to nagachika (Tomoyuki Chikanaga)
  • Target version deleted (2.1.0)
  • Parent task deleted (#5013)
#10

Updated by nagachika (Tomoyuki Chikanaga) over 6 years ago

  • Status changed from Assigned to Closed

This issue was solved with changeset r39654.
Motohiro, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


merge revision(s) 39354,39356,39382: [Backport #5014]

* signal.c (sigsegv): avoid to use async signal unsafe functions
  when nested sigsegv is happen.
  [Bug #5014] [ruby-dev:44082]

* signal.c (check_stack_overflow): extract duplicated code and get rid
  of declaration-after-statement.  [Bug #5014]

* signal.c (ruby_abort): fix typo in r39354 [Bug #5014]
#11

Updated by nagachika (Tomoyuki Chikanaga) over 6 years ago

  • Project changed from Backport200 to Backport193
  • Status changed from Closed to Assigned
  • Assignee changed from nagachika (Tomoyuki Chikanaga) to usa (Usaku NAKAMURA)

チケット作成時期的に 1.9.3 にも必要かと考え移動します。

#12

Updated by usa (Usaku NAKAMURA) over 6 years ago

  • Status changed from Assigned to Closed

This issue was solved with changeset r40050.
Motohiro, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


merge revision(s) 39354,39356,39382: [Backport #5014]

* signal.c (sigsegv): avoid to use async signal unsafe functions
  when nested sigsegv is happen.
  [Bug #5014] [ruby-dev:44082]

* signal.c (check_stack_overflow): extract duplicated code and get rid
  of declaration-after-statement.  [Bug #5014]

* signal.c (ruby_abort): fix typo in r39354 [Bug #5014]

Also available in: Atom PDF