From tim@robbins.dropbear.id.au  Mon Mar 29 01:38:12 2004
Return-Path: <tim@robbins.dropbear.id.au>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 6BF6016A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 29 Mar 2004 01:38:12 -0800 (PST)
Received: from smtp02.syd.iprimus.net.au (smtp02.syd.iprimus.net.au [210.50.76.52])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 3496043D1D
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 29 Mar 2004 01:38:12 -0800 (PST)
	(envelope-from tim@robbins.dropbear.id.au)
Received: from robbins.dropbear.id.au (210.50.81.142) by smtp02.syd.iprimus.net.au (7.0.024)
        id 402CF87000ECDCBC for FreeBSD-gnats-submit@freebsd.org; Mon, 29 Mar 2004 19:38:11 +1000
Received: by robbins.dropbear.id.au (Postfix, from userid 1000)
	id CA19B41BA; Mon, 29 Mar 2004 19:39:45 +1000 (EST)
Message-Id: <20040329093945.CA19B41BA@robbins.dropbear.id.au>
Date: Mon, 29 Mar 2004 19:39:45 +1000 (EST)
From: Tim Robbins <tim@robbins.dropbear.id.au>
Reply-To: Tim Robbins <tim@robbins.dropbear.id.au>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: net/nicotine does not start
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         64886
>Category:       ports
>Synopsis:       net/nicotine does not start
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    arved
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar 29 01:40:15 PST 2004
>Closed-Date:    Fri Apr 16 03:19:34 PDT 2004
>Last-Modified:  Fri Apr 16 03:19:34 PDT 2004
>Originator:     Tim Robbins
>Release:        FreeBSD 5.2-tjr amd64
>Organization:
The FreeBSD Project
>Environment:
System: FreeBSD 5.2-tjr amd64

>Description:
net/nicotine does not start properly on -current/amd64; I don't know whether
this problem is amd64 specific.

$ nicotine
Nicotine supports "psyco", an inline optimizer for python
code, you can get it at http://sourceforge.net/projects/psyco/
You do not have Python Vorbis bindings installed.
Others will not be able to see the lengths and the bitrates
of Ogg Vorbis files that you share. You can get the from
http://www.andrewchatham.com/pyogg/.
If you're using Debian, install the python-pyvorbis package.

