Opened 12 years ago

Closed 12 years ago

#34861 closed defect (fixed)

subversion: Could not create SASL context: generic failure

Reported by: benlaug_75@… Owned by: danielluke (Daniel J. Luke)
Priority: Normal Milestone:
Component: ports Version: 2.1.1
Keywords: Cc: blair (Blair Zajac), ibber_of_crew42@…, raimue (Rainer Müller), jmpp@…, landonf (Landon Fuller), nonstop.server@…
Port: subversion cyrus-sasl2

Description (last modified by ryandesign (Ryan Carsten Schmidt))

Subversion returns the following error for any action:

svn: E170001: Could not create SASL context: generic failure

The error happened with the version 2.1.25_0 of the cyrus-sasl2 port. This "fix" works:

sudo port activate cyrus-sasl2 @2.1.23_3+kerberos

Change History (30)

comment:1 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: blair@… added
Description: modified (diff)
Keywords: sasl svn subversion removed
Owner: changed from macports-tickets@… to dluke@…
Port: subversion added
Summary: subversion says could not create SASL contextsubversion: Could not create SASL context: generic failure

comment:2 Changed 12 years ago by danielluke (Daniel J. Luke)

What happened that caused this error to start appearing?

Did you just upgrade cyrus-sasl and subversion started failing? When you installed 2.1.25_0, did you specify any variants?

comment:3 Changed 12 years ago by benlaug_75@…

Nothing special, a selfupdate and upgrade outdated as usual (no variants).

Common commands causes this error : commit, update, checkout,...

comment:4 Changed 12 years ago by danielluke (Daniel J. Luke)

Are you running or connecting to a server that's configured to use sasl authentication? Can you give me some details on the config?

For what it's worth, I haven't seen any issues with any of the repos I use with 2.1.25_0+kerberos installed...

comment:5 Changed 12 years ago by benlaug_75@…

I use repositories without SASL auth and I use 10.7.4 with MacPorts 2.1.1.

comment:6 Changed 12 years ago by danielluke (Daniel J. Luke)

Can you provide exact steps to reproduce?

comment:7 Changed 12 years ago by lgillentine@…

I also was experiencing the same issue.

I also ran a selfupdate and upgrade outdated. (Those would be my steps to reproduce). The "fix" seems to work

comment:8 Changed 12 years ago by danielluke (Daniel J. Luke)

Someone who is having the issue please provide information so that the problem can be replicated:

Presumably it goes something like this:

  • Install subversion linked with cyrus-sasl2 2.1.23_3+kerberos
  • svn co /some repo/
  • upgrade cyrus-sasl2 to 2.1.25_0+kerberos
  • attempt to svn up the repo

Again, I'm not experiencing this problem (pulling from the macports repo, or locally created test repos), so either there is something specific to the repos you are using or something else different that we need to isolate to determine what the problem is.

comment:9 Changed 12 years ago by maurits@…

I had the same problem and the workaround works for me too. This is on Mac OS X 10.6.8. Note that I use subversion 1.7, but have the same problem in 1.6.

The generic failure I get is slightly more specific than what the original poster pasted:

svn: E170001: Could not create SASL context: generic failure: No such file or directory

(svn 1.6 simply says "svn: generic failure")

Indeed, what dluke mentions in the previous comment should replicate it. A simple 'svn ls' on a repo would suffice though.

You do need to try it with a repository using the svn+ssh protocol. For example, this works fine:

svn ls http://svn.zope.org/repos/main/zopetoolkit/doc

But this fails:

svn ls svn+ssh://svn.zope.org/repos/main/zopetoolkit/doc

That last one is only available when you are a Zope committer and have your ssh public key uploaded though, so that won't help most people here who want to try it, sorry. :-( Again, the workaround fixes it for me.

comment:10 Changed 12 years ago by danielluke (Daniel J. Luke)

Is this only happening on 10.6.x?

