Bug 64886 - net/nicotine does not start
Summary: net/nicotine does not start
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: Tilman Keskinoz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-29 10:40 UTC by Tim J. Robbins
Modified: 2004-04-16 11:19 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 Tim J. Robbins 2004-03-29 10:40:15 UTC
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

Fix: 

Not known.
How-To-Repeat: Install net/nicotine and try to run it.
Comment 1 Tilman Keskinoz freebsd_committer freebsd_triage 2004-03-29 16:33:06 UTC
State Changed
From-To: open->analyzed

Yes, this looks amd64 specific. I copied my working config files from my i386 
and I get the same error.
Comment 2 Tilman Keskinoz freebsd_committer freebsd_triage 2004-03-29 16:45:23 UTC
Responsible Changed
From-To: freebsd-ports-bugs->perky

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')
Comment 3 perky 2004-03-31 08:00:43 UTC
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
Comment 4 Tilman Keskinoz freebsd_committer freebsd_triage 2004-04-08 19:12:37 UTC
Responsible Changed
From-To: perky->arved

Grab back, as perky is right, it is not a python but a db41 isssue. 

I am working with the maintainer on a fix.
Comment 5 Tilman Keskinoz freebsd_committer freebsd_triage 2004-04-14 15:10:21 UTC
State Changed
From-To: analyzed->feedback

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.
Comment 6 Tilman Keskinoz freebsd_committer freebsd_triage 2004-04-16 11:18:50 UTC
State Changed
From-To: feedback->closed

Please update to the latest db41 and try again.  
nicotine seems to work here now.