* [ruby-core:103345] [Ruby master Bug#17791] Ractor exception when using Nokogiri
@ 2021-04-09 12:33 908709778
2021-04-10 0:40 ` [ruby-core:103361] " xtkoba+ruby
2021-04-10 3:51 ` [ruby-core:103363] " merch-redmine
0 siblings, 2 replies; 3+ messages in thread
From: 908709778 @ 2021-04-09 12:33 UTC (permalink / raw)
To: ruby-core
Issue #17791 has been reported by tomanderson (Thomas Ender).
----------------------------------------
Bug #17791: Ractor exception when using Nokogiri
https://bugs.ruby-lang.org/issues/17791
* Author: tomanderson (Thomas Ender)
* Status: Open
* Priority: Normal
* Backport: 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN
----------------------------------------
Parsing xml using nokogiri:
``` r
doc = Nokogiri.XML('<foo><bar /></foo>', nil, 'EUC-JP')
```
Suppose I want to parse 4 xmls with 4 ractors, it will raise an unsafe exception:
Ractor::UnsafeError: ractor unsafe method called from not main ractor
the ruby version is 3.0.1.
I wonder if there is any way to avoid this.
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* [ruby-core:103361] [Ruby master Bug#17791] Ractor exception when using Nokogiri
2021-04-09 12:33 [ruby-core:103345] [Ruby master Bug#17791] Ractor exception when using Nokogiri 908709778
@ 2021-04-10 0:40 ` xtkoba+ruby
2021-04-10 3:51 ` [ruby-core:103363] " merch-redmine
1 sibling, 0 replies; 3+ messages in thread
From: xtkoba+ruby @ 2021-04-10 0:40 UTC (permalink / raw)
To: ruby-core
Issue #17791 has been updated by xtkoba (Tee KOBAYASHI).
This is because a function (`read_memory`) in a C extension (`nokogiri.so`) is called which is not marked as ractor-safe (see Feature #17307).
A workaround would be to mark it so, although I don't know if it is truly ractor-safe.
----------------------------------------
Bug #17791: Ractor exception when using Nokogiri
https://bugs.ruby-lang.org/issues/17791#change-91452
* Author: tomanderson (Thomas Ender)
* Status: Open
* Priority: Normal
* Backport: 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN
----------------------------------------
Parsing xml using nokogiri:
``` r
doc = Nokogiri.XML('<foo><bar /></foo>', nil, 'EUC-JP')
```
Suppose I want to parse 4 xmls with 4 ractors, it will raise an unsafe exception:
Ractor::UnsafeError: ractor unsafe method called from not main ractor
the ruby version is 3.0.1.
I wonder if there is any way to avoid this.
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* [ruby-core:103363] [Ruby master Bug#17791] Ractor exception when using Nokogiri
2021-04-09 12:33 [ruby-core:103345] [Ruby master Bug#17791] Ractor exception when using Nokogiri 908709778
2021-04-10 0:40 ` [ruby-core:103361] " xtkoba+ruby
@ 2021-04-10 3:51 ` merch-redmine
1 sibling, 0 replies; 3+ messages in thread
From: merch-redmine @ 2021-04-10 3:51 UTC (permalink / raw)
To: ruby-core
Issue #17791 has been updated by jeremyevans0 (Jeremy Evans).
Status changed from Open to Rejected
Based on @xtkoba's analysis, closing as this doesn't appear to be a bug in Ruby.
----------------------------------------
Bug #17791: Ractor exception when using Nokogiri
https://bugs.ruby-lang.org/issues/17791#change-91454
* Author: tomanderson (Thomas Ender)
* Status: Rejected
* Priority: Normal
* Backport: 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN
----------------------------------------
Parsing xml using nokogiri:
``` r
doc = Nokogiri.XML('<foo><bar /></foo>', nil, 'EUC-JP')
```
Suppose I want to parse 4 xmls with 4 ractors, it will raise an unsafe exception:
Ractor::UnsafeError: ractor unsafe method called from not main ractor
the ruby version is 3.0.1.
I wonder if there is any way to avoid this.
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-04-10 3:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-09 12:33 [ruby-core:103345] [Ruby master Bug#17791] Ractor exception when using Nokogiri 908709778
2021-04-10 0:40 ` [ruby-core:103361] " xtkoba+ruby
2021-04-10 3:51 ` [ruby-core:103363] " merch-redmine
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).