Edgewall Software
Modify

Opened 14 years ago

Closed 3 years ago

#10129 closed defect (wontfix)

TypeError: argument number 2:

Reported by: ijy04 Owned by:
Priority: normal Milestone:
Component: general Version: 0.12.2
Severity: normal Keywords: svn16 verify
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

please help me.

Tell me how to solve.

How to Reproduce

While doing a GET operation on /browser, Trac issued an internal error.

(please provide additional details here)

Request parameters:

{'path': '/'}

User agent: Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0

System Information

Trac 0.12.2
Babel 0.9.5
Genshi 0.6
mod_python 3.3.1
pysqlite 2.6.3
Python 2.5.5 (r255:77872, May 13 2010, 22:27:01)
[GCC 4.2.3]
setuptools 0.6c11
SQLite 3.7.3
Subversion 1.6.15 (r1038135)
jQuery 1.4.2

Enabled Plugins

Python Traceback

Traceback (most recent call last):
  File "build/bdist.linux-armv5tel/egg/trac/web/main.py", line 511, in _dispatch_request
    dispatcher.dispatch(req)
  File "build/bdist.linux-armv5tel/egg/trac/web/main.py", line 237, in dispatch
    resp = chosen_handler.process_request(req)
  File "build/bdist.linux-armv5tel/egg/trac/versioncontrol/web_ui/browser.py", line 371, in process_request
    node = get_existing_node(req, repos, path, rev_or_latest)
  File "build/bdist.linux-armv5tel/egg/trac/versioncontrol/web_ui/util.py", line 64, in get_existing_node
    return repos.get_node(path, rev)
  File "build/bdist.linux-armv5tel/egg/trac/versioncontrol/cache.py", line 304, in get_node
    return self.repos.get_node(path, self.normalize_rev(rev))
  File "build/bdist.linux-armv5tel/egg/trac/versioncontrol/svn_fs.py", line 454, in get_node
    return SubversionNode(path, rev, self, self.pool)
  File "build/bdist.linux-armv5tel/egg/trac/versioncontrol/svn_fs.py", line 687, in __init__
    self.root = fs.revision_root(self.fs_ptr, rev, pool)
  File "/volume1/@optware/lib/python2.5/site-packages/libsvn/fs.py", line 244, in svn_fs_revision_root
    return apply(_fs.svn_fs_revision_root, args)
TypeError: argument number 2: 

Attachments (0)

Change History (11)

comment:1 by Christian Boos, 14 years ago

Keywords: svn16 verify added

Can you please provide us with more details?

  • the path to the repository
  • the nature of the filesystem on that path
  • maybe also the kind of repository (fsfs or bdb)

in reply to:  1 comment:2 by ijy04, 14 years ago

cat /proc/version Linux version 2.6.32.12 (root@build19) (gcc version 4.2.1) #1594 Fri Feb 25 19:01:38 CST 2011

svn repository path

/volume1/svn/test

trac path

/volume1/trac/test

trac.ini

# -*- coding: utf-8 -*-

[attachment]
max_size = 262144
render_unsafe_content = false

[browser]
color_scale = True
downloadable_paths = /trunk, /branches/*, /tags/*
hide_properties = svk:merge
intermediate_color =
intermediate_point =
newest_color = (255, 136, 136)
oldest_color = (136, 136, 255)
oneliner_properties = trac:summary
render_unsafe_content = false
wiki_properties = trac:description

[changeset]
max_diff_bytes = 10000000
max_diff_files = 0
wiki_format_messages = true

[header_logo]
alt = (please configure the [header_logo] section in trac.ini)
height = -1
link =
src = site/your_project_logo.png
width = -1

[inherit]
plugins_dir =
templates_dir =

[logging]
log_file = trac.log
# log_format = <inherited>
log_level = DEBUG
log_type = none

[milestone]
stats_provider = DefaultTicketGroupStatsProvider

[mimeviewer]
max_preview_size = 262144
mime_map = text/x-dylan:dylan,text/x-idl:ice,text/x-ada:ads:adb
tab_width = 8
treat_as_binary = application/octet-stream,application/pdf,application/postscript,application/msword,application/rtf,

[notification]
admit_domains =
always_notify_owner = false
always_notify_reporter = false
always_notify_updater = true
ambiguous_char_width = single
email_sender = SmtpEmailSender
ignore_domains =
mime_encoding = none
sendmail_path = sendmail
smtp_always_bcc =
smtp_always_cc =
smtp_default_domain =
smtp_enabled = false
smtp_from = trac@localhost
smtp_from_name =
smtp_password =
smtp_port = 25
smtp_replyto = trac@localhost
smtp_server = localhost
smtp_subject_prefix = __default__
smtp_user =
ticket_subject_template = $prefix #$ticket.id: $summary
use_public_cc = false
use_short_addr = false
use_tls = false

[project]
admin =
admin_trac_url = .
descr = My example project
footer = Visit the Trac open source project at<br /><a href="http://trac.edgewall.org/">http://trac.edgewall.org/</a>
icon = common/trac.ico
name = test
url =

[query]
default_anonymous_query = status!=closed&cc~=$USER
default_query = status!=closed&owner=$USER
items_per_page = 100
ticketlink_query = ?status=!closed

[report]
items_per_page = 100
items_per_page_rss = 0

[revisionlog]
default_log_limit = 100

[roadmap]
stats_provider = DefaultTicketGroupStatsProvider

[search]
# default_disabled_filters = <inherited>
min_query_length = 3

[sqlite]
# extensions = <inherited>

[svn]
branches = trunk,branches/*
tags = tags/*

[ticket]
default_cc =
default_component =
default_description =
default_keywords =
default_milestone =
default_owner =
default_priority = major
default_resolution = fixed
default_severity =
default_summary =
default_type = defect
default_version =
max_comment_size = 262144
max_description_size = 262144
preserve_newlines = default
restrict_owner = false
workflow = ConfigurableTicketWorkflow

[ticket-workflow]
accept = new,assigned,accepted,reopened -> accepted
accept.operations = set_owner_to_self
accept.permissions = TICKET_MODIFY
leave = * -> *
leave.default = 1
leave.operations = leave_status
reassign = new,assigned,accepted,reopened -> assigned
reassign.operations = set_owner
reassign.permissions = TICKET_MODIFY
reopen = closed -> reopened
reopen.operations = del_resolution
reopen.permissions = TICKET_CREATE
resolve = new,assigned,accepted,reopened -> closed
resolve.operations = set_resolution
resolve.permissions = TICKET_MODIFY

[timeline]
abbreviated_messages = True
changeset_collapse_events = false
changeset_long_messages = false
changeset_show_files = 0
default_daysback = 30
max_daysback = 90
newticket_formatter = oneliner
ticket_show_details = false

[trac]
auth_cookie_lifetime = 0
auth_cookie_path =
authz_file =
authz_module_name =
auto_preview_timeout = 2.0
auto_reload = False
backup_dir = db
base_url =
check_auth_ip = false
database = sqlite:db/trac.db
debug_sql = False
default_charset = utf-8
genshi_cache_size = 128
htdocs_location =
ignore_auth_case = false
mainnav = wiki,timeline,roadmap,browser,tickets,newticket,search
metanav = login,logout,prefs,help,about
mysqldump_path = mysqldump
never_obfuscate_mailto = false
permission_policies = DefaultPermissionPolicy, LegacyAttachmentPolicy
permission_store = DefaultPermissionStore
pg_dump_path = pg_dump
repository_dir =  /volume1/svn/test
repository_sync_per_request =
repository_type = svn
resizable_textareas = true
secure_cookies = False
show_email_addresses = false
show_ip_addresses = false
timeout = 20
use_base_url_for_redirect = False

[versioncontrol]
allowed_repository_dir_prefixes =

[wiki]
ignore_missing_pages = false
max_size = 262144
render_unsafe_content = false
safe_schemes = cvs,file,ftp,git,irc,http,https,news,sftp,smb,ssh,svn,svn+ssh
split_page_names = false

in httpd.conf file

<Location /trac>
   SetHandler mod_python
   PythonInterpreter main_interpreter
   PythonHandler trac.web.modpython_frontend
   SetEnv PYTHON_EGG_CACHE /opt/tmp/trac-eggs
   PythonOption TracEnvParentDir /volume1/trac
   #PythonOption TracEnv /opt/share/trac
   PythonOption TracUriRoot /trac
   Order allow,deny
   Allow from all
</Location>

<LocationMatch "/trac/[^/]+/login">
   AuthType Basic
   AuthName "Trac"
   AuthUserFile /opt/share/svn/svn-auth-file
   Require valid-user
</LocationMatch>

Replying to cboos:

Can you please provide us with more details?

  • the path to the repository
  • the nature of the filesystem on that path
  • maybe also the kind of repository (fsfs or bdb)

comment:3 by Christian Boos, 14 years ago

What does svnlook youngest /volume1/svn/test say?

in reply to:  3 comment:4 by ijy04, 14 years ago

svnlook youngest /volume1/svn/test
7
svnlook tree /volume1/svn/test
/
 trunk/
  asd/
  gmarketicon.gif
 branches/
 tags/
svnlook date /volume1/svn/test
2011-04-11 22:15:45 +0900 (Mon, 11 Apr 2011)
svnlook info /volume1/svn/test
deviak
2011-04-11 22:15:45 +0900 (Mon, 11 Apr 2011)
0

Replying to cboos:

What does svnlook youngest /volume1/svn/test say?

comment:5 by Christian Boos, 14 years ago

Ok, so I verified that there's nothing special with svn 1.6.15, and on your side it seems that svn alone is able to use that repository. I assume svnlook --version gives you 1.6.15 and that this corresponds to the same libraries also used by Trac via the svn bindings for Python.

Could you please try the script check_svn_repos.py from ticket #2620? It exercises the svn API in a minimal way, but also depends on the Trac API for the Pool object… The svn calls should however be able to work without that pool object.

So if the problem can be reproduced with that script, can you then try again with the following change:

  • check_svn_repos.py

    old new  
    2121
    2222    def check(self, rev):
    2323        pool = Pool(self.pool)
    24         root = fs.revision_root(self.fs_ptr, rev, pool())
     24        root = fs.revision_root(self.fs_ptr, rev)
    2525        editor = repos.RevisionChangeCollector(self.fs_ptr, rev, pool())
    2626        e_ptr, e_baton = delta.make_editor(editor, pool())
    2727        repos.svn_repos_replay(root, e_ptr, e_baton, pool())

comment:6 by Carsten Klein <carsten.klein@…>, 13 years ago

Trying to analyze this bug but I have stumbled upon the following construct in versioncontrol.api:

841	    def get_oldest_rev(self):
842	        """Return the oldest revision stored in the repository."""
843	        raise NotImplementedError
844	    oldest_rev = property(lambda x: x.get_oldest_rev())
845	
846	    def get_youngest_rev(self):
847	        """Return the youngest revision in the repository."""
848	        raise NotImplementedError
849	    youngest_rev = property(lambda x: x.get_youngest_rev())

Should it not rather be

...
oldest_rev = property(lambda self: self.get_oldest_rev())
...
youngest_rev = property(lambda self: self.get_youngest_rev())

to make it more clear that it accesses self?

comment:7 by Remy Blank, 13 years ago

Cosmetic, but clearer, yes. Fixed in [10719].

comment:8 by anonymous, 13 years ago

Hello,

I don't think the issue is fixed by applying the cosmetic changes. I am running Trac 0.12.1 with svn 1.6.17 on a QNAP NAS and I am getting the same error when doing a "trac-admin $ENV repository resync myRepos".

The error occurs in fs.py of libsvn, but in my case in line 729, not line 244 as in the orginal post. I assume that is because I am using trac-admin and not access the repository via web interface.

I manually applied the changed described in [10719] , but this didn't help. You described those changes as being cosmetic anyway. So how can the issue be fixed?

Please let me know which further information you need to better analyze the issue.

2011-12-31 18:44:59,060 Trac[console] ERROR: Exception in trac-admin command: 
Traceback (most recent call last):
  File "/opt/lib/python2.5/site-packages/trac/admin/console.py", line 107, in onecmd
    rv = cmd.Cmd.onecmd(self, line) or 0
  File "/opt/lib/python2.5/cmd.py", line 218, in onecmd
    return self.default(line)
  File "/opt/lib/python2.5/site-packages/trac/admin/console.py", line 266, in default
    return cmd_mgr.execute_command(*args)
  File "/opt/lib/python2.5/site-packages/trac/admin/api.py", line 123, in execute_command
    return f(*fargs)
  File "/opt/lib/python2.5/site-packages/trac/versioncontrol/admin.py", line 153, in _do_resync
    self._sync(reponame, rev, clean=True)
  File "/opt/lib/python2.5/site-packages/trac/versioncontrol/admin.py", line 139, in _sync
    repos.sync(self._sync_feedback, clean=clean)
  File "/opt/lib/python2.5/site-packages/trac/versioncontrol/cache.py", line 240, in sync
    @self.env.with_transaction()
  File "/opt/lib/python2.5/site-packages/trac/db/api.py", line 77, in transaction_wrapper
    fn(ldb)
  File "/opt/lib/python2.5/site-packages/trac/versioncontrol/cache.py", line 247, in do_transaction
    cset = self.repos.get_changeset(next_youngest)
  File "/opt/lib/python2.5/site-packages/trac/versioncontrol/svn_fs.py", line 442, in get_changeset
    return SubversionChangeset(self, rev, self.scope, self.pool)
  File "/opt/lib/python2.5/site-packages/trac/versioncontrol/svn_fs.py", line 856, in __init__
    message = self._get_prop(core.SVN_PROP_REVISION_LOG)
  File "/opt/lib/python2.5/site-packages/trac/versioncontrol/svn_fs.py", line 968, in _get_prop
    return fs.revision_prop(self.fs_ptr, self.rev, name, self.pool())
  File "/opt/lib/svn-python/libsvn/fs.py", line 729, in svn_fs_revision_prop
    return apply(_fs.svn_fs_revision_prop, args)
TypeError: argument number 2: 

comment:9 by Christian Boos, 13 years ago

Milestone: not applicable

Probably an InstallationIssue as it works for everybody else… (perhaps some kind of svn libraries mismatch between the bindings and the installed ones?).

See TracTroubleshooting and TracSubversion#Troubleshooting for hints about how you could dig deeper.

Parking the issue as a 3rd party issue…

comment:10 by Ryan J Ollos, 3 years ago

Milestone: not applicable

Closing since this is pretty old.

comment:11 by Ryan J Ollos, 3 years ago

Resolution: wontfix
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.