Bug 192031 - [ctl] link_elf_obj: symbol icl_pdu_new_bhs undefined
Summary: [ctl] link_elf_obj: symbol icl_pdu_new_bhs undefined
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 10.0-STABLE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-22 12:12 UTC by Nils Beyer
Modified: 2014-07-29 06:02 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nils Beyer 2014-07-22 12:12:20 UTC
Hi,
================================================================================
root@discofox:/usr/src/#uname -v
FreeBSD 10.0-STABLE #11 r268979M: Tue Jul 22 09:29:37 CEST 2014     root@discofox.local:/usr/obj/usr/src/sys/GENERIC


root@discofox:/usr/src/#svnlite info
Path: .
Working Copy Root Path: /usr/src
URL: svn://svn.freebsd.org/base/stable/10
Relative URL: ^/stable/10
Repository Root: svn://svn.freebsd.org/base
Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Revision: 268981
Node Kind: directory
Schedule: normal
Last Changed Author: jhb
Last Changed Rev: 268976
Last Changed Date: 2014-07-22 06:39:16 +0200 (Tue, 22 Jul 2014)


root@discofox:/usr/src/#svnlite diff
Index: sys/amd64/conf/GENERIC
===================================================================
--- sys/amd64/conf/GENERIC      (revision 268981)
+++ sys/amd64/conf/GENERIC      (working copy)
@@ -348,3 +348,9 @@
 
 # VMware support
 device         vmx                     # VMware VMXNET3 Ethernet
+
+# VT
+nodevice        sc
+nodevice        vga
+device          vt
+device          vt_vga
Index: sys/cddl/compat/opensolaris/kern/opensolaris_cmn_err.c
===================================================================
--- sys/cddl/compat/opensolaris/kern/opensolaris_cmn_err.c      (revision 268981)
+++ sys/cddl/compat/opensolaris/kern/opensolaris_cmn_err.c      (working copy)
@@ -78,7 +78,7 @@
 assfail(const char *a, const char *f, int l)
 {
 
-       panic("solaris assert: %s, file: %s, line: %d", a, f, l);
+       printf("solaris assert: %s, file: %s, line: %d", a, f, l);
 
        return (0);
 }
@@ -88,6 +88,6 @@
     const char *f, int l)
 {
 
-       panic("solaris assert: %s (0x%jx %s 0x%jx), file: %s, line: %d",
+       printf("solaris assert: %s (0x%jx %s 0x%jx), file: %s, line: %d",
            a, lv, op, rv, f, l);
 }


root@discofox:/usr/src/#kldload iscsi
root@discofox:/usr/src/#kldload ctl
kldload: an error occurred while loading the module. Please check dmesg(8) for more details.


root@discofox:/usr/src/#dmesg -a | tail -10
iic15: <I2C generic I/O> on iicbus15
info: [drm] Supports vblank timestamp caching Rev 1 (10.10.2010).
info: [drm] Driver supports precise vblank timestamp query.
drmn0: taking over the fictitious range 0xc0000000-0xd0000000
fbd0 on drmn0
VT: Replacing driver "vga" with new "fb".
info: [drm] Initialized i915 1.6.0 20080730
Jul 22 14:08:27 discofox sshd[1141]: error: PAM: authentication error for root from 10.2.0.7
link_elf_obj: symbol icl_pdu_new_bhs undefined
linker_load_file: Unsupported file type


root@discofox:/usr/src/#nm /boot/kernel/iscsi.ko | grep icl_pdu_new_bhs
0000000000003580 t icl_pdu_new_bhs
================================================================================


Regards,
Nils
Comment 1 Nils Beyer 2014-07-25 09:29:48 UTC
A possible fix that works for me:
=================================================================================
Index: sys/cam/ctl/ctl_frontend.h
===================================================================
--- sys/cam/ctl/ctl_frontend.h  (revision 269086)
+++ sys/cam/ctl/ctl_frontend.h  (working copy)
@@ -78,7 +78,8 @@
        }; \
        DECLARE_MODULE(name, name ## _mod, SI_SUB_CONFIGURE, SI_ORDER_FOURTH); \
        MODULE_DEPEND(name, ctl, 1, 1, 1); \
-       MODULE_DEPEND(name, cam, 1, 1, 1)
+       MODULE_DEPEND(name, cam, 1, 1, 1); \
+       MODULE_DEPEND(name, icl, 1, 1, 1);
=================================================================================

and then rebuild the "ctl" module.

Fix is based on:

    http://seagull.teak.jp/blog/0203
Comment 2 commit-hook freebsd_committer freebsd_triage 2014-07-25 11:29:52 UTC
A commit references this bug:

Author: trasz
Date: Fri Jul 25 11:29:45 UTC 2014
New revision: 269088
URL: http://svnweb.freebsd.org/changeset/base/269088

Log:
  Fix ctl(4) kldload failure that manifested like this:

  link_elf_obj: symbol icl_pdu_new_bhs undefined

  PR:		192031
  Submitted by:	Nils Beyer (earlier version)
  MFC after:	3 days
  Sponsored by:	FreeBSD Foundation

Changes:
  head/sys/cam/ctl/ctl_frontend_iscsi.c
Comment 3 Nils Beyer 2014-07-25 12:02:55 UTC
Hi Edward,

thanks for comitting the patch. Manually applied here and works as well. As a 
side note, neither with your patch nor with my variation the "ctl" module is 
unloadable:
=================================================================================
#kldunload ctl ; dmesg -a | tail -1
kldunload: can't unload file: Invalid argument
ctlfe module unload - not possible for this module type
=================================================================================


Regards,
Nils
Comment 4 commit-hook freebsd_committer freebsd_triage 2014-07-28 22:26:16 UTC
A commit references this bug:

Author: trasz
Date: Mon Jul 28 22:25:27 UTC 2014
New revision: 269202
URL: http://svnweb.freebsd.org/changeset/base/269202

Log:
  MFC r269088:

  Fix ctl(4) kldload failure that manifested like this:

  link_elf_obj: symbol icl_pdu_new_bhs undefined

  PR:		192031
  Submitted by:	Nils Beyer (earlier version)
  Sponsored by:	FreeBSD Foundation

Changes:
_U  stable/10/
  stable/10/sys/cam/ctl/ctl_frontend_iscsi.c
Comment 5 Nils Beyer 2014-07-29 06:02:55 UTC
Revision 269202 (MFC r269088) fixes the issue...