I don't (currently) have a 10.6 box to test on, which could explain why I can't reproduce the issue. (svn ls to a svn:ssh:// url works fine for me with cyrus-sasl2 2.1.25_0+kerberos installed).

If there are upstream bugs filed and/or patches that people have that we can test (and then integrate into the port) that would be great.

comment:11 Changed 12 years ago by danielluke (Daniel J. Luke)

Priority: HighNormal

comment:12 in reply to:  10 ; Changed 12 years ago by benlaug_75@…

Replying to dluke@…:

Is this only happening on 10.6.x?

I don't (currently) have a 10.6 box to test on, which could explain why I can't reproduce the issue. (svn ls to a svn:ssh:// url works fine for me with cyrus-sasl2 2.1.25_0+kerberos installed).

If there are upstream bugs filed and/or patches that people have that we can test (and then integrate into the port) that would be great.

Hi,

No sorry, I'm on Lion 10.7.4.

I have the problem, for instance, with the FFmpeg repository:

svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg

I also have a problem with my personal repository which is online since 6 years ago.

Thanks

comment:13 in reply to:  12 Changed 12 years ago by danielluke (Daniel J. Luke)

Replying to benlaug_75@…:

I have the problem, for instance, with the FFmpeg repository:

svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg

% port installed cyrus-sasl2
The following ports are currently installed:
  cyrus-sasl2 @2.1.25_0+kerberos+universal (active)
% svn --version
svn, version 1.7.5 (r1336830)
   compiled May 17 2012, 13:25:49

Copyright (C) 2012 The Apache Software Foundation.
This software consists of contributions made by many people; see the NOTICE
file for more information.
Subversion is open source software, see http://subversion.apache.org/

The following repository access (RA) modules are available:

* ra_neon : Module for accessing a repository via WebDAV protocol using Neon.
  - handles 'http' scheme
  - handles 'https' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
  - with Cyrus SASL authentication
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme
* ra_serf : Module for accessing a repository via WebDAV protocol using serf.
  - handles 'http' scheme
  - handles 'https' scheme

% svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
A    ffmpeg/configure
...
[snip]
 U   ffmpeg
Checked out revision 26402.
% sw_vers
ProductName:	Mac OS X
ProductVersion:	10.7.4
BuildVersion:	11E53

I also have a problem with my personal repository which is online since 6 years ago.

comment:14 Changed 12 years ago by bjbrown+macports@…

I have this problem as well. Under Lion I just fished up the 2.1.23 Portfile from the svn repository as per the fix. But I just upgraded to Mountain Lion (Build 12A269) and set up a clean macports installation. Now I don't seem to be able to download the source files for 2.1.23. I'm trying to use revision @84980 of the cyrus-sasl2 Portfile. My log is below:

version:1
:debug:main epoch: in tree: 1 installed: 1
:debug:main openssl 1.0.1c_0 exists in the ports tree
:debug:main openssl 1.0.1c_0  is the latest installed
:debug:main openssl 1.0.1c_0  is active
:debug:main Merging existing variants '' into variants
:debug:main new fully merged portvariants: 
:debug:main Changing to port directory: /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/devel/openssl
:debug:main OS darwin/12.0.0 (Mac OS X 10.8) arch i386
:debug:main org.macports.load registered provides 'load', a pre-existing procedure. Target override will not be provided
:debug:main org.macports.unload registered provides 'unload', a pre-existing procedure. Target override will not be provided
:debug:main org.macports.distfiles registered provides 'distfiles', a pre-existing procedure. Target override will not be provided
:debug:main Using group file /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/_resources/port1.0/group/muniversal-1.0.tcl
:debug:main Reading variant descriptions from /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/_resources/port1.0/variant_descriptions.conf
:debug:main universal variant already exists, so not adding the default one
:debug:main No need to upgrade! openssl 1.0.1c_0 >= openssl 1.0.1c_0
:debug:main epoch: in tree: 0 installed: 0
:debug:main zlib 1.2.7_0 exists in the ports tree
:debug:main zlib 1.2.7_0  is the latest installed
:debug:main zlib 1.2.7_0  is active
:debug:main Merging existing variants '' into variants
:debug:main new fully merged portvariants: 
:debug:main Changing to port directory: /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/archivers/zlib
:debug:main OS darwin/12.0.0 (Mac OS X 10.8) arch i386
:debug:main org.macports.load registered provides 'load', a pre-existing procedure. Target override will not be provided
:debug:main org.macports.unload registered provides 'unload', a pre-existing procedure. Target override will not be provided
:debug:main org.macports.distfiles registered provides 'distfiles', a pre-existing procedure. Target override will not be provided
:debug:main Using group file /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/_resources/port1.0/group/xcodeversion-1.0.tcl
:debug:main adding the default universal variant
:debug:main Reading variant descriptions from /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/_resources/port1.0/variant_descriptions.conf
:debug:main No need to upgrade! zlib 1.2.7_0 >= zlib 1.2.7_0
:msg:main --->  Computing dependencies for cyrus-sasl2:info:main .:debug:main cyrus-sasl2 has no conflicts
:debug:main Searching for dependency: openssl
:debug:main Found Dependency: receipt exists for openssl
:debug:main Searching for dependency: zlib
:debug:main Found Dependency: receipt exists for zlib
:msg:main 
:debug:main Executing org.macports.main (cyrus-sasl2)
:debug:main changing euid/egid - current euid: 0 - current egid: 0
:debug:main egid changed to: 501
:debug:main euid changed to: 502
:debug:archivefetch archivefetch phase started at Sun Jul 29 23:36:22 EDT 2012
:msg:archivefetch --->  Fetching archive for cyrus-sasl2
:debug:archivefetch Executing org.macports.archivefetch (cyrus-sasl2)
:debug:archivefetch euid/egid changed to: 0/0
:debug:archivefetch chowned /opt/local/var/macports/incoming to macports
:debug:archivefetch euid/egid changed to: 502/501
:info:archivefetch --->  cyrus-sasl2-2.1.23_3+kerberos.darwin_12.x86_64.tbz2 doesn't seem to exist in /opt/local/var/macports/incoming/verified
:msg:archivefetch --->  Attempting to fetch cyrus-sasl2-2.1.23_3+kerberos.darwin_12.x86_64.tbz2 from http://packages.macports.org/cyrus-sasl2
:debug:archivefetch Fetching archive failed:: The requested URL returned error: 404
:debug:archivefetch Privilege de-escalation not attempted as not running as root.
:debug:fetch fetch phase started at Sun Jul 29 23:36:22 EDT 2012
:notice:fetch --->  Fetching distfiles for cyrus-sasl2
:debug:fetch Executing org.macports.fetch (cyrus-sasl2)
:info:fetch --->  patch-config_ltconfig doesn't seem to exist in /opt/local/var/macports/distfiles/cyrus-sasl2
:notice:fetch --->  Attempting to fetch patch-config_ltconfig from http://ykf.ca.distfiles.macports.org/MacPorts/mpdistfiles/cyrus-sasl2
:debug:fetch Fetching distfile failed:: The requested URL returned error: 404
:notice:fetch --->  Attempting to fetch patch-config_ltconfig from http://ftp.andrew.cmu.edu/pub/cyrus-mail/
:debug:fetch Fetching distfile failed:: The requested URL returned error: 404
:notice:fetch --->  Attempting to fetch patch-config_ltconfig from ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/
:debug:fetch Fetching distfile failed:: RETR response: 550
:notice:fetch --->  Attempting to fetch patch-config_ltconfig from http://distfiles.macports.org/cyrus-sasl2
:debug:fetch Fetching distfile failed:: The requested URL returned error: 404
:notice:fetch --->  Attempting to fetch patch-config_ltconfig from http://lil.fr.distfiles.macports.org/cyrus-sasl2
:debug:fetch Fetching distfile failed:: The requested URL returned error: 404
:notice:fetch --->  Attempting to fetch patch-config_ltconfig from http://her.gr.distfiles.macports.org/mirrors/macports/mpdistfiles/cyrus-sasl2
:debug:fetch Fetching distfile failed:: The requested URL returned error: 404
:notice:fetch --->  Attempting to fetch patch-config_ltconfig from http://aarnet.au.distfiles.macports.org/pub/macports/mpdistfiles/cyrus-sasl2
:debug:fetch Fetching distfile failed:: The requested URL returned error: 404
:notice:fetch --->  Attempting to fetch patch-config_ltconfig from http://jog.id.distfiles.macports.org/macports/mpdistfiles/cyrus-sasl2
:debug:fetch Fetching distfile failed:: The requested URL returned error: 404
:notice:fetch --->  Attempting to fetch patch-config_ltconfig from http://sea.us.distfiles.macports.org/macports/mpdistfiles/cyrus-sasl2
:debug:fetch Fetching distfile failed:: Operation too slow. Less than 1024 bytes/sec transferred the last 60 seconds
:notice:fetch --->  Attempting to fetch patch-config_ltconfig from http://svn.macports.org/repository/macports/distfiles/cyrus-sasl2
:debug:fetch Fetching distfile failed:: The requested URL returned error: 404
:error:fetch org.macports.fetch for port cyrus-sasl2 returned: fetch failed
:debug:fetch Error code: NONE
:debug:fetch Backtrace: fetch failed
    while executing
"portfetch::fetchfiles"
    (procedure "portfetch::fetch_main" line 17)
    invoked from within
"$procedure $targetname"
:info:fetch Warning: targets not executed for cyrus-sasl2: org.macports.activate org.macports.fetch org.macports.checksum org.macports.extract org.macports.patch org.macports.configure org.macports.build org.macports.destroot org.macports.install
:notice:fetch Please see the log file for port cyrus-sasl2 for details:
    /opt/local/var/macports/logs/_Users_bjbrown_Downloads_cyrus-sasl/cyrus-sasl2/main.log

Thanks

comment:15 in reply to:  14 ; Changed 12 years ago by danielluke (Daniel J. Luke)

Replying to bjbrown+macports@…:

I have this problem as well. Under Lion I just fished up the 2.1.23 Portfile from the svn repository as per the fix. But I just upgraded to Mountain Lion (Build 12A269) and set up a clean macports installation. Now I don't seem to be able to download the source files for 2.1.23. I'm trying to use revision @84980 of the cyrus-sasl2 Portfile.

I haven't been able to reproduce this, so there is likely some environment difference that we need to discover so we can fix this generically.

Having said that, it looks like your problem is that you didn't follow the instructions at https://trac.macports.org/wiki/howto/InstallingOlderPort (specifically, you didn't copy the files/ directory contents)

comment:16 in reply to:  15 Changed 12 years ago by bjbrown+macports@…

Replying to dluke@…:

Replying to bjbrown+macports@…:

I have this problem as well. Under Lion I just fished up the 2.1.23 Portfile from the svn repository as per the fix. But I just upgraded to Mountain Lion (Build 12A269) and set up a clean macports installation. Now I don't seem to be able to download the source files for 2.1.23. I'm trying to use revision @84980 of the cyrus-sasl2 Portfile.

I haven't been able to reproduce this, so there is likely some environment difference that we need to discover so we can fix this generically.

Having said that, it looks like your problem is that you didn't follow the instructions at https://trac.macports.org/wiki/howto/InstallingOlderPort (specifically, you didn't copy the files/ directory contents)

