[#60404] is RB_GC_GUARD needed in rb_io_syswrite? — Eric Wong <normalperson@...>
I haven't gotten it to crash as-is, but it seems like we need to
4 messages
2014/02/01
[#60682] volatile usages — Eric Wong <normalperson@...>
Hi all, I went ahead and removed some use of volatile which were once
5 messages
2014/02/13
[#60794] [RFC] rearrange+pack vtm and time_object structs — Eric Wong <normalperson@...>
Extracted from addendum on top of Feature #9362 (cache-aligned objects).
4 messages
2014/02/16
[#61139] [ruby-trunk - Feature #9577] [Open] [PATCH] benchmark/driver.rb: align columns in text output — normalperson@...
Issue #9577 has been reported by Eric Wong.
3 messages
2014/02/28
[ruby-core:60671] Re: [ruby-trunk - Bug #9514] [Open] Huge query crash ruby core
From:
Eric Wong <normalperson@...>
Date:
2014-02-12 21:16:34 UTC
List:
ruby-core #60671
waghanza@gmail.com wrote:
> I have made a query on a [[http://teradata.com|terradata]] server using https://github.com/priviterag/teradata-cli
> <pre> /usr/local/share/gems/gems/teradata-cli-0.0.12/lib/teradata-cli/connection.rb:1055:
> [BUG] object allocation during garbage collection phase
It is likely the following in ext/teradata-cli/cli/cli.c:
static void
cli_free(struct rb_cli *p)
{
if (p->logging_on) {
logoff(p, Qtrue);
}
}
Maybe if disabling logging will avoid calling the logoff function,
you won't hit the [BUG].
The logoff function is not safe to call inside the GC free phase
since it uses rb_raise:
static void
logoff(struct rb_cli *p, VALUE force)
{
Int32 status;
char dummy[4] = {0, 0, 0, 0};
p->dbcarea.func = DBFDSC;
DBCHCL(&status, dummy, &p->dbcarea);
if (!force && status != EM_OK) {
rb_raise(CLIError, "CLI error: [%s] %s",
status_name(status), p->dbcarea.msg_text);
}
p->logging_on = Qfalse;
}
I do not know the non-Ruby API at all, so DBCHCL/DBFDSC macros /may/
not be safe, either.
Can you contact the teradata-cli authors and forward this to them?
I don't know anything about teradata-cli and do not have time to test.
> 0 enumerator.so
> 1 /usr/lib64/ruby/enc/encdb.so
> 2 /usr/lib64/ruby/enc/trans/transdb.so
> 27 /usr/lib64/ruby/date_core.so
> 30 /usr/lib64/ruby/stringio.so
> 33 /usr/lib64/ruby/vendor_ruby/psych.so
> 44 /usr/lib64/ruby/strscan.so
> 72 /usr/local/lib64/gems/ruby/teradata-cli-0.0.12/teradata-cli/cli.so
> 79 /usr/lib64/ruby/enc/utf_16le.so
> 80 /usr/lib64/ruby/enc/utf_16be.so</pre>
The rest of the C extensions you have look to be in the standard distro,
so teradata-cli/cli.so was the most likely candidate to look for bugs
in.