Bug 194265 - Using sysutils/arcconf on FreeBSD 11 Current Causes Segmentation Fault
Summary: Using sysutils/arcconf on FreeBSD 11 Current Causes Segmentation Fault
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: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-09 08:47 UTC by Pete Long
Modified: 2015-03-29 11:35 UTC (History)
7 users (show)

See Also:


Attachments
Patch to update to 1.7 (902 bytes, patch)
2015-02-27 09:04 UTC, michael
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pete Long 2014-10-09 08:47:35 UTC
Hello,

This report is concerning arcconf from /usr/ports/sysutils/arcconf. When run as shown below there is no output except for "Segmentation fault (core dumped)". My RAID controller is an Adaptec 3405 model.

# arcconf getconfig 1 al

Running arcconf without any arguments or options displays a list of options as expected beginning with the text shown below.

| UCLI |  Adaptec by PMC uniform command line interface
| UCLI |  Version 1.6 (B21062)
| UCLI |  (C) Adaptec by PMC 2003-2014
| UCLI |  All Rights Reserved


This issue was previously fixed as can be seen in bug report 189668 but seems to have resurfaced albeit in a slightly different form. When the issue first occurred in report 189668 my server would drop to a DB prompt and my SSH session would be terminated. Now I just get the "Segmentation fault (core dumped)" message.

Incidentally my email address has now changed to pete@valar.uk.net.

If it helps at all, here is some gdb output on the core file.