You're quite right, I didn't read that wiki page carefully enough this time. It worked fine once I downloaded the files. Thanks for the help, and sorry for the bother. I'll try and follow this bug so I can help test any fixes.

Benedict

comment:17 Changed 12 years ago by ibber_of_crew42@…

I cannot get the fix to work after upgrading to mountain lion and running the fix I get:

dyld: Library not loaded: /opt/local/lib/libsasl2.2.dylib
  Referenced from: /opt/local/bin/svn
  Reason: Incompatible library version: svn requires version 3.0.0 or later, but libsasl2.2.dylib provides version 0.0.0
Trace/BPT trap: 5

...For svn commands... Help?

comment:18 Changed 12 years ago by ibber_of_crew42@…

BTW I see a lot of post on the net from the Suse world and whatnot, which have this same issue with cyrus-sasl2 2.1.25... Maybe it should be pulled from macports (i.e. downgraded to 2.1.23)?

comment:19 Changed 12 years ago by ibber_of_crew42@…

Cc: ibber_of_crew42@… added

Cc Me!

comment:20 in reply to:  17 ; Changed 12 years ago by danielluke (Daniel J. Luke)

Replying to ibber_of_crew42@…:

I cannot get the fix to work after upgrading to mountain lion and running the fix

you mean you downgraded cyrus-sasl2?

