[Trusty] iscsitarget-dkms 1.4.20.3+svn499-0ubuntu2.3 fails to build on linux-lts-xenial kernel

Bug #1732746 reported by Kleber Sacilotto de Souza
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
iscsitarget (Ubuntu)
Trusty
Fix Released
Medium
Thadeu Lima de Souza Cascardo
Xenial
Fix Released
Medium
Unassigned

Bug Description

[Impact]
iscsitarget-dkms will fail to build for 4.4.0 kernels on trusty, when their ABI start with 1, like in -100 or -101.

[Test Case]
Install different kernels, including 3.13, and 4.4, and 4.4.0-78, 4.4.0-81 and 4.4.0-101. That means different kernel base versions, different ABIs, including the offending one (that starts with 1), and the one that had not have the sock_recvmsg signature changed. All build successfully.

[Regression Potential]
Builds could fail with a future kernel or an old kernel we haven't tested with. A similar solution has already been applied to xenial. Some other way of calling dkms could make the build fail. Different ways have been tested in this case.

iscsitarget ADT tests are failing on Trusty with linux-meta-lts-xenial 4.4.0-101.124~14.04.1 due to iscsitarget-dkms 1.4.20.3+svn499-0ubuntu2.3 compilation failure.

amd64: https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-trusty/trusty/amd64/i/iscsitarget/20171115_174514_4fc3d@/log.gz

i386: https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-trusty/trusty/i386/i/iscsitarget/20171115_174142_4fc3d@/log.gz

ppc64el: https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-trusty/trusty/ppc64el/i/iscsitarget/20171115_174421_4fc3d@/log.gz

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

I'm so glad we removed that later due to being unmaintained :-/
See bug 1613758

But for this lets take a look at what recent stable updates trigger ...

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Iniital checks on testbed setup

1. dkms build against Trusty base kernel 3.13.0-135-generic - ok
2. dkms build against current Trusty HWE kernel 4.4.0-98-generic - ok
3. build against proposed Trusty HWE kernel 4.4.0-101-generic - the reported error

In detail it is:
/var/lib/dkms/iscsitarget/1.4.20.3+svn499/build/kernel/nthread.c: In function ‘do_recv’:
/var/lib/dkms/iscsitarget/1.4.20.3+svn499/build/kernel/nthread.c:129:2: error: too many arguments to function ‘sock_recvmsg’
  res = sock_recvmsg(conn->sock, &msg, len, MSG_DONTWAIT | MSG_NOSIGNAL);
  ^
In file included from include/linux/skbuff.h:29:0,
                 from include/linux/if_ether.h:23,
                 from include/uapi/linux/ethtool.h:17,
                 from include/linux/ethtool.h:17,
                 from include/linux/netdevice.h:42,
                 from include/net/sock.h:51,
                 from /var/lib/dkms/iscsitarget/1.4.20.3+svn499/build/kernel/iscsi.h:19,
                 from /var/lib/dkms/iscsitarget/1.4.20.3+svn499/build/kernel/nthread.c:16:
include/linux/net.h:220:5: note: declared here
 int sock_recvmsg(struct socket *sock, struct msghdr *msg, int flags);
     ^
=> http://paste.ubuntu.com/25979971/

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Really the prototype of sock_recvmsg changed ??
I don't think so, but we need to find what is going on. ? (insert a little bit of WTF here)

One odd thing - I see only in the bad case
applying patch compat-4.4.0-84.patch...patching file kernel/nthread.c

That is from:
/var/lib/dkms/iscsitarget/1.4.20.3+svn499/build/patches/compat-4.4.0-84.patch

And here comes an interesting bit:
- res = sock_recvmsg(conn->sock, &msg, MSG_DONTWAIT | MSG_NOSIGNAL);
+ res = sock_recvmsg(conn->sock, &msg, len, MSG_DONTWAIT | MSG_NOSIGNAL);

