Bug 249528 - irc/ircd-hybrid bus error on 12.2-BETA2
Summary: irc/ircd-hybrid bus error on 12.2-BETA2
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Santhosh Raju
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-22 16:00 UTC by Greg Balfour
Modified: 2020-10-11 16:08 UTC (History)
0 users

See Also:
fox: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Greg Balfour 2020-09-22 16:00:01 UTC
Installed from packages running under VMware.

root@nextgen:/tmp # uname -a
FreeBSD nextgen.example.com 12.2-BETA2 FreeBSD 12.2-BETA2 r365865 GENERIC  amd64

root@nextgen:/tmp # file /usr/local/bin/ircd
/usr/local/bin/ircd: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for FreeBSD 12.1, FreeBSD-style, stripped

root@nextgen:/tmp # /usr/local/bin/ircd
Bus error (core dumped)

root@nextgen:/tmp # lldb -c /tmp/ircd.core -- /usr/local/bin/ircd
(lldb) target create "/usr/local/bin/ircd" --core "/tmp/ircd.core"
Core file '/tmp/ircd.core' (x86_64) was loaded.
(lldb) thread backtrace all
* thread #1, name = 'ircd', stop reason = signal SIGBUS
  * frame #0: 0x0000000800800bfd libc.so.7`fwrite + 205
    frame #1: 0x000000000023614c ircd`main + 76
    frame #2: 0x000000000022110f ircd`_start + 271
(lldb)
Comment 1 Santhosh Raju freebsd_committer freebsd_triage 2020-09-22 18:44:07 UTC
Thanks for the bug report.

I do not have immediate access to FreeBSD 12.2-BETA2, but it seems to be working as expected in 12.1.

Will look into it and get back.
Comment 2 Santhosh Raju freebsd_committer freebsd_triage 2020-09-23 01:25:25 UTC
(In reply to greg.bal4 from comment #0)

Does this problem happen even when running as non-root?
Comment 3 Greg Balfour 2020-09-23 02:55:23 UTC
It also happens when using the startup script which runs the program as user ircd.

root@nextgen:/tmp # /usr/local/etc/rc.d/ircd-hybrid start
Starting ircd_hybrid.
Bus error
/usr/local/etc/rc.d/ircd-hybrid: WARNING: failed to start ircd_hybrid


When running it via the startup script it occasionally produces a log file entry.

[2020-09-22T21:49:37-0500] Couldn't initialize the libltdl run time dynamic link library. Exiting.
Comment 4 Santhosh Raju freebsd_committer freebsd_triage 2020-10-07 10:07:12 UTC
(In reply to Greg Balfour from comment #3)

Apologies for the delayed reply, I was not able to replicate this issue.

Based on the error message you have shared, can you reinstall libltdl ( https://www.freshports.org/devel/libltdl ) and see if ircd-hybrid is still failing to work?
Comment 5 Santhosh Raju freebsd_committer freebsd_triage 2020-10-07 10:12:58 UTC
(In reply to Santhosh Raju from comment #4)

I am also not sure, but libtool ( https://www.freshports.org/devel/libtool ) might also be a suspect here here.
Comment 6 Greg Balfour 2020-10-08 16:49:02 UTC
I reinstalled libltdl and libtool and the problem persists.

I have now tried with 12.2-BETA3 and the latest quarterly packages
with the same result.  To reduce variables I did a clean install of
12.2-BETA3, then installed only the irc/ircd-hybrid package.
It pulled in libltdl but not libtool.  But I installed that too.

root@nextgen:~ # /usr/local/etc/rc.d/ircd-hybrid start
Starting ircd_hybrid.
Bus error
/usr/local/etc/rc.d/ircd-hybrid: WARNING: failed to start ircd_hybrid

root@nextgen:~ # uname -a
FreeBSD nextgen.example.com 12.2-BETA3 FreeBSD 12.2-BETA3 r366133 GENERIC  amd64

root@nextgen:~ # pkg info
ca_root_nss-3.57               Root certificate bundle from the Mozilla Project
indexinfo-0.3.1                Utility to regenerate the GNU info page index
ircd-hybrid-8.2.33             Fast irc daemon with a number of new features
libltdl-2.4.6                  System independent dlopen wrapper
libtool-2.4.6_1                Generic shared library support script
m4-1.4.18_1,1                  GNU M4
pkg-1.15.6                     Package manager

Note that this is under VMware.  No clue if that makes a difference.
Comment 7 Santhosh Raju freebsd_committer freebsd_triage 2020-10-08 17:03:43 UTC
(In reply to Greg Balfour from comment #6)

Thank you for going through and testing out package. I know it is not an easy task.

I did my testing in bhyve and virtualbox, I do not have access to a VMWare instance.

Would it be possible for you to try out ircd-hybrid in 12.1-RELEASE under VMWare and see if this issue persists? 

From what I understand you are pulling in the binary package directly using pkg(1) correct?

If that is the case, can you manually try building the port from the ports tree in 12.2-BETA3 and see if the problem persists?

The reason I ask that is because of this

> root@nextgen:/tmp # file /usr/local/bin/ircd
/usr/local/bin/ircd: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for FreeBSD 12.1, FreeBSD-style, stripped

I know sometimes binaries may break between minor releases and building the package natively might resolve the issue.

I am happy to provide any assistance needed for helping build the package.
Comment 8 Greg Balfour 2020-10-09 17:07:16 UTC
Rebuilding ircd-hybrid from the ports tree (just ircd-hybrid, using
packages for everything else) does resolve the issue.

root@nextgen:/usr/ports/irc/ircd-hybrid # /usr/local/etc/rc.d/ircd-hybrid start
Starting ircd_hybrid.
ircd: version hybrid-8.2.33(20200907_9618)
ircd: pid 15268
ircd: running in background mode from /usr/local

I assume when 12.2-RELEASE is out there will be packages built against
it so I can install everything using pkg(8).
Comment 9 Santhosh Raju freebsd_committer freebsd_triage 2020-10-11 16:08:25 UTC
(In reply to Greg Balfour from comment #8)

Glad it worked. Yeah I hope it will be resolved when packages are built against 12.2-RELEASE.

Closing the ticket for now, feel free to reopen in case the issue persists after 12.2-RELEASE.