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

Bug #876713 reported by Zaki Manian on 2011-10-17
24
This bug affects 3 people
Affects Status Importance Assigned to Milestone
gsoap (Ubuntu)
Undecided
Mattias Ellert
Oneiric
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)

Zaki Manian (zmanian) wrote :
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)

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

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.

Changed in gsoap (Ubuntu):
status: In Progress → Fix Committed

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
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

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.

Zaki Manian (zmanian) wrote :

I was able to change the state back to confirmed.

Changed in gsoap (Ubuntu):
status: Fix Released → Confirmed
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
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

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

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.

Martin Pitt (pitti) wrote :

Thanks for testing!

tags: added: verification-done
removed: verification-needed
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
Zaki Manian (zmanian) wrote :

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

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.

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?

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  Edit
Everyone can see this information.

Other bug subscribers