If you do that, you probably need to rebuild anything/everything that uses cyrus-sasl2 since you're providing an older library instead of the current one it was built with.

(ie, you need to uninstall/clean/rebuild subversion)

comment:21 in reply to:  18 Changed 12 years ago by danielluke (Daniel J. Luke)

Replying to ibber_of_crew42@…:

BTW I see a lot of post on the net from the Suse world and whatnot, which have this same issue with cyrus-sasl2 2.1.25... Maybe it should be pulled from macports (i.e. downgraded to 2.1.23)?

Given that I can't reproduce the issue, and we haven't isolated what the actual problem is, that would seem to be a pretty extreme thing to do. If you had a pointer to a Suse (or other) bug report that indicated that they downgraded (and why), it would maybe be more convincing.

Having said that, doing so would really be up to the maintainer(s) of the cyrus-sasl2 port.

comment:22 in reply to:  20 Changed 12 years ago by ibber_of_crew42@…

Replying to dluke@…:

Replying to ibber_of_crew42@…:

I cannot get the fix to work after upgrading to mountain lion and running the fix

you mean you downgraded cyrus-sasl2?

If you do that, you probably need to rebuild anything/everything that uses cyrus-sasl2 since you're providing an older library instead of the current one it was built with.

(ie, you need to uninstall/clean/rebuild subversion)

