Opened 5 years ago

Closed 4 years ago

# Login fails with database exception

Reported by: Owned by: lukem@… Steffen Hoffmann normal AccountManagerPlugin critical needinfo IntegrityError 0.12

### Description

Installing a new trac instance from scratch on a windows 7 x64 box. Have installed, in sequence, the following. Anything with ez prefix was installed using easy_install

• Python 2.7 x64
• easy install 0.6c11
• ez Genshi 0.6
• ez docutils 0.9.1
• ez pygments 1.5
• ez babel 0.9.5
• ez trac 12.3

Creation of a user using the registration module appears to work. No errors are shown and a line appears in the trac.htpasswd file

When trying to login the following error message occurs

Traceback (most recent call last):
File "build\bdist.win-amd64\egg\trac\web\api.py", line 441, in send_error
data, 'text/html')
File "build\bdist.win-amd64\egg\trac\web\chrome.py", line 825, in render_template
message = req.session.pop('chrome.%s.%d' % (type_, i))
File "build\bdist.win-amd64\egg\trac\web\api.py", line 216, in __getattr__
value = self.callbacks[name](self)
File "build\bdist.win-amd64\egg\trac\web\main.py", line 306, in _get_session
return Session(self.env, req)
File "build\bdist.win-amd64\egg\trac\web\session.py", line 211, in __init__
self.promote_session(sid)
File "build\bdist.win-amd64\egg\trac\web\session.py", line 270, in promote_session
@self.env.with_transaction()
File "build\bdist.win-amd64\egg\trac\db\api.py", line 77, in transaction_wrapper
fn(ldb)
File "build\bdist.win-amd64\egg\trac\web\session.py", line 302, in update_session_id
""", (self.req.authname, sid))
File "build\bdist.win-amd64\egg\trac\db\util.py", line 65, in execute
return self.cursor.execute(sql_escape_percent(sql), args)
File "build\bdist.win-amd64\egg\trac\db\sqlite_backend.py", line 78, in execute
result = PyFormatCursor.execute(self, *args)
File "build\bdist.win-amd64\egg\trac\db\sqlite_backend.py", line 56, in execute
args or [])
File "build\bdist.win-amd64\egg\trac\db\sqlite_backend.py", line 48, in _rollback_on_error
return function(self, *args, **kwargs)
IntegrityError: columns sid, authenticated, name are not unique


Config settings - taken from cookbook. Have disabled EmailVerificationModule as email not setup yet.

[components]
acct_mgr.api.* = enabled
acct_mgr.db.sessionstore = enabled
acct_mgr.htfile.htdigeststore = disabled
acct_mgr.htfile.htpasswdstore = enabled
acct_mgr.http.httpauthstore = disabled
acct_mgr.pwhash.htdigesthashmethod = disabled
acct_mgr.pwhash.htpasswdhashmethod = disabled
acct_mgr.svnserve.* = enabled
acct_mgr.web_ui.* = enabled
acct_mgr.web_ui.EmailVerificationModule = disabled
acct_mgr.web_ui.RegistrationModule = enabled

[account-manager]
htpasswd_hash_type = md5


Serving trac via batchfile

tracd --port 8000 C:\trac_projects\ctrack


### comment:1 follow-up:  2 Changed 5 years ago by lukem@…

Error



### comment:2 in reply to:  1 ; follow-up:  5 Changed 5 years ago by Steffen Hoffmann

Is this a Trac Error, or why is this a problem? AccountManager's login form is supposed to give visual feedback on login failure.

### comment:3 Changed 5 years ago by Steffen Hoffmann

Related tickets are #9252 and #9843, but the IntegrityError is definitely new here.

Sorry, this is pending for too long now, I know. I'll try to fix it ASAP.

### comment:4 follow-up:  6 Changed 5 years ago by lukem@…

Initially I believed this to be a problem with AccountManagerPlugin. However, I have since wiped the install and gone from scratch again, using Python 2.7 32bit. Everything worked fine. Something in Trac is not happy when running on x64

### comment:5 in reply to:  2 Changed 5 years ago by anonymous

Is this a Trac Error, or why is this a problem? AccountManager's login form is supposed to give visual feedback on login failure.

### comment:6 in reply to:  4 Changed 4 years ago by Steffen Hoffmann

Initially I believed this to be a problem with AccountManagerPlugin. However, I have since wiped the install and gone from scratch again, using Python 2.7 32bit. Everything worked fine. Something in Trac is not happy when running on x64

So I assume, that we can mark this ticket as resolved, or do you suggest any more action within the AcctMgr code? Since I don't plan/see the need to do something about it, I encourage you to close it yourself, if you agree.

### comment:7 follow-up:  8 Changed 4 years ago by lukem@…

Resolution: → wontfix new → closed

Works on 32bit python, fails on 64bit python. Closing as wontfix as Hasienda doesn't see the need to do something about it.

### comment:8 in reply to:  7 ; follow-up:  9 Changed 4 years ago by Steffen Hoffmann

Works on 32bit python, fails on 64bit python. Closing as wontfix as Hasienda doesn't see the need to do something about it.

Not exactly my words. 64bit is the future, so it would be unwise to ignore. I just meant to not see, how to fix within AcctMgr code. The error was detected during action on Trac db table session, but no real proof given, if this originated from acct_mgr.web_ui.LoginModule or in trac.auth.LoginModule, that AcctMgr code is wrapped around.

### comment:9 in reply to:  8 Changed 4 years ago by lukem@…

Since I don't plan/see the need to do something about it, I encourage you to close it yourself, if you agree.

Works on 32bit python, fails on 64bit python. Closing as wontfix as Hasienda doesn't see the need to do something about it.

Not exactly my words. 64bit is the future, so it would be unwise to ignore. I just meant to not see, how to fix within AcctMgr code. The error was detected during action on Trac db table session, but no real proof given, if this originated from acct_mgr.web_ui.LoginModule or in trac.auth.LoginModule, that AcctMgr code is wrapped around

I closed it as you said you "don't plan/see the need to do something about it". I took that to mean wontfix. I logged it with a full explanation of what was installed, in order, on what flavour of OS, with a log and example config. Plenty to reproduce the issue. If you need "real" proof, please explain how to get it. I'm a poor programmer, average scripter with very little python knowledge, using Trac as a wiki/help desk ticketing system.

.

### Modify Ticket

Action
as closed The owner will remain Steffen Hoffmann.
The resolution will be deleted. Next status will be 'reopened'.