So the package already carries a compat patch (from where that comes from I don't know yet).
That patch is only applied to the new kernel in proposed.
And that makes it fail.

investigating ...

Changed in iscsitarget (Ubuntu):
status: New → Confirmed
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

So the problem came in with:
iscsitarget (1.4.20.3+svn499-0ubuntu2.3) trusty; urgency=medium

  * d/p/(porting|compat|enable)-4.4.0-84.patch:
    Add compat code to build with Ubuntu 4.4.0-84 (LP: #1701697)
··
 -- Thadeu Lima de Souza Cascardo <email address hidden> Wed, 12 Jul 2017 20:13:41 +0000

Per [1] this is applied if PATCH_MATCH matches.
But it is applied to 101 as that applies to "4\.4\.0-([1-7])"
Note: There is an implicit .* following

We would have to fix the rule to not patch it if >4.4.0.100

[1]: http://manpages.ubuntu.com/manpages/xenial/man8/dkms.8.html

Changed in iscsitarget (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

it worked in my local tests, but @cascardo since you wrote the initial patch - could you give that a review?

Also I haven't checked but if you brought the same change to Xenial it will need the same fix there.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hmm, bug 1701697 lists Xenial - I'd wait for Cascardos comment but would expect the same breakage there.

Changed in iscsitarget (Ubuntu):
assignee: nobody → Thadeu Lima de Souza Cascardo (cascardo)
Changed in iscsitarget (Ubuntu Trusty):
status: New → Triaged
Changed in iscsitarget (Ubuntu Xenial):
status: New → Incomplete
tags: added: patch
Revision history for this message
Thadeu Lima de Souza Cascardo (cascardo) wrote :

It happens that the match was no good, and we replaced it with a grep for the source that we uploaded for xenial. For some reason, we forgot about trusty, so I am applying the same fix we added in xenial which explains why linux-4.4.0-101-generic didn't hit the issue.

Cascardo.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Ok cascardo, that means it is fixed in Xenial and you'll take Trusty by moving your existing fix there then - thanks for the info - updating tasks.

Changed in iscsitarget (Ubuntu):
status: Triaged → Fix Released
Changed in iscsitarget (Ubuntu Xenial):
status: Incomplete → Fix Released
Changed in iscsitarget (Ubuntu Trusty):
assignee: nobody → Thadeu Lima de Souza Cascardo (cascardo)
description: updated
Revision history for this message
Thadeu Lima de Souza Cascardo (cascardo) wrote :
Changed in iscsitarget (Ubuntu Trusty):
status: Triaged → In Progress
importance: Undecided → Medium
Mathew Hodson (mhodson)
Changed in iscsitarget (Ubuntu):
importance: Undecided → Medium
Changed in iscsitarget (Ubuntu Xenial):
importance: Undecided → Medium
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Kleber, or anyone else affected,

Accepted iscsitarget into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/iscsitarget/1.4.20.3+svn499-0ubuntu2.4 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-trusty to verification-done-trusty. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-trusty. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in iscsitarget (Ubuntu Trusty):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-trusty
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Kleber, or anyone else affected,

Accepted iscsitarget into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/iscsitarget/1.4.20.3+svn499-0ubuntu2.5 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-trusty to verification-done-trusty. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-trusty. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Revision history for this message
Kellen Renshaw (krenshaw) wrote :

Hello,

Ran into this bug with iscsitarget 1.4.20.3+svn499-0ubuntu2.3, DKMS failed to build.

The module built successfully with:

root@fleet-bunny:~# dpkg -l | grep iscsitarget-dkms
ii iscsitarget-dkms 1.4.20.3+svn499-0ubuntu2.5

root@fleet-bunny:~# dkms status
iscsitarget, 1.4.20.3+svn499, 3.13.0-143-generic, x86_64: installed
iscsitarget, 1.4.20.3+svn499, 4.4.0-116-generic, x86_64: installed
iscsitarget, 1.4.20.3+svn499, 4.4.0-83-generic, x86_64: installed

tags: added: verification-done-trusty
removed: verification-needed-trusty
Mathew Hodson (mhodson)
no longer affects: iscsitarget (Ubuntu)
Revision history for this message
Andy Whitcroft (apw) wrote :

Hello Kleber, or anyone else affected,

Accepted iscsitarget into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/iscsitarget/1.4.20.3+svn499-0ubuntu2.6 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-trusty to verification-done-trusty. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-trusty. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

tags: added: verification-needed-trusty
removed: verification-done-trusty
Revision history for this message
Stefan Bader (smb) wrote :

The update is just adding a restriction for ADT testing, so verification is done via ADT.

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

This bug was fixed in the package iscsitarget - 1.4.20.3+svn499-0ubuntu2.6

---------------
iscsitarget (1.4.20.3+svn499-0ubuntu2.6) trusty; urgency=medium

  * Fix ADT requirements to run daemon test only when isolation
    level machine is available.

iscsitarget (1.4.20.3+svn499-0ubuntu2.5) trusty; urgency=medium

  * Fix daemon dep8 test so it really tests for the running
    daemon (LP: #1734855).

iscsitarget (1.4.20.3+svn499-0ubuntu2.4) trusty; urgency=medium

  * Remove compat code for 4.4.0-84 and detect sock_recvmsg signature
    during build. (LP: #1732746)

 -- Stefan Bader <email address hidden> Mon, 28 Jan 2019 11:16:06 +0100

Changed in iscsitarget (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for iscsitarget has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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.