Like before, there was no need to rebuild subversion but I had two active cyrus-sasl2's... And svn chose the newer one... I finally got it working by simply force removing cyrus-sasl2 altogether...

comment:23 Changed 12 years ago by raimue (Rainer Müller)

Cc: raimue@… jmpp@… landonf@… added
Port: cyrus-sasl2 added

Same problem for me with the valgrind repository:

$ svn info svn://svn.valgrind.org/valgrind/trunk
svn: E170001: Unable to connect to a repository at URL 'svn://svn.valgrind.org/valgrind/trunk'
svn: E170001: Could not create SASL context: generic failure

These are the related port versions and variants I have installed:

$ port -q installed \( subversion cyrus-sasl2 \) and active
  cyrus-sasl2 @2.1.25_1+kerberos+universal (active)
  subversion @1.7.5_0+bash_completion+universal (active)

I can confirm that this problem is caused by cyrus-sasl2 @2.1.25_1+kerberos+universal specifically. Reverting back to cyrus-sasl2 @2.1.23_3+kerberos+universal solved the problem for me as already indicated in the original report.

comment:24 Changed 12 years ago by nonstop.server@…

Cc: nonstop.server@… added

Cc Me!

comment:25 in reply to:  23 ; Changed 12 years ago by danielluke (Daniel J. Luke)

Replying to raimue@…:

Same problem for me with the valgrind repository:

[snip]

works for me:

% svn info svn://svn.valgrind.org/valgrind/trunk
Path: trunk
URL: svn://svn.valgrind.org/valgrind/trunk
Repository Root: svn://svn.valgrind.org/valgrind
Repository UUID: a5019735-40e9-0310-863c-91ae7b9d1cf9
Revision: 12834
Node Kind: directory
Last Changed Author: sewardj
Last Changed Rev: 12834
Last Changed Date: 2012-08-04 19:10:23 -0400 (Sat, 04 Aug 2012)

% port installed subversion cyrus-sasl2
The following ports are currently installed:
  cyrus-sasl2 @2.1.25_1+kerberos+universal (active)
  subversion @1.7.5_0 (active)

so... if we can figure out what is different between our systems, we might be able to figure out what is going on (and how to fix it).

comment:26 in reply to:  25 Changed 12 years ago by rr@…

Looks like it's a hostname problem. In the sasl code, if gethostname() returns a unqualified hostname (no dots), it does a getaddrinfo() on that name to attempt to get a fully-qualified name. If that fails, the sasl context creation fails.

So, "sudo hostname foo" where foo won't resolve will cause this error. And, for example, "sudo hostname foo.local" will get rid of the error (which may or may not be the correct solution depending on one's environment).

comment:27 Changed 12 years ago by danielluke (Daniel J. Luke)

Owner: changed from dluke@… to dluke@…

There was just an update to the cyrus-sasl2 port, could someone who is experiencing the issue upgrade and see if it resolves it for them?

comment:28 in reply to:  27 Changed 12 years ago by benlaug_75@…

Replying to dluke@…:

There was just an update to the cyrus-sasl2 port, could someone who is experiencing the issue upgrade and see if it resolves it for them?

Ok, I will test ASAP. Unfortunately, I have a lot of work to do until Monday.

comment:29 Changed 12 years ago by raimue (Rainer Müller)

I upgraded to cyrus-sasl2 @2.1.25_2+kerberos+universal and the problem is gone for me now. Thanks!

comment:30 Changed 12 years ago by danielluke (Daniel J. Luke)

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.