Soap bind always tries IPV6_V6ONLY on bind and fails with " Protocol not available"

Bug #876713 reported by Zaki Manian
24
This bug affects 3 people
Affects Status Importance Assigned to Milestone
gsoap (Ubuntu)
Fix Released
Undecided
Mattias Ellert
Oneiric
Fix Released
Undecided
Unassigned

Bug Description

Based on various bug reports, it seems like this problem was fixed upstream in 2.7.*. I'm investigating why it emerged here.

Here is the strace.

setsockopt(3, SOL_IPV6, IPV6_V6ONLY, [0], 4) = -1 ENOPROTOOPT (Protocol not available)
dup(2) = 4
fcntl(4, F_GETFL) = 0x8002 (flags O_RDWR|O_LARGEFILE)
fstat(4, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 3), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f377363e000
lseek(4, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek)
write(4, "soap bind: Protocol not availabl"..., 34soap bind: Protocol not available

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: gsoap 2.8.3-1
ProcVersionSignature: Ubuntu 3.0.0-12.20-generic 3.0.4
Uname: Linux 3.0.0-12-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 1.23-0ubuntu3
Architecture: amd64
Date: Mon Oct 17 10:54:53 2011
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110427.1)
ProcEnviron:
 LC_CTYPE=en_US.UTF-8
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: gsoap
UpgradeStatus: Upgraded to oneiric on 2011-08-31 (47 days ago)

Revision history for this message
Zaki Manian (zmanian) wrote :
Revision history for this message
Zaki Manian (zmanian) wrote :

Prepending ::ffff: to your IPv4 address fixes the problem.

I tried the upstream debian packages and found the same effect.

Gsoap 2.8.3 can be compiled with an option to disable to setsockopt to IPV6_V6ONLY. I'm not yes sure if this would be a better idea given the default response.

Changed in gsoap (Ubuntu):
assignee: nobody → Mattias Ellert (mattias-ellert-fysast)
Revision history for this message
Mattias Ellert (mattias-ellert-fysast) wrote :

Gsoap 2.8.3 will automatically enable the option to call setsockopt if you enable IPv6 support, and there is no option to disable this feature. In my opinion this option should not be forcefully be enabled in this way. I have contacted upstream for input on the matter.

Changed in gsoap (Ubuntu):
status: New → In Progress
Revision history for this message
Mattias Ellert (mattias-ellert-fysast) wrote :

This issue has been addressed in version 2.8.3-3 in debian unstable. I expect this version to be imported to ubuntu precise universe shortly. I attach a debdiff that applies the same patch to the version in ubuntu oneiric.

Revision history for this message
Mattias Ellert (mattias-ellert-fysast) wrote :
Changed in gsoap (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "This debdiff applies the patch from debian unstable to ubuntu oneiric" of this bug report has been identified as being a patch in the form of a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-sponsors please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gsoap - 2.8.3-3

---------------
gsoap (2.8.3-3) unstable; urgency=low

  * Fix an issue with IPv4 only sockets when IPv6 is enabled (LP: #876713)
  * Use dpkg's build flags
 -- Ubuntu Archive Auto-Sync <email address hidden> Tue, 01 Nov 2011 10:32:49 +0000

Changed in gsoap (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Mattias Ellert (mattias-ellert-fysast) wrote :

Hi!

This bug is only fixed in precise. It is not fixed in oneiric which is the release the bug was reported against.

I am unable to reopen the bug (i.e change the state to something else than Fix Released) even though I am the one assigned to the bug.

Searching the launchpad documentation, the original bug reporter should be able to reopen it - so Zaki, could you try.

Revision history for this message
Zaki Manian (zmanian) wrote :

I was able to change the state back to confirmed.

Changed in gsoap (Ubuntu):
status: Fix Released → Confirmed
Revision history for this message
Daniel Holbach (dholbach) wrote :

Closed the 'precise' task, opened a task for 'oneiric'. The whole process is explained at https://wiki.ubuntu.com/StableReleaseUpdates

Changed in gsoap (Ubuntu):
status: Confirmed → Fix Released
Changed in gsoap (Ubuntu Oneiric):
status: New → Confirmed
Revision history for this message
Daniel Holbach (dholbach) wrote :

Thanks for your work on this. Uploaded. It should be sitting in the SRU queue now.

Changed in gsoap (Ubuntu Oneiric):
status: Confirmed → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Hello Zaki, or anyone else affected,

Accepted gsoap into oneiric-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Revision history for this message
Mattias Ellert (mattias-ellert-fysast) wrote :

Reproduce bug with current verison:

ellert@ubuntu-oneiric:~/soap$ ./soaptest
Error 28 fault: SOAP-ENV:Server [no subcode]
"Protocol not available"
Detail: setsockopt IPV6_V6ONLY failed in soap_bind()
ellert@ubuntu-oneiric:~/soap$

Download and install new version:

ellert@ubuntu-oneiric:~$ wget -N https://launchpad.net/ubuntu/+archive/primary/+files/gsoap_2.8.3-1ubuntu1_amd64.deb
ellert@ubuntu-oneiric:~$ wget -N https://launchpad.net/ubuntu/+archive/primary/+files/libgsoap0_2.8.3-1ubuntu1_amd64.deb
ellert@ubuntu-oneiric:~$ sudo dpkg --install gsoap_2.8.3-1ubuntu1_amd64.deb libgsoap0_2.8.3-1ubuntu1_amd64.deb

Rerun test with new version:

ellert@ubuntu-oneiric:~/soap$ ./soaptest
ellert@ubuntu-oneiric:~/soap$

With the new version there is no error.

Revision history for this message
Mattias Ellert (mattias-ellert-fysast) wrote :
Revision history for this message
Martin Pitt (pitti) wrote :

Thanks for testing!

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gsoap - 2.8.3-1ubuntu1

---------------
gsoap (2.8.3-1ubuntu1) oneiric-proposed; urgency=low

  * Fix an issue with IPv4 only sockets when IPv6 is enabled (LP: #876713)
 -- Mattias Ellert <email address hidden> Sun, 23 Oct 2011 11:47:12 +0200

Changed in gsoap (Ubuntu Oneiric):
status: Fix Committed → Fix Released
Revision history for this message
Zaki Manian (zmanian) wrote :

I've observed this bug re-emerge in Ubuntu 13.10. I haven't checked 14.04 yet

Revision history for this message
Mattias Ellert (mattias-ellert-fysast) wrote :

Thank you for your comment. You are right, the bug was fixed upstream but remerged later due to a change to the meaning of the --enable-ipv6 flag in configure script. A fix has been applied to release 2.8.16-3. This version is now in 14.10 (utopic).

This issue was already reported upstream as http://sourceforge.net/p/gsoap2/bugs/959/.

The fix applied uses the proposed fix from the upstrem report that comes from opensuse.

Revision history for this message
Brian Peschel (brianp-occinc) wrote :

Any word if this fix will be applied to 14.04 (trusty)? Or should I assume since the last post is a year old that it won't be applied?

Revision history for this message
Mattias Ellert (mattias-ellert-fysast) wrote :

Since 14.04 is an LTS release I guess it would make sense to fix this. A debdiff is attached. In addition to a number of IPv6 fixes it also fixes an issue with the default include paths that has been fixed in later ubuntu versions. (With this update ubuntu 14.04 has rhe same patches as EPEL 7 that uses the same upstream version.)

The same test as before (see comment #13 and comment #14) can be used to verify the fix also for trusty.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.