# gdb
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-marcel-freebsd".
(gdb) core arcconf.core
Core was generated by `arcconf'.
Program terminated with signal 11, Segmentation fault.
#0  0x00000000005bb00d in ?? ()
(gdb) bt
#0  0x00000000005bb00d in ?? ()
#1  0x000000080201858c in ?? ()
#2  0x00007fffffffebf8 in ?? ()
#3  0x01007fffffffc810 in ?? ()
#4  0x00000008020cf288 in ?? ()
#5  0x00007fffffffe094 in ?? ()
#6  0x0000000500675358 in ?? ()
#7  0x0000000000000000 in ?? ()
(gdb) quit


Here are some more details about my system and kernel.

FreeBSD 11.0-CURRENT #0 r272734 amd64

Custom kernel:

/usr/obj/usr/src/sys/PETEKERN20141008

The only changes I've made are below:

(the "Wireless NIC cards" section is completely commented)

options         ALTQ
options         ALTQ_CBQ        # Class Bases Queuing (CBQ)
options         ALTQ_RED        # Random Early Detection (RED)
options         ALTQ_RIO        # RED In/Out
options         ALTQ_HFSC       # Hierarchical Packet Scheduler (HFSC)
options         ALTQ_PRIQ       # Priority Queuing (PRIQ)
options         ALTQ_NOPCC      # Required for SMP build

device          lagg


The same reported issue occurs on an unmodified GENERIC kernel.

I've also tried to apply the previously created patch but to me it seems like it's already been included.


# cd

# vim aac_patch

# cd /sys/dev/aac ; patch < /root/aac_patch

Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|Index: aac.c
|===================================================================
|--- aac.c      (revision 266123)
|+++ aac.c      (working copy)
--------------------------
Patching file aac.c using Plan A...
Reversed (or previously applied) patch detected!  Assume -R? [y] y
Hunk #1 succeeded at 1408.
Hmm...  Ignoring the trailing garbage.
done

# arcconf getconfig 1 al
Segmentation fault (core dumped)


Hopefully the information above is sufficient but please don't hesitate to contact me (pete@valar.uk.net) if you require further information or test results.

Thanks for your time.

Regards,

Pete.
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2014-10-09 08:47:35 UTC
Maintainers CC'd
Comment 2 John Marino freebsd_committer freebsd_triage 2014-11-01 09:49:14 UTC
This PR "timed out" but there is no attached patch so there's nothing the committers can do.  I'm moving this PR out of "triage" to "open" status.
Comment 3 Palle Girgensohn freebsd_committer freebsd_triage 2015-02-16 16:47:24 UTC
same problem here. is there no known fix?

Palle
Comment 4 David.Boyd49 2015-02-16 18:03:17 UTC
This isn"t new with 11-CURRENT ... I have the same problem on 9.3-RELEASE and 10.1-RELEASE.

The segmentation fault seems to be adapter specific ... it occurs with 2820SA and 3405 (as reported by Pete), but doesn't occur with 3805.  I no longer have the 3405 but can test any fix(es) for 28020SA.
Comment 5 michael 2015-02-27 09:04:59 UTC
Created attachment 153572 [details]
Patch to update to 1.7

Please test 1.7 instead of 1.6
Comment 6 Palle Girgensohn freebsd_committer freebsd_triage 2015-02-27 09:28:30 UTC
Tried 1.7, same error, unfortunately

/usr/local/etc/periodic/daily/410.status-aac-raid 

Checking status of Adaptec RAID:
Segmentation fault (core dumped)
Segmentation fault (core dumped)


(gdb) bt
#0  0x00000000005d04dc in AIF_FibThreadProcessing ()
#1  0x000000000055a539 in fsaEnumChannelCallback ()
#2  0x00000000005ae5f8 in ArcSystem::fsaEnumAdapterCallback ()
#3  0x00000000004a4e50 in std::operator+<char, std::char_traits<char>, std::allocator<char> > ()
#4  0x0000000000424449 in dllSafeDeleteStorArc ()
#5  0x000000000040977e in ?? ()
#6  0x00000008007db000 in ?? ()
#7  0x0000000000000000 in ?? ()
Comment 7 Palle Girgensohn freebsd_committer freebsd_triage 2015-02-27 09:28:47 UTC
Tried 1.7, same error, unfortunately

/usr/local/etc/periodic/daily/410.status-aac-raid 

Checking status of Adaptec RAID:
Segmentation fault (core dumped)
Segmentation fault (core dumped)


(gdb) bt
#0  0x00000000005d04dc in AIF_FibThreadProcessing ()
#1  0x000000000055a539 in fsaEnumChannelCallback ()
#2  0x00000000005ae5f8 in ArcSystem::fsaEnumAdapterCallback ()
#3  0x00000000004a4e50 in std::operator+<char, std::char_traits<char>, std::allocator<char> > ()
#4  0x0000000000424449 in dllSafeDeleteStorArc ()
#5  0x000000000040977e in ?? ()
#6  0x00000008007db000 in ?? ()
#7  0x0000000000000000 in ?? ()
Comment 8 Palle Girgensohn freebsd_committer freebsd_triage 2015-02-27 09:44:41 UTC
Of course, it might still help someone else, I'll be happy to commit the patch if someone can prove it works. For me it fails, I don't have access to many adaptec controllers at the moment.
Comment 9 David.Boyd49 2015-03-09 20:26:50 UTC
Just for grins, I tried the arcconf command line utility on CentOS 7.0 with Adaptec 2820SA ... the results are the same for both 1.6 and 1.7 (segfault).

It appears that this utility is released by Adaptec with this error inherent.

I found that the arcconf command line utility included with asm v7.30.18837 does work for FreeBSD and CentOS.
Comment 10 Kurt Jaeger freebsd_committer freebsd_triage 2015-03-10 11:18:10 UTC
testing@work
Comment 11 commit-hook freebsd_committer freebsd_triage 2015-03-10 11:31:14 UTC
A commit references this bug:

Author: pi
Date: Tue Mar 10 11:31:07 UTC 2015
New revision: 380907
URL: https://svnweb.freebsd.org/changeset/ports/380907

Log:
  sysutils/arcconf: 1.6 -> 1.7

  PR:		194265
  Submitted by:	michael@fuckner.net (maintainer)

Changes:
  head/sysutils/arcconf/Makefile
  head/sysutils/arcconf/distinfo
Comment 12 Bartek Rutkowski freebsd_committer freebsd_triage 2015-03-29 11:35:21 UTC
The fix has been already committed, so I am closing this PR.