Nicotine supports a country code blocker but that
requires a (GPL'ed) library called GeoIP. You can find it here:
C library:       http://www.maxmind.com/app/c
Python bindings: http://www.maxmind.com/app/python
(the python bindings require the C library)

Shared files database seems to be corrupted, rescan your shares
Exception exceptions.AttributeError: "DbfilenameShelf instance has no attribute 'writeback'" in  ignored
Traceback (most recent call last):
  File "/usr/local/bin/nicotine", line 146, in ?
    app = frame.MainApp(config)
  File "/usr/local/lib/python2.3/site-packages/pynicotine/gtkgui/frame.py", line 933, in __init__
    self.frame = testwin(config)
  File "/usr/local/lib/python2.3/site-packages/pynicotine/gtkgui/frame.py", line 166, in __init__
    self.np = NetworkEventProcessor(self, self.callback, self.logMessage, self.SetStatusText, config)
  File "/usr/local/lib/python2.3/site-packages/pynicotine/pynicotine.py", line 65, in __init__
    self.config.readConfig()
  File "/usr/local/lib/python2.3/site-packages/pynicotine/config.py", line 149, in readConfig
    sharedfiles = shelve.open(self.filename+".files.db",flag='n')
  File "/usr/local/lib/python2.3/shelve.py", line 231, in open
    return DbfilenameShelf(filename, flag, protocol, writeback, binary)
  File "/usr/local/lib/python2.3/shelve.py", line 212, in __init__
    Shelf.__init__(self, anydbm.open(filename, flag), protocol, writeback, binary)
  File "/usr/local/lib/python2.3/anydbm.py", line 83, in open
    return mod.open(file, flag, mode)
  File "/usr/local/lib/python2.3/dbhash.py", line 16, in open
    return bsddb.hashopen(file, flag, mode)
  File "/usr/local/lib/python2.3/bsddb/__init__.py", line 192, in hashopen
    d.open(file, db.DB_HASH, flags, mode)
bsddb._db.DBInvalidArgError: (22, 'Invalid argument -- DB_ENV->dbremove: method not permitted before open')
Exception exceptions.AttributeError: "DbfilenameShelf instance has no attribute 'writeback'" in  ignored

>How-To-Repeat:
Install net/nicotine and try to run it.
>Fix:
Not known.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->analyzed 
State-Changed-By: arved 
State-Changed-When: Mon Mar 29 07:33:06 PST 2004 
State-Changed-Why:  
Yes, this looks amd64 specific. I copied my working config files from my i386 
and I get the same error. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=64886 
Responsible-Changed-From-To: freebsd-ports-bugs->perky 
Responsible-Changed-By: arved 
Responsible-Changed-When: Mon Mar 29 07:45:23 PST 2004 
Responsible-Changed-Why:  
Something is wrong with the bsddb python module.  

perky, can you look at this? 

% cat bdbtest 
import bsddb 
x = bsddb.hashopen("bsddb.test") 
x["one"] = "1" 
print x 
x.close() 
x = bsddb.hashopen("bsddb.test") 
print x 

% python bdbtest 
Traceback (most recent call last): 
File "bdbtest", line 2, in ? 
x = bsddb.hashopen("bsddb.test") 
File "/usr/local/lib/python2.3/bsddb/__init__.py", line 192, in hashopen 
d.open(file, db.DB_HASH, flags, mode) 
bsddb._db.DBInvalidArgError: (22, 'Invalid argument -- architecture lacks fast mutexes: applications cannot be threaded') 


http://www.freebsd.org/cgi/query-pr.cgi?pr=64886 

From: Hye-Shik Chang <perky@i18n.org>
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: ports/64886: net/nicotine does not start
Date: Wed, 31 Mar 2004 16:00:43 +0900

 On Mon, Mar 29, 2004 at 07:52:17AM -0800, Tilman Linneweh wrote:
 [snip]
 >   File "/usr/local/lib/python2.3/bsddb/__init__.py", line 192, in hashopen
 >     d.open(file, db.DB_HASH, flags, mode)
 > bsddb._db.DBInvalidArgError: (22, 'Invalid argument -- architecture lacks fast mutexes: applications cannot be threaded')
 > 
 
 The origin of this problem is db41's mutex detection.
 
 On i386:
 
 % grep db_cv_mutex build_unix/config.log
 db_cv_mutex=x86/gcc-assembly
 % grep HAVE_MUTEX_THREADS build_unix/db_config.h
 #define HAVE_MUTEX_THREADS 1
 
 But, on amd64:
 
 % grep db_cv_mutex build_unix/config.log
 db_cv_mutex=UNIX/fcntl
 % grep HAVE_MUTEX_THREADS build_unix/db_config.h
 /* #undef HAVE_MUTEX_THREADS */
 
 So we can't let DB_ENV_THREADS flag on and Python should be built
 with WITHOUT_THREADS=yes to support bsddb enough on amd64.
 
 Or, fixing db41 port would be better than that. :)
 
 
 Hye-Shik
Responsible-Changed-From-To: perky->arved 
Responsible-Changed-By: arved 
Responsible-Changed-When: Thu Apr 8 11:12:37 PDT 2004 
Responsible-Changed-Why:  
Grab back, as perky is right, it is not a python but a db41 isssue. 

I am working with the maintainer on a fix. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=64886 
State-Changed-From-To: analyzed->feedback 
State-Changed-By: arved 
State-Changed-When: Wed Apr 14 07:10:21 PDT 2004 
State-Changed-Why:  
Adding --with-mutex=x86/gcc-assembly for db41 seems to fix this problem. 

I am currently waiting for freedback from the maintainer regarding the 
possible impact. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=64886 
State-Changed-From-To: feedback->closed 
State-Changed-By: arved 
State-Changed-When: Fri Apr 16 03:18:50 PDT 2004 
State-Changed-Why:  
Please update to the latest db41 and try again.  
nicotine seems to work here now. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=64886 
>Unformatted:
