Edgewall Software
Modify

Opened 17 years ago

Closed 16 years ago

Last modified 15 years ago

#5752 closed defect (worksforme)

After installing svn-python Trac crashes

Reported by: davidgould@… Owned by: Christian Boos
Priority: high Milestone:
Component: version control Version: devel
Severity: critical Keywords: svn windows
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I've install the latest dev version 0.11 (from the latest branch) on my Windows 2000 machine. I create a trac environment and an svn repository. I then started the webserver (tracd) and could visit the localhost:8000 as expected. The svn warning about not find the svn repository came up so I then installed version 1.4.4 of svn-python. I restarted the webserver and clicked on the trac environment and python crashes. I've tried this both on a Windows 2000 machine and a Windows XP machine. Python crashes every time.

For further details please contact me at davidgould@…

Thanks.

Attachments (1)

python.txt (4.6 KB ) - added by anonymous 17 years ago.

Download all attachments as: .zip

Change History (24)

comment:1 by Christian Boos, 17 years ago

Component: generalversion control
Keywords: svn windows needinfo added
Owner: changed from Jonas Borgström to Christian Boos

You have some kind of binary incompatibility, as it works fine for me, Windows XP (x86) using either stock Python 2.3.5 or Python 2.4.2 and 2.5.1 from ActiveState, each using the SVN bindings installed with the corresponding svn-python-1.4.4.win32-py2.X.exe installer from tigris.

Please document the version of the binaries you're using.

comment:2 by Emmanuel Blot, 17 years ago

Reporter: changed from anonymous to davidgould@…
Version: devel

comment:3 by Jeffrey Hulten <jeffh@…>, 17 years ago

David,

This ticket requires more information from you before it can be worked on. Can you enter a comment with the binary version you are using for Python and the SVN-Python bindings?

Thanks,

Jeffrey Hulten

comment:4 by gareth@…, 17 years ago

I am also having this same problem.

I downloaded and installed in this order

svn-1.4.5-setup.exe python-2.5.1.msi svn-python-1.4.5.win32-py2.5.exe then I grabbed trac [6165] and followed the instructions for the windows standalone install.

I am not sure what to look for, it appears that Python has the SVN bindings

C:\Python25>python
Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from svn import core
>>> (core.SVN_VER_MAJOR, core.SVN_VER_MINOR, core.SVN_VER_MICRO, core.SVN_VER_PATCH)
(1, 4, 5, 5)

Please let me know how I can provide more debug info for you guys (if needed)

comment:5 by richard.webb@…, 17 years ago

I've just tried to set up 0.11 (latest revision) using the binaries mentioned in the previous post, and run into the same problem:

-Set up a trac environment without specifying an svn repository. Setup succeeds.

-Edit trac.ini to point to an svn repository. Attempting to browse to trac (running via tracd) now causes python to crash.

-Additionally, if i tried to create a new trac environment and specified an svn repository during the setup, then python crashed before setup was complete.

I then uninstalled svn1.4.5, installed svn1.4.4 (plus the matching svn-python) and recreated the repository. After doing that, i can now successfully browse the repository via trac.

in reply to:  5 ; comment:6 by easoney, 17 years ago

I have the same problem! This is my first time to intall Trac. Sad!

All components are (under winxp sp2) python: 2.4.4 trac: trac-0.10.4.win32.exe sqlite: pysqlite-2.3.4.win32-py2.4.exe clearSilver: clearsilver-0.9.14.win32-py2.4.exe svn: 1.4.5 svn py mod:svn-python-1.4.5.win32-py2.4.exe

When create a project, python.exe crash without any error message! after several try, I found that if svn_repository is not set, it is Ok! If it is set in process of trac-admin, python crash! If it is set in trac.ini after trac-admin create project successfully, then tracd crash when using IE browse the project url.

Any suggestion? is that a bug? It seems like that we have to use SVN 1.4.4 to get around it??? All of my code is under SVN 1.4.5 control, and I don't want to return to SVN 1.4.4 for using Trac …. :(

crying….#@$@$!%!%!%!

Replying to richard.webb@boldonjames.com:

I've just tried to set up 0.11 (latest revision) using the binaries mentioned in the previous post, and run into the same problem:

-Set up a trac environment without specifying an svn repository. Setup succeeds.

-Edit trac.ini to point to an svn repository. Attempting to browse to trac (running via tracd) now causes python to crash.

-Additionally, if i tried to create a new trac environment and specified an svn repository during the setup, then python crashed before setup was complete.

I then uninstalled svn1.4.5, installed svn1.4.4 (plus the matching svn-python) and recreated the repository. After doing that, i can now successfully browse the repository via trac.

in reply to:  6 comment:7 by easoney, 17 years ago

I try to return to SVN 1.4.4 just now, and everything is fine now… :( hope that repository created by SVN 1.4.5 can run peacefully under SVN 1.4.4…

Replying to easoney:

I have the same problem! This is my first time to intall Trac. Sad!

All components are (under winxp sp2) python: 2.4.4 trac: trac-0.10.4.win32.exe sqlite: pysqlite-2.3.4.win32-py2.4.exe clearSilver: clearsilver-0.9.14.win32-py2.4.exe svn: 1.4.5 svn py mod:svn-python-1.4.5.win32-py2.4.exe

When create a project, python.exe crash without any error message! after several try, I found that if svn_repository is not set, it is Ok! If it is set in process of trac-admin, python crash! If it is set in trac.ini after trac-admin create project successfully, then tracd crash when using IE browse the project url.

Any suggestion? is that a bug? It seems like that we have to use SVN 1.4.4 to get around it??? All of my code is under SVN 1.4.5 control, and I don't want to return to SVN 1.4.4 for using Trac …. :(

crying….#@$@$!%!%!%!

Replying to richard.webb@boldonjames.com:

I've just tried to set up 0.11 (latest revision) using the binaries mentioned in the previous post, and run into the same problem:

-Set up a trac environment without specifying an svn repository. Setup succeeds.

-Edit trac.ini to point to an svn repository. Attempting to browse to trac (running via tracd) now causes python to crash.

-Additionally, if i tried to create a new trac environment and specified an svn repository during the setup, then python crashed before setup was complete.

I then uninstalled svn1.4.5, installed svn1.4.4 (plus the matching svn-python) and recreated the repository. After doing that, i can now successfully browse the repository via trac.

comment:8 by Christian Boos, 17 years ago

Milestone: 0.11.1

Well, the Python bindings for 1.4.5 are working fine for me. I'm using ActiveState's Python though, not sure if that makes a difference.

ActivePython 2.5.1.1 (ActiveState Software Inc.) based on
Python 2.5.1 (r251:54863, May  1 2007, 17:47:05) [MSC v.1310 32 bit (Intel)] on win32

comment:9 by richard.webb@…, 17 years ago

I tried both the ActiveState and 'standard' versions of Python 2.5.1, and both resulted in a crash :(

I didn't mention my platform in my previous post - i was testing in a VirtualPC running Windows XP(SP2)

comment:10 by Christian Boos, 17 years ago

Works for me also for with Python 2.4 and the 1.4.5 bindings…

ActivePython 2.4.2 Build 248 (ActiveState Corp.) based on
Python 2.4.2 (#67, Oct 30 2005, 16:11:18) [MSC v.1310 32 bit (Intel)] on win32

Maybe it's the presence of some svn binaries from a different build is interfering, but for me it worked before and after installing the svn-1.4.5 command line package. You should check with a debugger to see what are the actual DLLs loaded in python.exe when running tracd, at the time it crashes.

I'm also on Windows XP(SP2), but not in a virtual host, though I doubt this makes any difference. So please try to get that list of DLLs, and a backtrace could give some hint as well.

by anonymous, 17 years ago

Attachment: python.txt added

comment:11 by richard.webb@…, 17 years ago

Is the attached any use?

Possibly some version conflict in libapr? I see that svn-1.4.4-setup.exe/svn-python-1.4.4.win32-py2.5.exe install the same version of libapr.dll, wheres svn-1.4.5-setup.exe/svn-python-1.4.5.win32-py2.5.exe install different versions.

comment:12 by Christian Boos, 17 years ago

Keywords: needinfo removed
Milestone: 0.11.1
Resolution: worksforme
Status: newclosed

Right, it's a libapr conflict. The bindings have loaded:

C:\Python25\lib\site-packages\libsvn\libapr-1.dll

but in the end, the one from the SVN package gets used:

C:\Program Files\Subversion\bin\libapr.dll

and it crashes there.

On my side, I only have the following libraries from the SVN package loaded in my Python process:

C:\Program Files\Subversion\iconv\_tbl_simple.so
C:\Program Files\Subversion\iconv\utf-8.so
C:\Program Files\Subversion\iconv\windows-1252.so

The only APR library which is loaded is the one from the Python bindings:

C:\Program Files\ActiveState\Python-2.5\Lib\site-packages\libsvn\libapr.dll

See the difference? In the above, I have libapr.dll there, not libapr-1.dll

You probably didn't do a clean install of the bindings, and had an old libapr-1.dll library in the Lib\site-packages\libsvn folder from a previous install (1.4.4 probably). That library somehow gets picked first. Even if the libapr.dll that is later found in the Subversion\bin folder is exactly the same as the libapr.dll that should also be in the Lib\site-packages\libsvn folder, it is probably used without having been correctly initialized (I bet the apr_initialize() happened in libapr-1.dll).

Bottom line: uninstall all you previous SVN python bindings packages, then do a clean re-install of 1.4.5: you should now have only libapr.dll in your Lib\site-packages\libsvn folder and all should be well ;-)

As a side note, I somehow fear the day when Subversion will make use of sqlite3: even more incompatibility nightmares to be expected…

in reply to:  12 comment:13 by anonymous, 17 years ago

Just in case anyone else seeing this crash has the same problem:

Replying to cboos:

You probably didn't do a clean install of the bindings, and had an old libapr-1.dll library in the Lib\site-packages\libsvn folder from a previous install (1.4.4 probably).

Almost, but not quite:

Turns out that the libapr-1.dll was installed by a set of python bindings built against Apache2.2 (the Subversion website has an Apache2.0 based build that installs libapr.dll and an Apache2.2 based build that installs libapr-1.dll). - so i basically had versions of SVN/Python-SVN installed built against different runtimes, and that seems to have upset things.

I feel slightly silly now, though it does strike me that releasing 2 different builds with the same .exe name is asking for this kind of confusion to happen :(

comment:14 by CDokolas, 17 years ago

I was trying to deploy Trac 0.11b2 as a pilot project these past two weeks and ran into the same problem. As soon as I uninstalled SVN 1.4.6, everything came back to normal. SVN 1.4.6 uses libapr 0.9.something while svn-python uses 1.2.12. Subversion puts its bin directory in the path, thus confusing svn-python. It also seems to me like svn-python looks first for a libapr.dll and then perhaps for a libapr-1.dll. This could be a bug in svn-python.

Some details: Windows XP, Apache 2.2, Python 2.5.2, svn-python-1.4.6.win32-py2.5

comment:15 by anonymous, 16 years ago

I have this problem too.

comment:16 by anonymous, 16 years ago

Resolution: worksforme
Status: closedreopened

in reply to:  15 comment:17 by anonymous, 16 years ago

Resolution: worksforme
Status: reopenedclosed

Replying to anonymous:

I have this problem too.

Okay, but it's already fairly clear that you have a libapr version conflict, so read everything already in this ticket and you should be able to solve it. Either way, it's not a problem with Trac. If you need further help you can ask in the MailingList or the IrcChannel.

comment:18 by anonymous, 16 years ago

Since it's an issue of which .dll gets found in the path first, changing the order of items in PATH will take care of it. Make sure that the Python path comes before the Subversion\bin path

… C:\Python25;C:\Python25\Scripts;C:\Program Files\Subversion\bin; …

comment:19 by wbinsh@…, 16 years ago

hi everyone. I have installed the subversion1.5.3 and I got same problem.I set the path like this: C:\Python25;C:\Python25\lib\site-package\libsvn;C:\Program Files\Subversion\bin and still don't work. I searched my svn and apache and python25 path and only found libapr.dll in python25\lib\site-package\libsvn directory ,in svn and apache's bin directory they only have libapr-1.dll. So I don't know if it's the same problem.

comment:20 by wbinsh@…, 16 years ago

Sorry I forgot to restart computer after set path environment variable. Now I can't even start apache.Windows event log said "Application Error. Error application: httpd.exe,version:2.2.10.0,Error module:libapr.dll,offset:0x00007e69". I commented out all added loadmodule statements and it works,if I add "LoadModule dav_svn modules/mod_dav_svn.so" error occurs.If I add "LoadModule python_module modules/mod_python.so" it's normal. Is there anything wrong with my softwares?

my details: Win Server2003 apache_2.2.10-win32-x86-openssl-0.9.8i.msi mod_python-3.3.1.win32-py2.5-Apache2.2.exe python-2.5.2.msi Setup-Subversion-1.5.3.msi svn-python-1.5.3.win32-py2.5.exe Genshi-0.5.1.win32-py2.5.exe setuptools-0.6c8-py2.5.egg Trac-0.11.1.win32.exe

comment:21 by anonymous, 16 years ago

Finally , I back to svn1.4.5 and worked.:(

comment:22 by pascal.paradis@…, 16 years ago

Hello

I've been configuring Trac (Trac 0.12dev-r7811) under Windows 2003 R2 this week and I encountered the same problem as described.

I followed the http://trac.edgewall.org/wiki/TracOnWindows instructions. Except I had SVN 1.5.1 and Apache 2.2.9 already configured on this machine.

What I discovered is the libapr.dll causing trouble was bundled with the python bindings 1.4.5. The right libapr you need is named libapr-1.dll and bundled with svn-python bindings version 1.5.5 compiled against Apache 2.2.9 (File version is 1.3.0).

I solved the error by using these steps.

  1. Backup your files for safety.
  1. Stop Apache
  1. Uprading SVN to the lastest version (1.5.5) wich also implies that you need to upgrade apache modules.
  1. Delete SVN bindings version 1.4.5. Delete all references to libapr (File version 0.9.17.0 bundled with bindings 1.4.5) in your apache folder and your python folder.
  1. Install http://subversion.tigris.org/files/documents/15/44597/svn-python-1.5.5.win32-py2.5.exe with easy_install.
  1. Copy all the dlls bundled with svn-python 1.5.5 in your apache bin folder.

The trick resides in the fact that you need to have the right python svn bindings installed on your computer. And your apache bin folder need to have the exact same dll than your python bindings.

comment:23 by anonymous, 15 years ago

FIXED!!!

My upgrade of Apache, SVN and Trac was going fine; I had all the programs running great on their own, but there was one very crucial problem left to overcome: Trac could see the SVN repos while running on tracd, but Trac couldn't see the repos while running on Apache. I tried everything, had literally been so frustrated that I was going to switch to Bugzilla…I've literally days spent trying to get Trac to talk to SVN…uninstalling, reinstalling, moving files, adding little bits and pieces of Python code here and there, swapping versions of bindings, swapping module versions, reconfiguring Apache from mod_python to fcgi and back again, pouring over forums, tickets, email groups, installation instructions, etc…-you know, all that troubleshooting stuff we all know and love so well…and now, thanks to the clear comments above by pascal.paradis, it's all fixed. Pascal, thank you soooo much.

Apache/2.2.14 (Win32) DAV/2 SVN/1.6.6 mod_python/3.3.1 Python/2.5.4

I just stopped Apache, copied all the .dll files from /libsvn to my Apache /bin dir and restarted Apache. Everything now works perfectly. w00t!

-I have to say that this was undoubtedly the absolute worst upgrade procedure I've ever experienced. I understand that integrating these programs is a huge development task, and as a developer and sysadmin I appreciate all the work that goes into building all the associated parts and APIs, but there MUST be an easier upgrade path…from an engineering prospective the work done to improve Trac is fantastic, but from an end-user perspective, specifically the installation and configuration of it, Trac is a disjointed hodge-podge of instructions that usually carry the caveat of "your mileage may vary". Someone needs to focus on keeping the installation instructions clear and concise, or perhaps build and maintain an installer system that actually works….or both. -JMHO

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos 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.