Bug 154210 - ports-mgmt/portupgrade 2.4.8_1,2: cross-thread violation on rb_gc()
Summary: ports-mgmt/portupgrade 2.4.8_1,2: cross-thread violation on rb_gc()
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Steve Wills
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-21 19:10 UTC by Garry
Modified: 2012-07-24 02:10 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Garry 2011-01-21 19:10:06 UTC
After using "portupgrade -a", ruby was updated to 'ruby-1.8.7.302,1'. This caused an error then I lauched portupgrade again:

** Stale lock file was found. Removed.
/usr/local/lib/ruby/site_ruby/1.8/pkginfo.rb:1: [BUG] cross-thread violation on rb_gc()
ruby 1.8.7 (2010-08-16 patchlevel 302) [i386-freebsd7]

Abort trap: 6 (core dumped)
 
After updating portupgrade to version portupgrade-2.4.8_1,2 manually via /usr/ports an error changed to:

** Stale lock file was found. Removed.
/usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:782: [BUG] cross-thread violation on rb_gc()
ruby 1.8.7 (2010-08-16 patchlevel 302) [i386-freebsd7]

Abort trap: 6 (core dumped)

How-To-Repeat: Upgrade ruby to version ruby-1.8.7.302,1
Upgrade portupgrade to version portupgrade-2.4.8_1,2
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2011-01-21 20:27:52 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ruby

Fix synopsis and assign.
Comment 2 Royce Williams 2011-06-28 22:21:42 UTC
From my non-developer research, this appears to be one of the possible
outcomes of upgrading ruby with portupgrade.

Since the problem renders portupgrade unusable, you can treat the
symptom by manually reinstall ruby\*-bdb:

cd /usr/ports/databases/ruby-bdb
make clean
make deinstall
make reinstall

For some background information, see:

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/188996
Comment 3 Steve Wills freebsd_committer freebsd_triage 2011-08-21 21:39:12 UTC
Responsible Changed
From-To: ruby->swills

I'll take it.
Comment 4 Steve Wills freebsd_committer freebsd_triage 2011-08-21 21:42:18 UTC
State Changed
From-To: open->closed

Suspect the research on cross-thread violation on rb_gc is correct. 
Regardless, the issue is that upgrading ruby without upgrading or 
reinstalling ruby-bdb is going to cause breakage. Correct solution would 
be to portupgrade -aR. This would happen with other packages where 
dependents aren't updated. Not a bug in portupgrade, so closing the bug 
for now. If you have further issues, please open a new PR.
Comment 5 Richard Brooksby 2012-07-23 13:55:48 UTC
I got exactly this problem using

  portupgrade --batch -RrP portupgrade

I solved it by manually reinstalling ruby-bdb as described above.  But =
my experience suggests that swills is incorrect that -R fixes the =
problem.=
Comment 6 Bryan Drewery 2012-07-24 02:05:35 UTC
Hi,

I'm currently maintaining portupgrade.

Recent versions gracefully handle errors when reading the DB, which
creep up during upgrading of ruby or ruby-bdb.

However, I've never ran across the mentioned issue and agree with swills
that ruby-bdb was likely not upgraded yet.

I've been testing quite a bit upgrading ruby / portupgrade,
reinstalling, etc, for the past months. I have yet to run into an issue
like this.

Either way, this is a ruby crash, not really a portupgrade problem, or
really solvable by portupgrade.

Regards,
Bryan Drewery