Bug 205001 - databases/db5: Core dumps on armv6hf architecture
Summary: databases/db5: Core dumps on armv6hf architecture
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm Any
: --- Affects Many People
Assignee: Matthias Andree
URL:
Keywords: crash, easy, needs-qa, patch
Depends on:
Blocks:
 
Reported: 2015-12-03 21:52 UTC by dave
Modified: 2015-12-23 20:30 UTC (History)
4 users (show)

See Also:
mandree: maintainer-feedback+
koobs: merge-quarterly?


Attachments
Patch to add armv6hf to the cases where posix mutexes are used (438 bytes, patch)
2015-12-03 21:52 UTC, dave
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description dave 2015-12-03 21:52:13 UTC
Created attachment 163827 [details]
Patch to add armv6hf to the cases where posix mutexes are used

successfully compiled portupgrade on armv6hf platform, but when invoked it core dumps. trace shows illegal instruction in the db5 library.

the Makefile notes that db5 uses a deprecated function and enables posix mutexes for aarch64 and armv6 architectures (references FreeBSD bug #197227)

If I do the same for armv6hf I can successfully run portupgrade

patch to Makefile attached
Comment 1 mikael.urankar 2015-12-04 10:40:27 UTC
Can we do something like that instead?
.if ${ARCH} == "aarch64" || ${ARCH:Marmv6*}
Comment 2 Michael Moll freebsd_committer 2015-12-16 12:32:54 UTC
Can we please also fix this in the other db* ports? ;)
Comment 3 Matthias Andree freebsd_committer 2015-12-18 07:44:35 UTC
db48 needs to die.

I will patch db6 as well.
Comment 4 commit-hook freebsd_committer 2015-12-19 11:04:32 UTC
A commit references this bug:

Author: mandree
Date: Sat Dec 19 11:03:37 UTC 2015
New revision: 404013
URL: https://svnweb.freebsd.org/changeset/ports/404013

Log:
  Fix crash by using POSIX mutexes on all armv6* ARCHes not just armv6.

  This is to fix illegal-instruction crashes on armv6hf.

  PR:		205001
  Submitted by:	dave@dogwood.com
  Reviewed by:	mikael.urankar@gmail.com
  MFH:		2015Q4

Changes:
  head/databases/db5/Makefile
  head/databases/db6/Makefile
Comment 5 Matthias Andree freebsd_committer 2015-12-19 11:07:09 UTC
requesting MFH permission from portmgr@
Comment 6 Mathieu Arnold freebsd_committer 2015-12-19 17:05:06 UTC
over to the correct team.
Comment 7 commit-hook freebsd_committer 2015-12-22 08:46:39 UTC
A commit references this bug:

Author: mandree
Date: Tue Dec 22 08:46:33 UTC 2015
New revision: 404223
URL: https://svnweb.freebsd.org/changeset/ports/404223

Log:
  MFH: r401088 r404013

  As with armv6 we need to use POSIX mutexes. Without this the ports try to
  use fcntl mutexes and fails as they are deprecated.

  Approved by:	mandree (maintainer)
  Differential Revision:	https://reviews.freebsd.org/D4107

  Fix crash by using POSIX mutexes on all armv6* ARCHes not just armv6.

  This is to fix illegal-instruction crashes on armv6hf.

  PR:		205001
  Submitted by:	dave@dogwood.com
  Reviewed by:	mikael.urankar@gmail.com
  Approved by:	ports-secteam (feld@)

Changes:
_U  branches/2015Q4/
  branches/2015Q4/databases/db48/Makefile
  branches/2015Q4/databases/db5/Makefile
  branches/2015Q4/databases/db6/Makefile